2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef __AFS_SYSINCLUDESH__
11 #define __AFS_SYSINCLUDESH__ 1
14 #include <sys/errno.h>
15 #include <sys/types.h>
16 #include <sys/param.h>
18 #include <sys/queue.h>
19 #include <sys/resourcevar.h>
20 #include <sys/kernel.h>
22 #include <sys/systm.h>
24 #include <sys/filedesc.h>
26 #include <sys/socket.h>
27 #include <sys/socketvar.h>
28 #include <sys/dirent.h>
33 #include <sys/mount.h>
34 #include <sys/vnode.h>
35 #include <sys/malloc.h>
36 #include <ufs/ffs/fs.h>
37 #include <ufs/ufs/quota.h>
38 #include <ufs/ufs/inode.h>
39 #include <ufs/ufs/extattr.h>
40 #include <ufs/ufs/ufsmount.h>
42 #include <sys/protosw.h>
43 #include <sys/ioctl.h>
44 #include <sys/timeout.h>
46 #else /* AFS_OBSD_ENV */
47 #ifdef AFS_LINUX22_ENV
48 #include <linux/version.h>
49 #include <linux/config.h>
50 #include <linux/linkage.h>
51 #include <linux/limits.h>
52 #include <linux/wait.h>
53 #include <linux/types.h>
54 #include <linux/vfs.h>
55 #include <linux/net.h>
56 #include <linux/kdev_t.h>
57 #include <linux/ioctl.h>
58 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
59 * inclusion of uaccess.h.
61 #define _LINUX_CODA_FS_I
63 struct coda_inode_info {};
64 #define _LINUX_XFS_FS_I
65 struct xfs_inode_info {};
66 #include <asm/uaccess.h>
67 #include <linux/list.h>
68 #include <linux/dcache.h>
70 #include <linux/quota.h>
71 #include <linux/sched.h>
73 #include <linux/string.h>
74 #include <asm/semaphore.h>
75 #include <linux/errno.h>
76 #ifdef COMPLETION_H_EXISTS
77 #include <linux/completion.h>
80 #else /* AFS_LINUX22_ENV */
81 #if defined(AFS_DARWIN_ENV)
84 typedef unsigned short etap_event_t;
87 #if !defined(AFS_OSF_ENV)
88 #include "../h/errno.h"
89 #include "../h/types.h"
90 #include "../h/param.h"
96 #include "../h/page.h"
97 #include "../h/region.h"
99 #include "../h/sysmacros.h"
100 #include "../h/signal.h"
101 #include "../h/var.h"
102 #endif /* AFS_AUX_ENV */
104 #include "../h/systm.h"
105 #include "../h/time.h"
109 #include "sys/statfs.h"
114 #include "../h/file.h"
115 #include "../h/fullstat.h"
116 #include "../h/vattr.h"
117 #include "../h/var.h"
118 #include "../h/access.h"
119 #endif /* AFS_AIX_ENV */
121 #if defined(AFS_SGI_ENV)
123 #include "../sys/sema.h"
124 #include "../sys/cmn_err.h"
126 #include <ksys/behavior.h>
127 #endif /* AFS_SGI64_ENV */
128 #include "../fs/efs_inode.h"
129 #ifdef AFS_SGI_EFS_IOPS_ENV
130 #include "../sgiefs/efs.h"
132 #include "../sys/kmem.h"
133 #include "../sys/cred.h"
134 #include "../sys/resource.h"
137 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
138 * is on (see afs_osi.h).
139 * In IRIX 6.5 we cannot have DEBUG turned on since certain
140 * system-defined structures have different members with DEBUG on, and
141 * this breaks our ability to interact with the rest of the kernel.
143 * Instead of using ASSERT(), we use our own osi_Assert().
145 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
147 #include "../sys/debug.h"
150 #include "../sys/debug.h"
153 #include "../sys/statvfs.h"
154 #include "../sys/sysmacros.h"
155 #include "../sys/fs_subr.h"
156 #include "../sys/siginfo.h"
157 #endif /* AFS_SGI_ENV */
159 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
160 # include "../h/kernel.h"
161 #endif /* !SUN5 && !SGI */
164 #include <sys/cmn_err.h> /* for kernel printf() prototype */
167 #if defined(AFS_SUN56_ENV)
168 #include "../h/vfs.h" /* stops SUN56 socketvar.h warnings */
169 #include "../h/stropts.h" /* stops SUN56 socketvar.h warnings */
170 #include "../h/stream.h" /* stops SUN56 socketvar.h errors */
173 #include "../h/socket.h"
174 #include "../h/socketvar.h"
175 #include "../h/protosw.h"
177 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
178 # include "../h/dirent.h"
180 # include "../h/sysmacros.h"
181 # include "../h/fs/ufs_fsdir.h"
182 # endif /* AFS_SUN5_ENV */
184 # include "../h/dir.h"
185 #endif /* SGI || SUN || HPUX */
188 # include "../h/smp_lock.h"
189 #endif /* AFS_DEC_ENV */
192 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
193 #include "../h/user.h"
194 #endif /* AFS_SGI64_ENV */
195 #define MACH_USER_API 1
196 #include "../h/file.h"
197 #include "../h/uio.h"
198 #include "../h/buf.h"
199 #include "../h/stat.h"
202 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
204 # include "../h/mount.h"
205 # include "../machine/psl.h"
206 # include "../afs/gfs_vnode.h"
210 # include <vfs/vfs.h>
211 # include <vfs/vnode.h>
212 # include <sys/inode.h>
213 # include <sys/mount.h>
214 # include <vm/vm_pager.h>
215 # include <kern/mfs.h>
216 # include <mach/vm_param.h>
217 # include <kern/parallel.h>
218 #endif /* AFS_MACH_ENV */
222 # include "../h/statvfs.h"
223 # endif /* AFS_SUN5_ENV */
225 struct vfspage; /* for vnode.h compiler warnings */
226 # include "../h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
227 # include "../h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
228 # endif /* AFS_HPUX_ENV */
229 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
230 # include <sys/uio.h>
231 # include <sys/mount.h>
232 # include <sys/namei.h>
233 # include <sys/vnode.h>
234 # include <sys/queue.h>
235 # include <sys/malloc.h>
237 # include <sys/ubc.h>
238 #define timeout_fcn_t mach_timeout_fcn_t
239 # include <kern/sched_prim.h>
241 MALLOC_DECLARE(M_AFS);
242 # include <ufs/ufs/dinode.h>
244 # include <vm/vm_extern.h>
245 # include <vm/pmap.h>
246 # include <vm/vm_map.h>
247 # include <sys/lock.h>
248 # include <sys/user.h>
252 #define doff_t int32_t
253 # include <ufs/ufs/quota.h>
254 # include <ufs/ufs/inode.h>
255 # include <ufs/ffs/fs.h>
257 # include "../h/vfs.h"
258 # include "../h/vnode.h"
260 # include "../h/fs/ufs_inode.h"
261 # include "../h/fs/ufs_mount.h"
263 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
264 # include "../ufs/inode.h"
265 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
266 # include "../ufs/mount.h"
267 # endif /* !AFS_HPUX_ENV */
268 # endif /* !AFS_AIX32_ENV */
269 # endif /* AFS_SUN5_ENV */
270 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
271 #endif /* AFS_DEC_ENV */
273 /* These mainly deal with networking and rpc headers */
274 #include "../netinet/in.h"
275 #undef MFREE /* defined at mount.h for AIX */
277 # include "../h/time.h"
279 # include "../h/mbuf.h"
280 #endif /* AFS_SUN5_ENV */
282 #include "../rpc/types.h"
283 #include "../rx/xdr.h"
286 # include "net/spl.h"
289 /* Miscellaneous headers */
290 #include "../h/proc.h"
291 #if !defined(AFS_FBSD_ENV)
292 #include "../h/ioctl.h"
293 #endif /* AFS_FBSD_ENV */
295 #if defined(AFS_HPUX101_ENV)
296 #include "../h/proc_iface.h"
297 #include "../h/vas.h"
300 #if defined(AFS_HPUX102_ENV)
301 #include "../h/unistd.h"
302 #include "../h/tty.h"
305 #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN_ENV) && !defined(AFS_MACH_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
307 # include "../h/text.h"
311 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
312 # include "../h/flock.h" /* fcntl.h is a user-level include in aix */
314 # include "../h/fcntl.h"
315 #endif /* AIX || DEC */
317 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
318 # include "../h/unistd.h"
319 #endif /* SGI || SUN */
322 # include "../h/vmuser.h"
323 #endif /* AFS_AIX32_ENV */
325 #if defined(AFS_SUN5_ENV)
326 #include <sys/tiuser.h>
327 #include <sys/t_lock.h>
328 #include <sys/mutex.h>
329 #include <sys/vtrace.h>
330 #include <sys/pathname.h>
331 #include <sys/debug.h>
334 #else /* ! AFS_OSF_ENV */
335 /* All of the OSF/1 stuff is here */
336 #include <net/net_globals.h>
338 #include <sys/types.h>
339 #include <sys/param.h>
340 #include <sys/systm.h>
341 #include <sys/time.h>
342 #include <sys/kernel.h>
343 #include <sys/socket.h>
344 #include <sys/socketvar.h>
345 #include <sys/protosw.h>
347 #include <sys/user.h>
348 #include <sys/file.h>
351 #include <sys/stat.h>
352 #include <sys/vnode.h>
353 #include <ufs/inode.h>
354 #include <sys/mount.h>
355 #include <vm/vm_page.h>
356 #include <mach/vm_param.h>
357 #include <kern/parallel.h>
358 #include <mach/mach_types.h>
359 #ifndef AFS_OSF30_ENV
360 #include <kern/mfs.h>
362 #include <mach/vm_param.h>
363 #include <kern/parallel.h>
365 /* These mainly deal with networking and rpc headers */
366 #include <netinet/in.h>
367 #include <sys/mbuf.h>
368 #include <rpc/types.h>
376 #endif /* AFS_ALPHA_ENV */
379 #include <sys/proc.h>
380 #include <sys/ioctl.h>
382 #endif /* AFS_OSF_ENV */
383 #endif /* AFS_LINUX22_ENV */
384 #endif /* AFS_OBSD_ENV */
386 #endif /* __AFS_SYSINCLUDESH__ so idempotent */