]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): When stdout is in binary mode, make sure all
authorJim Meyering <jim@meyering.net>
Tue, 18 May 1999 14:13:33 +0000 (14:13 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 18 May 1999 14:13:33 +0000 (14:13 +0000)
input files are also read in binary mode.

src/cat.c

index 62789d60e6d297bc33869f307839221a45df9a86..37f47c96760942dea7948d91262fec755c69c32e 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -666,6 +666,9 @@ main (int argc, char **argv)
       /* Switch stdout to BINARY mode.  */
       binary_output = 1;
       SET_BINARY (output_desc);
+      /* When stdout is in binary mode, make sure all input files are
+        also read in binary mode.  */
+      file_open_mode |= O_BINARY;
     }
   else if (quote)
     {