From: Jim Meyering Date: Tue, 1 Aug 2000 07:10:57 +0000 (+0000) Subject: (tee): Use SET_BINARY and SET_BINARY2. X-Git-Tag: TEXTUTILS-2_0g~34 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=cf04cc6ec2f4b54dc2f3df1bf6789122a71acd90;p=thirdparty%2Fcoreutils.git (tee): Use SET_BINARY and SET_BINARY2. From Prashant TR. --- diff --git a/src/tee.c b/src/tee.c index 2d86fcb80a..43fec1e61e 100644 --- a/src/tee.c +++ b/src/tee.c @@ -175,6 +175,8 @@ tee (int nfiles, const char **files) for (i = nfiles; i >= 1; i--) files[i] = files[i - 1]; + SET_BINARY2 (0, 1); + /* In the array of NFILES + 1 descriptors, make the first one correspond to standard output. */ descriptors[0] = stdout; @@ -192,6 +194,7 @@ tee (int nfiles, const char **files) else { SETVBUF (descriptors[i], NULL, _IONBF, 0); + SET_BINARY (fileno (descriptors[i])); } }