1 /* types.h 4.9 82/11/13 */ 2 3 /* 4 * Basic system types and major/minor device constructing/busting macros. 5 */ 6 7 /* major part of a device */ 8 #define major(x) ((int)(((unsigned)(x)>>8)&0377)) 9 10 /* minor part of a device */ 11 #define minor(x) ((int)((x)&0377)) 12 13 /* make a device number */ 14 #define makedev(x,y) ((dev_t)(((x)<<8) | (y))) 15 16 typedef unsigned char u_char; 17 typedef unsigned short u_short; 18 typedef unsigned int u_int; 19 typedef unsigned long u_long; 20 21 #ifdef vax 22 typedef struct _physadr { int r[1]; } *physadr; 23 typedef struct label_t { 24 int val[14]; 25 } label_t; 26 #endif 27 #ifdef sun 28 typedef struct _physadr { short r[1]; } *physadr; 29 typedef struct label_t { 30 int val[13]; 31 } label_t; 32 #endif 33 typedef struct _quad { long val[2]; } quad; 34 typedef long daddr_t; 35 typedef char * caddr_t; 36 typedef u_long ino_t; 37 typedef long swblk_t; 38 typedef int size_t; 39 typedef int time_t; 40 typedef short dev_t; 41 typedef int off_t; 42 43 typedef struct fd_set { int fds_bits[1]; } fd_set; 44