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) || defined(AFS_FBSD_ENV)
79 typedef unsigned short etap_event_t;
81 #if !defined(AFS_OSF_ENV)
82 #include "../h/errno.h"
83 #include "../h/types.h"
84 #include "../h/param.h"
90 #include "../h/page.h"
91 #include "../h/region.h"
93 #include "../h/sysmacros.h"
94 #include "../h/signal.h"
96 #endif /* AFS_AUX_ENV */
98 #include "../h/systm.h"
99 #include "../h/time.h"
103 #include "sys/statfs.h"
105 #include "../h/file.h"
106 #include "../h/fullstat.h"
107 #include "../h/vattr.h"
108 #include "../h/var.h"
109 #include "../h/access.h"
110 #endif /* AFS_AIX_ENV */
112 #if defined(AFS_SGI_ENV)
114 #include "../sys/sema.h"
115 #include "../sys/cmn_err.h"
117 #include <ksys/behavior.h>
118 #endif /* AFS_SGI64_ENV */
119 #include "../fs/efs_inode.h"
120 #ifdef AFS_SGI_EFS_IOPS_ENV
121 #include "../sgiefs/efs.h"
123 #include "../sys/kmem.h"
124 #include "../sys/cred.h"
125 #include "../sys/resource.h"
128 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
129 * is on (see afs_osi.h).
130 * In IRIX 6.5 we cannot have DEBUG turned on since certain
131 * system-defined structures have different members with DEBUG on, and
132 * this breaks our ability to interact with the rest of the kernel.
134 * Instead of using ASSERT(), we use our own osi_Assert().
136 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
138 #include "../sys/debug.h"
141 #include "../sys/debug.h"
144 #include "../sys/statvfs.h"
145 #include "../sys/sysmacros.h"
146 #include "../sys/fs_subr.h"
147 #include "../sys/siginfo.h"
148 #endif /* AFS_SGI_ENV */
150 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
151 # include "../h/kernel.h"
152 #endif /* !SUN5 && !SGI */
155 #include <sys/cmn_err.h> /* for kernel printf() prototype */
158 #if defined(AFS_SUN56_ENV)
159 #include "../h/vfs.h" /* stops SUN56 socketvar.h warnings */
160 #include "../h/stropts.h" /* stops SUN56 socketvar.h warnings */
161 #include "../h/stream.h" /* stops SUN56 socketvar.h errors */
164 #include "../h/socket.h"
165 #include "../h/socketvar.h"
166 #include "../h/protosw.h"
168 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
169 # include "../h/dirent.h"
171 # include "../h/sysmacros.h"
172 # include "../h/fs/ufs_fsdir.h"
173 # endif /* AFS_SUN5_ENV */
175 # include "../h/dir.h"
176 #endif /* SGI || SUN || HPUX */
179 # include "../h/smp_lock.h"
180 #endif /* AFS_DEC_ENV */
183 #ifndef AFS_SGI64_ENV
184 #include "../h/user.h"
185 #endif /* AFS_SGI64_ENV */
186 #define MACH_USER_API 1
187 #include "../h/file.h"
188 #include "../h/uio.h"
189 #include "../h/buf.h"
190 #include "../h/stat.h"
193 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
195 # include "../h/mount.h"
196 # include "../machine/psl.h"
197 # include "../afs/gfs_vnode.h"
201 # include <vfs/vfs.h>
202 # include <vfs/vnode.h>
203 # include <sys/inode.h>
204 # include <sys/mount.h>
205 # include <vm/vm_pager.h>
206 # include <kern/mfs.h>
207 # include <mach/vm_param.h>
208 # include <kern/parallel.h>
209 #endif /* AFS_MACH_ENV */
213 # include "../h/statvfs.h"
214 # endif /* AFS_SUN5_ENV */
216 struct vfspage; /* for vnode.h compiler warnings */
217 # include "../h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
218 # include "../h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
219 # endif /* AFS_HPUX_ENV */
220 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
221 # include <sys/uio.h>
222 # include <sys/mount.h>
223 # include <sys/namei.h>
224 # include <sys/vnode.h>
225 # include <sys/queue.h>
227 # include <sys/ubc.h>
228 #define timeout_fcn_t mach_timeout_fcn_t
229 # include <kern/sched_prim.h>
231 # include <ufs/ufs/dinode.h>
233 # include <vm/vm_extern.h>
234 # include <vm/pmap.h>
235 # include <vm/vm_map.h>
236 # include <sys/lock.h>
240 #define doff_t int32_t
241 # include <ufs/ufs/quota.h>
242 # include <ufs/ufs/inode.h>
243 # include <ufs/ffs/fs.h>
245 # include "../h/vfs.h"
246 # include "../h/vnode.h"
248 # include "../h/fs/ufs_inode.h"
249 # include "../h/fs/ufs_mount.h"
251 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
252 # include "../ufs/inode.h"
253 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
254 # include "../ufs/mount.h"
255 # endif /* !AFS_HPUX_ENV */
256 # endif /* !AFS_AIX32_ENV */
257 # endif /* AFS_SUN5_ENV */
258 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
259 #endif /* AFS_DEC_ENV */
261 /* These mainly deal with networking and rpc headers */
262 #include "../netinet/in.h"
263 #undef MFREE /* defined at mount.h for AIX */
265 # include "../h/time.h"
267 # include "../h/mbuf.h"
268 #endif /* AFS_SUN5_ENV */
270 #include "../rpc/types.h"
271 #include "../rpc/xdr.h"
274 # include "net/spl.h"
277 /* Miscellaneous headers */
278 #include "../h/proc.h"
279 #if !defined(AFS_FBSD_ENV)
280 #include "../h/ioctl.h"
281 #endif /* AFS_FBSD_ENV */
283 #if defined(AFS_HPUX101_ENV)
284 #include "../h/proc_iface.h"
285 #include "../h/vas.h"
288 #if defined(AFS_HPUX102_ENV)
289 #include "../h/unistd.h"
290 #include "../h/tty.h"
293 #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)
295 # include "../h/text.h"
299 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
300 # include "../h/flock.h" /* fcntl.h is a user-level include in aix */
302 # include "../h/fcntl.h"
303 #endif /* AIX || DEC */
305 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
306 # include "../h/unistd.h"
307 #endif /* SGI || SUN */
310 # include "../h/vmuser.h"
311 #endif /* AFS_AIX32_ENV */
313 #if defined(AFS_SUN5_ENV)
314 #include <sys/tiuser.h>
315 #include <sys/t_lock.h>
316 #include <sys/mutex.h>
317 #include <sys/vtrace.h>
318 #include <sys/pathname.h>
319 #include <sys/debug.h>
322 #else /* ! AFS_OSF_ENV */
323 /* All of the OSF/1 stuff is here */
324 #include <net/net_globals.h>
326 #include <sys/types.h>
327 #include <sys/param.h>
328 #include <sys/systm.h>
329 #include <sys/time.h>
330 #include <sys/kernel.h>
331 #include <sys/socket.h>
332 #include <sys/socketvar.h>
333 #include <sys/protosw.h>
335 #include <sys/user.h>
336 #include <sys/file.h>
339 #include <sys/stat.h>
340 #include <sys/vnode.h>
341 #include <ufs/inode.h>
342 #include <sys/mount.h>
343 #include <vm/vm_page.h>
344 #include <mach/vm_param.h>
345 #include <kern/parallel.h>
346 #include <mach/mach_types.h>
347 #ifndef AFS_OSF30_ENV
348 #include <kern/mfs.h>
350 #include <mach/vm_param.h>
351 #include <kern/parallel.h>
353 /* These mainly deal with networking and rpc headers */
354 #include <netinet/in.h>
355 #include <sys/mbuf.h>
356 #include <rpc/types.h>
364 #endif /* AFS_ALPHA_ENV */
367 #include <sys/proc.h>
368 #include <sys/ioctl.h>
370 #endif /* AFS_OSF_ENV */
371 #endif /* AFS_LINUX22_ENV */
372 #endif /* AFS_OBSD_ENV */
374 #endif /* __AFS_SYSINCLUDESH__ so idempotent */