From e74027abc8096372b4fee512d715c94171cb6e60 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 30 Apr 2009 01:30:39 +0000 Subject: [PATCH] Branch HEAD b=18790 i=robert, panda Check the types for PPC64 platform. --- libcfs/autoconf/lustre-libcfs.m4 | 16 +++++++++++++++- libcfs/include/libcfs/posix/posix-types.h | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 492b0e7..c200cae 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -433,7 +433,6 @@ LB_LINUX_TRY_COMPILE([ ]) ]) - # # LIBCFS_PROG_LINUX # @@ -510,6 +509,21 @@ AC_CHECK_TYPE([spinlock_t], # lnet/utils/wirecheck.c AC_CHECK_FUNCS([strnlen]) +AC_CHECK_TYPE([umode_t], + [AC_DEFINE(HAVE_UMODE_T, 1, [umode_t is defined])], + [], + [#include ]) + +AC_CHECK_TYPE([__u64], + [AC_DEFINE(HAVE___U64, 1, [__u64 is defined])], + [], + [#include ]) + +AC_CHECK_TYPE([__s64], + [AC_DEFINE(HAVE___S64, 1, [__s64 is defined])], + [], + [#include ]) + # -------- Check for required packages -------------- diff --git a/libcfs/include/libcfs/posix/posix-types.h b/libcfs/include/libcfs/posix/posix-types.h index 392e70e..911ba95 100644 --- a/libcfs/include/libcfs/posix/posix-types.h +++ b/libcfs/include/libcfs/posix/posix-types.h @@ -42,7 +42,9 @@ #ifndef _LUSTRE_POSIX_TYPES_H #define _LUSTRE_POSIX_TYPES_H +#ifndef HAVE_UMODE_T typedef unsigned short umode_t; +#endif /* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the @@ -58,8 +60,12 @@ typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; +#ifndef HAVE___S64 typedef __signed__ long long __s64; +#endif +#ifndef HAVE___U64 typedef unsigned long long __u64; +#endif /* long integer with size equal to pointer */ typedef unsigned long ulong_ptr_t; -- 1.8.3.1