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