[xiph-commits] r3720 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Tue Sep 16 02:53:52 PDT 2008


Author: conrad
Date: 2008-09-16 02:53:52 -0700 (Tue, 16 Sep 2008)
New Revision: 3720

Modified:
   liboggz/trunk/src/tools/oggz_tools.c
Log:
Apply patch from dryeo, "OS/2 also needs to set stdin/stdout to binary"
Closes ticket:414


Modified: liboggz/trunk/src/tools/oggz_tools.c
===================================================================
--- liboggz/trunk/src/tools/oggz_tools.c	2008-09-16 09:51:58 UTC (rev 3719)
+++ liboggz/trunk/src/tools/oggz_tools.c	2008-09-16 09:53:52 UTC (rev 3720)
@@ -40,7 +40,7 @@
 #include <oggz/oggz.h>
 #include "dirac.h"
 
-#ifdef WIN32                                                                   
+#if defined (WIN32) || defined (__EMX__)
 #include <fcntl.h>    
 #include <io.h>
 #define snprintf _snprintf
@@ -464,11 +464,17 @@
 ot_init (void)
 {
 #ifdef _WIN32
-  /* We need to set stdin/stdout to binary mode */
+  /* We need to set stdin/stdout to binary mode on Win32 */
 
   _setmode( _fileno( stdin ), _O_BINARY );
   _setmode( _fileno( stdout ), _O_BINARY );
 #endif
+#ifdef __EMX__
+  /* We need to set stdin/stdout to binary mode on OS/2*/
+
+  setmode( fileno( stdin ), O_BINARY );
+  setmode( fileno( stdout ), O_BINARY );
+#endif
 }
 
 void



More information about the commits mailing list