diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-11 18:24:42 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-11 18:24:42 +0000 |
commit | b2b2956e017305410b463ee04d73aa069f1d0836 (patch) | |
tree | 33dc52107c9be6ca6dbc9b4364329a963f0039cd | |
parent | a40f69da685d71f86fe4407d28db5ae9fde25ca0 (diff) | |
download | coreutils-b2b2956e017305410b463ee04d73aa069f1d0836.tar.xz |
(main): Avoid setmode; use POSIX-specified routines instead.
-rw-r--r-- | src/split.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/split.c b/src/split.c index a93fdffed..7c357c8ef 100644 --- a/src/split.c +++ b/src/split.c @@ -541,7 +541,8 @@ main (int argc, char **argv) quote (infile)); /* Binary I/O is safer when bytecounts are used. */ - SET_BINARY (STDIN_FILENO); + if (O_BINARY && ! isatty (STDIN_FILENO)) + freopen (NULL, "rb", stdin); /* No output file is open now. */ output_desc = -1; |