[GRASSLIST:5190] Re: newbie question
Eric G. Miller
egm2 at jps.net
Sun Dec 8 23:47:07 EST 2002
On Mon, Dec 09, 2002 at 04:13:28AM +0000, Glynn Clements wrote:
>
> Eric G. Miller wrote:
>
> > > If the filesystem was mounted in "text" mode, Cygwin will attempt to
> > > perform LF/CRLF translation, which will corrupt the files; in this
> > > case, you would need to start again, as any files which had been
> > > generated would already be corrupt.
> >
> > Hmm, does Cygwin open all files opened via open() in binary mode? I
> > should think so.
>
> Unfortunately, no. The file is opened in binary mode if you use the
> (Cygwin specific) O_BINARY flag in the call to open(), or if the file
> resides on a "filesystem" which was mounted in binary mode, or if
> $CYGWIN contains "binmode". Otherwise, it is opened in text mode.
Oh, I see. I guess the Cygwin folks must've had a good reason for this
decision. I'm not inclined to add O_BINARY hacks just for cygwin,
though I think some of the magic numbers in open.c could be replaced
by their appropriate symbolic constants O_RDONLY, O_WRONLY and O_RDWR;
even if they are 0, 1, and 2 everywhere...
--
"...the plural of anecdote is [not?] data." - attrib. to George Stigler
More information about the grass-user
mailing list