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>
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>
75 #ifdef COMPLETION_H_EXISTS
76 #include <linux/completion.h>
79 #else /* AFS_LINUX22_ENV */
80 #if defined(AFS_DARWIN_ENV)
83 typedef unsigned short etap_event_t;
86 #if !defined(AFS_OSF_ENV)
87 #include "../h/errno.h"
88 #include "../h/types.h"
89 #include "../h/param.h"
95 #include "../h/page.h"
96 #include "../h/region.h"
98 #include "../h/sysmacros.h"
99 #include "../h/signal.h"
100 #include "../h/var.h"
101 #endif /* AFS_AUX_ENV */
103 #include "../h/systm.h"
104 #include "../h/time.h"
108 #include "sys/statfs.h"
113 #include "../h/file.h"
114 #include "../h/fullstat.h"
115 #include "../h/vattr.h"
116 #include "../h/var.h"
117 #include "../h/access.h"
118 #endif /* AFS_AIX_ENV */
120 #if defined(AFS_SGI_ENV)
122 #include "../sys/sema.h"
123 #include "../sys/cmn_err.h"
125 #include <ksys/behavior.h>
126 #endif /* AFS_SGI64_ENV */
127 #include "../fs/efs_inode.h"
128 #ifdef AFS_SGI_EFS_IOPS_ENV
129 #include "../sgiefs/efs.h"
131 #include "../sys/kmem.h"
132 #include "../sys/cred.h"
133 #include "../sys/resource.h"
136 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
137 * is on (see afs_osi.h).
138 * In IRIX 6.5 we cannot have DEBUG turned on since certain
139 * system-defined structures have different members with DEBUG on, and
140 * this breaks our ability to interact with the rest of the kernel.
142 * Instead of using ASSERT(), we use our own osi_Assert().
144 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
146 #include "../sys/debug.h"
149 #include "../sys/debug.h"
152 #include "../sys/statvfs.h"
153 #include "../sys/sysmacros.h"
154 #include "../sys/fs_subr.h"
155 #include "../sys/siginfo.h"
156 #endif /* AFS_SGI_ENV */
158 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
159 # include "../h/kernel.h"
160 #endif /* !SUN5 && !SGI */
163 #include <sys/cmn_err.h> /* for kernel printf() prototype */
166 #if defined(AFS_SUN56_ENV)
167 #include "../h/vfs.h" /* stops SUN56 socketvar.h warnings */
168 #include "../h/stropts.h" /* stops SUN56 socketvar.h warnings */
169 #include "../h/stream.h" /* stops SUN56 socketvar.h errors */
172 #include "../h/socket.h"
173 #include "../h/socketvar.h"
174 #include "../h/protosw.h"
176 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
177 # include "../h/dirent.h"
179 # include "../h/sysmacros.h"
180 # include "../h/fs/ufs_fsdir.h"
181 # endif /* AFS_SUN5_ENV */
183 # include "../h/dir.h"
184 #endif /* SGI || SUN || HPUX */
187 # include "../h/smp_lock.h"
188 #endif /* AFS_DEC_ENV */
191 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
192 #include "../h/user.h"
193 #endif /* AFS_SGI64_ENV */
194 #define MACH_USER_API 1
195 #include "../h/file.h"
196 #include "../h/uio.h"
197 #include "../h/buf.h"
198 #include "../h/stat.h"
201 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
203 # include "../h/mount.h"
204 # include "../machine/psl.h"
205 # include "../afs/gfs_vnode.h"
209 # include <vfs/vfs.h>
210 # include <vfs/vnode.h>
211 # include <sys/inode.h>
212 # include <sys/mount.h>
213 # include <vm/vm_pager.h>
214 # include <kern/mfs.h>
215 # include <mach/vm_param.h>
216 # include <kern/parallel.h>
217 #endif /* AFS_MACH_ENV */
221 # include "../h/statvfs.h"
222 # endif /* AFS_SUN5_ENV */
224 struct vfspage; /* for vnode.h compiler warnings */
225 # include "../h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
226 # include "../h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
227 # endif /* AFS_HPUX_ENV */
228 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
229 # include <sys/uio.h>
230 # include <sys/mount.h>
231 # include <sys/namei.h>
232 # include <sys/vnode.h>
233 # include <sys/queue.h>
234 # include <sys/malloc.h>
236 # include <sys/ubc.h>
237 #define timeout_fcn_t mach_timeout_fcn_t
238 # include <kern/sched_prim.h>
240 MALLOC_DECLARE(M_AFS);
241 # include <ufs/ufs/dinode.h>
243 # include <vm/vm_extern.h>
244 # include <vm/pmap.h>
245 # include <vm/vm_map.h>
246 # include <sys/lock.h>
247 # include <sys/user.h>
251 #define doff_t int32_t
252 # include <ufs/ufs/quota.h>
253 # include <ufs/ufs/inode.h>
254 # include <ufs/ffs/fs.h>
256 # include "../h/vfs.h"
257 # include "../h/vnode.h"
259 # include "../h/fs/ufs_inode.h"
260 # include "../h/fs/ufs_mount.h"
262 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
263 # include "../ufs/inode.h"
264 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
265 # include "../ufs/mount.h"
266 # endif /* !AFS_HPUX_ENV */
267 # endif /* !AFS_AIX32_ENV */
268 # endif /* AFS_SUN5_ENV */
269 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
270 #endif /* AFS_DEC_ENV */
272 /* These mainly deal with networking and rpc headers */
273 #include "../netinet/in.h"
274 #undef MFREE /* defined at mount.h for AIX */
276 # include "../h/time.h"
278 # include "../h/mbuf.h"
279 #endif /* AFS_SUN5_ENV */
281 #include "../rpc/types.h"
282 #include "../rx/xdr.h"
285 # include "net/spl.h"
288 /* Miscellaneous headers */
289 #include "../h/proc.h"
290 #if !defined(AFS_FBSD_ENV)
291 #include "../h/ioctl.h"
292 #endif /* AFS_FBSD_ENV */
294 #if defined(AFS_HPUX101_ENV)
295 #include "../h/proc_iface.h"
296 #include "../h/vas.h"
299 #if defined(AFS_HPUX102_ENV)
300 #include "../h/unistd.h"
301 #include "../h/tty.h"
304 #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)
306 # include "../h/text.h"
310 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
311 # include "../h/flock.h" /* fcntl.h is a user-level include in aix */
313 # include "../h/fcntl.h"
314 #endif /* AIX || DEC */
316 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
317 # include "../h/unistd.h"
318 #endif /* SGI || SUN */
321 # include "../h/vmuser.h"
322 #endif /* AFS_AIX32_ENV */
324 #if defined(AFS_SUN5_ENV)
325 #include <sys/tiuser.h>
326 #include <sys/t_lock.h>
327 #include <sys/mutex.h>
328 #include <sys/vtrace.h>
329 #include <sys/pathname.h>
330 #include <sys/debug.h>
333 #else /* ! AFS_OSF_ENV */
334 /* All of the OSF/1 stuff is here */
335 #include <net/net_globals.h>
337 #include <sys/types.h>
338 #include <sys/param.h>
339 #include <sys/systm.h>
340 #include <sys/time.h>
341 #include <sys/kernel.h>
342 #include <sys/socket.h>
343 #include <sys/socketvar.h>
344 #include <sys/protosw.h>
346 #include <sys/user.h>
347 #include <sys/file.h>
350 #include <sys/stat.h>
351 #include <sys/vnode.h>
352 #include <ufs/inode.h>
353 #include <sys/mount.h>
354 #include <vm/vm_page.h>
355 #include <mach/vm_param.h>
356 #include <kern/parallel.h>
357 #include <mach/mach_types.h>
358 #ifndef AFS_OSF30_ENV
359 #include <kern/mfs.h>
361 #include <mach/vm_param.h>
362 #include <kern/parallel.h>
364 /* These mainly deal with networking and rpc headers */
365 #include <netinet/in.h>
366 #include <sys/mbuf.h>
367 #include <rpc/types.h>
375 #endif /* AFS_ALPHA_ENV */
378 #include <sys/proc.h>
379 #include <sys/ioctl.h>
381 #endif /* AFS_OSF_ENV */
382 #endif /* AFS_LINUX22_ENV */
383 #endif /* AFS_OBSD_ENV */
385 #endif /* __AFS_SYSINCLUDESH__ so idempotent */