From: Love Hörnquist-Åstrand Date: Fri, 18 Jan 2002 18:45:27 +0000 (+0000) Subject: netbsd-alpha-start-at-server-support-20020118 X-Git-Tag: openafs-devel-1_3_0~57 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=60612252e71c304e882fbab1a8d5edec2218c28e;p=packages%2Fo%2Fopenafs.git netbsd-alpha-start-at-server-support-20020118 not ready yet adds the concept of a common OS param file --- diff --git a/acinclude.m4 b/acinclude.m4 index c669a7956..eb7487182 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -189,7 +189,7 @@ case $system in ;; *-netbsd*) MKAFS_OSTYPE=NBSD - AC_MSG_RESULT(i386_nbsd) + AC_MSG_RESULT(nbsd) ;; *-openbsd*) MKAFS_OSTYPE=OBSD @@ -209,8 +209,13 @@ else AFS_SYSNAME="i386_fbsd_42" ;; i?86-*-netbsd*1.5*) + AFS_PARAM_COMMON=param.nbsd15.h AFS_SYSNAME="i386_nbsd15" ;; + alpha-*-netbsd*1.5*) + AFS_PARAM_COMMON=param.nbsd15.h + AFS_SYSNAME="alpha_nbsd15" + ;; hppa*-hp-hpux11*) AFS_SYSNAME="hp_ux110" ;; @@ -485,6 +490,7 @@ ENABLE_KERNEL_MODULE=libafs fi AC_SUBST(AFS_SYSNAME) +AC_SUBST(AFS_PARAM_COMMON) AC_SUBST(ENABLE_KERNEL_MODULE) AC_SUBST(LIB_AFSDB) AC_SUBST(LINUX_KERNEL_PATH) diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in index fa889786e..09fd6f4a3 100644 --- a/src/config/Makefile.config.in +++ b/src/config/Makefile.config.in @@ -45,6 +45,7 @@ LINUX_VERSION = @LINUX_VERSION@ LINUX_VERS = @LINUX_VERSION@ LWP_OPTMZ = @LWP_OPTMZ@ MKAFS_OSTYPE = @MKAFS_OSTYPE@ +AFS_PARAM_COMMON = @AFS_PARAM_COMMON@ MT_CC = @MT_CC@ MT_CFLAGS = @MT_CFLAGS@ MT_LIBS = @MT_LIBS@ diff --git a/src/config/Makefile.in b/src/config/Makefile.in index b0a230630..d8e88b2f5 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -74,8 +74,15 @@ UKDIRS = ${UKERNELDIR}/afs \ $(UKDIRS): mkdir -p $@ -${KERNELDIR}/afs/param.h ${DEST}/include/afs/param.h ${DESTDIR}${includedir}/afs/param.h ${TOP_INCDIR}/afs/param.h: ${srcdir}/param.${SYS_NAME}.h - -$(INST) +# XXX inlined INST +${KERNELDIR}/afs/param.h ${DEST}/include/afs/param.h ${DESTDIR}${includedir}/afs/param.h ${TOP_INCDIR}/afs/param.h: ${srcdir}/param.${SYS_NAME}.h ${AFS_PARAM_COMMON} + if [ X${AFS_PARAM_COMMON} != X ] ; then \ + cat ${srcdir}/${AFS_PARAM_COMMON} ${srcdir}/param.${SYS_NAME}.h > param.h.new ; \ + $(RM) -f $@; \ + $(CP) param.h.new $@ ; \ + else \ + $(RM) -f $@; $(CP) ${srcdir}/param.${SYS_NAME}.h $@ ; \ + fi ${UKERNELDIR}/afs/afs_sysnames.h ${KERNELDIR}/afs/afs_sysnames.h ${DEST}/include/afs/afs_sysnames.h ${DESTDIR}${includedir}/afs/afs_sysnames.h ${TOP_INCDIR}/afs/afs_sysnames.h: ${srcdir}/afs_sysnames.h $(INST) diff --git a/src/config/param.alpha_nbsd15.h b/src/config/param.alpha_nbsd15.h new file mode 100644 index 000000000..6dab433cd --- /dev/null +++ b/src/config/param.alpha_nbsd15.h @@ -0,0 +1,16 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_ALPHA_ENV 1 +#define AFS_ALPHA_XBSD_ENV 1 + +#define AFS_ALPHA_ENV 1 + +#define AFS_MOUNT_AFS "afs" + +#define SYS_NAME "alpha_nbsd15" +#define SYS_NAME_ID SYS_NAME_ID_alpha_nbsd15 + +#define AFSBIG_ENDIAN 1 + +#endif /* AFS_PARAM_COMMON_H */ diff --git a/src/config/param.i386_nbsd15.h b/src/config/param.i386_nbsd15.h index d4d951954..0096ec8f6 100644 --- a/src/config/param.i386_nbsd15.h +++ b/src/config/param.i386_nbsd15.h @@ -1,110 +1,17 @@ -#ifndef AFS_PARAM_H -#define AFS_PARAM_H +#ifndef AFS_PARAM_COMMON_H +#define AFS_PARAM_COMMON_H #include -#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_NBSD_ENV 1 -#define AFS_NBSD15_ENV 1 #define AFS_X86_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, \ - (struct simplelock *)0, curproc) -#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ - (struct simplelock *)0, curproc) - -#include - -#define AFS_VM_RDWR_ENV 1 -#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" -#ifndef MOUNT_UFS -#define MOUNT_UFS "ufs" -#endif - -#ifndef MOUNT_AFS -#define MOUNT_AFS AFS_MOUNT_AFS -#endif #define SYS_NAME "i386_nbsd15" #define SYS_NAME_ID SYS_NAME_ID_i386_nbsd15 -#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 1 /* 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) 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 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 - -#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 */ +#endif /* AFS_PARAM_COMMON_H */ diff --git a/src/config/param.nbsd15.h b/src/config/param.nbsd15.h new file mode 100644 index 000000000..f49c2821f --- /dev/null +++ b/src/config/param.nbsd15.h @@ -0,0 +1,104 @@ + +#ifndef AFS_PARAM_COMMON_H +#define AFS_PARAM_COMMON_H + +#include + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_NBSD_ENV 1 +#define AFS_NBSD15_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, \ + (struct simplelock *)0, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + (struct simplelock *)0, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif + +#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 */ + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 1 /* 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) 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 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 + +#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_COMMON_H */