From: dj AT delorie DOT com (DJ Delorie) Subject: Re: using cat on binary files (CTRL-Z trauma) 29 Oct 1996 06:16:04 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199610291348.IAA08031.cygnus.gnu-win32@delorie.com> Original-To: kerr AT wizard DOT net Original-CC: noer AT cygnus DOT com, gnu-win32 AT cygnus DOT com In-reply-to: <199610290352.WAA05725@wizard.wizard.net> (kerr@wizard.net) Original-Sender: owner-gnu-win32 AT cygnus DOT com > Many UNIX programs don't specify WHAT??? O_BINARY is strictly a > MS-DOS artifact. Well, maybe Mac's have it, I don't know. There > _is_ no O_BINARY flag in UNIX, so I would hazard to guess that there > are _very_ few UNIX programs that use it. It's easy to add to the beginning of a unix program: #ifndef O_BINARY #define O_BINARY 0 #endif > I would suggest that for maximum compatibility files should default > to binary mode. We've had this discussion on the djgpp group many times. For some programs, it makes sense, but we almost always end up adding a command-line option to change the default. If cat were binary, and you cat'd two files with ^Z in them, when you read the file with another program, it stops at the first ^Z and you don't see the second file at all. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".