Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Single UNIX Specification, Version 3 |
both | z/OS V1R7 |
#define _UNIX03_SOURCE
#include <string.h>
int strerror_r(int errnum, char *strerrbuf, size_t buflen);
strerror_r() maps the error number in errnum to an error message string and copies the message string into the buffer pointed to by strerrbuf with length buflen. If the length of the message string is greater than or equal to buflen, strerror_r() copies the first buflen-1 characters of the message string into strerrbuf, terminates strerrbuf with a null character (\0) and returns ERANGE. The error number must be a valid errno value.
This function does not produce a locale-dependent error message string.
If successful, strerror_r() returns 0.