summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-06-03 14:06:10 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-06-03 14:06:10 +0000
commitbf67bb10a18c0c3b428aaa979b33a4c35f10f240 (patch)
tree6b9d000ebf68102f8ed039dc958e14285efec3f7 /stream
parentc9280563fe3519a4a305a28cff3ee2f4368a76a4 (diff)
downloadmpv-bf67bb10a18c0c3b428aaa979b33a4c35f10f240.tar.bz2
mpv-bf67bb10a18c0c3b428aaa979b33a4c35f10f240.tar.xz
Files should be opened in binary mode on OS/2.
patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29346 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index e1f77bc2ab..e113e6788e 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -119,7 +119,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
filename++;
#endif
-#if defined(__CYGWIN__)|| defined(__MINGW32__)
+#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
m |= O_BINARY;
#endif
@@ -128,13 +128,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
// 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
}