TYPES(5) — Unix Programmer’s Manual
NAME
types − primitive system data types
SYNOPSIS
#include <sys/types.h>
DESCRIPTION
The data types defined in the include file are used in UNIX system code; some data of these types are accessible to user code:
/∗types.h6.183/07/29 ∗/
/∗
∗ Basic system types and major/minor device constructing/busting macros.
∗/
/∗ major part of a device ∗/
#definemajor(x)((int)(((unsigned)(x)>>8)&0377))
/∗ minor part of a device ∗/
#defineminor(x)((int)((x)&0377))
/∗ make a device number ∗/
#definemakedev(x,y)((dev_t)(((x)<<8) | (y)))
typedefunsigned charu_char;
typedefunsigned shortu_short;
typedefunsigned intu_int;
typedefunsigned longu_long;
typedefunsigned shortushort; /∗ sys III compat ∗/
typedefunsigned intuint; /∗ sys III compat ∗/
typedefunsigned longulong; /∗ sys III compat ∗/
/∗#ifdef vax∗/
typedefstruct_physadr { int r[1]; } ∗physadr;
typedefstructlabel_t {
intval[14];
} label_t;
/∗#endif∗/
typedefstruct_quad { long val[2]; } quad;
typedeflongdaddr_t;
typedefchar ∗caddr_t;
typedefu_longino_t;
typedeflongswblk_t;
typedefintsize_t;
typedefinttime_t;
typedefshortdev_t;
typedefintoff_t;
typedefstructfd_set { int fds_bits[1]; } fd_set;
The form daddr_t is used for disk addresses except in an inode on disk, see fs(5). Times are encoded in seconds since 00:00:00 GMT, January 1, 1970. The major and minor parts of a device code specify kind and unit number of a device and are installation-dependent. Offsets are measured in bytes from the beginning of a file. The label_t variables are used to save the processor state while another process is running.
SEE ALSO
fs(5), time(3), lseek(2), adb(1)
4th Berkeley Distribution — 1 August 1985