[FFmpeg-cvslog] r16553 - in trunk: configure libavformat/file.c

ramiro subversion
Sun Jan 11 23:05:43 CET 2009


Author: ramiro
Date: Sun Jan 11 23:05:43 2009
New Revision: 16553

Log:
Use setmode() if it exists in <io.h>, and not based on O_BINARY.

Modified:
   trunk/configure
   trunk/libavformat/file.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sun Jan 11 22:55:14 2009	(r16552)
+++ trunk/configure	Sun Jan 11 23:05:43 2009	(r16553)
@@ -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

Modified: trunk/libavformat/file.c
==============================================================================
--- trunk/libavformat/file.c	Sun Jan 11 22:55:14 2009	(r16552)
+++ trunk/libavformat/file.c	Sun Jan 11 23:05:43 2009	(r16553)
@@ -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, cons
             fd = 0;
         }
     }
-#ifdef O_BINARY
+#ifdef HAVE_SETMODE
     setmode(fd, O_BINARY);
 #endif
     h->priv_data = (void *)(size_t)fd;




More information about the ffmpeg-cvslog mailing list