7.21.6.2 The strerror function

Synopsis

1

#include <string.h>
char *strerror(int errnum);

Description

2

The strerror function maps the number in errnum to a message string. Typically, the values for errnum come from errno, but strerror shall map any value of type int to a message.

3

The implementation shall behave as if no library function calls the strerror function.

Returns

4

The strerror function returns a pointer to the string, the contents of which are locale- specific. The array pointed to shall not be modified by the program, but may be overwritten by a subsequent call to the strerror function.