www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/08/07:48:11

Message-ID: <B0FEA00E82A7D1118BFB00A0CC990278213247@ARGON>
From: Michel de Ruiter <Michel AT smr DOT nl>
To: "'Eli Zaretskii'" <eliz AT is DOT elta DOT co DOT il>
Cc: "'DJGPP workers'" <djgpp-workers AT delorie DOT com>
Subject: RE: setmode problem
Date: Thu, 8 Apr 1999 13:48:53 +0200
X-Mailer: Internet Mail Service (5.5.2448.0)
Reply-To: djgpp-workers AT delorie DOT com

> Imagine a program that switches stdin to binary mode and also
> redirects it to a file with `dup'.
> With your change, the result will depend on the order of these
> two operations: in one case, you wind up with an unbuffered file,
> in the other it is buffered.

Yep. I thought of dup, but not long enough :-)

> So at least some changes in other functions, like `dup' and `dup2'
> will be necessary to prevent these subtle ``features''.

Or put the buffering-check in... fillbuf or whatever it is called.

> I thought setmode.txh already tells enough about this issue.  If not,
> please tell what's missing.

I'll take a look again when I am back with my DJGPP computer...

> > It seems this problem is already known among some DJGPP
> > "porters" but not all. We (someone how knows most about this)
> > should document this somewhere at least...
> I agree, and I put this information in setmode.txh, open.txh,
> fopen.txh, and signal.txh exactly for that reason.  Again, if
> something's missing from that description, please tell what it is.

Ok.

Groente, Michel.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019