MODEL(5)
NAME
model − HP-UX machine identification
HP-UX COMPATIBILITY
Level: HP-UX/RUN ONLY
Origin: HP
SYNOPSIS
#include <model.h>
DESCRIPTION
There are some distinctions between the implementations of HP-UX due to hardware differences. Where such distinctions exist, conditional compilation or other definitions can be used to isolate the differences. Flags and typedefs to resolve these distinctions are collected in model.h. This file contains constants indentifying various HP-UX implementations.
For example, the header file model.h contains the constants HP_S_200 for Series 200 and HP_S_500 for Series 500. Other such constants will be added as HP-UX extends to other machines.
Model.h also has a statement defining the preprocessor constant MYSYS to represent the specific implementation for which compilation is desired. MYSYS will be equal to one of the constants above (HP_S_200 or HP_S_500).
Conditional compilation may be used to adapt one file for execution on more than one HP-UX implementation, if it contains implementation- or architecture-dependent features. For instance,
#if MYSYS==HP_S_200
<statements>
#endif
will cause the statements following the if statement to be compiled only for the HP 9000 Series 200.
Model.h also contains typedefs for several predefined types to enhance portability of certain types of code and of files.
int8
u_int8
Signed and unsigned 8-bit integers.
int16
u_int16
Signed and unsigned 16-bit integers.
int32
u_int32
Signed and unsigned 32-bit integers.
machptr
u_machptr
Signed and unsigned integers large enough to hold a pointer.
HARDWARE DEPENDENCIES
Series 200:
A conditional compilation variable, hp9000s200, is implemented. It is predefined to the C preprocessor.
Series 500:
A conditional compilation variable, hp9000s500, is implemented. It is predefined to the C preprocessor.
SEE ALSO
Hewlett-Packard — last mod. May 11, 2021