This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> > 
> > But opening with "rt" is non-POSIX,
> 
> No it isn't.  POSIX requires any CRT that doesn't understand or care about
> the second character to ignore it.

This is the POSIX definition of fopen():
http://www.opengroup.org/onlinepubs/009695399/functions/fopen.html

In there, it specifically calls out that "r" and "rb" are synonyms, and
says nothing about ignoring the second character.  Likewise,
"r+", "r+b", and "rb+" ar synonyms, and here b isn't always the
second character.  And it omits any mention of "rt".

On fopen(), cygwin is only compliant with POSIX (ie. "r" and "rb"
behave identically) if you link with binmode.o or if you use a binary
mount point.  Text mount points are the only place where "r" and
"rb" behave differently, since in POSIX, text files and binary files
have no line ending distinction.

--
Eric Blake



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]