From b2b2956e017305410b463ee04d73aa069f1d0836 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Jul 2005 18:24:42 +0000 Subject: (main): Avoid setmode; use POSIX-specified routines instead. --- src/split.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/split.c') 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; -- cgit v1.2.3-54-g00ecf