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/ufsmount.h>
41 #include <sys/protosw.h>
42 #include <sys/ioctl.h>
43 #include <vm/vm_kern.h>
45 #else /* AFS_OBSD_ENV */
46 #ifdef AFS_LINUX22_ENV
47 #include <linux/version.h>
48 #include <linux/config.h>
49 #include <linux/linkage.h>
50 #include <linux/limits.h>
51 #include <linux/wait.h>
52 #include <linux/types.h>
53 #include <linux/vfs.h>
54 #include <linux/net.h>
55 #include <linux/kdev_t.h>
56 #include <linux/ioctl.h>
57 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
58 * inclusion of uaccess.h.
60 #define _LINUX_CODA_FS_I
62 struct coda_inode_info {};
63 #define _LINUX_XFS_FS_I
64 struct xfs_inode_info {};
65 #include <asm/uaccess.h>
66 #include <linux/list.h>
67 #include <linux/dcache.h>
69 #include <linux/quota.h>
70 #include <linux/sched.h>
72 #include <linux/string.h>
73 #include <asm/semaphore.h>
74 #include <linux/errno.h>
76 #else /* AFS_LINUX22_ENV */
77 #if defined(AFS_DARWIN_ENV)
80 typedef unsigned short etap_event_t;
83 #if !defined(AFS_OSF_ENV)
84 #include "../h/errno.h"
85 #include "../h/types.h"
86 #include "../h/param.h"
92 #include "../h/page.h"
93 #include "../h/region.h"
95 #include "../h/sysmacros.h"
96 #include "../h/signal.h"
98 #endif /* AFS_AUX_ENV */
100 #include "../h/systm.h"
101 #include "../h/time.h"
105 #include "sys/statfs.h"
110 #include "../h/file.h"
111 #include "../h/fullstat.h"
112 #include "../h/vattr.h"
113 #include "../h/var.h"
114 #include "../h/access.h"
115 #endif /* AFS_AIX_ENV */
117 #if defined(AFS_SGI_ENV)
119 #include "../sys/sema.h"
120 #include "../sys/cmn_err.h"
122 #include <ksys/behavior.h>
123 #endif /* AFS_SGI64_ENV */
124 #include "../fs/efs_inode.h"
125 #ifdef AFS_SGI_EFS_IOPS_ENV
126 #include "../sgiefs/efs.h"
128 #include "../sys/kmem.h"
129 #include "../sys/cred.h"
130 #include "../sys/resource.h"
133 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
134 * is on (see afs_osi.h).
135 * In IRIX 6.5 we cannot have DEBUG turned on since certain
136 * system-defined structures have different members with DEBUG on, and
137 * this breaks our ability to interact with the rest of the kernel.
139 * Instead of using ASSERT(), we use our own osi_Assert().
141 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
143 #include "../sys/debug.h"
146 #include "../sys/debug.h"
149 #include "../sys/statvfs.h"
150 #include "../sys/sysmacros.h"
151 #include "../sys/fs_subr.h"
152 #include "../sys/siginfo.h"
153 #endif /* AFS_SGI_ENV */
155 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
156 # include "../h/kernel.h"
157 #endif /* !SUN5 && !SGI */
160 #include <sys/cmn_err.h> /* for kernel printf() prototype */
163 #if defined(AFS_SUN56_ENV)
164 #include "../h/vfs.h" /* stops SUN56 socketvar.h warnings */
165 #include "../h/stropts.h" /* stops SUN56 socketvar.h warnings */
166 #include "../h/stream.h" /* stops SUN56 socketvar.h errors */
169 #include "../h/socket.h"
170 #include "../h/socketvar.h"
171 #include "../h/protosw.h"
173 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
174 # include "../h/dirent.h"
176 # include "../h/sysmacros.h"
177 # include "../h/fs/ufs_fsdir.h"
178 # endif /* AFS_SUN5_ENV */
180 # include "../h/dir.h"
181 #endif /* SGI || SUN || HPUX */
184 # include "../h/smp_lock.h"
185 #endif /* AFS_DEC_ENV */
188 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
189 #include "../h/user.h"
190 #endif /* AFS_SGI64_ENV */
191 #define MACH_USER_API 1
192 #include "../h/file.h"
193 #include "../h/uio.h"
194 #include "../h/buf.h"
195 #include "../h/stat.h"
198 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
200 # include "../h/mount.h"
201 # include "../machine/psl.h"
202 # include "../afs/gfs_vnode.h"
206 # include <vfs/vfs.h>
207 # include <vfs/vnode.h>
208 # include <sys/inode.h>
209 # include <sys/mount.h>
210 # include <vm/vm_pager.h>
211 # include <kern/mfs.h>
212 # include <mach/vm_param.h>
213 # include <kern/parallel.h>
214 #endif /* AFS_MACH_ENV */
218 # include "../h/statvfs.h"
219 # endif /* AFS_SUN5_ENV */
221 struct vfspage; /* for vnode.h compiler warnings */
222 # include "../h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
223 # include "../h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
224 # endif /* AFS_HPUX_ENV */
225 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
226 # include <sys/uio.h>
227 # include <sys/mount.h>
228 # include <sys/namei.h>
229 # include <sys/vnode.h>
230 # include <sys/queue.h>
231 # include <sys/malloc.h>
233 # include <sys/ubc.h>
234 #define timeout_fcn_t mach_timeout_fcn_t
235 # include <kern/sched_prim.h>
237 MALLOC_DECLARE(M_AFS);
238 # include <ufs/ufs/dinode.h>
240 # include <vm/vm_extern.h>
241 # include <vm/pmap.h>
242 # include <vm/vm_map.h>
243 # include <sys/lock.h>
244 # include <sys/user.h>
248 #define doff_t int32_t
249 # include <ufs/ufs/quota.h>
250 # include <ufs/ufs/inode.h>
251 # include <ufs/ffs/fs.h>
253 # include "../h/vfs.h"
254 # include "../h/vnode.h"
256 # include "../h/fs/ufs_inode.h"
257 # include "../h/fs/ufs_mount.h"
259 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
260 # include "../ufs/inode.h"
261 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
262 # include "../ufs/mount.h"
263 # endif /* !AFS_HPUX_ENV */
264 # endif /* !AFS_AIX32_ENV */
265 # endif /* AFS_SUN5_ENV */
266 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
267 #endif /* AFS_DEC_ENV */
269 /* These mainly deal with networking and rpc headers */
270 #include "../netinet/in.h"
271 #undef MFREE /* defined at mount.h for AIX */
273 # include "../h/time.h"
275 # include "../h/mbuf.h"
276 #endif /* AFS_SUN5_ENV */
278 #include "../rpc/types.h"
279 #include "../rx/xdr.h"
282 # include "net/spl.h"
285 /* Miscellaneous headers */
286 #include "../h/proc.h"
287 #if !defined(AFS_FBSD_ENV)
288 #include "../h/ioctl.h"
289 #endif /* AFS_FBSD_ENV */
291 #if defined(AFS_HPUX101_ENV)
292 #include "../h/proc_iface.h"
293 #include "../h/vas.h"
296 #if defined(AFS_HPUX102_ENV)
297 #include "../h/unistd.h"
298 #include "../h/tty.h"
301 #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)
303 # include "../h/text.h"
307 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
308 # include "../h/flock.h" /* fcntl.h is a user-level include in aix */
310 # include "../h/fcntl.h"
311 #endif /* AIX || DEC */
313 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
314 # include "../h/unistd.h"
315 #endif /* SGI || SUN */
318 # include "../h/vmuser.h"
319 #endif /* AFS_AIX32_ENV */
321 #if defined(AFS_SUN5_ENV)
322 #include <sys/tiuser.h>
323 #include <sys/t_lock.h>
324 #include <sys/mutex.h>
325 #include <sys/vtrace.h>
326 #include <sys/pathname.h>
327 #include <sys/debug.h>
330 #else /* ! AFS_OSF_ENV */
331 /* All of the OSF/1 stuff is here */
332 #include <net/net_globals.h>
334 #include <sys/types.h>
335 #include <sys/param.h>
336 #include <sys/systm.h>
337 #include <sys/time.h>
338 #include <sys/kernel.h>
339 #include <sys/socket.h>
340 #include <sys/socketvar.h>
341 #include <sys/protosw.h>
343 #include <sys/user.h>
344 #include <sys/file.h>
347 #include <sys/stat.h>
348 #include <sys/vnode.h>
349 #include <ufs/inode.h>
350 #include <sys/mount.h>
351 #include <vm/vm_page.h>
352 #include <mach/vm_param.h>
353 #include <kern/parallel.h>
354 #include <mach/mach_types.h>
355 #ifndef AFS_OSF30_ENV
356 #include <kern/mfs.h>
358 #include <mach/vm_param.h>
359 #include <kern/parallel.h>
361 /* These mainly deal with networking and rpc headers */
362 #include <netinet/in.h>
363 #include <sys/mbuf.h>
364 #include <rpc/types.h>
372 #endif /* AFS_ALPHA_ENV */
375 #include <sys/proc.h>
376 #include <sys/ioctl.h>
378 #endif /* AFS_OSF_ENV */
379 #endif /* AFS_LINUX22_ENV */
380 #endif /* AFS_OBSD_ENV */
382 #endif /* __AFS_SYSINCLUDESH__ so idempotent */