types.5 (2010 09)

t
types(5) types(5)
NAME
types - primitive system data types
SYNOPSIS
#include <sys/types.h>
DESCRIPTION
Remarks
The example given on this page is a typical version. The type names are in general expected to be
present, although exceptions (if any) may be described in DEPENDENCIES. In most cases the funda-
mental type which implements each typedef is implementation dependent as long as source code which
uses those typedefs need not be changed. In some cases the typedef is actually a shorthand for a com-
monly used type, and will not vary.
The data types defined in the include file are used in HP-UX system code; some data of these types are
accessible to user code:
typedef struct { int r[1]; } *physadr;
typedef char *caddr_t;
typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned long ino_t;
typedef short cnt_t;
typedef long time_t;
typedef long dev_t;
typedef long off_t;
typedef long paddr_t;
typedef long key_t;
typedef int32_t pid_t;
typedef long uid_t;
typedef long gid_t;
typedef long blkcnt_t;
Note that the defined names above are standardized, but the actual type to which they are defined may
vary between HP-UX implementations.
The meanings of the types are:
physadr used as a pointer to memory; the pointer is aligned to follow hardware-dependent
instruction addressing conventions.
caddr_t used as an untyped pointer or a pointer to untyped memory.
uint shorthand for unsigned integer.
ushort shorthand for unsigned short.
ino_t used to specify I-numbers. All native file systems (including HFS and VxFS 3.5)
through HP-UX 11i, use values that will fit within 32-bits. Some remote NFS servers
may use larger values, which will be truncated without error for 32-bit applications
and may not result in unique values.
cnt_t used in some implementations to hold reference counts for some kernel data structures.
time_t time encoded in seconds since 00:00:00 GMT, January 1, 1970.
dev_t specifies kind and unit number of a device, encoded in two parts known as major and
minor.
off_t offset measured in bytes from the beginning of a file. If a 32-bit application is compiled
with
-D_FILE_OFFSET_BITS=64 or -D_LARGEFILE64_SOURCE, off_t will
become an int64_t .
paddr_t used as an integer type which is properly sized to hold a pointer.
key_t the type of a key used to obtain a message queue, semaphore, or shared memory
identifier, see stdipc (3C).
pid_t used to specify process and process group identifiers.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)