Commit | Line | Data |
---|---|---|
805e021f CE |
1 | /* |
2 | * Copyright 2000, International Business Machines Corporation and others. | |
3 | * All Rights Reserved. | |
4 | * | |
5 | * This software has been released under the terms of the IBM Public | |
6 | * License. For details, see the LICENSE file in the top-level source | |
7 | * directory or online at http://www.openafs.org/dl/license10.html | |
8 | */ | |
9 | ||
10 | #ifdef UKERNEL | |
11 | # include <UKERNEL/sysincludes.h> | |
12 | #else | |
13 | ||
14 | #ifndef __AFS_SYSINCLUDESH__ | |
15 | #define __AFS_SYSINCLUDESH__ 1 | |
16 | ||
17 | #ifdef AFS_OBSD_ENV | |
18 | # include <sys/errno.h> | |
19 | # include <sys/types.h> | |
20 | # include <sys/param.h> | |
21 | # include <sys/lock.h> | |
22 | # include <sys/queue.h> | |
23 | # include <sys/resourcevar.h> | |
24 | # include <sys/kernel.h> | |
25 | # include <sys/proc.h> | |
26 | # include <sys/time.h> | |
27 | # include <sys/filedesc.h> | |
28 | # include <sys/file.h> | |
29 | # include <sys/socket.h> | |
30 | # include <sys/socketvar.h> | |
31 | # include <sys/dirent.h> | |
32 | # include <sys/user.h> | |
33 | # include <sys/uio.h> | |
34 | # include <sys/buf.h> | |
35 | # include <sys/stat.h> | |
36 | # include <sys/mount.h> | |
37 | # include <sys/vnode.h> | |
38 | # include <sys/malloc.h> | |
39 | # include <ufs/ffs/fs.h> | |
40 | # include <ufs/ufs/quota.h> | |
41 | # include <ufs/ufs/inode.h> | |
42 | # ifndef AFS_OBSD38_ENV | |
43 | # include <ufs/ufs/extattr.h> | |
44 | # endif | |
45 | # include <ufs/ufs/ufsmount.h> | |
46 | # ifndef MLEN | |
47 | # include <sys/mbuf.h> | |
48 | # include <net/if.h> | |
49 | # endif | |
50 | # include <sys/protosw.h> | |
51 | # include <sys/ioctl.h> | |
52 | # include <sys/timeout.h> | |
53 | ||
54 | #elif defined(AFS_NBSD40_ENV) | |
55 | # if defined(AFS_NBSD50_ENV) && !defined(AFS_NBSD70_ENV) | |
56 | # include <sys/simplelock.h> | |
57 | # endif | |
58 | # include <sys/errno.h> | |
59 | # include <sys/types.h> | |
60 | # include <sys/mount.h> /* may define MOUNT_AFS */ | |
61 | # include <sys/param.h> | |
62 | # include <sys/systm.h> | |
63 | # include <sys/conf.h> | |
64 | # include <sys/exec.h> | |
65 | # include <sys/lock.h> | |
66 | # include <sys/syscall.h> | |
67 | # include <sys/syscallargs.h> | |
68 | # include <sys/queue.h> | |
69 | # include <sys/resourcevar.h> | |
70 | # include <sys/kernel.h> | |
71 | # include <sys/proc.h> | |
72 | # include <sys/time.h> | |
73 | # include <sys/filedesc.h> | |
74 | # include <sys/exec.h> | |
75 | # include <sys/lock.h> | |
76 | # include <sys/syscall.h> | |
77 | # include <sys/syscallargs.h> | |
78 | # include <sys/queue.h> | |
79 | # include <sys/resourcevar.h> | |
80 | # include <sys/kernel.h> | |
81 | # include <sys/proc.h> | |
82 | # include <sys/time.h> | |
83 | # include <sys/filedesc.h> | |
84 | # include <sys/file.h> | |
85 | # include <sys/socket.h> | |
86 | # include <sys/socketvar.h> | |
87 | # include <sys/dirent.h> | |
88 | # include <sys/kauth.h> | |
89 | # include <sys/uio.h> | |
90 | # include <sys/buf.h> | |
91 | # include <sys/stat.h> | |
92 | # include <sys/file.h> | |
93 | # include <sys/namei.h> | |
94 | # include <sys/uio.h> | |
95 | # include <sys/buf.h> | |
96 | # include <sys/file.h> | |
97 | # include <sys/namei.h> | |
98 | # include <sys/vnode.h> | |
99 | # include <ufs/ffs/fs.h> | |
100 | # include <ufs/ufs/quota.h> | |
101 | # include <ufs/ufs/inode.h> | |
102 | # include <ufs/ufs/extattr.h> | |
103 | # include <ufs/ufs/ufsmount.h> | |
104 | # ifndef MLEN | |
105 | # include <sys/mbuf.h> | |
106 | # include <net/if.h> | |
107 | # endif /* !MLEN */ | |
108 | # include <sys/protosw.h> | |
109 | # include <sys/ioctl.h> | |
110 | ||
111 | #elif defined(AFS_LINUX22_ENV) | |
112 | # include <linux/version.h> | |
113 | # ifdef HAVE_LINUX_CONFIG_H | |
114 | # include <linux/config.h> | |
115 | # endif | |
116 | # include <linux/linkage.h> | |
117 | # include <linux/limits.h> | |
118 | # include <linux/wait.h> | |
119 | # include <linux/types.h> | |
120 | # include <linux/vfs.h> | |
121 | # include <linux/net.h> | |
122 | # include <linux/kdev_t.h> | |
123 | # include <linux/ioctl.h> | |
124 | # if defined(AFS_LINUX26_ENV) | |
125 | # include <linux/compat.h> | |
126 | # include <linux/backing-dev.h> | |
127 | # include <linux/pagemap.h> | |
128 | # include <linux/namei.h> | |
129 | # ifdef STRUCT_INODE_HAS_I_SECURITY | |
130 | # include <linux/security.h> | |
131 | # endif | |
132 | # include <linux/suspend.h> | |
133 | # endif | |
134 | /* Avoid conflicts with coda overloading AFS type namespace. Must precede | |
135 | * inclusion of uaccess.h. | |
136 | */ | |
137 | # ifndef _LINUX_CODA_FS_I | |
138 | # define _LINUX_CODA_FS_I | |
139 | # define _CODA_HEADER_ | |
140 | # define _CFS_HEADER_ | |
141 | struct coda_inode_info { | |
142 | }; | |
143 | # endif | |
144 | # ifndef _LINUX_XFS_FS_I | |
145 | # define _LINUX_XFS_FS_I | |
146 | struct xfs_inode_info { | |
147 | }; | |
148 | # endif | |
149 | # if defined(HAVE_LINUX_UACCESS_H) | |
150 | # include <linux/uaccess.h> | |
151 | # else | |
152 | # include <asm/uaccess.h> | |
153 | # endif | |
154 | # include <linux/list.h> | |
155 | # include <linux/dcache.h> | |
156 | # include <linux/mount.h> | |
157 | # include <linux/fs.h> | |
158 | # include <linux/quota.h> | |
159 | # include <linux/sched.h> | |
160 | # if defined(HAVE_LINUX_SCHED_SIGNAL_H) | |
161 | # include <linux/sched/signal.h> | |
162 | # endif | |
163 | # include <linux/mm.h> | |
164 | # include <linux/slab.h> | |
165 | # include <linux/proc_fs.h> | |
166 | # include <linux/string.h> | |
167 | # if defined(HAVE_LINUX_SEMAPHORE_H) | |
168 | # include <linux/semaphore.h> | |
169 | # else | |
170 | # include <asm/semaphore.h> | |
171 | # endif | |
172 | # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) | |
173 | # include <linux/mutex.h> | |
174 | # endif | |
175 | # include <linux/errno.h> | |
176 | # include <linux/completion.h> | |
177 | # if defined(HAVE_LINUX_EXPORTFS_H) | |
178 | # include <linux/exportfs.h> | |
179 | # endif | |
180 | # ifdef AFS_LINUX24_ENV | |
181 | # include <linux/pagemap.h> | |
182 | # endif | |
183 | ||
184 | #else /* AFS_LINUX22_ENV */ | |
185 | # if defined(AFS_DARWIN_ENV) | |
186 | # ifndef _MACH_ETAP_H_ | |
187 | # define _MACH_ETAP_H_ | |
188 | typedef unsigned short etap_event_t; | |
189 | # endif | |
190 | # endif | |
191 | ||
192 | # include "h/errno.h" | |
193 | # include "h/types.h" | |
194 | # include "h/param.h" | |
195 | ||
196 | # ifdef AFS_AUX_ENV | |
197 | # ifdef PAGING | |
198 | # include "h/mmu.h" | |
199 | # include "h/seg.h" | |
200 | # include "h/page.h" | |
201 | # include "h/region.h" | |
202 | # endif /* PAGING */ | |
203 | # include "h/sysmacros.h" | |
204 | # include "h/signal.h" | |
205 | # include "h/var.h" | |
206 | # endif /* AFS_AUX_ENV */ | |
207 | ||
208 | # include "h/systm.h" | |
209 | # include "h/time.h" | |
210 | ||
211 | # ifdef AFS_FBSD_ENV | |
212 | # include <sys/socket.h> | |
213 | # include <net/if.h> | |
214 | # include <net/if_var.h> | |
215 | # endif | |
216 | ||
217 | # ifdef AFS_AIX_ENV | |
218 | # ifdef AFS_AIX41_ENV | |
219 | # include "sys/statfs.h" | |
220 | # endif | |
221 | # ifdef AFS_AIX51_ENV | |
222 | # include "sys/acl.h" | |
223 | # endif | |
224 | # include "../h/file.h" | |
225 | # include "../h/fullstat.h" | |
226 | # include "../h/vattr.h" | |
227 | # include "../h/var.h" | |
228 | # include "../h/access.h" | |
229 | # endif /* AFS_AIX_ENV */ | |
230 | ||
231 | # if defined(AFS_SGI_ENV) | |
232 | # include "values.h" | |
233 | # include "sys/sema.h" | |
234 | # include "sys/cmn_err.h" | |
235 | # ifdef AFS_SGI64_ENV | |
236 | # include <ksys/behavior.h> | |
237 | /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL, | |
238 | * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from | |
239 | * older headers like we want the old behavior, so we fake it. */ | |
240 | # if defined(BHV_PREPARE) && !defined(CELL_CAPABLE) | |
241 | # define BHV_IS_BHVL(bhp) (0) | |
242 | # endif | |
243 | # endif /* AFS_SGI64_ENV */ | |
244 | # include "fs/efs_inode.h" | |
245 | # include "sys/kmem.h" | |
246 | # include "sys/cred.h" | |
247 | # include "sys/resource.h" | |
248 | ||
249 | /* | |
250 | * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG | |
251 | * is on (see afs_osi.h). | |
252 | * In IRIX 6.5 we cannot have DEBUG turned on since certain | |
253 | * system-defined structures have different members with DEBUG on, and | |
254 | * this breaks our ability to interact with the rest of the kernel. | |
255 | * | |
256 | * Instead of using ASSERT(), we use our own osi_Assert(). | |
257 | */ | |
258 | # if defined(AFS_SGI65_ENV) && !defined(DEBUG) | |
259 | # define DEBUG | |
260 | # include "sys/debug.h" | |
261 | # undef DEBUG | |
262 | # else | |
263 | # include "sys/debug.h" | |
264 | # endif | |
265 | ||
266 | # include "sys/statvfs.h" | |
267 | # include "sys/sysmacros.h" | |
268 | # include "sys/fs_subr.h" | |
269 | # include "sys/siginfo.h" | |
270 | # include "limits.h" | |
271 | # endif /* AFS_SGI_ENV */ | |
272 | ||
273 | # if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) | |
274 | # include "h/kernel.h" | |
275 | # endif /* !SUN5 && !SGI */ | |
276 | ||
277 | # ifdef AFS_SUN5_ENV | |
278 | # include <sys/cmn_err.h> /* for kernel printf() prototype */ | |
279 | # include "h/vfs.h" /* stops SUN5 socketvar.h warnings */ | |
280 | # include "h/stropts.h" /* stops SUN5 socketvar.h warnings */ | |
281 | # include "h/stream.h" /* stops SUN5 socketvar.h errors */ | |
282 | # endif | |
283 | ||
284 | # ifdef AFS_SUN510_ENV | |
285 | # include <sys/cred_impl.h> | |
286 | # include <sys/policy.h> | |
287 | # endif | |
288 | ||
289 | # include "h/socket.h" | |
290 | # include "h/socketvar.h" | |
291 | # include "h/protosw.h" | |
292 | ||
293 | # if defined(AFS_FBSD_ENV) | |
294 | # include "sys/limits.h" | |
295 | # endif | |
296 | ||
297 | # ifdef AFS_HPUX_ENV | |
298 | # include "limits.h" | |
299 | # endif | |
300 | ||
301 | # if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || \ | |
302 | defined(AFS_FBSD_ENV) || defined(AFS_NBSD40_ENV) | |
303 | # include "h/dirent.h" | |
304 | # ifdef AFS_SUN5_ENV | |
305 | # include "h/sysmacros.h" | |
306 | # include "h/fs/ufs_fsdir.h" | |
307 | # endif /* AFS_SUN5_ENV */ | |
308 | # else | |
309 | # include "h/dir.h" | |
310 | # endif /* SGI || SUN || HPUX */ | |
311 | ||
312 | # if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV) && \ | |
313 | !defined(AFS_NBSD40_ENV) | |
314 | # include "h/user.h" | |
315 | # endif /* AFS_SGI64_ENV */ | |
316 | # define MACH_USER_API 1 | |
317 | # if defined(AFS_FBSD_ENV) | |
318 | # include "h/bio.h" | |
319 | # include "h/filedesc.h" | |
320 | # endif | |
321 | # include "h/file.h" | |
322 | # include "h/uio.h" | |
323 | # include "h/buf.h" | |
324 | # include "h/stat.h" | |
325 | ||
326 | ||
327 | /* ----- The following mainly deal with vnodes/inodes stuff ------ */ | |
328 | # ifdef AFS_SUN5_ENV | |
329 | # include "h/statvfs.h" | |
330 | # endif /* AFS_SUN5_ENV */ | |
331 | # ifdef AFS_HPUX_ENV | |
332 | struct vfspage; /* for vnode.h compiler warnings */ | |
333 | # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */ | |
334 | # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */ | |
335 | # ifdef AFS_HPUX110_ENV | |
336 | # include "h/resource.h" | |
337 | # endif | |
338 | # ifdef AFS_HPUX1123_ENV | |
339 | # include <sys/user.h> | |
340 | # include <sys/cred.h> | |
341 | # endif | |
342 | # endif /* AFS_HPUX_ENV */ | |
343 | # if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) | |
344 | # if defined(AFS_FBSD_ENV) | |
345 | struct vop_getwritemount_args; | |
346 | # endif | |
347 | # include <sys/uio.h> | |
348 | # include <sys/mount.h> | |
349 | # include <sys/namei.h> | |
350 | # ifdef AFS_DARWIN80_ENV | |
351 | # include <sys/kauth.h> | |
352 | # include <string.h> | |
353 | # endif | |
354 | # include <sys/vnode.h> | |
355 | # include <sys/queue.h> | |
356 | # ifndef AFS_NBSD40_ENV | |
357 | # include <sys/malloc.h> | |
358 | # endif | |
359 | # ifdef AFS_FBSD_ENV | |
360 | MALLOC_DECLARE(M_AFS); | |
361 | # include <ufs/ufs/dinode.h> | |
362 | # include <vm/vm.h> | |
363 | # include <vm/vm_extern.h> | |
364 | # include <vm/pmap.h> | |
365 | # include <vm/vm_map.h> | |
366 | # include <sys/lock.h> | |
367 | # include <sys/user.h> | |
368 | # else | |
369 | # include <sys/ubc.h> | |
370 | # define timeout_fcn_t mach_timeout_fcn_t | |
371 | # include <kern/sched_prim.h> | |
372 | # endif | |
373 | # undef timeout_fcn_t | |
374 | # define _DIR_H_ | |
375 | # define doff_t int32_t | |
376 | # ifndef AFS_DARWIN80_ENV | |
377 | # include <ufs/ufs/quota.h> | |
378 | # include <ufs/ufs/inode.h> | |
379 | # include <ufs/ffs/fs.h> | |
380 | # endif | |
381 | # else | |
382 | # ifndef AFS_NBSD40_ENV | |
383 | # include "h/vfs.h" | |
384 | # include "h/vnode.h" | |
385 | # endif | |
386 | # ifdef AFS_SUN5_ENV | |
387 | # include "h/fs/ufs_inode.h" | |
388 | # include "h/fs/ufs_mount.h" | |
389 | # else | |
390 | # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_NBSD40_ENV) | |
391 | # include "ufs/inode.h" | |
392 | # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_NBSD40_ENV) | |
393 | # include "ufs/mount.h" | |
394 | # endif /* !AFS_HPUX_ENV */ | |
395 | # endif /* !AFS_AIX32_ENV */ | |
396 | # endif /* AFS_SUN5_ENV */ | |
397 | # endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */ | |
398 | ||
399 | /* These mainly deal with networking and rpc headers */ | |
400 | # include "netinet/in.h" | |
401 | # undef MFREE /* defined at mount.h for AIX */ | |
402 | # ifdef AFS_SUN5_ENV | |
403 | # include "h/time.h" | |
404 | # else | |
405 | # if !defined(AFS_HPUX_ENV) | |
406 | # include "h/mbuf.h" | |
407 | # endif | |
408 | # endif /* AFS_SUN5_ENV */ | |
409 | ||
410 | # include "rx/xdr.h" | |
411 | ||
412 | /* Miscellaneous headers */ | |
413 | # include "h/proc.h" | |
414 | # if !defined(AFS_FBSD_ENV) | |
415 | # include "h/ioctl.h" | |
416 | # endif /* AFS_FBSD_ENV */ | |
417 | ||
418 | # if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV) | |
419 | # include "h/proc_iface.h" | |
420 | # include "h/vas.h" | |
421 | # endif | |
422 | ||
423 | # if defined(AFS_HPUX102_ENV) | |
424 | # include "h/unistd.h" | |
425 | # include "h/tty.h" | |
426 | # endif | |
427 | ||
428 | # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_NBSD40_ENV) | |
429 | ||
430 | # include "h/text.h" | |
431 | # endif | |
432 | ||
433 | ||
434 | # if defined(AFS_AIX_ENV) | |
435 | # include "h/flock.h" /* fcntl.h is a user-level include in aix */ | |
436 | # else | |
437 | # include "h/fcntl.h" | |
438 | # endif /* AIX */ | |
439 | ||
440 | # if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) | |
441 | # include "h/unistd.h" | |
442 | # endif /* SGI || SUN */ | |
443 | ||
444 | # ifdef AFS_AIX32_ENV | |
445 | # include "h/vmuser.h" | |
446 | # endif /* AFS_AIX32_ENV */ | |
447 | ||
448 | # if defined(AFS_SUN5_ENV) | |
449 | # include <sys/tiuser.h> | |
450 | # include <sys/t_lock.h> | |
451 | # include <sys/mutex.h> | |
452 | # include <sys/vtrace.h> | |
453 | # include <sys/pathname.h> | |
454 | # include <sys/debug.h> | |
455 | # endif | |
456 | ||
457 | #endif /* AFS_LINUX22_ENV */ | |
458 | ||
459 | #endif /* __AFS_SYSINCLUDESH__ so idempotent */ | |
460 | ||
461 | #endif |