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

Re: gcc and mint-libs PL46



What you wrote:
> "Chris Herborth" <chrish@qnx.com> writes:
> 
> |> fopen( NULL, "r" ) returns NULL under QNX; assuming WATCOM implements the
> |> ANSI spec properly (a pretty safe assumption), that's how it should act.
> 
> The fact that ONX does so is no proof that ANSI demands it.

Chances are that ANSI is ambiguous and/or doesn't specify what to do in
this case.  WATCOM/QNX (and, given the evidence of a section of code in
GNUchess or whatever that seems to depend on this, and the wide array
of systems that GNU software runs on) did the sensible thing.

fopen returns NULL when it couldn't open the file.  Whether or not this is
because the filename was invalid (and NULL is certainly invalid) is
irrelevant; if it couldn't open the file, it must return NULL.

-- 
----------========================================================----------
Chris Herborth, R&D Technical Writer       Arcane  Dragon     chrish@qnx.com
QNX Software Systems, Ltd.                  -==(UDIC)==-         |||  JAGUAR
http://quest.jpl.nasa.gov/Info-ZIP/people/cjh/chris.html        / | \ 64-bit