upload: diffstat-1.40-1, tar-1.15.1-1

Eric Blake ericblake@comcast.net
Wed Aug 17 16:47:00 GMT 2005


> >
> >I'm not sure this is correct.  fopen(..., "rt") should create LF endings
> >on binary mounts and CRLF on text mounts...  IIUC, the open mode is a hint
> >to the underlying filesystem whether line ending translation should be
> >done -- the actual translation is done based on the mount type.
> 
> Opening with "rt" bypasses the underlying mount type.  And, it only
> opens the file for read.

But opening with "rt" is non-POSIX, while opening with "r" or "rb" is
POSIX, so the upstream maintainers are more reluctant to accept
a patch that uses "rt".  I have never seen any standards documentation
that describes what "rt" should do, so I assumed that it forced
opening a file in text mode (ie. all \r\n in the file are collapsed to
\n to the application reading the file, regardless of the mount point
of the file).  It sounds like you are telling me my assumption was
wrong, and that "rt" on a binary mount point preserves \r?

Maybe we need an update to http://cygwin.com/cygwin-ug-net/using-textbinary.html

--
Eric Blake




More information about the Cygwin-apps mailing list