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 /src/split.c | |
| parent | (open_next_file): Avoid setmode; use POSIX-specified routines instead. (diff) | |
| download | coreutils-b2b2956e017305410b463ee04d73aa069f1d0836.tar.gz coreutils-b2b2956e017305410b463ee04d73aa069f1d0836.zip | |
(main): Avoid setmode; use POSIX-specified routines instead.
Diffstat (limited to 'src/split.c')
| -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; |
