Not part of default build.
authordougt@meer.net
Tue, 04 Mar 2008 11:43:44 -0800
changeset 12561 f979914262b0e2b8ebc22b7ffc30efcf261abcd2
parent 12560 6e5b7c75a8df4cdf884f73c9b898f292a7573912
child 12562 ce87f83a217e4db30224c363026b5009539ecd42
push idunknown
push userunknown
push dateunknown
milestone1.9b5pre
Not part of default build.
build/wince/shunt/include/mozce_defs.h
build/wince/shunt/include/mozce_shunt.h
build/wince/shunt/stdio.cpp
build/wince/shunt/win32.cpp
--- a/build/wince/shunt/include/mozce_defs.h
+++ b/build/wince/shunt/include/mozce_defs.h
@@ -786,9 +786,20 @@ typedef struct
                                     //        to the background of the images
 } SHDRAGIMAGE, *LPSHDRAGIMAGE;
 
 #ifndef max
 #define max(a,b) (((a) > (b)) ? (a) : (b))
 #endif
 
 #define SHGetSpecialFolderPathW SHGetSpecialFolderPath
+
+// On Windows CE, there are some functions that are wide, but there
+// isn't a function named "functionW".
+
+#define SHGetPathFromIDListW SHGetPathFromIDList 
+#define GetUserNameW         GetUserName
+#define RemovePropW          RemoveProp
+#define GetPropW             GetProp
+#define SetPropW             SetProp
+#define FONTENUMPROCW        FONTENUMPROC
+#define GetLongPathNameW     GetLongPathName
 #endif // _MOZCE_DEFS
--- a/build/wince/shunt/include/mozce_shunt.h
+++ b/build/wince/shunt/include/mozce_shunt.h
@@ -120,49 +120,20 @@
 #define CreateDialogIndirectParamA CreateDialogIndirectParamW
 #define SystemParametersInfoA      SystemParametersInfoW
 #define DispatchMessageA           DispatchMessageW
 #define CallWindowProcA            CallWindowProcW
 #define GetWindowLongA             GetWindowLongW
 #define SetWindowLongA             SetWindowLongW
 #define GetMonitorInfoW           GetMonitorInfo
 
-#if 0
-#define GetProp                   GetPropA
-#define SetProp                   SetPropA
-#define RemoveProp                RemovePropA
-
-
-#define SetWorldTransform         SetWorldTransform
-#define GetWorldTransform         GetWorldTransform
-#define SetGraphicsMode           SetGraphicsMode
-
-#define ScriptFreeCache           ScriptFreeCache
-
-#undef GetProcAddress
+#undef  GetProcAddress
 #define GetProcAddress            GetProcAddressA
 
 
-
-// OutlineTextMetrics are tricky. It is a pain to convert W->A text metrics,
-// and we have no A functions. Because we do not define UNICODE, headers specify A function versions
-// We can override the function defines here, but can't override the typedefs (typedef TEXTMETRICW TEXTMETRIC)
-// A define is a hack around this, but it might fail elsewhere.
-// dougt code review
-#undef GetOutlineTextMetrics
-#define GetOutlineTextMetrics     GetOutlineTextMetricsW
-#undef GetTextMetrics
-#define GetTextMetrics            GetTextMetricsW
-#define OUTLINETEXTMETRIC         OUTLINETEXTMETRICW
-#define TEXTMETRIC                TEXTMETRICW
-#undef wsprintf
-#define wsprintf                wsprintfW
-
-#endif  //if 0
-
 //still need these
 #define GetCurrentDirectory       GetCurrentDirectoryW
 #define OpenSemaphore             OpenSemaphoreW
 #define SetCurrentDirectoryW      SetCurrentDirectoryW
 
 #endif // MOZCE_SHUNT_EXPORTS
 
 //////////////////////////////////////////////////////////
@@ -206,16 +177,19 @@ extern "C" {
   // From signal.cpp
   MOZCE_SHUNT_API int raise(int inSignal);
   MOZCE_SHUNT_API _sigsig signal(int inSignal, _sigsig inFunc);
 
   // From stat.cpp
   MOZCE_SHUNT_API int stat(const char *inPath, struct stat * outStat);
 
   // From stdio.cpp
+
+  MOZCE_SHUNT_API int _waccess(const wchar_t *path, int mode);
+
   MOZCE_SHUNT_API int access(const char *path, int mode);
   MOZCE_SHUNT_API void rewind(FILE* inStream);
   MOZCE_SHUNT_API FILE* fdopen(int inFD, const char* inMode);
   MOZCE_SHUNT_API void perror(const char* inString);
   MOZCE_SHUNT_API int remove(const char* inPath);
 
   MOZCE_SHUNT_API char* getcwd(char* buff, size_t size);
 
@@ -302,16 +276,18 @@ extern "C" {
   MOZCE_SHUNT_API DWORD GetShortPathName(LPCTSTR inLongPath, LPTSTR outShortPath, DWORD inBufferSize);
   MOZCE_SHUNT_API DWORD GetShortPathNameW(LPCWSTR aLPATH, LPWSTR aSPATH, DWORD aLen);
 
   MOZCE_SHUNT_API DWORD GetEnvironmentVariable(LPCSTR lpName, LPCSTR lpBuffer, DWORD nSize);
   MOZCE_SHUNT_API DWORD GetEnvironmentVariableW(LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize);
   MOZCE_SHUNT_API void GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
 
 
+  MOZCE_SHUNT_API DWORD GetLongPathNameW(LPCWSTR lpszShortPath, LPCWSTR lpszLongPath, DWORD cchBuffer);
+
   #define GetFullPathNameW GetFullPathName
   MOZCE_SHUNT_API DWORD GetFullPathName(const char* lpFileName, DWORD nBufferLength, const char* lpBuffer, const char** lpFilePart);
 
 //dd  MOZCE_SHUNT_API UINT GetACP(void);
 
   MOZCE_SHUNT_API BOOL mozce_PeekMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg);
   MOZCE_SHUNT_API BOOL mozce_GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
   MOZCE_SHUNT_API LONG GetMessageTime(void);
--- a/build/wince/shunt/stdio.cpp
+++ b/build/wince/shunt/stdio.cpp
@@ -88,22 +88,30 @@ int
         if(_fdtab[i].fd == -1)
             return i;
     }
     
     return -1;
 }
 
 
+MOZCE_SHUNT_API int _waccess(const wchar_t *path, int mode)
+{
+#ifdef API_LOGGING
+    mozce_printf("-- _waccess called\n");
+#endif
+    
+    return 0;
+}
 
 
 MOZCE_SHUNT_API int access(const char *path, int mode)
 {
 #ifdef API_LOGGING
-        mozce_printf("-- access called\n");
+    mozce_printf("-- access called\n");
 #endif
     
     return 0;
 }
 
 MOZCE_SHUNT_API void rewind(FILE* inStream)
 {
 #ifdef API_LOGGING
--- a/build/wince/shunt/win32.cpp
+++ b/build/wince/shunt/win32.cpp
@@ -547,24 +547,24 @@ MOZCE_SHUNT_API void GetSystemTimeAsFile
     mozce_printf("GetSystemTimeAsFileTime called\n");
 #endif
 
     SYSTEMTIME st;
     GetSystemTime(&st);
     SystemTimeToFileTime(&st,lpSystemTimeAsFileTime);
 }
 
-#ifndef MIN
-#define MIN(a,b) (((a)<(b)) ? (a) : (b))
+MOZCE_SHUNT_API DWORD GetLongPathNameW(LPCWSTR lpszShortPath, LPCWSTR lpszLongPath, DWORD cchBuffer)
+{
+#ifdef API_LOGGING
+    mozce_printf("GetLongPathNameW called\n");
 #endif
 
-
-#ifndef MAX
-#define MAX(a,b) (((a)>(b)) ? (a) : (b))
-#endif
+    return 0;
+}
 
 MOZCE_SHUNT_API DWORD GetFullPathName(const char* lpFileName,
                                       DWORD nBufferLength,
                                       const char* lpBuffer,
                                       const char** lpFilePart)
 {
 #ifdef API_LOGGING
     mozce_printf("GetFullPathName called\n");