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