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