From 866c535664335f33e4ab48d1fa0e4c09f4d58543 Mon Sep 17 00:00:00 2001 From: pjkirner Date: Mon, 10 Oct 2005 13:45:45 +0000 Subject: [PATCH] * Added include/libcfs/types.h to fixed XT3 (Catamount) build error (i.e. no "types.h" in that environmnet) --- lnet/include/libcfs/Makefile.am | 2 +- lnet/include/libcfs/linux/libcfs.h | 2 +- lnet/include/libcfs/types.h | 39 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100755 lnet/include/libcfs/types.h diff --git a/lnet/include/libcfs/Makefile.am b/lnet/include/libcfs/Makefile.am index 50e377a..351caa4 100644 --- a/lnet/include/libcfs/Makefile.am +++ b/lnet/include/libcfs/Makefile.am @@ -5,4 +5,4 @@ endif DIST_SUBDIRS := $(SUBDIRS) EXTRA_DIST := curproc.h kp30.h libcfs.h list.h lltrace.h portals_lib.h \ - portals_utils.h user-lock.h user-prim.h user-time.h + portals_utils.h types.h user-lock.h user-prim.h user-time.h diff --git a/lnet/include/libcfs/linux/libcfs.h b/lnet/include/libcfs/linux/libcfs.h index fc86b61..c69058f 100644 --- a/lnet/include/libcfs/linux/libcfs.h +++ b/lnet/include/libcfs/linux/libcfs.h @@ -18,7 +18,7 @@ #ifdef HAVE_ASM_TYPES_H #include #else -#include "types.h" +#include #endif diff --git a/lnet/include/libcfs/types.h b/lnet/include/libcfs/types.h new file mode 100755 index 0000000..ba3995f --- /dev/null +++ b/lnet/include/libcfs/types.h @@ -0,0 +1,39 @@ +#ifndef _LIBCFS_TYPES_H +#define _LIBCFS_TYPES_H + +/* + * Note: This is currently a duplicate of + * It was necssary to introduce this to fix build issues + * on the XT3 (Catamount). should have + * been removed immediatly, however at the time of this writing + * it's unclear what the external dependencies are tied + * to that file (It's not just some source file #including it) + * there is some build/packaging infrastructure that includes it. + * Hopefully that will be resolved shortly, that file will + * be removed, and this comment can be deleted. + */ + +typedef unsigned short umode_t; + +#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ + !defined(_EXT2_TYPES_H) && !defined(_I386_TYPES_H)) + +/* + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the + * header files exported to user space + */ + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +typedef __signed__ long long __s64; +typedef unsigned long long __u64; +#endif + +#endif -- 1.8.3.1