HP C/iX Library Reference Manual (30026-90004)
8 Chapter1
Introduction to the HP C/iX Library
Library Header Files
Some of the ANSI-defined header files, as implemented in the HP C/iX library, contain
declarations for entities beyond those required by ANSI C. For example, the header
<math.h> contains a macro definition for M_PI, the value of the mathematical constant pi.
Because M_PI is not a reserved identifier in C, it is possible that a legal C program might
use that identifier for a different purpose. Consequently, it is important that the compiler
not process such declarations when compiling in ANSI mode.
If you have a program that relies on a non-ANSI declaration in one of the standard header
files, and if you want to compile in ANSI mode, you must explicitly request such
declarations to be visible. You do so by adding the following directive to your source file
before including the standard header file:
#define _MPEXL_SOURCE
This tells the preprocessor that your source program needs the extensions present in
MPE/iX. Alternatively, you could specify this using the compiler option -D_MPEXL_SOURCE
<search.h> Defines the types used with the hsearch and tsearch functions.
<setjmp.h> Declares a type and several functions for bypassing the normal function call and
return discipline.
<signal.h> Contains declaration used in dealing with conditions thatmay be reported during
program execution.
<stdarg.h> Provides a standard method for dealing with variable arguments.
<stddef.h> Defines several macros and types used widely in conjunction with the C library.
<stdio.h> Defines a structure, several functions, and macros useful for I/O.
<stdlib.h> Declares various general utility functions and macros.
<string.h> Declares functions useful for manipulating character arrays and other objects
treated as character arrays.
<time.h> Declares types, global variables, and functions used for manipulating time.
<times.h>
b
Contains the definition of the struct tms, which is used by some older non-ANSI
library functions.
<unistd.h> Defines macros that are used as arguments to the lseek function. These macros
are also declared in <stdarg.h>.
<values.h> Contains a set of manifest constants, conditionally defined for particular
processor architectures.
<varargs.h> Declares types and macros for declaring variable argument functions. See also
<stdarg.h>.
a. These headers are not defined by the ANSI C standard. Programs using these headers are
likely to be less portable.
b. These headers are not defined by the ANSI C standard. Programs using these headers are
likely to be less portable.
Table 1-2. HP C/iX Library Header Files
Header Description