summaryrefslogtreecommitdiffstats
path: root/zdiff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'zdiff.cc')
-rw-r--r--zdiff.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/zdiff.cc b/zdiff.cc
index 7419929..ee8c014 100644
--- a/zdiff.cc
+++ b/zdiff.cc
@@ -31,6 +31,9 @@
#include <stdint.h>
#include <unistd.h>
#include <sys/stat.h>
+#if defined(__MSVCRT__) || defined(__OS2__)
+#include <io.h>
+#endif
#include "arg_parser.h"
#include "zutils.h"
@@ -313,8 +316,8 @@ int main( const int argc, const char * const argv[] )
} // end process options
#if defined(__MSVCRT__) || defined(__OS2__)
- _fsetmode( stdin, "b" );
- _fsetmode( stdout, "b" );
+ setmode( STDIN_FILENO, O_BINARY );
+ setmode( STDOUT_FILENO, O_BINARY );
#endif
if( argind >= parser.arguments() )