aix51-support-20020926
[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_OBSD_ENV
14 #include <sys/errno.h>
15 #include <sys/types.h>
16 #include <sys/param.h>
17 #include <sys/lock.h>
18 #include <sys/queue.h>
19 #include <sys/resourcevar.h>
20 #include <sys/kernel.h>
21 #include <sys/proc.h>
22 #include <sys/systm.h>
23 #include <sys/time.h>
24 #include <sys/filedesc.h>
25 #include <sys/file.h>
26 #include <sys/socket.h>
27 #include <sys/socketvar.h>
28 #include <sys/dirent.h>
29 #include <sys/user.h>
30 #include <sys/uio.h>
31 #include <sys/buf.h>
32 #include <sys/stat.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>
40 #include <sys/mbuf.h>
41 #include <sys/protosw.h>
42 #include <sys/ioctl.h> 
43 #include <vm/vm_kern.h>
44 #include <rpc/rpc.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.
59  */
60 #define _LINUX_CODA_FS_I
61 #define _CFS_HEADER_
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>
68 #include <linux/fs.h>
69 #include <linux/quota.h>
70 #include <linux/sched.h>
71 #include <linux/mm.h>
72 #include <linux/string.h>
73 #include <asm/semaphore.h>
74 #include <linux/errno.h>
75
76 #else /* AFS_LINUX22_ENV */
77 #if defined(AFS_DARWIN_ENV)
78 #ifndef _MACH_ETAP_H_
79 #define _MACH_ETAP_H_   
80 typedef unsigned short                  etap_event_t; 
81 #endif
82 #endif
83 #if     !defined(AFS_OSF_ENV)
84 #include "../h/errno.h"
85 #include "../h/types.h"
86 #include "../h/param.h"
87
88 #ifdef  AFS_AUX_ENV
89 #ifdef  PAGING
90 #include "../h/mmu.h"
91 #include "../h/seg.h"
92 #include "../h/page.h"
93 #include "../h/region.h"
94 #endif /* PAGING */
95 #include "../h/sysmacros.h"
96 #include "../h/signal.h"
97 #include "../h/var.h"
98 #endif /* AFS_AUX_ENV */
99
100 #include "../h/systm.h"
101 #include "../h/time.h"
102
103 #ifdef  AFS_AIX_ENV
104 #ifdef AFS_AIX41_ENV
105 #include "sys/statfs.h"
106 #endif
107 #ifdef AFS_AIX51_ENV
108 #include "sys/acl.h"
109 #endif
110 #include "../h/file.h"
111 #include "../h/fullstat.h"
112 #include "../h/vattr.h"
113 #include "../h/var.h"
114 #include "../h/access.h"
115 #endif /* AFS_AIX_ENV */
116
117 #if defined(AFS_SGI_ENV)
118 #include "values.h"
119 #include "../sys/sema.h"
120 #include "../sys/cmn_err.h"
121 #ifdef AFS_SGI64_ENV
122 #include <ksys/behavior.h>
123 #endif /* AFS_SGI64_ENV */
124 #include "../fs/efs_inode.h"
125 #ifdef AFS_SGI_EFS_IOPS_ENV
126 #include "../sgiefs/efs.h"
127 #endif
128 #include "../sys/kmem.h"
129 #include "../sys/cred.h"
130 #include "../sys/resource.h"
131
132 /*
133  * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
134  * is on (see afs_osi.h).
135  * In IRIX 6.5 we cannot have DEBUG turned on since certain
136  * system-defined structures have different members with DEBUG on, and
137  * this breaks our ability to interact with the rest of the kernel.
138  *
139  * Instead of using ASSERT(), we use our own osi_Assert().
140  */
141 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
142 #define DEBUG
143 #include "../sys/debug.h"
144 #undef DEBUG
145 #else
146 #include "../sys/debug.h"
147 #endif
148
149 #include "../sys/statvfs.h"
150 #include "../sys/sysmacros.h"
151 #include "../sys/fs_subr.h"
152 #include "../sys/siginfo.h"
153 #endif  /* AFS_SGI_ENV */
154
155 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
156 #  include "../h/kernel.h"
157 #endif /* !SUN5 && !SGI */
158
159 #ifdef  AFS_SUN5_ENV
160 #include <sys/cmn_err.h>        /* for kernel printf() prototype */
161 #endif
162
163 #if     defined(AFS_SUN56_ENV)
164 #include "../h/vfs.h"           /* stops SUN56 socketvar.h warnings */
165 #include "../h/stropts.h"       /* stops SUN56 socketvar.h warnings */
166 #include "../h/stream.h"        /* stops SUN56 socketvar.h errors */
167 #endif
168
169 #include "../h/socket.h"
170 #include "../h/socketvar.h"
171 #include "../h/protosw.h"
172
173 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
174 #  include "../h/dirent.h"
175 #  ifdef        AFS_SUN5_ENV
176 #    include "../h/sysmacros.h"
177 #    include "../h/fs/ufs_fsdir.h"
178 #  endif /* AFS_SUN5_ENV */
179 #else
180 #  include "../h/dir.h"
181 #endif /* SGI || SUN || HPUX */
182
183 #ifdef AFS_DEC_ENV
184 #  include "../h/smp_lock.h"
185 #endif /* AFS_DEC_ENV */
186
187
188 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
189 #include "../h/user.h"
190 #endif /* AFS_SGI64_ENV */
191 #define MACH_USER_API   1
192 #include "../h/file.h"
193 #include "../h/uio.h"
194 #include "../h/buf.h"
195 #include "../h/stat.h"
196
197
198 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
199 #ifdef  AFS_DEC_ENV
200 #  include "../h/mount.h"
201 #  include "../machine/psl.h"
202 #  include "../afs/gfs_vnode.h"
203 #endif
204
205 #ifdef  AFS_MACH_ENV
206 #    include <vfs/vfs.h>
207 #    include <vfs/vnode.h>
208 #    include <sys/inode.h>
209 #    include <sys/mount.h>
210 #    include <vm/vm_pager.h>
211 #    include <kern/mfs.h>
212 #    include <mach/vm_param.h>
213 #    include <kern/parallel.h>
214 #endif /* AFS_MACH_ENV */
215
216 #ifndef AFS_DEC_ENV
217 #  ifdef        AFS_SUN5_ENV
218 #    include "../h/statvfs.h"
219 #  endif /* AFS_SUN5_ENV */
220 #  ifdef AFS_HPUX_ENV
221 struct vfspage;                 /* for vnode.h compiler warnings */
222 #    include "../h/swap.h"      /* for struct swpdbd, for vnode.h compiler warnings */
223 #    include "../h/dbd.h"       /* for union idbd, for vnode.h compiler warnings */
224 #  endif /* AFS_HPUX_ENV */
225 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
226 #  include <sys/uio.h>
227 #  include <sys/mount.h> 
228 #  include <sys/namei.h>
229 #  include <sys/vnode.h>  
230 #  include <sys/queue.h>    
231 #  include <sys/malloc.h>
232 #ifndef AFS_FBSD_ENV
233 #  include <sys/ubc.h>
234 #define timeout_fcn_t mach_timeout_fcn_t
235 #  include <kern/sched_prim.h>
236 #else
237 MALLOC_DECLARE(M_AFS);
238 #  include <ufs/ufs/dinode.h>
239 #  include <vm/vm.h>
240 #  include <vm/vm_extern.h>
241 #  include <vm/pmap.h>
242 #  include <vm/vm_map.h>
243 #  include <sys/lock.h>
244 #  include <sys/user.h>
245 #endif
246 #undef timeout_fcn_t
247 #define _DIR_H_
248 #define doff_t          int32_t
249 #  include <ufs/ufs/quota.h>
250 #  include <ufs/ufs/inode.h>
251 #  include <ufs/ffs/fs.h>
252 #else
253 #  include "../h/vfs.h"
254 #  include "../h/vnode.h"
255 #  ifdef        AFS_SUN5_ENV
256 #    include "../h/fs/ufs_inode.h"
257 #    include "../h/fs/ufs_mount.h"
258 #  else
259 #    if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
260 #      include "../ufs/inode.h"
261 #      if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
262 #        include "../ufs/mount.h"
263 #      endif /* !AFS_HPUX_ENV */
264 #    endif /* !AFS_AIX32_ENV */
265 #  endif /* AFS_SUN5_ENV */
266 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
267 #endif /* AFS_DEC_ENV */
268
269 /* These mainly deal with networking and rpc headers */
270 #include "../netinet/in.h"
271 #undef  MFREE   /* defined at mount.h for AIX */
272 #ifdef  AFS_SUN5_ENV
273 #  include "../h/time.h"
274 #else
275 #  include "../h/mbuf.h"
276 #endif /* AFS_SUN5_ENV */
277
278 #include "../rpc/types.h"
279 #include "../rx/xdr.h"
280
281 #ifdef AFS_AIX32_ENV
282 #  include "net/spl.h"
283 #endif
284
285 /* Miscellaneous headers */
286 #include "../h/proc.h"
287 #if !defined(AFS_FBSD_ENV)
288 #include "../h/ioctl.h"
289 #endif /* AFS_FBSD_ENV */
290
291 #if     defined(AFS_HPUX101_ENV)
292 #include "../h/proc_iface.h"
293 #include "../h/vas.h"
294 #endif
295
296 #if     defined(AFS_HPUX102_ENV)
297 #include "../h/unistd.h"
298 #include "../h/tty.h"
299 #endif
300
301 #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)
302
303 #  include "../h/text.h"
304 #endif 
305
306
307 #if     defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
308 #  include "../h/flock.h"       /* fcntl.h is a user-level include in aix */
309 #else
310 #  include "../h/fcntl.h"
311 #endif /* AIX || DEC */
312
313 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
314 #  include "../h/unistd.h"
315 #endif /* SGI || SUN */
316
317 #ifdef  AFS_AIX32_ENV
318 #  include "../h/vmuser.h"
319 #endif /* AFS_AIX32_ENV */
320
321 #if     defined(AFS_SUN5_ENV)
322 #include <sys/tiuser.h>
323 #include <sys/t_lock.h>
324 #include <sys/mutex.h>
325 #include <sys/vtrace.h>
326 #include <sys/pathname.h>
327 #include <sys/debug.h>
328 #endif
329
330 #else   /* ! AFS_OSF_ENV */
331 /* All of the OSF/1 stuff is here */
332 #include <net/net_globals.h>
333 #include <errno.h>
334 #include <sys/types.h>
335 #include <sys/param.h>
336 #include <sys/systm.h>
337 #include <sys/time.h>
338 #include <sys/kernel.h>
339 #include <sys/socket.h>
340 #include <sys/socketvar.h>
341 #include <sys/protosw.h>
342 #include <ufs/dir.h>
343 #include <sys/user.h>
344 #include <sys/file.h>
345 #include <sys/uio.h>
346 #include <sys/buf.h>
347 #include <sys/stat.h>
348 #include <sys/vnode.h>
349 #include <ufs/inode.h>
350 #include <sys/mount.h>
351 #include <vm/vm_page.h>
352 #include <mach/vm_param.h>
353 #include <kern/parallel.h>
354 #include <mach/mach_types.h>
355 #ifndef AFS_OSF30_ENV
356 #include <kern/mfs.h>
357 #endif
358 #include <mach/vm_param.h>
359 #include <kern/parallel.h>
360
361 /* These mainly deal with networking and rpc headers */
362 #include <netinet/in.h>
363 #include <sys/mbuf.h>
364 #include <rpc/types.h>
365
366 #ifdef  AFS_ALPHA_ENV
367 #undef kmem_alloc
368 #undef kmem_free
369 #undef mem_alloc
370 #undef mem_free
371 #undef register
372 #endif  /* AFS_ALPHA_ENV */
373
374 #include <rx/xdr.h>
375 #include <sys/proc.h>
376 #include <sys/ioctl.h>
377
378 #endif  /* AFS_OSF_ENV */
379 #endif /* AFS_LINUX22_ENV */
380 #endif /* AFS_OBSD_ENV */
381
382 #endif /* __AFS_SYSINCLUDESH__  so idempotent */