summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-08-01 07:10:57 +0000
committerJim Meyering <jim@meyering.net>2000-08-01 07:10:57 +0000
commitcf04cc6ec2f4b54dc2f3df1bf6789122a71acd90 (patch)
tree77b0629185df56991c4a87756f170d3248943c87 /src/tee.c
parentfe15457dcdf53d7b9f3f2757250f55dfd9cc4254 (diff)
downloadcoreutils-cf04cc6ec2f4b54dc2f3df1bf6789122a71acd90.tar.xz
(tee): Use SET_BINARY and SET_BINARY2.
From Prashant TR.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tee.c b/src/tee.c
index 2d86fcb80..43fec1e61 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]));
}
}