6df2c23aea8844259e198d6010f665f4c8a4a0fa
* Copyright (c) 1982, 1986, 1991 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)types.h 7.17 (Berkeley) %G%
typedef unsigned char u_char
;
typedef unsigned short u_short
;
typedef unsigned int u_int
;
typedef unsigned long u_long
;
typedef unsigned short ushort
; /* Sys V compatibility */
typedef char * caddr_t
; /* core address */
typedef long daddr_t
; /* disk address */
typedef short dev_t
; /* device number */
typedef u_long ino_t
; /* inode number */
typedef long off_t
; /* file offset (should be a quad) */
typedef u_short nlink_t
; /* link count */
typedef long swblk_t
; /* swap offset */
typedef long segsz_t
; /* segment size */
typedef u_short uid_t
; /* user id */
typedef u_short gid_t
; /* group id */
typedef short pid_t
; /* process id */
typedef u_short mode_t
; /* permissions */
typedef u_long fixpt_t
; /* fixed point number */
typedef struct _uquad
{ u_long val
[2]; } u_quad
;
typedef struct _quad
{ long val
[2]; } quad
;
typedef long * qaddr_t
; /* should be typedef quad * qaddr_t; */
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xff)) /* minor number */
#define makedev(x,y) ((dev_t)(((x)<<8) | (y))) /* create dev_t */
#include <machine/ansi.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
#include <machine/types.h>
typedef _CLOCK_T_
clock_t;
#define NBBY 8 /* number of bits in a byte */
* Select uses bit masks of file descriptors in longs. These macros
* manipulate such bit fields (the filesystem macros use chars).
* FD_SETSIZE may be defined by the user, but the default here should
* be enough for most uses.
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#define howmany(x, y) (((x)+((y)-1))/(y))
fd_mask fds_bits
[howmany(FD_SETSIZE
, NFDBITS
)];
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#if defined(__STDC__) && defined(KERNEL)
* Forward structure declarations for function prototypes.
* We include the common structures that cross subsystem boundaries here;
* others are mostly used in the same place that the structure is defined.
#endif /* !_POSIX_SOURCE */