aboutsummaryrefslogtreecommitdiff
path: root/src/xzdec
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-13 17:29:02 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-13 17:29:02 +0200
commit96c46df7deb231ea68a03d8d1da9de4c774e36d8 (patch)
tree6788af6a63bd9bdc77f318b7581b43e859e1a44c /src/xzdec
parentRemove dead directories from .gitignore. (diff)
downloadxz-96c46df7deb231ea68a03d8d1da9de4c774e36d8.tar.xz
Improve support for DOS-like systems.
Here DOS-like means DOS, Windows, and OS/2.
Diffstat (limited to '')
-rw-r--r--src/xzdec/xzdec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c
index c17b5790..44543f4d 100644
--- a/src/xzdec/xzdec.c
+++ b/src/xzdec/xzdec.c
@@ -24,8 +24,9 @@
#include <stdio.h>
#include <unistd.h>
-#ifdef _WIN32
+#ifdef DOSLIKE
# include <fcntl.h>
+# include <io.h>
#endif
#include "getopt.h"
@@ -408,7 +409,7 @@ main(int argc, char **argv)
lzma_stream strm = LZMA_STREAM_INIT;
// Some systems require setting stdin and stdout to binary mode.
-#ifdef _WIN32
+#ifdef DOSLIKE
setmode(fileno(stdin), O_BINARY);
setmode(fileno(stdout), O_BINARY);
#endif