Re: sys_nerr and strerror()

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 24 Jul 1999 00:49:57 +0200

Jens-S. Voeckler wrote:

> supported by the 64 bit environment any longer. On the other hand,
> strerror() is guaranteed to return a NULL pointer for illegal error
> numbers. I don't know if that is always true on all platforms (doubt it,
> though), or even if it is prescribed by POSIX.

I don't have access to the POSIX standard document, but the Open Group
"The Single UNIX ® Specification, Version 2" does not guarantee that
strerror returns NULL for unknown errors:

      On error errno may be set, but no return value is
      reserved to indicate an error.

The strerror() interface is also not required to be reentrant. Not that
it matters much.

--
Henrik Nordstrom
Spare time Squid hacker
Received on Tue Jul 29 2003 - 13:15:59 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:16 MST