sys_errlist, sys_nerr

global variables for mapping errno to error messages 

Global Variables


SYNOPSIS

#include <stdio.h>

extern char **sys_errlist;

extern int sys_nerr;


DESCRIPTION

Inclusion of the <stdio.h> header file provides for definitions of sys_errlist and sys_nerr as shown in the SYNOPSIS section. sys_errlist is an array of character strings that provides a mapping from errno values to error messages. sys_nerr indicates the highest valid array index.

Use of these variables is deprecated, because errno can be a negative value for Win32 error message, and using these values to access sys_errlist results in an array bounds error. Use the strerror() function instead.


CONFORMANCE

4.4BSD, with exceptions.


PORTING ISSUES

No strings corresponding to Win32 error codes are provided, and using errno to index sys_errlist when it is set to a Win32 error code results in an array bounds error. Hence code should not use sys_errlist, but rather should call strerror().


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
perror(), strerror()

Miscellaneous:
errno, h_errno


PTC MKS Toolkit 10.5 Documentation Build 40.