From 02a04f2d03e80be3f66bb76fd1bc775216b0d37c Mon Sep 17 00:00:00 2001 From: BugMaster Date: Sat, 24 May 2008 01:09:07 -0600 Subject: [PATCH] binmode stdin on mingw, not just msvc --- common/osdep.h | 5 ++++- x264.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/osdep.h b/common/osdep.h index c7353e0d..18c7c487 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -31,9 +31,12 @@ #include #endif -#ifdef _MSC_VER +#ifdef _WIN32 #include // _setmode() #include // _O_BINARY +#endif + +#ifdef _MSC_VER #define inline __inline #define strcasecmp stricmp #define strncasecmp strnicmp diff --git a/x264.c b/x264.c index 8484cadd..d78461f3 100644 --- a/x264.c +++ b/x264.c @@ -90,7 +90,7 @@ int main( int argc, char **argv ) pthread_win32_thread_attach_np(); #endif -#ifdef _MSC_VER +#ifdef _WIN32 _setmode(_fileno(stdin), _O_BINARY); _setmode(_fileno(stdout), _O_BINARY); #endif -- 2.47.3