xref: /original-bsd/sys/sys/types.h (revision fbed46ce)
1 /*	types.h	2.1	3/25/82	*/
2 
3 /*	types.h	4.4	82/04/19	*/
4 
5 /*
6  * Basic system types and major/minor device constructing/busting macros.
7  */
8 
9 /* major part of a device */
10 #define	major(x)	((int)(((unsigned)(x)>>8)&0377))
11 
12 /* minor part of a device */
13 #define	minor(x)	((int)((x)&0377))
14 
15 /* make a device number */
16 #define	makedev(x,y)	((dev_t)(((x)<<8) | (y)))
17 
18 typedef	unsigned char	u_char;
19 typedef	unsigned short	u_short;
20 typedef	unsigned int	u_int;
21 typedef	unsigned long	u_long;
22 
23 /* SHOULD USE long RATHER THAN int HERE BUT IT WOULD GIVE LINT ON THE KERNEL */
24 /* GASTRIC DISTRESS AND DON'T HAVE TIME TO FIX THAT JUST NOW */
25 typedef	struct	_physadr { int r[1]; } *physadr;
26 typedef	int	daddr_t;
27 typedef	char *	caddr_t;
28 typedef	u_long	ino_t;
29 typedef	int	swblk_t;
30 typedef	int	size_t;
31 typedef	int	time_t;
32 typedef	int	label_t[14];
33 typedef	short	dev_t;
34 typedef	int	off_t;
35 typedef	long	portid_t;
36 
37 typedef	struct	fd_set { int fds_bits[1]; } fd_set;
38