1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 #ifndef _SYS_TYPES_H_
41 #define _SYS_TYPES_H_
42
43 #include <sys/cdefs.h>
44 #include <sys/_types.h>
45 #include <machine/endian.h>
46
47 #if __BSD_VISIBLE
48 typedef unsigned char u_char;
49 typedef unsigned short u_short;
50 typedef unsigned int u_int;
51 typedef unsigned long u_long;
52
53 typedef unsigned char unchar;
54 typedef unsigned short ushort;
55 typedef unsigned int uint;
56 typedef unsigned long ulong;
57
58 typedef __cpuid_t cpuid_t;
59 typedef __register_t register_t;
60 #endif
61
62
63
64
65
66 #ifndef __BIT_TYPES_DEFINED__
67 #define __BIT_TYPES_DEFINED__
68 #endif
69
70 #ifndef _INT8_T_DEFINED_
71 #define _INT8_T_DEFINED_
72 typedef __int8_t int8_t;
73 #endif
74
75 #ifndef _UINT8_T_DEFINED_
76 #define _UINT8_T_DEFINED_
77 typedef __uint8_t uint8_t;
78 #endif
79
80 #ifndef _INT16_T_DEFINED_
81 #define _INT16_T_DEFINED_
82 typedef __int16_t int16_t;
83 #endif
84
85 #ifndef _UINT16_T_DEFINED_
86 #define _UINT16_T_DEFINED_
87 typedef __uint16_t uint16_t;
88 #endif
89
90 #ifndef _INT32_T_DEFINED_
91 #define _INT32_T_DEFINED_
92 typedef __int32_t int32_t;
93 #endif
94
95 #ifndef _UINT32_T_DEFINED_
96 #define _UINT32_T_DEFINED_
97 typedef __uint32_t uint32_t;
98 #endif
99
100 #ifndef _INT64_T_DEFINED_
101 #define _INT64_T_DEFINED_
102 typedef __int64_t int64_t;
103 #endif
104
105 #ifndef _UINT64_T_DEFINED_
106 #define _UINT64_T_DEFINED_
107 typedef __uint64_t uint64_t;
108 #endif
109
110
111 typedef __uint8_t u_int8_t;
112 typedef __uint16_t u_int16_t;
113 typedef __uint32_t u_int32_t;
114 typedef __uint64_t u_int64_t;
115
116
117 typedef __int64_t quad_t;
118 typedef __uint64_t u_quad_t;
119 typedef quad_t * qaddr_t;
120
121 #if __BSD_VISIBLE
122
123 typedef __vaddr_t vaddr_t;
124 typedef __paddr_t paddr_t;
125 typedef __vsize_t vsize_t;
126 typedef __psize_t psize_t;
127 #endif
128
129
130 typedef char * caddr_t;
131 typedef __int32_t daddr_t;
132 typedef __int32_t daddr32_t;
133 typedef __int64_t daddr64_t;
134 typedef __dev_t dev_t;
135 typedef __fixpt_t fixpt_t;
136 typedef __gid_t gid_t;
137 typedef __id_t id_t;
138 typedef __ino_t ino_t;
139 typedef __key_t key_t;
140 typedef __mode_t mode_t;
141 typedef __nlink_t nlink_t;
142 typedef __pid_t pid_t;
143 typedef __rlim_t rlim_t;
144 typedef __segsz_t segsz_t;
145 typedef __swblk_t swblk_t;
146 typedef __uid_t uid_t;
147 typedef __useconds_t useconds_t;
148 typedef __suseconds_t suseconds_t;
149
150
151
152
153
154
155
156
157
158 typedef __in_addr_t in_addr_t;
159 typedef __in_port_t in_port_t;
160 typedef __sa_family_t sa_family_t;
161 typedef __socklen_t socklen_t;
162
163
164
165
166 #ifndef _CLOCK_T_DEFINED_
167 #define _CLOCK_T_DEFINED_
168 typedef __clock_t clock_t;
169 #endif
170
171 #ifndef _CLOCKID_T_DEFINED_
172 #define _CLOCKID_T_DEFINED_
173 typedef __clockid_t clockid_t;
174 #endif
175
176 #ifndef _SIZE_T_DEFINED_
177 #define _SIZE_T_DEFINED_
178 typedef __size_t size_t;
179 #endif
180
181 #ifndef _SSIZE_T_DEFINED_
182 #define _SSIZE_T_DEFINED_
183 typedef __ssize_t ssize_t;
184 #endif
185
186 #ifndef _TIME_T_DEFINED_
187 #define _TIME_T_DEFINED_
188 typedef __time_t time_t;
189 #endif
190
191 #ifndef _TIMER_T_DEFINED_
192 #define _TIMER_T_DEFINED_
193 typedef __timer_t timer_t;
194 #endif
195
196 #ifndef _OFF_T_DEFINED_
197 #define _OFF_T_DEFINED_
198 typedef __off_t off_t;
199 #endif
200
201
202
203
204
205
206 #if __BSD_VISIBLE && !defined(_KERNEL)
207 __BEGIN_DECLS
208 off_t lseek(int, off_t, int);
209 int ftruncate(int, off_t);
210 int truncate(const char *, off_t);
211 __END_DECLS
212 #endif
213
214 #if __BSD_VISIBLE
215
216 #define major(x) ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
217 #define minor(x) ((int32_t)((x) & 0xff) | (((x) & 0xffff0000) >> 8))
218 #define makedev(x,y) ((dev_t)((((x) & 0xff) << 8) | ((y) & 0xff) | (((y) & 0xffff00) << 8)))
219 #endif
220
221 #if __BSD_VISIBLE
222 #include <sys/select.h>
223 #endif
224
225 #if defined(__STDC__) && defined(_KERNEL)
226
227
228
229
230
231 struct proc;
232 struct pgrp;
233 struct ucred;
234 struct rusage;
235 struct file;
236 struct buf;
237 struct tty;
238 struct uio;
239 #endif
240
241 #endif