]> granicus.if.org Git - libx264/commitdiff
binmode stdin on mingw, not just msvc
authorBugMaster <BugMaster@narod.ru>
Sat, 24 May 2008 07:09:07 +0000 (01:09 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Tue, 3 Jun 2008 22:21:28 +0000 (16:21 -0600)
common/osdep.h
x264.c

index c7353e0dac3baab7c5c93e0bb128947a66cbc2d4..18c7c4877476938062df195fbd468603a47b6411 100644 (file)
 #include <inttypes.h>
 #endif
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 #include <io.h>    // _setmode()
 #include <fcntl.h> // _O_BINARY
+#endif
+
+#ifdef _MSC_VER
 #define inline __inline
 #define strcasecmp stricmp
 #define strncasecmp strnicmp
diff --git a/x264.c b/x264.c
index 8484cadd5879a0c3af33706b9e5e625952d85225..d78461f36bc21df2f233c439288e7667e51b3ecc 100644 (file)
--- 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