1 /* NetBSD shared section */
3 #ifndef AFS_PARAM_COMMON_H
4 #define AFS_PARAM_COMMON_H 1
6 #define AFS_64BIT_ENV 1
7 #define AFS_NAMEI_ENV 1 /* User space interface to file system */
8 #define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
9 #define AFS_64BIT_CLIENT 1
11 #define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
12 #define AFS_SYSCALL 318 /* 210 */
15 /* including this file before sysincludes.h is canonical, but
16 * NBSD40's mount.h defines MOUNT_AFS */
18 #define MOUNT_AFS AFS_MOUNT_AFS
22 #define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
24 #define AFS_NBSD_ENV 1
25 #define AFS_NBSD15_ENV 1
26 #define AFS_NBSD16_ENV 1
27 #define AFS_NBSD20_ENV 1
28 #define AFS_NBSD30_ENV 1
29 #define AFS_NBSD40_ENV 1
31 #define AFS_NONFSTRANS 1
33 #define AFS_VFSINCL_ENV 1
35 #define AFS_HAVE_FFS 1 /* Use system's ffs. */
37 #if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
38 #define AFS_HAVE_STATVFS 1 /* System supports statvfs */
43 #if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
44 #include <sys/param.h>
47 #define FTRUNC O_TRUNC
54 #define RXK_LISTENER_ENV 1
57 #include <afs/afs_sysnames.h>
59 #define AFS_VM_RDWR_ENV 1
61 #define AFS_GREEDY43_ENV 1
63 #define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
64 #define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
66 /* Extra kernel definitions (from kdefs file) */
68 #define AFS_GLOBAL_SUNLOCK 1
69 #define AFS_SHORTGID 1 /* are group id's short? */
72 /* apparently not in 40 */
75 #ifdef _KERNEL_DEPRECATED
76 #define AFS_GLOBAL_SUNLOCK 1
77 #define AFS_VFS34 1 /* What is VFS34??? */
78 #define AFS_SHORTGID 1 /* are group id's short? */
79 #define afsio_iov uio_iov
80 #define afsio_iovcnt uio_iovcnt
81 #define afsio_offset uio_offset
82 #define afsio_seg uio_segflg
83 #define afsio_resid uio_resid
84 #define AFS_UIOSYS UIO_SYSSPACE
85 #define AFS_UIOUSER UIO_USERSPACE
86 #define AFS_CLBYTES CLBYTES
87 #define osi_GetTime(x) microtime(x)
88 #define AFS_KALLOC(x) kalloc(x)
89 #define AFS_KFREE(x,y) kfree(x,y)
90 #define v_count v_usecount
91 #define v_vfsp v_mount
92 #define vfs_bsize mnt_stat.f_bsize
93 #define vfs_fsid mnt_stat.f_fsid
94 #define va_nodeid va_fileid
95 #define vfs_vnodecovered mnt_vnodecovered
97 #define vnode_t struct vnode
100 #define MUTEX_DEFAULT 0
101 #endif /* MUTEX_DEFAULT */
107 #define p_rcred p_ucred
109 #define VN_RELE(vp) vrele(((struct vnode *)(vp)))
110 #define VN_HOLD(vp) VREF(((struct vnode *)(vp)))
112 #if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
113 enum vcexcl { NONEXCL, EXCL };
117 #define MIN(A,B) ((A) < (B) ? (A) : (B))
120 #define MAX(A,B) ((A) > (B) ? (A) : (B))
124 #endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
125 #endif /* _KERNEL_DEPRECATED */
127 #else /* !defined(UKERNEL) */
130 /* This section for user space compiles only */
132 #define UKERNEL 1 /* user space kernel */
134 #include <afs/afs_sysnames.h>
136 #define AFS_USERSPACE_IP_ADDR 1
137 #define RXK_LISTENER_ENV 1
138 #define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
140 #define afsio_iov uio_iov
141 #define afsio_iovcnt uio_iovcnt
142 #define afsio_offset uio_offset
143 #define afsio_seg uio_segflg
144 #define afsio_fmode uio_fmode
145 #define afsio_resid uio_resid
146 #define AFS_UIOSYS UIO_SYSSPACE
147 #define AFS_UIOUSER UIO_USERSPACE
148 #define AFS_CLBYTES MCLBYTES
149 #define AFS_MINCHANGE 2
150 #define VATTR_NULL usr_vattr_null
157 #if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
159 #include <sys/param.h>
160 #include <sys/types.h>
161 #include <sys/mount.h>
162 #include <sys/fcntl.h>
163 #include <netinet/in.h>
165 #include <sys/socket.h>
168 #endif /* !defined(UKERNEL) */
170 #endif /* AFS_PARAM_COMMON_H */