> > > > 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
