linux26-i-security-20040621
[openafs.git] / src / afs / sysincludes.h
index 1d89b9f..c87b2a9 100644 (file)
@@ -7,6 +7,10 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#ifdef UKERNEL
+#include <UKERNEL/sysincludes.h>
+#else
+
 #ifndef __AFS_SYSINCLUDESH__
 #define __AFS_SYSINCLUDESH__ 1
 
@@ -19,7 +23,6 @@
 #include <sys/resourcevar.h>
 #include <sys/kernel.h>
 #include <sys/proc.h>
-#include <sys/systm.h>
 #include <sys/time.h>
 #include <sys/filedesc.h>
 #include <sys/file.h>
 #include <ufs/ffs/fs.h>
 #include <ufs/ufs/quota.h>
 #include <ufs/ufs/inode.h>
+#include <ufs/ufs/extattr.h>
 #include <ufs/ufs/ufsmount.h>
+#ifndef MLEN
 #include <sys/mbuf.h>
+#include <net/if.h>
+#endif
 #include <sys/protosw.h>
-#include <sys/ioctl.h> 
-#include <vm/vm_kern.h>
-#include <rpc/rpc.h>
+#include <sys/ioctl.h>
+#include <sys/timeout.h>
 #else /* AFS_OBSD_ENV */
 #ifdef AFS_LINUX22_ENV
 #include <linux/version.h>
 #include <linux/net.h>
 #include <linux/kdev_t.h>
 #include <linux/ioctl.h>
+#if defined(AFS_LINUX26_ENV)
+#include <linux/backing-dev.h>
+#include <linux/pagemap.h>
+#include <linux/namei.h>
+#ifdef STRUCT_INODE_HAS_I_SECURITY
+#include <linux/security.h>
+#endif
+#include <linux/suspend.h>
+#endif
 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
  * inclusion of uaccess.h.
  */
 #define _LINUX_CODA_FS_I
 #define _CFS_HEADER_
-struct coda_inode_info {};
+struct coda_inode_info {
+};
 #define _LINUX_XFS_FS_I
-struct xfs_inode_info {};
+struct xfs_inode_info {
+};
 #include <asm/uaccess.h>
 #include <linux/list.h>
 #include <linux/dcache.h>
@@ -72,33 +89,36 @@ struct xfs_inode_info {};
 #include <linux/string.h>
 #include <asm/semaphore.h>
 #include <linux/errno.h>
+#ifdef COMPLETION_H_EXISTS
+#include <linux/completion.h>
+#endif
 
 #else /* AFS_LINUX22_ENV */
 #if defined(AFS_DARWIN_ENV)
 #ifndef _MACH_ETAP_H_
-#define _MACH_ETAP_H_   
-typedef unsigned short                  etap_event_t; 
+#define _MACH_ETAP_H_
+typedef unsigned short etap_event_t;
 #endif
 #endif
 #if    !defined(AFS_OSF_ENV)
-#include "../h/errno.h"
-#include "../h/types.h"
-#include "../h/param.h"
+#include "h/errno.h"
+#include "h/types.h"
+#include "h/param.h"
 
 #ifdef AFS_AUX_ENV
 #ifdef PAGING
-#include "../h/mmu.h"
-#include "../h/seg.h"
-#include "../h/page.h"
-#include "../h/region.h"
+#include "h/mmu.h"
+#include "h/seg.h"
+#include "h/page.h"
+#include "h/region.h"
 #endif /* PAGING */
-#include "../h/sysmacros.h"
-#include "../h/signal.h"
-#include "../h/var.h"
+#include "h/sysmacros.h"
+#include "h/signal.h"
+#include "h/var.h"
 #endif /* AFS_AUX_ENV */
 
-#include "../h/systm.h"
-#include "../h/time.h"
+#include "h/systm.h"
+#include "h/time.h"
 
 #ifdef AFS_AIX_ENV
 #ifdef AFS_AIX41_ENV
@@ -116,18 +136,18 @@ typedef unsigned short                  etap_event_t;
 
 #if defined(AFS_SGI_ENV)
 #include "values.h"
-#include "../sys/sema.h"
-#include "../sys/cmn_err.h"
+#include "sys/sema.h"
+#include "sys/cmn_err.h"
 #ifdef AFS_SGI64_ENV
 #include <ksys/behavior.h>
 #endif /* AFS_SGI64_ENV */
-#include "../fs/efs_inode.h"
+#include "fs/efs_inode.h"
 #ifdef AFS_SGI_EFS_IOPS_ENV
-#include "../sgiefs/efs.h"
+#include "sgiefs/efs.h"
 #endif
-#include "../sys/kmem.h"
-#include "../sys/cred.h"
-#include "../sys/resource.h"
+#include "sys/kmem.h"
+#include "sys/cred.h"
+#include "sys/resource.h"
 
 /*
  * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
@@ -140,20 +160,20 @@ typedef unsigned short                  etap_event_t;
  */
 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
 #define DEBUG
-#include "../sys/debug.h"
+#include "sys/debug.h"
 #undef DEBUG
 #else
-#include "../sys/debug.h"
+#include "sys/debug.h"
 #endif
 
-#include "../sys/statvfs.h"
-#include "../sys/sysmacros.h"
-#include "../sys/fs_subr.h"
-#include "../sys/siginfo.h"
-#endif  /* AFS_SGI_ENV */
+#include "sys/statvfs.h"
+#include "sys/sysmacros.h"
+#include "sys/fs_subr.h"
+#include "sys/siginfo.h"
+#endif /* AFS_SGI_ENV */
 
 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
-#  include "../h/kernel.h"
+#  include "h/kernel.h"
 #endif /* !SUN5 && !SGI */
 
 #ifdef AFS_SUN5_ENV
@@ -161,45 +181,49 @@ typedef unsigned short                  etap_event_t;
 #endif
 
 #if    defined(AFS_SUN56_ENV)
-#include "../h/vfs.h"          /* stops SUN56 socketvar.h warnings */
-#include "../h/stropts.h"      /* stops SUN56 socketvar.h warnings */
-#include "../h/stream.h"       /* stops SUN56 socketvar.h errors */
+#include "h/vfs.h"             /* stops SUN56 socketvar.h warnings */
+#include "h/stropts.h"         /* stops SUN56 socketvar.h warnings */
+#include "h/stream.h"          /* stops SUN56 socketvar.h errors */
 #endif
 
-#include "../h/socket.h"
-#include "../h/socketvar.h"
-#include "../h/protosw.h"
+#include "h/socket.h"
+#include "h/socketvar.h"
+#include "h/protosw.h"
 
 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
-#  include "../h/dirent.h"
+#  include "h/dirent.h"
 #  ifdef       AFS_SUN5_ENV
-#    include "../h/sysmacros.h"
-#    include "../h/fs/ufs_fsdir.h"
+#    include "h/sysmacros.h"
+#    include "h/fs/ufs_fsdir.h"
 #  endif /* AFS_SUN5_ENV */
 #else
-#  include "../h/dir.h"
+#  include "h/dir.h"
 #endif /* SGI || SUN || HPUX */
 
 #ifdef AFS_DEC_ENV
-#  include "../h/smp_lock.h"
+#  include "h/smp_lock.h"
 #endif /* AFS_DEC_ENV */
 
 
 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
-#include "../h/user.h"
+#include "h/user.h"
 #endif /* AFS_SGI64_ENV */
 #define        MACH_USER_API   1
-#include "../h/file.h"
-#include "../h/uio.h"
-#include "../h/buf.h"
-#include "../h/stat.h"
+#if defined(AFS_FBSD50_ENV)
+#include "h/bio.h"
+#include "h/filedesc.h"
+#endif
+#include "h/file.h"
+#include "h/uio.h"
+#include "h/buf.h"
+#include "h/stat.h"
 
 
 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
 #ifdef AFS_DEC_ENV
-#  include "../h/mount.h"
-#  include "../machine/psl.h"
-#  include "../afs/gfs_vnode.h"
+#  include "h/mount.h"
+#  include "machine/psl.h"
+#  include "afs/gfs_vnode.h"
 #endif
 
 #ifdef AFS_MACH_ENV
@@ -215,19 +239,29 @@ typedef unsigned short                  etap_event_t;
 
 #ifndef AFS_DEC_ENV
 #  ifdef       AFS_SUN5_ENV
-#    include "../h/statvfs.h"
+#    include "h/statvfs.h"
 #  endif /* AFS_SUN5_ENV */
 #  ifdef AFS_HPUX_ENV
 struct vfspage;                        /* for vnode.h compiler warnings */
-#    include "../h/swap.h"     /* for struct swpdbd, for vnode.h compiler warnings */
-#    include "../h/dbd.h"      /* for union idbd, for vnode.h compiler warnings */
+#    include "h/swap.h"                /* for struct swpdbd, for vnode.h compiler warnings */
+#    include "h/dbd.h"         /* for union idbd, for vnode.h compiler warnings */
+#ifdef AFS_HPUX110_ENV
+#    include "h/resource.h"
+#endif
+#ifdef AFS_HPUX1123_ENV 
+#      include <sys/user.h>
+#      include <sys/cred.h>
+#endif
 #  endif /* AFS_HPUX_ENV */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#  if defined(AFS_FBSD50_ENV)
+struct vop_getwritemount_args;
+#  endif
 #  include <sys/uio.h>
-#  include <sys/mount.h> 
+#  include <sys/mount.h>
 #  include <sys/namei.h>
-#  include <sys/vnode.h>  
-#  include <sys/queue.h>    
+#  include <sys/vnode.h>
+#  include <sys/queue.h>
 #  include <sys/malloc.h>
 #ifndef AFS_FBSD_ENV
 #  include <sys/ubc.h>
@@ -250,16 +284,16 @@ MALLOC_DECLARE(M_AFS);
 #  include <ufs/ufs/inode.h>
 #  include <ufs/ffs/fs.h>
 #else
-#  include "../h/vfs.h"
-#  include "../h/vnode.h"
+#  include "h/vfs.h"
+#  include "h/vnode.h"
 #  ifdef       AFS_SUN5_ENV
-#    include "../h/fs/ufs_inode.h"
-#    include "../h/fs/ufs_mount.h"
+#    include "h/fs/ufs_inode.h"
+#    include "h/fs/ufs_mount.h"
 #  else
 #    if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
-#      include "../ufs/inode.h"
+#      include "ufs/inode.h"
 #      if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
-#        include "../ufs/mount.h"
+#        include "ufs/mount.h"
 #      endif /* !AFS_HPUX_ENV */
 #    endif /* !AFS_AIX32_ENV */
 #  endif /* AFS_SUN5_ENV */
@@ -267,55 +301,57 @@ MALLOC_DECLARE(M_AFS);
 #endif /* AFS_DEC_ENV */
 
 /* These mainly deal with networking and rpc headers */
-#include "../netinet/in.h"
-#undef MFREE   /* defined at mount.h for AIX */
+#include "netinet/in.h"
+#undef MFREE                   /* defined at mount.h for AIX */
 #ifdef AFS_SUN5_ENV
-#  include "../h/time.h"
+#  include "h/time.h"
 #else
-#  include "../h/mbuf.h"
+#if !defined(AFS_HPUX_ENV)
+#  include "h/mbuf.h"
+#endif
 #endif /* AFS_SUN5_ENV */
 
-#include "../rpc/types.h"
-#include "../rx/xdr.h"
+#include "rpc/types.h"
+#include "rx/xdr.h"
 
 #ifdef AFS_AIX32_ENV
 #  include "net/spl.h"
 #endif
 
 /* Miscellaneous headers */
-#include "../h/proc.h"
+#include "h/proc.h"
 #if !defined(AFS_FBSD_ENV)
-#include "../h/ioctl.h"
+#include "h/ioctl.h"
 #endif /* AFS_FBSD_ENV */
 
-#if    defined(AFS_HPUX101_ENV)
-#include "../h/proc_iface.h"
-#include "../h/vas.h"
+#if    defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
+#include "h/proc_iface.h"
+#include "h/vas.h"
 #endif
 
 #if    defined(AFS_HPUX102_ENV)
-#include "../h/unistd.h"
-#include "../h/tty.h"
+#include "h/unistd.h"
+#include "h/tty.h"
 #endif
 
 #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)
 
-#  include "../h/text.h"
-#endif 
+#  include "h/text.h"
+#endif
 
 
 #if    defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
-#  include "../h/flock.h"      /* fcntl.h is a user-level include in aix */
+#  include "h/flock.h"         /* fcntl.h is a user-level include in aix */
 #else
-#  include "../h/fcntl.h"
+#  include "h/fcntl.h"
 #endif /* AIX || DEC */
 
 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
-#  include "../h/unistd.h"
+#  include "h/unistd.h"
 #endif /* SGI || SUN */
 
 #ifdef AFS_AIX32_ENV
-#  include "../h/vmuser.h"
+#  include "h/vmuser.h"
 #endif /* AFS_AIX32_ENV */
 
 #if    defined(AFS_SUN5_ENV)
@@ -327,7 +363,7 @@ MALLOC_DECLARE(M_AFS);
 #include <sys/debug.h>
 #endif
 
-#else  /* ! AFS_OSF_ENV */
+#else /* ! AFS_OSF_ENV */
 /* All of the OSF/1 stuff is here */
 #include <net/net_globals.h>
 #include <errno.h>
@@ -369,14 +405,16 @@ MALLOC_DECLARE(M_AFS);
 #undef mem_alloc
 #undef mem_free
 #undef register
-#endif /* AFS_ALPHA_ENV */
+#endif /* AFS_ALPHA_ENV */
 
 #include <rx/xdr.h>
 #include <sys/proc.h>
 #include <sys/ioctl.h>
 
-#endif /* AFS_OSF_ENV */
+#endif /* AFS_OSF_ENV */
 #endif /* AFS_LINUX22_ENV */
 #endif /* AFS_OBSD_ENV */
 
 #endif /* __AFS_SYSINCLUDESH__  so idempotent */
+
+#endif