xref: /original-bsd/sys/sys/types.h (revision 39c8fdd5)
1 /*	types.h	6.1	83/07/29	*/
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 typedef	unsigned short	ushort;		/* sys III compat */
21 
22 #ifdef vax
23 typedef	struct	_physadr { int r[1]; } *physadr;
24 typedef	struct	label_t	{
25 	int	val[14];
26 } label_t;
27 #endif
28 typedef	struct	_quad { long val[2]; } quad;
29 typedef	long	daddr_t;
30 typedef	char *	caddr_t;
31 typedef	u_long	ino_t;
32 typedef	long	swblk_t;
33 typedef	int	size_t;
34 typedef	int	time_t;
35 typedef	short	dev_t;
36 typedef	int	off_t;
37 
38 typedef	struct	fd_set { int fds_bits[1]; } fd_set;
39