From: ramiro Date: Sun, 11 Jan 2009 22:05:43 +0000 (+0000) Subject: Use setmode() if it exists in , and not based on O_BINARY. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/commitdiff_plain/e25403aa8239a9d8d0f06d296bf5722bc6b07ea4 Use setmode() if it exists in , and not based on O_BINARY. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16553 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- diff --git a/configure b/configure index 6916df471..37af6c4bc 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 e50168d89..827541d1a 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -22,6 +22,9 @@ #include "libavutil/avstring.h" #include "avformat.h" #include +#ifdef HAVE_SETMODE +#include +#endif #include #include #include @@ -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;