Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

8    errno.h

Palm OS® Protein C/C++ Compiler Language & Library Reference

Palm OS® Developer Suite

The <errno.h> header provides the global error code variable errno.

Global Variables ^TOP^

errno Variable ^TOP^

Purpose

Global error code variable.

Declared In

posix/errno.h

Prototype

extern int errno


Comments

The errno variable is used by many functions to return error values. The value of errno is defined only after a call to a function for which it is explicitly stated to be set and until it is changed by the next function call. The value of errno should only be examined when it is indicated to be valid by a function's return value. Programs should obtain the definition of errno by the inclusion of <errno.h>. It is unspecified whether errno is a macro or an identifier declared with external linkage.

The errno variable has a value of zero (0) at the beginning. If an error occurs, then this variable is given the value of the error number. In some cases, the behavior of the math library with regard to errno is implementation defined.

Nothing in the <errno.h> header is specific to Palm OS®. The specific numeric values associated with the error names are not portable and should be treated as opaque by applications.