[x264-devel] commit: binmode stdin on mingw, not just msvc (BugMaster )

git version control git at videolan.org
Wed Jun 4 00:53:48 CEST 2008


x264 | branch: master | BugMaster <BugMaster at narod.ru> | Sat May 24 01:09:07 2008 -0600| [02a04f2d03e80be3f66bb76fd1bc775216b0d37c]

binmode stdin on mingw, not just msvc

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=02a04f2d03e80be3f66bb76fd1bc775216b0d37c
---

 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 c7353e0..18c7c48 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -31,9 +31,12 @@
 #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 8484cad..d78461f 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



More information about the x264-devel mailing list