strerror_r

Maps an errno value to a message string, reentrantly.

Library:LibC
Classification:POSIX
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  int strerror_r (
     int      errnum,
     char    *strerrbuf,
     size_t   buflen);
  

Parameters

errnum

(IN) Specifies the error number to be mapped to an error message.

strerrbuf

(OUT) Points to the message string associated with the error number.

buflen

(OUT) Specifies the number of bytes in the message string.

Return Values

If successful, returns 0. Otherwise returns a nonzero error code.

Decimal

Constant

Description

14

ERANGE

The errnum parameter is invalid.

Remarks

The strerror_r function maps the error number in errnum to a locale-dependent error message string and returns a pointer to it in strerrbuf.

See Also