summaryrefslogtreecommitdiffstats
path: root/zcmp.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:25:23 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:25:23 +0000
commit8566aaafaa90f4d8225628f26b5d394292165a57 (patch)
treec652849f0274c7b8d1a5103faf77dd040ae9d8ca /zcmp.cc
parentAdding upstream version 1.0~rc6. (diff)
downloadzutils-8566aaafaa90f4d8225628f26b5d394292165a57.tar.xz
zutils-8566aaafaa90f4d8225628f26b5d394292165a57.zip
Adding upstream version 1.0~rc7.upstream/1.0_rc7
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--zcmp.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/zcmp.cc b/zcmp.cc
index c2fdd7a..0a4c1fc 100644
--- a/zcmp.cc
+++ b/zcmp.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"
@@ -357,8 +360,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() )