diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2010-10-09 23:20:51 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2010-10-09 23:20:51 +0300 |
commit | acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8 (patch) | |
tree | 35890836c5773f47b87df4f694fda87070cd541c /src | |
parent | OS/2 and DOS: Be less verbose on signals. (diff) | |
download | xz-acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8.tar.xz |
lzmainfo: Use setmode() on DOS-like systems.
Diffstat (limited to '')
-rw-r--r-- | src/lzmainfo/lzmainfo.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lzmainfo/lzmainfo.c b/src/lzmainfo/lzmainfo.c index b5f36320..8bd43af6 100644 --- a/src/lzmainfo/lzmainfo.c +++ b/src/lzmainfo/lzmainfo.c @@ -20,6 +20,11 @@ #include "tuklib_progname.h" #include "tuklib_exit.h" +#ifdef TUKLIB_DOSLIKE +# include <fcntl.h> +# include <io.h> +#endif + static void lzma_attribute((noreturn)) help(void) @@ -171,6 +176,10 @@ main(int argc, char **argv) parse_args(argc, argv); +#ifdef TUKLIB_DOSLIKE + setmode(STDIN_FILENO, O_BINARY); +#endif + int ret = EXIT_SUCCESS; // We print empty lines around the output only when reading from |