xref: /original-bsd/sys/sys/types.h (revision 264c46cb)
1 /*	types.h	4.10	83/05/18	*/
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 #ifdef sun
29 typedef	struct	_physadr { short r[1]; } *physadr;
30 typedef	struct	label_t	{
31 	int	val[13];
32 } label_t;
33 #endif
34 typedef	struct	_quad { long val[2]; } quad;
35 typedef	long	daddr_t;
36 typedef	char *	caddr_t;
37 typedef	u_long	ino_t;
38 typedef	long	swblk_t;
39 typedef	int	size_t;
40 typedef	int	time_t;
41 typedef	short	dev_t;
42 typedef	int	off_t;
43 
44 typedef	struct	fd_set { int fds_bits[1]; } fd_set;
45