changeset 29304:cdd4453294c0

Files should be opened in binary mode on OS/2. patch by KO Myung-Hun, komh chollian net
author diego
date Wed, 03 Jun 2009 14:06:10 +0000
parents 4f26b760cb37
children f502153807a9
files stream/stream_file.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_file.c	Wed Jun 03 13:42:11 2009 +0000
+++ b/stream/stream_file.c	Wed Jun 03 14:06:10 2009 +0000
@@ -119,7 +119,7 @@
     filename++;
 #endif
 
-#if defined(__CYGWIN__)|| defined(__MINGW32__)
+#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
   m |= O_BINARY;
 #endif
 
@@ -128,13 +128,13 @@
       // read from stdin
       mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
       f=0; // 0=stdin
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__OS2__)
 	  setmode(fileno(stdin),O_BINARY);
 #endif
     } else {
       mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
       f=1;
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__OS2__)
 	  setmode(fileno(stdout),O_BINARY);
 #endif
     }