TYPES(5) — FILE FORMATS
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.h 1.1 85/12/18 SMI; from UCB 4.11 83/07/01 ∗/
/∗
∗ Basic system types and major/minor device constructing/busting macros.
∗/
#ifndef _TYPES_
#define_TYPES_
/∗ 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; /∗ System V compatibility ∗/
#ifdef vax
typedefstruct_physadr { int r[1]; } ∗physadr;
typedefstructlabel_t {
intval[14];
} label_t;
#endif
#ifdef mc68000
typedefstruct_physadr { short r[1]; } ∗physadr;
typedefstructlabel_t {
intval[13];
} 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;
#endif
The form daddr_t is used for disk addresses, 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(3C), lseek(2), adb(1S)
Sun Release 3.0β — Last change: 1 April 1983