From e1d0342326d11a14e1fb0075fb62cc6be9389b97 Mon Sep 17 00:00:00 2001 From: Antoine Verheijen Date: Wed, 7 May 2014 14:57:26 -0600 Subject: [PATCH] OpenBSD: Add support for OpenBSD 5.4 Add param header files and other config info to provide support for OpenBSD 5.4. Change-Id: I56d2e716bd7fa4dee699f8d190cb4b60bb0f67a8 Reviewed-on: http://gerrit.openafs.org/11130 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear --- acinclude.m4 | 1 + src/config/afs_sysnames.h | 2 + src/config/param.amd64_obsd54.h | 19 +++++++++ src/config/param.i386_obsd54.h | 25 ++++++++++++ src/config/param.obsd54.h | 87 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 src/config/param.amd64_obsd54.h create mode 100644 src/config/param.i386_obsd54.h create mode 100644 src/config/param.obsd54.h diff --git a/acinclude.m4 b/acinclude.m4 index b3b26cd..e832420 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -787,6 +787,7 @@ case $AFS_SYSNAME in *_obsd51) AFS_PARAM_COMMON=param.obsd51.h ;; *_obsd52) AFS_PARAM_COMMON=param.obsd52.h ;; *_obsd53) AFS_PARAM_COMMON=param.obsd53.h ;; + *_obsd54) AFS_PARAM_COMMON=param.obsd54.h ;; *_linux22) AFS_PARAM_COMMON=param.linux22.h ;; *_linux24) AFS_PARAM_COMMON=param.linux24.h ;; *_linux26) AFS_PARAM_COMMON=param.linux26.h ;; diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index f14c92b..866dc56 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -288,6 +288,7 @@ #define SYS_NAME_ID_i386_obsd51 2620 #define SYS_NAME_ID_i386_obsd52 2621 #define SYS_NAME_ID_i386_obsd53 2622 +#define SYS_NAME_ID_i386_obsd54 2623 #define SYS_NAME_ID_amd64_linux2 2700 #define SYS_NAME_ID_amd64_linux22 2701 @@ -355,6 +356,7 @@ #define SYS_NAME_ID_amd64_obsd51 4020 #define SYS_NAME_ID_amd64_obsd52 4021 #define SYS_NAME_ID_amd64_obsd53 4022 +#define SYS_NAME_ID_amd64_obsd54 4023 #define AFS_REALM_SZ 64 diff --git a/src/config/param.amd64_obsd54.h b/src/config/param.amd64_obsd54.h new file mode 100644 index 0000000..fade040 --- /dev/null +++ b/src/config/param.amd64_obsd54.h @@ -0,0 +1,19 @@ +/* + * Thanks to Jim Rees and University of Michigan CITI, for the initial + * OpenBSD porting work. + */ + +#ifndef AFS_AMD64_PARAM_H +#define AFS_AMD64_PARAM_H + +#define SYS_NAME "amd64_obsd54" +#define SYS_NAME_ID SYS_NAME_ID_amd64_obsd54 + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_64BITPOINTER_ENV 1 +#define AFS_64BITUSERPOINTER_ENV 1 +#define AFSLITTLE_ENDIAN 1 + +#endif /* AFS_AMD64_PARAM_H */ diff --git a/src/config/param.i386_obsd54.h b/src/config/param.i386_obsd54.h new file mode 100644 index 0000000..f039f12 --- /dev/null +++ b/src/config/param.i386_obsd54.h @@ -0,0 +1,25 @@ +/* + * Thanks to Jim Rees and University of Michigan CITI, for the initial + * OpenBSD porting work. + */ + +#ifndef AFS_I386_PARAM_H +#define AFS_I386_PARAM_H + +#define SYS_NAME "i386_obsd54" +#define SYS_NAME_ID SYS_NAME_ID_i386_obsd54 + +#define AFS_X86_XBSD_ENV 1 +#define AFS_X86_ENV 1 +#define AFSLITTLE_ENDIAN 1 + +#ifdef _KERNEL +void bcopy(const void *, void *, size_t); + +static inline void *memmove(void *dst, const void *src, size_t len) { + bcopy(src, dst, len); + return(dst); +} +#endif + +#endif /* AFS_I386_PARAM_H */ diff --git a/src/config/param.obsd54.h b/src/config/param.obsd54.h new file mode 100644 index 0000000..7dd8551 --- /dev/null +++ b/src/config/param.obsd54.h @@ -0,0 +1,87 @@ +/* + * 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 AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ + +#define AFS_OBSD_ENV 1 +#define AFS_OBSD31_ENV 1 +#define AFS_OBSD32_ENV 1 +#define AFS_OBSD33_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_OBSD46_ENV 1 +#define AFS_OBSD47_ENV 1 +#define AFS_OBSD48_ENV 1 +#define AFS_OBSD49_ENV 1 +#define AFS_OBSD50_ENV 1 +#define AFS_OBSD51_ENV 1 +#define AFS_OBSD52_ENV 1 +#define AFS_OBSD53_ENV 1 +#define AFS_OBSD54_ENV 1 +#undef AFS_NONFSTRANS +#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 */ + +#ifndef IGNORE_STDS_H +#include +#endif + +#ifndef TAILQ_ENTRY +#include +#endif + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#ifdef MULTIPROCESSOR +#define AFS_GLOBAL_SUNLOCK 1 +#endif +#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 */ -- 1.9.4