[GRASSLIST:5189] Re: newbie question
glynn.clements at virgin.net
Sun Dec 8 23:13:28 EST 2002
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.
> However, it seems we should add the "b" to all the
> fdopen() calls in src/libes/gis/open.c. On *nix systems it makes
> no difference, but it might make the difference on other systems.
That won't help in this particular case, as cell I/O doesn't use those
functions. More generally, unless we "port" the whole of GRASS to
Cygwin (i.e. use O_BINARY), the user will need to ensure that any
GRASS databases reside on a binary filesystem.
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user