From acbc4cdecbeec2a4dfaac04f185ece49b2ff17c8 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 9 Oct 2010 23:20:51 +0300 Subject: [PATCH] lzmainfo: Use setmode() on DOS-like systems. --- src/lzmainfo/lzmainfo.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 +# include +#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