Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

cpp(1)

magic(4)

MODEL(4)  —  HP-UX

NAME

model − HP-UX machine identification

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 identifying various HP-UX implementations. 

For example the header file model.h contains the following constants for the HP 9000 Series 200. 

/* model.h for the HP 9000 Series 200 */
 #defineHP_S_2000x20A
#defineHP_S_5000x208
#defineHP_S_8000x20B

Other such constants will be added as HP-UX extends to other machines. 

In addition, model.h 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. 

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. 

Certain C preprocessor conditional compilation variables are defined to aid in implementation-dependent code, see cpp(1).

SEE ALSO

cc(1), cpp(1), magic(4). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026