1 /* $Id: types.h,v 1.10 1994/06/24 11:04:37 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
8 * Basic system types and major/minor device constructing/busting macros.
11 #if !defined(_SYS_TYPES_H)
17 typedef unsigned int size_t; /* type returned by sizeof */
22 typedef unsigned long time_t;
26 #if !defined(_POSIX_SOURCE)
28 /* major part of a device */
29 #define major(x) ((int)(((unsigned)(x)>>8)&0377))
31 /* minor part of a device */
32 #define minor(x) ((int)((x)&0377))
34 /* make a device number */
35 #define makedev(x,y) ((dev_t)(((x)<<8) | (y)))
37 typedef unsigned char u_char;
38 typedef unsigned short u_short;
39 typedef unsigned int u_int;
40 typedef unsigned long u_long;
42 typedef struct _physadr { int r[1]; } *physadr;
44 typedef char * caddr_t;
48 typedef u_short ino_t;
52 #include <sys/stdtypes.h>
54 typedef long label_t[14];
58 /* system V compatibility: */
59 typedef unsigned int uint;
60 typedef unsigned short ushort;
61 typedef unsigned char uchar_t;
66 #else /* _POSIX_SOURCE */
68 typedef unsigned short dev_t; /* hold (major|minor) device pair */
69 typedef unsigned char gid_t; /* group id */
70 typedef unsigned short ino_t; /* i-node number */
71 typedef unsigned short mode_t; /* mode number within an i-node */
72 typedef unsigned char nlink_t; /* number-of-links field within an i-node */
73 typedef long off_t; /* offsets within a file */
74 typedef int pid_t; /* type for pids (must be signed) */
75 typedef unsigned short uid_t; /* user id */
77 #endif /* _POSIX_SOURCE */
79 #endif /* _SYS_TYPES_H */