What is the domain of strerror()?

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Apr 7 08:10:56 AEST 1989


In article <1249 at microsoft.UUCP> w-colinp at microsoft.uucp (Colin Plumb) writes:
>It says that strerror() maps the error number passed to it to an error
>string, but I can't find any description of what a valid error number is.

That's easy; anything the standard says is an error number is allowed,
and anything else is up to the implementation.  I.e. the non-zero value
of errno, as set by some functions according to the standard, is an
acceptable "error number" for strerror().  Presumably any other non-zero
value that the implementation assigns to arrno is also acceptable to
strerror().

The Rationale refers you to perror(), 4.9.10.4, where this connection
is clearer.



More information about the Comp.std.c mailing list