Bug 456449: checked in some more WinMobile WinCE porting changes from
authorwtc%google.com
Fri, 06 Feb 2009 00:12:20 +0000
changeset 4037 8a5e8073c45c7a6ada1601061d232a4059ace38d
parent 4036 6dac956daa5a626f2e8bae5fe21b668464b92cb8
child 4038 47994da012de5066c1947f8e94ec55cd67ae208e
push idunknown
push userunknown
push dateunknown
bugs456449
Bug 456449: checked in some more WinMobile WinCE porting changes from Brad Lassey <bugmail@lassey.us>. r=wtc. Modified Files: prio.c prlog.c
pr/src/io/prio.c
pr/src/io/prlog.c
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -45,16 +45,20 @@
 PRLock *_pr_flock_lock;
 PRCondVar *_pr_flock_cv;
 
 #ifdef WINCE
 /*
  * There are no stdin, stdout, stderr in Windows CE.  INVALID_HANDLE_VALUE
  * should cause all I/O functions on the handle to fail.
  */
+#define STD_INPUT_HANDLE  ((DWORD)-10)
+#define STD_OUTPUT_HANDLE ((DWORD)-11)
+#define STD_ERROR_HANDLE  ((DWORD)-12)
+
 static HANDLE GetStdHandle(DWORD nStdHandle)
 {
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     return INVALID_HANDLE_VALUE;
 }
 #endif
 
 void _PR_InitIO(void)
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -389,18 +389,20 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const
     }
     else
 #endif
     {
         newLogFile = fopen(file, "w");
         if (!newLogFile)
             return PR_FALSE;
 
+#ifndef WINCE  /* _IONBF does not exist in the Windows Mobile 6 SDK. */
         /* We do buffering ourselves. */
         setvbuf(newLogFile, NULL, _IONBF, 0);
+#endif
     }
     if (logFile
         && logFile != stdout
         && logFile != stderr
 #ifdef XP_PC
         && logFile != WIN32_DEBUG_FILE
 #endif
         ) {