Pristine Ack-5.5
[Ack-5.5.git] / include / _tail_mon / sys / types.h
1 /* $Id: types.h,v 1.10 1994/06/24 11:04:37 ceriel Exp $ */
2 /*
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".
5  */
6
7 /*
8  * Basic system types and major/minor device constructing/busting macros.
9  */
10
11 #if     !defined(_SYS_TYPES_H)
12 #define _SYS_TYPES_H
13
14 #ifdef __STDC__
15 #if     !defined(_SIZE_T)
16 #define _SIZE_T
17 typedef unsigned int    size_t;         /* type returned by sizeof */
18 #endif  /* _SIZE_T */
19
20 #if     !defined(_TIME_T)
21 #define _TIME_T
22 typedef unsigned long   time_t;
23 #endif  /* TIME_T */
24 #endif
25
26 #if !defined(_POSIX_SOURCE)
27
28 /* major part of a device */
29 #define major(x)        ((int)(((unsigned)(x)>>8)&0377))
30
31 /* minor part of a device */
32 #define minor(x)        ((int)((x)&0377))
33
34 /* make a device number */
35 #define makedev(x,y)    ((dev_t)(((x)<<8) | (y)))
36
37 typedef unsigned char   u_char;
38 typedef unsigned short  u_short;
39 typedef unsigned int    u_int;
40 typedef unsigned long   u_long;
41
42 typedef struct  _physadr { int r[1]; } *physadr;
43 typedef long    daddr_t;
44 typedef char *  caddr_t;
45 #if defined(__BSD4_2)
46 typedef u_long ino_t;
47 #else
48 typedef u_short ino_t;
49 #endif
50 typedef long    swblk_t;
51
52 #include <sys/stdtypes.h>
53
54 typedef long    label_t[14];
55 typedef short   dev_t;
56 typedef long    off_t;
57
58 /* system V compatibility: */
59 typedef unsigned int    uint;
60 typedef unsigned short  ushort;
61 typedef unsigned char   uchar_t;
62 typedef short           cnt_t;
63 typedef long            paddr_t;
64 typedef long            key_t;
65
66 #else   /* _POSIX_SOURCE */
67 #if     defined(_MINIX)
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 */
76 #endif  /* _MINIX */
77 #endif  /* _POSIX_SOURCE */
78
79 #endif /* _SYS_TYPES_H */