mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
lzmainfo: Use setmode() on DOS-like systems.
This commit is contained in:
parent
ef364d3abc
commit
acbc4cdecb
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue