OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/afs/sysincludes.h
00001 /*
00002  * Copyright 2000, International Business Machines Corporation and others.
00003  * All Rights Reserved.
00004  *
00005  * This software has been released under the terms of the IBM Public
00006  * License.  For details, see the LICENSE file in the top-level source
00007  * directory or online at http://www.openafs.org/dl/license10.html
00008  */
00009 
00010 #ifdef UKERNEL
00011 # include <UKERNEL/sysincludes.h>
00012 #else
00013 
00014 #ifndef __AFS_SYSINCLUDESH__
00015 #define __AFS_SYSINCLUDESH__ 1
00016 
00017 #ifdef AFS_OBSD_ENV
00018 # include <sys/errno.h>
00019 # include <sys/types.h>
00020 # include <sys/param.h>
00021 # include <sys/lock.h>
00022 # include <sys/queue.h>
00023 # include <sys/resourcevar.h>
00024 # include <sys/kernel.h>
00025 # include <sys/proc.h>
00026 # include <sys/time.h>
00027 # include <sys/filedesc.h>
00028 # include <sys/file.h>
00029 # include <sys/socket.h>
00030 # include <sys/socketvar.h>
00031 # include <sys/dirent.h>
00032 # include <sys/user.h>
00033 # include <sys/uio.h>
00034 # include <sys/buf.h>
00035 # include <sys/stat.h>
00036 # include <sys/mount.h>
00037 # include <sys/vnode.h>
00038 # include <sys/malloc.h>
00039 # include <ufs/ffs/fs.h>
00040 # include <ufs/ufs/quota.h>
00041 # include <ufs/ufs/inode.h>
00042 # ifndef AFS_OBSD38_ENV
00043 #  include <ufs/ufs/extattr.h>
00044 # endif
00045 # include <ufs/ufs/ufsmount.h>
00046 # ifndef MLEN
00047 #  include <sys/mbuf.h>
00048 #  include <net/if.h>
00049 # endif
00050 # include <sys/protosw.h>
00051 # include <sys/ioctl.h>
00052 # include <sys/timeout.h>
00053 
00054 #elif defined(AFS_NBSD40_ENV)
00055 # ifdef AFS_NBSD50_ENV
00056 #  include <sys/simplelock.h>
00057 # endif
00058 # include <sys/errno.h>
00059 # include <sys/types.h>
00060 # include <sys/mount.h> /* may define MOUNT_AFS */
00061 # include <sys/param.h>
00062 # include <sys/systm.h>
00063 # include <sys/conf.h>
00064 # include <sys/exec.h>
00065 # include <sys/lock.h>
00066 # include <sys/syscall.h>
00067 # include <sys/syscallargs.h>
00068 # include <sys/queue.h>
00069 # include <sys/resourcevar.h>
00070 # include <sys/kernel.h>
00071 # include <sys/proc.h>
00072 # include <sys/time.h>
00073 # include <sys/filedesc.h>
00074 # include <sys/exec.h>
00075 # include <sys/lock.h>
00076 # include <sys/syscall.h>
00077 # include <sys/syscallargs.h>
00078 # include <sys/queue.h>
00079 # include <sys/resourcevar.h>
00080 # include <sys/kernel.h>
00081 # include <sys/proc.h>
00082 # include <sys/time.h>
00083 # include <sys/filedesc.h>
00084 # include <sys/file.h>
00085 # include <sys/socket.h>
00086 # include <sys/socketvar.h>
00087 # include <sys/dirent.h>
00088 # include <sys/kauth.h>
00089 # include <sys/uio.h>
00090 # include <sys/buf.h>
00091 # include <sys/stat.h>
00092 # include <sys/file.h>
00093 # include <sys/namei.h>
00094 # include <sys/uio.h>
00095 # include <sys/buf.h>
00096 # include <sys/file.h>
00097 # include <sys/namei.h>
00098 # include <sys/vnode.h>
00099 # include <ufs/ffs/fs.h>
00100 # include <ufs/ufs/quota.h>
00101 # include <ufs/ufs/inode.h>
00102 # include <ufs/ufs/extattr.h>
00103 # include <ufs/ufs/ufsmount.h>
00104 # ifndef MLEN
00105 #  include <sys/mbuf.h>
00106 #  include <net/if.h>
00107 # endif /* !MLEN */
00108 # include <sys/protosw.h>
00109 # include <sys/ioctl.h>
00110 
00111 #elif defined(AFS_LINUX22_ENV)
00112 # include <linux/version.h>
00113 # ifdef HAVE_LINUX_CONFIG_H
00114 #  include <linux/config.h>
00115 # endif
00116 # include <linux/linkage.h>
00117 # include <linux/limits.h>
00118 # include <linux/wait.h>
00119 # include <linux/types.h>
00120 # include <linux/vfs.h>
00121 # include <linux/net.h>
00122 # include <linux/kdev_t.h>
00123 # include <linux/ioctl.h>
00124 # if defined(AFS_LINUX26_ENV)
00125 #  include <linux/backing-dev.h>
00126 #  include <linux/pagemap.h>
00127 #  include <linux/namei.h>
00128 #  ifdef STRUCT_INODE_HAS_I_SECURITY
00129 #   include <linux/security.h>
00130 #  endif
00131 #  include <linux/suspend.h>
00132 # endif
00133 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
00134  * inclusion of uaccess.h.
00135  */
00136 # ifndef _LINUX_CODA_FS_I
00137 #  define _LINUX_CODA_FS_I
00138 #  define _CODA_HEADER_
00139 #  define _CFS_HEADER_
00140 struct coda_inode_info {
00141 };
00142 # endif
00143 # ifndef _LINUX_XFS_FS_I
00144 #  define _LINUX_XFS_FS_I
00145 struct xfs_inode_info {
00146 };
00147 # endif
00148 # include <asm/uaccess.h>
00149 # include <linux/list.h>
00150 # include <linux/dcache.h>
00151 # include <linux/mount.h>
00152 # include <linux/fs.h>
00153 # include <linux/quota.h>
00154 # include <linux/sched.h>
00155 # include <linux/mm.h>
00156 # include <linux/slab.h>
00157 # include <linux/string.h>
00158 # if defined(HAVE_LINUX_SEMAPHORE_H)
00159 #  include <linux/semaphore.h>
00160 # else
00161 #  include <asm/semaphore.h>
00162 # endif
00163 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
00164 #  include <linux/mutex.h>
00165 # endif
00166 # include <linux/errno.h>
00167 # ifdef HAVE_LINUX_COMPLETION_H
00168 #  include <linux/completion.h>
00169 # endif
00170 # if defined(HAVE_LINUX_EXPORTFS_H)
00171 #  include <linux/exportfs.h>
00172 # endif
00173 # ifdef AFS_LINUX24_ENV
00174 #  include <linux/pagemap.h>
00175 # endif
00176 
00177 #else /* AFS_LINUX22_ENV */
00178 # if defined(AFS_DARWIN_ENV)
00179 #  ifndef _MACH_ETAP_H_
00180 #   define _MACH_ETAP_H_
00181 typedef unsigned short etap_event_t;
00182 #  endif
00183 # endif
00184 
00185 # include "h/errno.h"
00186 # include "h/types.h"
00187 # include "h/param.h"
00188 
00189 # ifdef AFS_AUX_ENV
00190 #  ifdef        PAGING
00191 #   include "h/mmu.h"
00192 #   include "h/seg.h"
00193 #   include "h/page.h"
00194 #   include "h/region.h"
00195 #  endif /* PAGING */
00196 #  include "h/sysmacros.h"
00197 #  include "h/signal.h"
00198 #  include "h/var.h"
00199 # endif /* AFS_AUX_ENV */
00200 
00201 # include "h/systm.h"
00202 # include "h/time.h"
00203 
00204 # ifdef AFS_AIX_ENV
00205 #  ifdef AFS_AIX41_ENV
00206 #   include "sys/statfs.h"
00207 #  endif
00208 #  ifdef AFS_AIX51_ENV
00209 #   include "sys/acl.h"
00210 #  endif
00211 #  include "../h/file.h"
00212 #  include "../h/fullstat.h"
00213 #  include "../h/vattr.h"
00214 #  include "../h/var.h"
00215 #  include "../h/access.h"
00216 # endif /* AFS_AIX_ENV */
00217 
00218 # if defined(AFS_SGI_ENV)
00219 #  include "values.h"
00220 #  include "sys/sema.h"
00221 #  include "sys/cmn_err.h"
00222 #  ifdef AFS_SGI64_ENV
00223 #   include <ksys/behavior.h>
00224 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
00225  * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
00226  * older headers like we want the old behavior, so we fake it. */
00227 #   if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
00228 #    define BHV_IS_BHVL(bhp) (0)
00229 #   endif
00230 #  endif /* AFS_SGI64_ENV */
00231 #  include "fs/efs_inode.h"
00232 #  include "sys/kmem.h"
00233 #  include "sys/cred.h"
00234 #  include "sys/resource.h"
00235 
00236 /*
00237  * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
00238  * is on (see afs_osi.h).
00239  * In IRIX 6.5 we cannot have DEBUG turned on since certain
00240  * system-defined structures have different members with DEBUG on, and
00241  * this breaks our ability to interact with the rest of the kernel.
00242  *
00243  * Instead of using ASSERT(), we use our own osi_Assert().
00244  */
00245 #  if defined(AFS_SGI65_ENV) && !defined(DEBUG)
00246 #   define DEBUG
00247 #   include "sys/debug.h"
00248 #   undef DEBUG
00249 #  else
00250 #   include "sys/debug.h"
00251 #  endif
00252 
00253 #  include "sys/statvfs.h"
00254 #  include "sys/sysmacros.h"
00255 #  include "sys/fs_subr.h"
00256 #  include "sys/siginfo.h"
00257 #  include "limits.h"
00258 # endif /* AFS_SGI_ENV */
00259 
00260 # if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
00261 #  include "h/kernel.h"
00262 # endif /* !SUN5 && !SGI */
00263 
00264 # ifdef AFS_SUN5_ENV
00265 #  include <sys/cmn_err.h>      /* for kernel printf() prototype */
00266 #  include "h/vfs.h"            /* stops SUN5 socketvar.h warnings */
00267 #  include "h/stropts.h"                /* stops SUN5 socketvar.h warnings */
00268 #  include "h/stream.h"         /* stops SUN5 socketvar.h errors */
00269 # endif
00270 
00271 # ifdef AFS_SUN510_ENV
00272 #  include <sys/cred_impl.h>
00273 #  include <sys/policy.h>
00274 # endif
00275 
00276 # include "h/socket.h"
00277 # include "h/socketvar.h"
00278 # include "h/protosw.h"
00279 
00280 # if defined(AFS_FBSD_ENV)
00281 #  include "limits.h"
00282 # endif
00283 
00284 # ifdef AFS_HPUX_ENV
00285 #  include "limits.h"
00286 # endif
00287 
00288 # if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || \
00289   defined(AFS_FBSD_ENV) || defined(AFS_NBSD40_ENV)
00290 #  include "h/dirent.h"
00291 #  ifdef        AFS_SUN5_ENV
00292 #   include "h/sysmacros.h"
00293 #   include "h/fs/ufs_fsdir.h"
00294 #  endif /* AFS_SUN5_ENV */
00295 # else
00296 #  include "h/dir.h"
00297 # endif /* SGI || SUN || HPUX */
00298 
00299 # if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV) && \
00300   !defined(AFS_NBSD40_ENV)
00301 #  include "h/user.h"
00302 # endif /* AFS_SGI64_ENV */
00303 # define        MACH_USER_API   1
00304 # if defined(AFS_FBSD_ENV)
00305 #  include "h/bio.h"
00306 #  include "h/filedesc.h"
00307 # endif
00308 # include "h/file.h"
00309 # include "h/uio.h"
00310 # include "h/buf.h"
00311 # include "h/stat.h"
00312 
00313 
00314 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
00315 # ifdef AFS_SUN5_ENV
00316 #  include "h/statvfs.h"
00317 # endif /* AFS_SUN5_ENV */
00318 # ifdef AFS_HPUX_ENV
00319 struct vfspage;         /* for vnode.h compiler warnings */
00320 #  include "h/swap.h"   /* for struct swpdbd, for vnode.h compiler warnings */
00321 #  include "h/dbd.h"    /* for union idbd, for vnode.h compiler warnings */
00322 #  ifdef AFS_HPUX110_ENV
00323 #   include "h/resource.h"
00324 #  endif
00325 #  ifdef AFS_HPUX1123_ENV
00326 #   include <sys/user.h>
00327 #   include <sys/cred.h>
00328 #  endif
00329 # endif /* AFS_HPUX_ENV */
00330 # if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
00331 #  if defined(AFS_FBSD_ENV)
00332 struct vop_getwritemount_args;
00333 #  endif
00334 #  include <sys/uio.h>
00335 #  include <sys/mount.h>
00336 #  include <sys/namei.h>
00337 #  ifdef AFS_DARWIN80_ENV
00338 #   include <sys/kauth.h>
00339 #   include <string.h>
00340 #  endif
00341 #  include <sys/vnode.h>
00342 #  include <sys/queue.h>
00343 #  ifndef AFS_NBSD40_ENV
00344 #   include <sys/malloc.h>
00345 #  endif
00346 #  ifdef AFS_FBSD_ENV
00347 MALLOC_DECLARE(M_AFS);
00348 #   include <ufs/ufs/dinode.h>
00349 #   include <vm/vm.h>
00350 #   include <vm/vm_extern.h>
00351 #   include <vm/pmap.h>
00352 #   include <vm/vm_map.h>
00353 #   include <sys/lock.h>
00354 #   include <sys/user.h>
00355 #  else
00356 #   include <sys/ubc.h>
00357 #   define timeout_fcn_t mach_timeout_fcn_t
00358 #   include <kern/sched_prim.h>
00359 #  endif
00360 #  undef timeout_fcn_t
00361 #  define _DIR_H_
00362 #  define doff_t          int32_t
00363 #  ifndef AFS_DARWIN80_ENV
00364 #   include <ufs/ufs/quota.h>
00365 #   include <ufs/ufs/inode.h>
00366 #   include <ufs/ffs/fs.h>
00367 #  endif
00368 # else
00369 #  ifndef AFS_NBSD40_ENV
00370 #   include "h/vfs.h"
00371 #   include "h/vnode.h"
00372 #  endif
00373 #  ifdef        AFS_SUN5_ENV
00374 #   include "h/fs/ufs_inode.h"
00375 #   include "h/fs/ufs_mount.h"
00376 #  else
00377 #   if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_NBSD40_ENV)
00378 #    include "ufs/inode.h"
00379 #    if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_NBSD40_ENV)
00380 #     include "ufs/mount.h"
00381 #    endif /* !AFS_HPUX_ENV */
00382 #   endif /* !AFS_AIX32_ENV */
00383 #  endif /* AFS_SUN5_ENV */
00384 # endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
00385 
00386 /* These mainly deal with networking and rpc headers */
00387 # include "netinet/in.h"
00388 # undef MFREE                   /* defined at mount.h for AIX */
00389 # ifdef AFS_SUN5_ENV
00390 #  include "h/time.h"
00391 # else
00392 #  if !defined(AFS_HPUX_ENV)
00393 #   include "h/mbuf.h"
00394 #  endif
00395 # endif /* AFS_SUN5_ENV */
00396 
00397 # include "rpc/types.h"
00398 # include "rx/xdr.h"
00399 
00400 /* Miscellaneous headers */
00401 # include "h/proc.h"
00402 # if !defined(AFS_FBSD_ENV)
00403 #  include "h/ioctl.h"
00404 # endif /* AFS_FBSD_ENV */
00405 
00406 # if    defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
00407 #  include "h/proc_iface.h"
00408 #  include "h/vas.h"
00409 # endif
00410 
00411 # if    defined(AFS_HPUX102_ENV)
00412 #  include "h/unistd.h"
00413 #  include "h/tty.h"
00414 # endif
00415 
00416 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_NBSD40_ENV)
00417 
00418 #  include "h/text.h"
00419 # endif
00420 
00421 
00422 # if    defined(AFS_AIX_ENV)
00423 #  include "h/flock.h"          /* fcntl.h is a user-level include in aix */
00424 # else
00425 #  include "h/fcntl.h"
00426 # endif /* AIX */
00427 
00428 # if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
00429 #  include "h/unistd.h"
00430 # endif /* SGI || SUN */
00431 
00432 # ifdef AFS_AIX32_ENV
00433 #  include "h/vmuser.h"
00434 # endif /* AFS_AIX32_ENV */
00435 
00436 # if    defined(AFS_SUN5_ENV)
00437 #  include <sys/tiuser.h>
00438 #  include <sys/t_lock.h>
00439 #  include <sys/mutex.h>
00440 #  include <sys/vtrace.h>
00441 #  include <sys/pathname.h>
00442 #  include <sys/debug.h>
00443 # endif
00444 
00445 #endif /* AFS_LINUX22_ENV */
00446 
00447 #endif /* __AFS_SYSINCLUDESH__  so idempotent */
00448 
00449 #endif
 All Data Structures Files Functions Variables