STRERROR(3)               OpenBSD Programmer's Manual              STRERROR(3)

NAME
     strerror - get error message string

SYNOPSIS
     #include <string.h>

     char *
     strerror(int errnum);

     int
     strerror_r(int errnum, char *strerrbuf, size_t buflen);

DESCRIPTION
     The strerror() function returns a pointer to the language-dependent error
     message string affiliated with the specified error number errnum.  The
     returned string contains a maximum of NL_TEXTMAX characters, including
     the trailing NUL.

     The array pointed to is not to be modified by the program, but may be
     overwritten by subsequent calls to strerror().

     strerror_r() is a thread safe version of strerror() that places the error
     message in the given buffer strerrbuf.  If the error message is larger
     then buflen the message will be truncated to fit within buflen and ERANGE
     is returned.  strerror_r() returns zero upon successful completion.  An
     error number is returned, otherwise.

SEE ALSO
     intro(2), perror(3), setlocale(3)

STANDARDS
     The strerror() function conforms to ANSI X3.159-1989 (``ANSI C'').  The
     strerror_r() function conforms to IEEE Std 1003.1 (``POSIX'').

OpenBSD 3.5                      June 29, 1991                               1
