Message-ID: From: Michel de Ruiter To: "'Eli Zaretskii'" Cc: "'DJGPP workers'" 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.