> >> Call strerror() and check if it returns a NULL pointer.
> >sterror doesn't return NULL; it returns "Unknown error x" if
> >you call it with an out-of-range x.
> Looks like you found a broken strerror() implementation.
Eh? Even the SUS wording indicates that there's no return
value reserved to indicate an error. It does describe a way
to test for failure, however, by mucking with errno.
The behavior on a standard Linux system (glibc 2.2) is as
described above on invalid errnos: "Unknown error x".