next up previous contents index
Next: 9.4.6 fcntl.h: POSIX low-level Up: 9.4 Header Files Previous: 9.4.4 ctype.h: character handling

9.4.5 errno.h: error numbers

   

DESCRIPTION

This file declares the global errno variable, and defines symbolic constants for all the errno values defined in the ISO/ANSI C, POSIX.1, and UNIX standards. They are provided mainly for the convenience of clients that can benefit from standardized error codes and do not already have their own error handling scheme and error code namespace. The symbols defined in this header file have the same values as the corresponding symbols defined in oskit/error.h (see 4.6.2), which are the error codes used through the OSKit's COM interfaces; this way, error codes from arbitrary OSKit components can be used directly as errno values at least by programs that use the minimal C library.

The main disadvantage of using COM error codes as errno values is that, since they don't start from around 0 like typical Unix errno values, it's impossible to provide a traditional Unix-style sys_errlist table for them. However, they are fully compatible with the POSIX-blessed strerror and perror routines, and in any case the minimal C library is not intended to support ``legacy'' applications directly - for that purpose, a ``real'' C library would be more appropriate, and such a C library would probably use more traditional errno values, doing appropriate translation when interacting with COM interfaces.



University of Utah Flux Research Group