On Thursday 22 March 2007 15:42, [EMAIL PROTECTED] wrote: > >> getc(NULL) also blows up; what is your point? > > > >My point is that it should not SEGV on NULL pointer. It should > >return -1 and set EBADF. > > You are wrong; the standard disagrees with you.
7.19.7.5.3: The [getc] function returns the next characted from the input stream pointed to by [stream]. If the stream is at end-of-file, the end-of-file indicator for the stream is set and [getc] returns EOF. If a read error occurs, the error indicator for the stream is set and [getc] returns EOF. Where does the standard disagree ? --Stefan -- Stefan Teleman 'Nobody Expects the Spanish Inquisition' KDE e.V. -Monty Python [EMAIL PROTECTED] _______________________________________________ opensolaris-discuss mailing list [email protected]
