1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Update to 1.6.5.

Submitted by:	bjk (maintainer)
PR:		ports/183946
This commit is contained in:
Hiroki Sato 2013-12-02 05:01:19 +00:00
parent 72eb7d36db
commit db6429a261
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=335451
16 changed files with 1262 additions and 4 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= openafs
DISTVERSION= ${AFS_DISTVERSION}.${DBVERSION:S/-//g}
PORTREVISION= 1
CATEGORIES= net kld
MASTER_SITES= http://dl.central.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
http://dl.openafs.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
@ -41,6 +42,14 @@ PLIST_SUB+= AFSMNTDIR=${AFSMNTDIR:C,^/,,} \
AFSSTATEDIR=${AFSSTATEDIR:C,^/,,} \
AFSCACHEDIR=${AFSCACHEDIR:C,^/,,}
# clang (the base system compiler in __FreeBSD_version 1000024 and later)
# is pickier about stack alignment than gcc; OpenAFS uses its own
# lightweight process "threading" library which will produce a misaligned
# stack under clang; we need to pass -mstackrealign to avoid SIGBUS at
# runtime. gcc does not understand this flag, so we use compiler.mk to
# figure out what type of compiler is in use.
USES+= compiler
NO_STAGE= yes
.include <bsd.port.pre.mk>
@ -61,9 +70,6 @@ IGNORE= requires kernel configuration file ${_KERNCONF} to build
.if ${OSVERSION} < 800000
IGNORE= supports FreeBSD 8.0 and later
.endif
.if ${OSVERSION} > 1000000
IGNORE= Does not build
.endif
CONFIGURE_ARGS= --prefix=${PREFIX} \
--localstatedir=/var \
@ -95,6 +101,11 @@ post-extract:
${MKDIR} ${WRKDIR}/conf
cd ${KERNCONFDIR} && /usr/sbin/config -d ${WRKDIR}/conf ${_KERNCONF} >/dev/null
post-patch:
.if ${COMPILER_TYPE} == clang
${REINPLACE_CMD} -e 's/XCFLAGS="-O2 -pipe -fPIC"/XCFLAGS="-O2 -pipe -fPIC -mstackrealign"/' ${WRKSRC}/configure
.endif
create-sample-files:
@${ECHO_CMD} openafs.org > ${WRKDIR}/ThisCell
@${ECHO_CMD} "${AFSMNTDIR}:${AFSCACHEDIR}:150000" > ${WRKDIR}/cacheinfo

View File

@ -3,7 +3,7 @@
# $FreeBSD$
#
# PROVIDE: afsserver
# REQUIRE: networking
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf

View File

@ -0,0 +1,80 @@
diff --git a/src/afs/FBSD/osi_vm.c b/src/afs/FBSD/osi_vm.c
index 5fd9703..65f5333 100644
--- a/src/afs/FBSD/osi_vm.c
+++ b/src/afs/FBSD/osi_vm.c
@@ -29,13 +29,15 @@
#include "afs/afs_stats.h" /* statistics */
#include <vm/vm_object.h>
#include <vm/vm_map.h>
-#include <limits.h>
-#include <float.h>
+#include <sys/limits.h>
+#if __FreeBSD_version >= 1000030
+#include <sys/rwlock.h>
+#endif
/*
* FreeBSD implementation notes:
* Most of these operations require us to frob vm_objects. Most
- * functions require that the object be locked (with VM_OBJECT_LOCK)
+ * functions require that the object be locked (with VM_OBJECT_*LOCK)
* on entry and leave it locked on exit. The locking protocol
* requires that we access vp->v_object with the heavy vnode lock
* held and the vnode interlock unlocked.
@@ -58,6 +60,14 @@
#define islocked_vnode(v) VOP_ISLOCKED((v), curthread)
#endif
+#if __FreeBSD_version >= 1000030
+#define AFS_VM_OBJECT_WLOCK(o) VM_OBJECT_WLOCK(o)
+#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_WUNLOCK(o)
+#else
+#define AFS_VM_OBJECT_WLOCK(o) VM_OBJECT_LOCK(o)
+#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_UNLOCK(o)
+#endif
+
/* Try to discard pages, in order to recycle a vcache entry.
*
* We also make some sanity checks: ref count, open count, held locks.
@@ -155,9 +165,9 @@ osi_VM_StoreAllSegments(struct vcache *avc)
if (!vget(vp, LK_EXCLUSIVE | LK_RETRY, curthread)) {
obj = vp->v_object;
if (obj != NULL) {
- VM_OBJECT_LOCK(obj);
+ AFS_VM_OBJECT_WLOCK(obj);
vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
- VM_OBJECT_UNLOCK(obj);
+ AFS_VM_OBJECT_WUNLOCK(obj);
anyio = 1;
}
vput(vp);
@@ -203,7 +213,7 @@ osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
lock_vnode(vp, LK_EXCLUSIVE);
if (vp->v_bufobj.bo_object != NULL) {
- VM_OBJECT_LOCK(vp->v_bufobj.bo_object);
+ AFS_VM_OBJECT_WLOCK(vp->v_bufobj.bo_object);
/*
* Do we really want OBJPC_SYNC? OBJPC_INVAL would be
* faster, if invalidation is really what we are being
@@ -219,7 +229,7 @@ osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
*/
vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC);
- VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object);
+ AFS_VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object);
}
tries = 5;
@@ -249,9 +259,9 @@ osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
ASSERT_VOP_LOCKED(vp, __func__);
obj = vp->v_object;
if (obj != NULL) {
- VM_OBJECT_LOCK(obj);
+ AFS_VM_OBJECT_WLOCK(obj);
vm_object_page_remove(obj, 0, 0, FALSE);
- VM_OBJECT_UNLOCK(obj);
+ AFS_VM_OBJECT_WUNLOCK(obj);
}
osi_vinvalbuf(vp, 0, 0, 0);
}

View File

@ -0,0 +1,123 @@
diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c
index 01498fa..ac16df0 100644
--- a/src/afs/FBSD/osi_vnodeops.c
+++ b/src/afs/FBSD/osi_vnodeops.c
@@ -54,6 +54,9 @@
#include <sys/malloc.h>
#include <sys/namei.h>
#include <sys/unistd.h>
+#if __FreeBSD_version >= 1000030
+#include <sys/rwlock.h>
+#endif
#include <vm/vm_page.h>
#include <vm/vm_object.h>
#include <vm/vm_pager.h>
@@ -266,6 +269,14 @@ static __inline void ma_vm_page_unlock(vm_page_t m) {};
#define MA_PCPU_ADD(c, n) (c) += (n)
#endif
+#if __FreeBSD_version >= 1000030
+#define AFS_VM_OBJECT_WLOCK(o) VM_OBJECT_WLOCK(o)
+#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_WUNLOCK(o)
+#else
+#define AFS_VM_OBJECT_WLOCK(o) VM_OBJECT_LOCK(o)
+#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_UNLOCK(o)
+#endif
+
#ifdef AFS_FBSD70_ENV
#ifndef AFS_FBSD80_ENV
/* From kern_lock.c */
@@ -806,7 +817,7 @@ afs_vop_getpages(struct vop_getpages_args *ap)
{
vm_page_t m = ap->a_m[ap->a_reqpage];
- VM_OBJECT_LOCK(object);
+ AFS_VM_OBJECT_WLOCK(object);
ma_vm_page_lock_queues();
if (m->valid != 0) {
/* handled by vm_fault now */
@@ -819,11 +830,11 @@ afs_vop_getpages(struct vop_getpages_args *ap)
}
}
ma_vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(object);
+ AFS_VM_OBJECT_WUNLOCK(object);
return (0);
}
ma_vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(object);
+ AFS_VM_OBJECT_WUNLOCK(object);
}
bp = getpbuf(&afs_pbuf_freecnt);
@@ -851,19 +862,19 @@ afs_vop_getpages(struct vop_getpages_args *ap)
relpbuf(bp, &afs_pbuf_freecnt);
if (code && (uio.uio_resid == ap->a_count)) {
- VM_OBJECT_LOCK(object);
+ AFS_VM_OBJECT_WLOCK(object);
ma_vm_page_lock_queues();
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vm_page_free(ap->a_m[i]);
}
ma_vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(object);
+ AFS_VM_OBJECT_WUNLOCK(object);
return VM_PAGER_ERROR;
}
size = ap->a_count - uio.uio_resid;
- VM_OBJECT_LOCK(object);
+ AFS_VM_OBJECT_WLOCK(object);
ma_vm_page_lock_queues();
for (i = 0, toff = 0; i < npages; i++, toff = nextoff) {
vm_page_t m;
@@ -893,6 +904,9 @@ afs_vop_getpages(struct vop_getpages_args *ap)
}
if (i != ap->a_reqpage) {
+#if __FreeBSD_version >= 1000042
+ vm_page_readahead_finish(m);
+#else
/*
* Whether or not to leave the page activated is up in
* the air, but we should put the page on a page queue
@@ -926,10 +940,11 @@ afs_vop_getpages(struct vop_getpages_args *ap)
vm_page_free(m);
ma_vm_page_unlock(m);
}
+#endif /* __FreeBSD_version 1000042 */
}
}
ma_vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(object);
+ AFS_VM_OBJECT_WUNLOCK(object);
return 0;
}
@@ -1076,24 +1091,6 @@ afs_vop_poll(ap)
return (1);
}
-/*
- * Mmap a file
- *
- * NB Currently unsupported.
- */
-/* ARGSUSED */
-int
-afs_vop_mmap(ap)
- struct vop_mmap_args /* {
- * struct vnode *a_vp;
- * int a_fflags;
- * struct ucred *a_cred;
- * struct thread *td;
- * } */ *ap;
-{
- return (EINVAL);
-}
-
int
afs_vop_fsync(ap)
struct vop_fsync_args /* {

View File

@ -0,0 +1,31 @@
diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
index 63fe88f..e0a744d 100644
--- a/src/afs/afs_pioctl.c
+++ b/src/afs/afs_pioctl.c
@@ -815,9 +815,15 @@ afs_xioctl(afs_proc_t *p, struct ioctl_args *uap, register_t *retval)
# else
fdp = p->p_fd;
#endif
+#if defined(AFS_FBSD100_ENV)
+ if ((uap->fd >= fdp->fd_nfiles)
+ || ((fd = fdp->fd_ofiles[uap->fd].fde_file) == NULL))
+ return EBADF;
+#else
if ((u_int) uap->fd >= fdp->fd_nfiles
|| (fd = fdp->fd_ofiles[uap->fd]) == NULL)
return EBADF;
+#endif
if ((fd->f_flag & (FREAD | FWRITE)) == 0)
return EBADF;
/* first determine whether this is any sort of vnode */
@@ -1118,10 +1124,6 @@ afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
vp = (struct vnode *)dp->d_inode;
#else
code = gop_lookupname_user(path, AFS_UIOUSER, follow, &vp);
-#if defined(AFS_FBSD80_ENV) /* XXX check on 7x */
- if (vp != NULL)
- VN_HOLD(vp);
-#endif /* AFS_FBSD80_ENV */
#endif /* AFS_LINUX22_ENV */
#endif /* AFS_AIX41_ENV */
AFS_GLOCK();

View File

@ -0,0 +1,13 @@
diff --git a/src/afs/afs_warn.c b/src/afs/afs_warn.c
index d8bdddc..a04a98b 100644
--- a/src/afs/afs_warn.c
+++ b/src/afs/afs_warn.c
@@ -25,6 +25,8 @@
# include <net/if.h>
# if defined(AFS_SUN58_ENV)
# include <sys/varargs.h>
+# elif defined(AFS_FBSD_ENV)
+# include <machine/stdarg.h>
# else
# include <stdarg.h>
# endif

View File

@ -0,0 +1,13 @@
diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h
index 5840227..9d68b1e 100644
--- a/src/afs/sysincludes.h
+++ b/src/afs/sysincludes.h
@@ -288,7 +288,7 @@ typedef unsigned short etap_event_t;
# include "h/protosw.h"
# if defined(AFS_FBSD_ENV)
-# include "limits.h"
+# include "sys/limits.h"
# endif
# ifdef AFS_HPUX_ENV

View File

@ -0,0 +1,24 @@
diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h
index 060795b..2a7e993 100644
--- a/src/config/afs_sysnames.h
+++ b/src/config/afs_sysnames.h
@@ -209,7 +209,9 @@
#define SYS_NAME_ID_i386_fbsd_84 2123
#define SYS_NAME_ID_i386_fbsd_90 2120
#define SYS_NAME_ID_i386_fbsd_91 2122
+#define SYS_NAME_ID_i386_fbsd_92 2124
#define SYS_NAME_ID_i386_fbsd_100 2130
+#define SYS_NAME_ID_i386_fbsd_110 2140
#define SYS_NAME_ID_ia64_linux2 2200
#define SYS_NAME_ID_ia64_linux22 2201
@@ -310,7 +312,9 @@
#define SYS_NAME_ID_amd64_fbsd_84 3015
#define SYS_NAME_ID_amd64_fbsd_90 3020
#define SYS_NAME_ID_amd64_fbsd_91 3022
+#define SYS_NAME_ID_amd64_fbsd_92 3023
#define SYS_NAME_ID_amd64_fbsd_100 3030
+#define SYS_NAME_ID_amd64_fbsd_110 3040
#define SYS_NAME_ID_amd64_w2k 3400

View File

@ -0,0 +1,224 @@
diff --git a/src/config/param.amd64_fbsd_110.h b/src/config/param.amd64_fbsd_110.h
new file mode 100644
index 0000000..2e55c67
--- /dev/null
+++ b/src/config/param.amd64_fbsd_110.h
@@ -0,0 +1,218 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "amd64_fbsd_110"
+#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_110
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BITUSERPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_FBSD80_ENV 1
+#define AFS_FBSD81_ENV 1
+#define AFS_FBSD90_ENV 1
+#define AFS_FBSD91_ENV 1
+#define AFS_FBSD100_ENV 1
+#define AFS_FBSD110_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_FBSD80_ENV 1
+#define AFS_X86_FBSD81_ENV 1
+#define AFS_X86_FBSD90_ENV 1
+#define AFS_X86_FBSD91_ENV 1
+#define AFS_X86_FBSD100_ENV 1
+#define AFS_X86_FBSD110_ENV 1
+#define AFS_X86_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD80_ENV 1
+#define AFS_USR_FBSD81_ENV 1
+#define AFS_USR_FBSD90_ENV 1
+#define AFS_USR_FBSD91_ENV 1
+#define AFS_USR_FBSD100_ENV 1
+#define AFS_USR_FBSD110_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */

View File

@ -0,0 +1,221 @@
diff --git a/src/config/param.amd64_fbsd_92.h b/src/config/param.amd64_fbsd_92.h
new file mode 100644
index 0000000..b16c83d
--- /dev/null
+++ b/src/config/param.amd64_fbsd_92.h
@@ -0,0 +1,215 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "amd64_fbsd_92"
+#define SYS_NAME_ID SYS_NAME_ID_amd64_fbsd_92
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BITUSERPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_FBSD80_ENV 1
+#define AFS_FBSD81_ENV 1
+#define AFS_FBSD90_ENV 1
+#define AFS_FBSD91_ENV 1
+#define AFS_FBSD92_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_FBSD80_ENV 1
+#define AFS_X86_FBSD81_ENV 1
+#define AFS_X86_FBSD90_ENV 1
+#define AFS_X86_FBSD91_ENV 1
+#define AFS_X86_FBSD92_ENV 1
+#define AFS_X86_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD80_ENV 1
+#define AFS_USR_FBSD81_ENV 1
+#define AFS_USR_FBSD90_ENV 1
+#define AFS_USR_FBSD91_ENV 1
+#define AFS_USR_FBSD92_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BITPOINTER_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */

View File

@ -0,0 +1,222 @@
diff --git a/src/config/param.i386_fbsd_110.h b/src/config/param.i386_fbsd_110.h
new file mode 100644
index 0000000..622e7f1
--- /dev/null
+++ b/src/config/param.i386_fbsd_110.h
@@ -0,0 +1,216 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "i386_fbsd_110"
+#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_110
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_FBSD80_ENV 1
+#define AFS_FBSD81_ENV 1
+#define AFS_FBSD90_ENV 1
+#define AFS_FBSD91_ENV 1
+#define AFS_FBSD100_ENV 1
+#define AFS_FBSD110_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_FBSD80_ENV 1
+#define AFS_X86_FBSD81_ENV 1
+#define AFS_X86_FBSD90_ENV 1
+#define AFS_X86_FBSD91_ENV 1
+#define AFS_X86_FBSD100_ENV 1
+#define AFS_X86_FBSD110_ENV 1
+#define AFS_X86_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD80_ENV 1
+#define AFS_USR_FBSD81_ENV 1
+#define AFS_USR_FBSD90_ENV 1
+#define AFS_USR_FBSD91_ENV 1
+#define AFS_USR_FBSD100_ENV 1
+#define AFS_USR_FBSD110_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */

View File

@ -0,0 +1,219 @@
diff --git a/src/config/param.i386_fbsd_92.h b/src/config/param.i386_fbsd_92.h
new file mode 100644
index 0000000..7941bde
--- /dev/null
+++ b/src/config/param.i386_fbsd_92.h
@@ -0,0 +1,213 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* Machine / Operating system information */
+#define SYS_NAME "i386_fbsd_92"
+#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_92
+
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */
+
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV 1
+
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_FBSD_ENV 1
+#define AFS_FBSD50_ENV 1
+#define AFS_FBSD51_ENV 1
+#define AFS_FBSD52_ENV 1
+#define AFS_FBSD53_ENV 1
+#define AFS_FBSD60_ENV 1
+#define AFS_FBSD61_ENV 1
+#define AFS_FBSD62_ENV 1
+#define AFS_FBSD70_ENV 1
+#define AFS_FBSD71_ENV 1
+#define AFS_FBSD80_ENV 1
+#define AFS_FBSD81_ENV 1
+#define AFS_FBSD90_ENV 1
+#define AFS_FBSD91_ENV 1
+#define AFS_FBSD92_ENV 1
+#define AFS_X86_FBSD_ENV 1
+#define AFS_X86_FBSD50_ENV 1
+#define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+#define AFS_X86_FBSD62_ENV 1
+#define AFS_X86_FBSD70_ENV 1
+#define AFS_X86_FBSD71_ENV 1
+#define AFS_X86_FBSD80_ENV 1
+#define AFS_X86_FBSD81_ENV 1
+#define AFS_X86_FBSD90_ENV 1
+#define AFS_X86_FBSD91_ENV 1
+#define AFS_X86_FBSD92_ENV 1
+#define AFS_X86_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+#define FTRUNC O_TRUNC
+
+#define IUPD 0x0010
+#define IACC 0x0020
+#define ICHG 0x0040
+#define IMOD 0x0080
+
+#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+ NULL, curproc)
+#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \
+ NULL, curproc)
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_VFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_GREEDY43_ENV 1
+#define AFS_ENV 1
+
+#define AFS_SYSCALL 339
+#define AFS_MOUNT_AFS "afs"
+
+#ifndef MOUNT_UFS
+#define MOUNT_UFS "ufs"
+#endif
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 0 /* are group id's short? */
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES CLBYTES
+#define osi_GetTime(x) microtime(x)
+#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1)
+#undef AFS_KALLOC_NOSLEEP
+#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+#define AFS_KFREE(x,y) osi_fbsd_free((x))
+#define v_count v_usecount
+#define v_vfsp v_mount
+#define vfs_bsize mnt_stat.f_bsize
+#define vfs_fsid mnt_stat.f_fsid
+#define va_nodeid va_fileid
+#define vfs_vnodecovered mnt_vnodecovered
+#define direct dirent
+#define vnode_t struct vnode
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_VFSINCL_ENV 1
+#define AFS_USR_FBSD50_ENV 1
+#define AFS_USR_FBSD51_ENV 1
+#define AFS_USR_FBSD52_ENV 1
+#define AFS_USR_FBSD53_ENV 1
+#define AFS_USR_FBSD60_ENV 1
+#define AFS_USR_FBSD61_ENV 1
+#define AFS_USR_FBSD70_ENV 1
+#define AFS_USR_FBSD71_ENV 1
+#define AFS_USR_FBSD80_ENV 1
+#define AFS_USR_FBSD81_ENV 1
+#define AFS_USR_FBSD90_ENV 1
+#define AFS_USR_FBSD91_ENV 1
+#define AFS_USR_FBSD92_ENV 1
+#define AFS_USR_FBSD_ENV 1
+#undef AFS_NONFSTRANS
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 339
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#include <afs/afs_sysnames.h>
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <limits.h>
+
+#endif /* !defined(UKERNEL) */
+
+/* general user-space compiles */
+
+#if defined(UKERNEL) || !defined(KERNEL)
+#define STDLIB_HAS_MALLOC_PROTOS 1
+#endif
+
+#endif /* AFS_PARAM_H */

View File

@ -0,0 +1,31 @@
diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in
index efc5f9b..92461c9 100644
--- a/src/libafs/MakefileProto.FBSD.in
+++ b/src/libafs/MakefileProto.FBSD.in
@@ -42,9 +42,7 @@ KOPTS = -fPIC -mno-red-zone
KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \
-elf \
-<i386_fbsd_60>
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 \
-<all>
-mno-align-long-strings -fno-common -ffreestanding \
-I${KBLD} -include opt_global.h -fno-strict-aliasing
@@ -72,15 +70,11 @@ setup:
-$(RM) -f h net netinet rpc ufs nfs machine sys vm
-ln -fs ${KSRC}/net net
<amd64 i386>
- -ln -fs ${KSRC}/x86/include machine
+ -ln -fs ${KSRC}/x86/include x86
<all>
-ln -fs ${KSRC}/netinet netinet
-ln -fs ${KSRC}/nfs nfs
-<fbsd_50 fbsd_51 fbsd_52 fbsd_53 fbsd_60 fbsd_61 fbsd_62 fbsd_70>
- -ln -fs /usr/include/rpc rpc
-<all -fbsd_50 -fbsd_51 -fbsd_52 -fbsd_53 -fbsd_60 -fbsd_61 -fbsd_62 -fbsd_70>
-ln -fs ${KSRC}/rpc rpc
-<all>
-ln -fs ${KSRC}/sys sys
-ln -fs ${KSRC}/ufs/ufs ufs
-ln -fs ${KSRC}/sys h

View File

@ -0,0 +1,16 @@
diff --git a/src/libuafs/MakefileProto.FBSD.in b/src/libuafs/MakefileProto.FBSD.in
index 642fe6a..33f0c48 100644
--- a/src/libuafs/MakefileProto.FBSD.in
+++ b/src/libuafs/MakefileProto.FBSD.in
@@ -23,11 +23,7 @@ OPTF=-O
TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD50_ENV $(XCFLAGS)
TEST_LDFLAGS=
-<fbsd_50 fbsd_51 fbsd_52 fbsd_53 fbsd_60 fbsd_61>
-TEST_LIBS=-lc_r
-<all -fbsd_50 -fbsd_51 -fbsd_52 -fbsd_53 -fbsd_60 -fbsd_61>
TEST_LIBS=-lpthread
-<all>
LIBUAFS = libuafs.a
LIBJUAFS = libjuafs.a

View File

@ -0,0 +1,13 @@
diff --git a/src/rx/rx_clock.h b/src/rx/rx_clock.h
index 2bdc0b8..0810432 100644
--- a/src/rx/rx_clock.h
+++ b/src/rx/rx_clock.h
@@ -92,7 +92,7 @@ extern int clock_nUpdates;
#if defined(AFS_SGI61_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX_64BIT_KERNEL)
#define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)cv)
#else
-#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || (defined(AFS_DARWIN100_ENV) && defined(__amd64__)) || defined(AFS_NBSD_ENV)
+#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || (defined(AFS_DARWIN100_ENV) && defined(__amd64__)) || defined(AFS_XBSD_ENV)
#define clock_GetTime(cv) \
BEGIN \
struct timeval tv; \

View File

@ -0,0 +1,17 @@
diff --git a/src/rx/rx_kcommon.h b/src/rx/rx_kcommon.h
index 64d03cb..58bf69c 100644
--- a/src/rx/rx_kcommon.h
+++ b/src/rx/rx_kcommon.h
@@ -141,7 +141,11 @@ typedef unsigned short etap_event_t;
#include "h/errno.h"
#if !(defined(AFS_SUN5_ENV) && defined(KERNEL))
/* if sys/systm.h includes varargs.h some versions of solaris have conflicts */
-#include "stdarg.h"
+# if defined(AFS_FBSD_ENV)
+# include "machine/stdarg.h"
+# else
+# include "stdarg.h"
+# endif
#endif
#ifdef KERNEL
#include "afs/sysincludes.h"