[SCM] libav/experimental: Use setmode() if it exists in <io.h>, and not based on O_BINARY.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:35:07 UTC 2013
The following commit has been merged in the experimental branch:
commit b507ebd1792da5e44088ddcab315b41cc500695b
Author: Ramiro Polla <ramiro.polla at gmail.com>
Date: Sun Jan 11 22:05:43 2009 +0000
Use setmode() if it exists in <io.h>, and not based on O_BINARY.
Originally committed as revision 16553 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/configure b/configure
index 6916df4..37af6c4 100755
--- 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
diff --git a/libavformat/file.c b/libavformat/file.c
index e50168d..827541d 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list