diff --git a/mozilla/nsprpub/pr/src/Makefile.in b/mozilla/nsprpub/pr/src/Makefile.in index 44df1f6fd46..d6c38fad194 100644 --- a/mozilla/nsprpub/pr/src/Makefile.in +++ b/mozilla/nsprpub/pr/src/Makefile.in @@ -201,6 +201,10 @@ OS_LIBS = advapi32.lib wsock32.lib winmm.lib endif endif +ifeq ($(OS_TARGET),WINCE) +OS_LIBS = Ws2.lib +endif + ifeq ($(OS_TARGET),MacOSX) OS_LIBS = -framework CoreServices -framework CoreFoundation endif diff --git a/mozilla/nsprpub/pr/src/io/prfile.c b/mozilla/nsprpub/pr/src/io/prfile.c index 545fa712f7b..6545a48a4ad 100644 --- a/mozilla/nsprpub/pr/src/io/prfile.c +++ b/mozilla/nsprpub/pr/src/io/prfile.c @@ -719,7 +719,7 @@ PR_IMPLEMENT(PRStatus) PR_CreatePipe( #pragma unused (readPipe, writePipe) #endif -#ifdef WIN32 +#if defined(WIN32) && !defined(WINCE) HANDLE readEnd, writeEnd; SECURITY_ATTRIBUTES pipeAttributes; diff --git a/mozilla/nsprpub/pr/src/io/prio.c b/mozilla/nsprpub/pr/src/io/prio.c index be187756aba..29fcd9b4728 100644 --- a/mozilla/nsprpub/pr/src/io/prio.c +++ b/mozilla/nsprpub/pr/src/io/prio.c @@ -54,7 +54,7 @@ void _PR_InitIO(void) _pr_flock_lock = PR_NewLock(); _pr_flock_cv = PR_NewCondVar(_pr_flock_lock); -#ifdef WIN32 +#if defined(WIN32) && !defined(WINCE) _pr_stdin = PR_AllocFileDesc((PROsfd)GetStdHandle(STD_INPUT_HANDLE), methods); _pr_stdout = PR_AllocFileDesc((PROsfd)GetStdHandle(STD_OUTPUT_HANDLE), diff --git a/mozilla/nsprpub/pr/src/io/prlog.c b/mozilla/nsprpub/pr/src/io/prlog.c index 744340644fe..1f87d9918b5 100644 --- a/mozilla/nsprpub/pr/src/io/prlog.c +++ b/mozilla/nsprpub/pr/src/io/prlog.c @@ -99,6 +99,16 @@ static PRLock *_pr_logLock; #define WIN32_DEBUG_FILE (FILE*)-2 #endif +#ifdef WINCE +static void OutputDebugStringA(const char* msg) { + int len = MultiByteToWideChar(CP_ACP, 0, msg, -1, 0, 0); + WCHAR *wMsg = (WCHAR *)PR_Malloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, msg, -1, wMsg, len); + OutputDebugStringW(wMsg); + PR_Free(wMsg); +} +#endif + /* Macros used to reduce #ifdef pollution */ #if defined(_PR_USE_STDIO_FOR_LOGGING) && defined(XP_PC) @@ -107,7 +117,7 @@ static PRLock *_pr_logLock; if (logFile == WIN32_DEBUG_FILE) { \ char savebyte = buf[nb]; \ buf[nb] = '\0'; \ - OutputDebugString(buf); \ + OutputDebugStringA(buf); \ buf[nb] = savebyte; \ } else { \ fwrite(buf, 1, nb, fd); \ @@ -254,7 +264,7 @@ void _PR_InitLog(void) #ifdef XP_PC char* str = PR_smprintf("Unable to create nspr log file '%s'\n", ev); if (str) { - OutputDebugString(str); + OutputDebugStringA(str); PR_smprintf_free(str); } #else