Mail Archives: djgpp/2000/07/13/11:54:09
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> On Thu, 13 Jul 2000, Olaf van der Spek wrote:
>> > In cygwin, the "default" comes from the mount table, and is often
>> > "binary", so the "t" is a good idea.
>>
>> But it caused popen to fail, so it doesn't seem that good to me always.
> If "wt" fails, it means that the library you are using is non-ANSI. ANSI
> C defines the "t" flag and requires a complying library to support it
> (which on Unix means simply to ignore it).
Well, he's talking about popen(), of course, which has never been
defined by ANSI, to begin with, so the ANSI rules don't apply, here.
But neither does ANSI C define the "t" flag. ANSI C89 only requires
libraries to ignore anything that might be in the 'mode' argument
string of fopen() after one of the defined strings. None of the
defined mode strings contains a 't'. In C99, they even tightened this
rule. Quoting the draft:
[#3] The argument mode points to a string. If the string is
one of the following, the file is open in the indicated
mode. Otherwise, the behavior is undefined.214)
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -