From: Paul Eggert Date: Mon, 11 Jul 2005 18:24:42 +0000 (+0000) Subject: (main): Avoid setmode; use POSIX-specified routines instead. X-Git-Tag: CPPI-1_12~269 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2b2956e017305410b463ee04d73aa069f1d0836;p=platform%2Fupstream%2Fcoreutils.git (main): Avoid setmode; use POSIX-specified routines instead. --- diff --git a/src/split.c b/src/split.c index a93fdff..7c357c8 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;