Mail Archives: cygwin-developers/2002/08/26/10:58:59
On Mon, Aug 26, 2002 at 04:48:23PM +0200, Corinna Vinschen wrote:
>On Tue, Aug 27, 2002 at 12:38:09AM +1000, Robert Collins wrote:
>> On Tue, 2002-08-27 at 00:29, Corinna Vinschen wrote:
>> > On Mon, Aug 26, 2002 at 03:20:00PM +0100, Conrad Scott wrote:
>> > > "Christopher Faylor" <cgf AT redhat DOT com> wrote:
>> > > > There shouldn't really be that much overhead to the current
>> > > method for
>> > > > handling text/binary reads, though. It's just checking a bit
>> > > field.
>> > >
>> > > At the coal-face it ends up being a bit more messy than that. For
>> > > example, the fhandler::read code checks the readahead buffers for
>> > > pending data but they will always be empty in binary-mode (AFAIK)
>> > > . In fact there's a page of code before the check for whether a
>> > > binary read is being done and only then does the code escape back
>> > > to the caller. Since (AFAIK) you can't change the text/binary
>> > > mode of an fd once it's been opened (and thus the readahead
>> >
>> > You can. setmode(fd, O_TEXT); or setmode(fd, O_BINARY);
>>
>> Which is why I was suggesting stripping O_TEXT capability for raw FD's,
>> and making the TEXT translation only ever apply to the FILE * calls -
>> fprintf, fscanf, fread etc...
>>
>> It allows all the fd level code to be much much simpler.
>
>Sure, I *love* the idea, but it would break applications, e. g. ash,
>which opens input files on descriptor level.
Right. It basically breaks the way it's supposed to WORK. This is a
nonsensical suggestion. Why do you think it is the way it is currently,
Robert? Textmode translations work on fd and they are supposed to work
on fds.
That you would suggest anything other than that means that either I'm
not getting your suggestion or you are way off base.
Corinna says "You can use setmode on an fd" and you say "My suggestion
is to break all backwards compatibility and break with the way Microsoft
does it so that the code will be cleaner." That's what I'm hearing and
that just won't fly.
cgf
- Raw text -