Commit e25403aa authored by ramiro's avatar ramiro

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

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16553 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a58b39ea
...@@ -875,6 +875,7 @@ HAVE_LIST=" ...@@ -875,6 +875,7 @@ HAVE_LIST="
roundf roundf
sdl sdl
sdl_video_size sdl_video_size
setmode
socklen_t socklen_t
soundcard_h soundcard_h
poll_h poll_h
...@@ -1823,6 +1824,7 @@ check_func inet_aton $network_extralibs ...@@ -1823,6 +1824,7 @@ check_func inet_aton $network_extralibs
check_func memalign check_func memalign
check_func mkstemp check_func mkstemp
check_func posix_memalign check_func posix_memalign
check_func_headers io.h setmode
check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetProcessTimes
check_header conio.h check_header conio.h
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include "avformat.h" #include "avformat.h"
#include <fcntl.h> #include <fcntl.h>
#ifdef HAVE_SETMODE
#include <io.h>
#endif
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -104,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) ...@@ -104,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
fd = 0; fd = 0;
} }
} }
#ifdef O_BINARY #ifdef HAVE_SETMODE
setmode(fd, O_BINARY); setmode(fd, O_BINARY);
#endif #endif
h->priv_data = (void *)(size_t)fd; h->priv_data = (void *)(size_t)fd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment