1: /* 2: * Copyright (c) 1986 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)types.h 1.4.1 (2.11BSD) 2000/2/28 7: */ 8: 9: #ifndef _TYPES_ 10: #define _TYPES_ 11: 12: /* 13: * Basic system types and major/minor device constructing/busting macros. 14: */ 15: 16: /* major part of a device */ 17: #define major(x) ((int)(((int)(x)>>8)&0377)) 18: 19: /* minor part of a device */ 20: #define minor(x) ((int)((x)&0377)) 21: 22: /* make a device number */ 23: #define makedev(x,y) ((dev_t)(((x)<<8) | (y))) 24: 25: typedef unsigned char u_char; 26: typedef unsigned short u_short; 27: typedef unsigned int u_int; 28: typedef unsigned long u_long; /* see this! unsigned longs at last! */ 29: typedef unsigned short ushort; /* sys III compat */ 30: 31: #ifdef pdp11 32: typedef struct _physadr { short r[1]; } *physadr; 33: typedef struct label_t { 34: int val[8]; /* regs 2-7, __ovno and super SP */ 35: } label_t; 36: #endif 37: typedef struct _quad { long val[2]; } quad; 38: typedef long daddr_t; 39: typedef char * caddr_t; 40: typedef u_short ino_t; 41: typedef long swblk_t; 42: typedef u_int size_t; 43: typedef int ssize_t; 44: typedef long time_t; 45: typedef short dev_t; 46: typedef long off_t; 47: typedef u_short uid_t; 48: typedef u_short gid_t; 49: typedef int pid_t; 50: typedef u_short mode_t; 51: 52: #define NBBY 8 /* number of bits in a byte */ 53: 54: #ifndef howmany 55: #define howmany(x, y) (((x)+((y)-1))/(y)) 56: #endif 57: 58: #include <sys/select.h> 59: 60: typedef char bool_t; /* boolean */ 61: typedef u_int memaddr; /* core or swap address */ 62: typedef long ubadr_t; /* unibus address */ 63: 64: #endif