This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
I/O redirection of binary data
- To: gnu-win32 at cygnus dot com
- Subject: I/O redirection of binary data
- From: Paul Wessel <pal dot wessel at geologi dot uio dot no>
- Date: Fri, 11 Sep 1998 11:32:15 -0600
- Cc: pal dot wessel at geologi dot uio dot no
Hi gnu-win32 experts-
POSIX recommends that one could use the b(inary) modifier
in fopen for portability since the b has no effect on POSIX
systems but may be needed in, say, MS-DOS. How can
I deal with this in redirection? I often have a program do
program > data
and data is supposed to be binary but under gnu-win32 I noticed
that the file size is incorrect (it is larger probably due to CR/LFs?)
compared to POSIX systems. This also causes problems when
trying to read the file with anotherprogram < data.
Are there any non-intrusive solutions? WHen using stdout I am
not using fopen so I cannot easily use the binary flag...
Prof. Paul Wessel
Visiting Professor
Institute for Geologi
P.B. 1047 Blindern
N-0316 Oslo, Norway
+47 22857326
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".