> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Eric Blake > Sent: Wednesday, August 17, 2005 9:41 PM > To: [email protected] > Subject: 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". >
You're right. What the heck was I looking at? I thought it might have been an earlier SUS, but version 2 says pretty much the same thing. Whatever it was, I know it didn't call out any synonyms for anything, and did mention ignoring whatever wan't understood. I ran into a similar situation with mutt. > 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. Well, like I explained to Korny, POSIX doesn't specify file contents (though I suppose I'd better qualify that, see above!). The *Unix* world thinks all files are text files, which is insane, and the cause of the disaster we have before us called Computer "Science". Ponder if you will: it's the 21st century, our disposable flying cars get a thousand nautical miles per gallon (of water of course), there's a Chicken-Flavored Pill in every pot, the moon is lousy with moonbases, people are living on Mars and vacationing in low-earth-orbit Space Hotels, the common cold has finally been cured, and yet here we are worrying about whether it's an "\n" or an "\r\n" at the end of a line of text. This is progress? I call it madness. A house divided against its line endings can not endure. -- Gary R. Van Sickle
