Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) strerror_r(3)
NAME
strerror_r - Accesses message explaining function error
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <string.h>
char *strerror_r(
int errnum);
char *strerrbuf,
size_t *buflen);
PARAMETERS
errnum Specifies an error-number value.
strerrbuf Points to a buffer where strerror_r returns the error message string.
buflen Specifies the length of the strerrbuf buffer.
DESCRIPTION
The strerror_r( ) function maps the error number specified by the errnum parameter to a locale-
dependent error message string, and returns the string in the buffer pointed to by strerrbuf. The
buffer length is specified by buflen.
The string pointed to by the return value is not modified by the program, but may be overwritten
by a subsequent call to this function. The implementation behaves as though no other function
calls the strerror_r( ) function.
NOTES
The strerror_r( ) function only supports the C/POSIX locale.
RETURN VALUES
Upon successful completion, the strerror_r( ) function returns a 0 (zero). Otherwise, errno is
returned to indicate the error.
ERRORS
If any of the following conditions occur, the strerror_r( ) function sets errno to the correspond-
ing value:
[EINVAL] The value of the errnum parameter is an invalid error number.
[ERANGE] Insufficient storage was supplied by the strerrbuf and buflen parameters to con-
tain the generated message string.
RELATED INFORMATION
Functions: strerror(3).
STANDARDS CONFORMANCE
Interfaces documented on this reference page conform to the following industry standards:
• IEEE Std 1003.1-2004, POSIX System Application Program Interface
527187-017 Hewlett-Packard Company 6−143