[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text tools, line endings, and O_TEXT

From: John Cowan
Subject: Re: Text tools, line endings, and O_TEXT
Date: Thu, 6 Sep 2007 14:49:45 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Eric Blake scripsit:
> John Cowan <cowan <at> ccil.org> writes:
> > Are you saying that an O_TEXT open under Cygwin, given a binary mount,
> > will cause newline translation?  I had assumed that O_TEXT would be
> > ignored under Cygwin just as it is under Linux.
> Yes.  The cygwin behavior is as follows:

Okay.  I see why you do that, but it does kinda undermine the argument
that "Cygwin should behave like Linux", since this is a conspicuous
example of it *not* behaving like Linux.

> Using O_BINARY is important, however, I claim that using O_TEXT in portable 
> code should be a very rare circumstance.  There's a reason that C99 only 
> calls 
> out fopen("r") and fopen("rb"), but not fopen("rt").

Okay, fair enough.

Evolutionary psychology is the theory           John Cowan
that men are nothing but horn-dogs,             http://www.ccil.org/~cowan
and that women only want them for their money.  address@hidden
        --Susan McCarthy (adapted)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]