# HG changeset patch # User diego # Date 1244037970 0 # Node ID cdd4453294c0e3885d8c5f5357104edcf492b7af # Parent 4f26b760cb37047d363f302f9e7e277511924013 Files should be opened in binary mode on OS/2. patch by KO Myung-Hun, komh chollian net diff -r 4f26b760cb37 -r cdd4453294c0 stream/stream_file.c --- 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 }