d0b4cbdfa2292e62a7a64efc1139db4381548a80
[openafs.git] / src / afs / sysincludes.h
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 #ifndef __AFS_SYSINCLUDESH__
11 #define __AFS_SYSINCLUDESH__ 1
12
13 #ifdef AFS_LINUX22_ENV
14 #include <linux/version.h>
15 #include <linux/config.h>
16 #include <linux/linkage.h>
17 #include <linux/limits.h>
18 #include <linux/wait.h>
19 #include <linux/types.h>
20 #include <linux/vfs.h>
21 #include <linux/net.h>
22 #include <linux/kdev_t.h>
23 #include <linux/ioctl.h>
24 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
25  * inclusion of uaccess.h.
26  */
27 #define _LINUX_CODA_FS_I
28 #define _CFS_HEADER_
29 struct coda_inode_info {};
30 #include <asm/uaccess.h>
31 #include <linux/list.h>
32 #include <linux/dcache.h>
33 #include <linux/fs.h>
34 #include <linux/quota.h>
35 #include <linux/sched.h>
36 #include <linux/mm.h>
37 #include <linux/string.h>
38 #include <asm/semaphore.h>
39 #include <linux/errno.h>
40
41 #else /* AFS_LINUX22_ENV */
42 #if     !defined(AFS_OSF_ENV)
43 #include "../h/errno.h"
44 #include "../h/types.h"
45 #include "../h/param.h"
46
47 #ifdef  AFS_AUX_ENV
48 #ifdef  PAGING
49 #include "../h/mmu.h"
50 #include "../h/seg.h"
51 #include "../h/page.h"
52 #include "../h/region.h"
53 #endif /* PAGING */
54 #include "../h/sysmacros.h"
55 #include "../h/signal.h"
56 #include "../h/var.h"
57 #endif /* AFS_AUX_ENV */
58
59 #include "../h/systm.h"
60 #include "../h/time.h"
61
62 #ifdef  AFS_AIX_ENV
63 #ifdef AFS_AIX41_ENV
64 #include "sys/statfs.h"
65 #endif
66 #include "../h/file.h"
67 #include "../h/fullstat.h"
68 #include "../h/vattr.h"
69 #include "../h/var.h"
70 #include "../h/access.h"
71 #endif /* AFS_AIX_ENV */
72
73 #if defined(AFS_SGI_ENV)
74 #include "values.h"
75 #include "../sys/sema.h"
76 #include "../sys/cmn_err.h"
77 #ifdef AFS_SGI64_ENV
78 #include <ksys/behavior.h>
79 #endif /* AFS_SGI64_ENV */
80 #include "../sgiefs/efs.h"
81 #include "../sys/kmem.h"
82 #include "../sys/cred.h"
83 #include "../sys/resource.h"
84
85 /*
86  * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
87  * is on (see afs_osi.h).
88  * In IRIX 6.5 we cannot have DEBUG turned on since certain
89  * system-defined structures have different members with DEBUG on, and
90  * this breaks our ability to interact with the rest of the kernel.
91  *
92  * Instead of using ASSERT(), we use our own osi_Assert().
93  */
94 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
95 #define DEBUG
96 #include "../sys/debug.h"
97 #undef DEBUG
98 #else
99 #include "../sys/debug.h"
100 #endif
101
102 #include "../sys/statvfs.h"
103 #include "../sys/sysmacros.h"
104 #include "../sys/fs_subr.h"
105 #include "../sys/siginfo.h"
106 #endif  /* AFS_SGI_ENV */
107
108 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
109 #  include "../h/kernel.h"
110 #endif /* !SUN5 && !SGI */
111
112 #ifdef  AFS_SUN5_ENV
113 #include <sys/cmn_err.h>        /* for kernel printf() prototype */
114 #endif
115
116 #if     defined(AFS_SUN56_ENV)
117 #include "../h/vfs.h"           /* stops SUN56 socketvar.h warnings */
118 #include "../h/stropts.h"       /* stops SUN56 socketvar.h warnings */
119 #include "../h/stream.h"        /* stops SUN56 socketvar.h errors */
120 #endif
121
122 #include "../h/socket.h"
123 #include "../h/socketvar.h"
124 #include "../h/protosw.h"
125
126 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)
127 #  include "../h/dirent.h"
128 #  ifdef        AFS_SUN5_ENV
129 #    include "../h/sysmacros.h"
130 #    include "../h/fs/ufs_fsdir.h"
131 #  endif /* AFS_SUN5_ENV */
132 #else
133 #  include "../h/dir.h"
134 #endif /* SGI || SUN || HPUX */
135
136 #ifdef AFS_DEC_ENV
137 #  include "../h/smp_lock.h"
138 #endif /* AFS_DEC_ENV */
139
140
141 #ifndef AFS_SGI64_ENV
142 #include "../h/user.h"
143 #endif /* AFS_SGI64_ENV */
144 #define MACH_USER_API   1
145 #include "../h/file.h"
146 #include "../h/uio.h"
147 #include "../h/buf.h"
148 #include "../h/stat.h"
149
150
151 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
152 #ifdef  AFS_DEC_ENV
153 #  include "../h/mount.h"
154 #  include "../machine/psl.h"
155 #  include "../afs/gfs_vnode.h"
156 #endif
157
158 #ifdef  AFS_MACH_ENV
159 #    include <vfs/vfs.h>
160 #    include <vfs/vnode.h>
161 #    include <sys/inode.h>
162 #    include <sys/mount.h>
163 #    include <vm/vm_pager.h>
164 #    include <kern/mfs.h>
165 #    include <mach/vm_param.h>
166 #    include <kern/parallel.h>
167 #endif /* AFS_MACH_ENV */
168
169 #ifndef AFS_DEC_ENV
170 #  ifdef        AFS_SUN5_ENV
171 #    include "../h/statvfs.h"
172 #  endif /* AFS_SUN5_ENV */
173 #  ifdef AFS_HPUX_ENV
174 struct vfspage;                 /* for vnode.h compiler warnings */
175 #    include "../h/swap.h"      /* for struct swpdbd, for vnode.h compiler warnings */
176 #    include "../h/dbd.h"       /* for union idbd, for vnode.h compiler warnings */
177 #  endif /* AFS_HPUX_ENV */
178 #  include "../h/vfs.h"
179 #  include "../h/vnode.h"
180 #  ifdef        AFS_SUN5_ENV
181 #    include "../h/fs/ufs_inode.h"
182 #    include "../h/fs/ufs_mount.h"
183 #  else
184 #    if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
185 #      include "../ufs/inode.h"
186 #      if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
187 #        include "../ufs/mount.h"
188 #      endif /* !AFS_HPUX_ENV */
189 #    endif /* !AFS_AIX32_ENV */
190 #  endif /* AFS_SUN5_ENV */
191 #endif /* AFS_DEC_ENV */
192
193 /* These mainly deal with networking and rpc headers */
194 #include "../netinet/in.h"
195 #undef  MFREE   /* defined at mount.h for AIX */
196 #ifdef  AFS_SUN5_ENV
197 #  include "../h/time.h"
198 #else
199 #  include "../h/mbuf.h"
200 #endif /* AFS_SUN5_ENV */
201
202 #include "../rpc/types.h"
203 #include "../rpc/xdr.h"
204
205 #ifdef AFS_AIX32_ENV
206 #  include "net/spl.h"
207 #endif
208
209 /* Miscellaneous headers */
210 #include "../h/proc.h"
211 #include "../h/ioctl.h"
212
213 #if     defined(AFS_HPUX101_ENV)
214 #include "../h/proc_iface.h"
215 #include "../h/vas.h"
216 #endif
217
218 #if     defined(AFS_HPUX102_ENV)
219 #include "../h/unistd.h"
220 #include "../h/tty.h"
221 #endif
222
223 #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)
224 #  include "../h/text.h"
225 #endif 
226
227
228 #if     defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
229 #  include "../h/flock.h"       /* fcntl.h is a user-level include in aix */
230 #else
231 #  include "../h/fcntl.h"
232 #endif /* AIX || DEC */
233
234 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
235 #  include "../h/unistd.h"
236 #endif /* SGI || SUN */
237
238 #ifdef  AFS_AIX32_ENV
239 #  include "../h/vmuser.h"
240 #endif /* AFS_AIX32_ENV */
241
242 #if     defined(AFS_SUN5_ENV)
243 #include <sys/tiuser.h>
244 #include <sys/t_lock.h>
245 #include <sys/mutex.h>
246 #include <sys/vtrace.h>
247 #include <sys/pathname.h>
248 #include <sys/debug.h>
249 #endif
250
251 #else   /* ! AFS_OSF_ENV */
252 /* All of the OSF/1 stuff is here */
253 #include <net/net_globals.h>
254 #include <errno.h>
255 #include <sys/types.h>
256 #include <sys/param.h>
257 #include <sys/systm.h>
258 #include <sys/time.h>
259 #include <sys/kernel.h>
260 #include <sys/socket.h>
261 #include <sys/socketvar.h>
262 #include <sys/protosw.h>
263 #include <ufs/dir.h>
264 #include <sys/user.h>
265 #include <sys/file.h>
266 #include <sys/uio.h>
267 #include <sys/buf.h>
268 #include <sys/stat.h>
269 #include <sys/vnode.h>
270 #include <ufs/inode.h>
271 #include <sys/mount.h>
272 #include <vm/vm_page.h>
273 #include <mach/vm_param.h>
274 #include <kern/parallel.h>
275 #include <mach/mach_types.h>
276 #ifndef AFS_OSF30_ENV
277 #include <kern/mfs.h>
278 #endif
279 #include <mach/vm_param.h>
280 #include <kern/parallel.h>
281
282 /* These mainly deal with networking and rpc headers */
283 #include <netinet/in.h>
284 #include <sys/mbuf.h>
285 #include <rpc/types.h>
286
287 #ifdef  AFS_ALPHA_ENV
288 #undef kmem_alloc
289 #undef kmem_free
290 #undef mem_alloc
291 #undef mem_free
292 #undef register
293 #endif  /* AFS_ALPHA_ENV */
294
295 #include <rpc/xdr.h>
296 #include <sys/proc.h>
297 #include <sys/ioctl.h>
298
299 #endif  /* AFS_OSF_ENV */
300 #endif /* AFS_LINUX22_ENV */
301
302 #endif /* __AFS_SYSINCLUDESH__  so idempotent */