Stefan Farfeleder wrote: > On Mon, Nov 24, 2003 at 07:05:02PM +0100, boyd, rounin wrote: > > From: "Jacques A. Vidrine" <[EMAIL PROTECTED]> > > > The application is broken. You must only check errno if you get an > > > error indication from the library call. > > > > errno is only meaningful after a syscall error. > > Wrong, counter-example: strtol().
Wrong; the standard specifies that the errno shall only be checked when the return value is -1. The exception in the strtol() case is only for presetting errno to 0 before you make the call, and making a check only following a -1 return. You cannot make assumptions about underlying implementations; they may be either system calls or library routines, and your application is not supposed to know or depend on which case prevails. -- Terry _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[EMAIL PROTECTED]"