Next Previous Contents

29. errno_string

Synopsis

Return a string describing an errno.

Usage

String_Type errno_string (Integer_Type err)

Description

The errno_string function returns a string describing the integer error code err. The variable err usually corresponds to the errno intrinsic function. See the description for errno for more information.

Example

The errno_string function may be used as follows:

    define sizeof_file (file)
    {
       variable st = stat (file);
       if (st == NULL)
         verror ("%s: %s", file, errno_string (errno);
       return st.st_size;
    }
See Also

errno, stat, verror


Next Previous Contents