From 7439ca3b79ecb4a1e518f38fd2ce4e6a57a6e15b Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Fri, 20 Sep 2002 17:32:11 +0000 Subject: [PATCH] update-openbsd-31-20020920 update OpenBSD to 3.1 --- acinclude.m4 | 3 ++ src/cf/osconf.m4 | 4 +- src/config/param.i386_obsd31.h | 106 +++++++++++++++++++++++++++++++++++++ src/config/param.i386_obsd31_usr.h | 60 +++++++++++++++++++++ src/lwp/process.s | 2 +- 5 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 src/config/param.i386_obsd31.h create mode 100644 src/config/param.i386_obsd31_usr.h diff --git a/acinclude.m4 b/acinclude.m4 index a9d07ac..dce8fd0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -239,6 +239,9 @@ if test "x$with_afs_sysname" != "x"; then else AC_MSG_CHECKING(your AFS sysname) case $host in + i386-unknown-openbsd3.1) + AFS_SYSNAME="i386_obsd31" + ;; i?86-*-freebsd4.2*) AFS_SYSNAME="i386_fbsd_42" ;; diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 1185d1e..367fa1f 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -190,8 +190,8 @@ case $AFS_SYSNAME in XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE" SHLIB_LINKER="${MT_CC} -shared" ;; - - i386_obsd29) + + *_obsd*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-pthread" diff --git a/src/config/param.i386_obsd31.h b/src/config/param.i386_obsd31.h new file mode 100644 index 0000000..25023cd --- /dev/null +++ b/src/config/param.i386_obsd31.h @@ -0,0 +1,106 @@ +/* + * Jim Rees, University of Michigan CITI + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#ifndef IGNORE_STDS_H +#include +#include +#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_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_OBSD_ENV 1 +#define AFS_NONFSTRANS 1 +#define AFS_KERBEROS_ENV 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) + +#define AFS_VM_RDWR_ENV 0 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 210 +#define AFS_MOUNT_AFS "afs" + +#define SYS_NAME "i386_obsd31" +#define SYS_NAME_ID 2002 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* 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 MB_CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) kalloc(x) +#define AFS_KFREE(x,y) kfree(x,y) +#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 vnode_t struct vnode +#define setgroups sys_setgroups + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#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 */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_obsd31_usr.h b/src/config/param.i386_obsd31_usr.h new file mode 100644 index 0000000..7893d6e --- /dev/null +++ b/src/config/param.i386_obsd31_usr.h @@ -0,0 +1,60 @@ +/* + * Jim Rees, University of Michigan CITI + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_OBSD_ENV 1 +#define AFS_386i_ENV 1 /* 386 Architecture--for lwp stuff */ +#define AFS_NONFSTRANS 1 +#define AFS_KERBEROS_ENV + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 210 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "i386_obsd31" +#define SYS_NAME_ID 2002 +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ + +#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 MB_CLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* AFS_PARAM_H */ diff --git a/src/lwp/process.s b/src/lwp/process.s index 5df491e..1f355c9 100644 --- a/src/lwp/process.s +++ b/src/lwp/process.s @@ -1165,7 +1165,7 @@ LEAF(returnto,1) END(returnto) #endif -#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV) +#if defined(AFS_NCR_ENV) || defined(AFS_X86_ENV) || defined(AFS_DJGPP_ENV) || defined(AFS_OBSD_ENV) /* Sun 386i... I hope this does the right thing!!! * * Written by Derek Atkins -- 1.9.4