]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Use setmode() if it exists in <io.h>, and not based on O_BINARY.
authorramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 11 Jan 2009 22:05:43 +0000 (22:05 +0000)
committerramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 11 Jan 2009 22:05:43 +0000 (22:05 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16553 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

configure
libavformat/file.c

index 6916df471bd16550a69b94e1d493bc343a41242f..37af6c4bca0e4882b946ab8ecb69d54589b782de 100755 (executable)
--- a/configure
+++ b/configure
@@ -875,6 +875,7 @@ HAVE_LIST="
     roundf
     sdl
     sdl_video_size
+    setmode
     socklen_t
     soundcard_h
     poll_h
@@ -1823,6 +1824,7 @@ check_func  inet_aton $network_extralibs
 check_func  memalign
 check_func  mkstemp
 check_func  posix_memalign
+check_func_headers io.h setmode
 check_func_headers windows.h GetProcessTimes
 
 check_header conio.h
index e50168d89e8f8917bef4a8535c076a6abbf8177d..827541d1ae7b50634e98da762fa9a6113c9b5e9c 100644 (file)
@@ -22,6 +22,9 @@
 #include "libavutil/avstring.h"
 #include "avformat.h"
 #include <fcntl.h>
+#ifdef HAVE_SETMODE
+#include <io.h>
+#endif
 #include <unistd.h>
 #include <sys/time.h>
 #include <stdlib.h>
@@ -104,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
             fd = 0;
         }
     }
-#ifdef O_BINARY
+#ifdef HAVE_SETMODE
     setmode(fd, O_BINARY);
 #endif
     h->priv_data = (void *)(size_t)fd;