1.4. Errors <errno.h>

The header <errno.h> defines several macros all relating to the reporting of error conditions.

The macros required by ANSI C are:

EDOM
ERANGE

which expand into integral constant expressions with distinct non-zero values, suitable for use in #if pre-processing directives. XGC also includes the following error definition macros:

ENOSYS
EIO
EBADF
EINVAL
ENODEV
ENOMEM
EBUSY

The variable errno is declared in the library libc.a and may be set and tested at any time.

Note: The POSIX Threads library ensures each thread has a private copy of errno.

Note: Signal handlers and interrupt handlers do not have a private copy of errno.