Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ types(5) — SunOS 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fs(5)

time(3C)

lseek(2)

adb(1S)

TYPES(5)  —  System Interface Manual — 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.2 83/07/27 SMI; from UCB 4.11 83/07/01 ∗/
 /∗
 ∗ 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 ∗/
 #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;

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 System Release 1.0  —  1 April 1983

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