From: Matt Benjamin Date: Sat, 18 Jul 2009 13:29:20 +0000 (-0400) Subject: Add amd64 subtarget for OpenBSD X-Git-Tag: openafs-devel-1_5_61~78 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=dbdd3190a75ce634c2e13d2e2141c564af379519 Add amd64 subtarget for OpenBSD The subtarget name is amd64_obsd. A sysname is created for the OpenBSD 4.5 release, since it's current. The sysname id range starting at 4000 is claimed for amd64_obsd, with amd64_obsd45 at 4014, so that prior releases can be added in the correct order, if needed. Mention of Jim Rees and CITI in new param file changed to line crediting them for original work. Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/153 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index 8aafc16..bcbbcfb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -471,7 +471,11 @@ case $system in MKAFS_OSTYPE=NBSD AC_MSG_RESULT(nbsd) ;; - *-openbsd*) + x86_64-*-openbsd*) + MKAFS_OSTYPE=OBSD + AC_MSG_RESULT(amd64_obsd) + ;; + i386-openbsd*) MKAFS_OSTYPE=OBSD AC_MSG_RESULT(i386_obsd) ;; @@ -501,6 +505,12 @@ else vm=${v#*.} AFS_SYSNAME="sparc64_obsd${vM}${vm}" ;; + x86_64-*-openbsd?.?) + v=${host#*openbsd} + vM=${v%.*} + vm=${v#*.} + AFS_SYSNAME="amd64_obsd${vM}${vm}" + ;; i?86-*-freebsd?.*) v=${host#*freebsd} vM=${v%.*} diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 3f7824e..201ad44 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -287,6 +287,8 @@ #define SYS_NAME_ID_i386_dfbsd_22 3900 #define SYS_NAME_ID_i386_dfbsd_23 3901 +#define SYS_NAME_ID_amd64_obsd45 4014 + /* * Placeholder to keep system-wide standard flags since this file is included by all * files (i.e in afs/param.h) diff --git a/src/config/param.amd64_obsd45.h b/src/config/param.amd64_obsd45.h new file mode 100644 index 0000000..84302c9 --- /dev/null +++ b/src/config/param.amd64_obsd45.h @@ -0,0 +1,75 @@ +/* + * Thanks to Jim Rees and University of Michigan CITI, for the initial + * OpenBSD porting work. + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#ifndef IGNORE_STDS_H +#include +#endif + +#define SYS_NAME "amd64_obsd45" +#define SYS_NAME_ID SYS_NAME_ID_amd64_obsd45 + +#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_64BITPOINTER_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_OBSD_ENV 1 +#define AFS_OBSD34_ENV 1 +#define AFS_OBSD35_ENV 1 +#define AFS_OBSD36_ENV 1 +#define AFS_OBSD37_ENV 1 +#define AFS_OBSD38_ENV 1 +#define AFS_OBSD39_ENV 1 +#define AFS_OBSD40_ENV 1 +#define AFS_OBSD41_ENV 1 +#define AFS_OBSD42_ENV 1 +#define AFS_OBSD43_ENV 1 +#define AFS_OBSD44_ENV 1 +#define AFS_OBSD45_ENV 1 +#define AFS_NONFSTRANS 1 +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 + +#define FTRUNC O_TRUNC + +#define AFS_SYSCALL 208 +#define AFS_MOUNT_AFS "afs" + +#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 */ + +#define AFSLITTLE_ENDIAN 1 + +#ifndef IGNORE_STDS_H +#include +#endif + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_SHORTGID 0 /* are group id's short? */ + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl { NONEXCL, EXCL }; + +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_obsd45.h b/src/config/param.i386_obsd45.h index 7664157..89dc0cb 100644 --- a/src/config/param.i386_obsd45.h +++ b/src/config/param.i386_obsd45.h @@ -1,5 +1,6 @@ /* - * Jim Rees, University of Michigan CITI + * Thanks to Jim Rees and University of Michigan CITI, for the initial + * OpenBSD porting work. */ #ifndef AFS_PARAM_H