Whamcloud - gitweb
LU-5327 libcfs: add libcfs/types.h 70/11070/3
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 11 Jul 2014 19:31:26 +0000 (14:31 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 1 Aug 2014 06:46:57 +0000 (06:46 +0000)
commitd3e3c5777dd6929d43c2c9028aab1079d8b2406c
tree433501b532171816eff8aa396f76382f560d4b33
parent3da5ac8cf543bd3caf0008d08536c620ac58560f
LU-5327 libcfs: add libcfs/types.h

Add libcfs/include/libcfs/types.h which unconditionally includes
linux/types.h and defines the LP*64 macros by testing for
_ASM_GENERIC_INT_L64_H or _ASM_GENERIC_INT_LL64_H. Remove autoconf
tests to determine in __u64 is unsigned long or unsigned long
long. Remove the headers posix-types.h and posix-wordsize.h. This
fixes two problems:

  1) Use of the LP*64 macros may make lustre headers unusable when
     config.h is not included (like when the headers are used out of
     tree).

  2) Some platforms (like powerpc64) define __u64 to be unsigned long
     in the kernel and unsigned long long in userspace. This means
     that a single autoconf test cannot be used to determine how to
     define the terrible LP*64 macros.

Imaginary ports of Lustre to non-Linux platforms may handle this
change by adding linux/types.h somewhere in their include path and
putting the right typedefs and defines therein.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iaab8e552d2d8a1c87ca2675f5068bc2943d8ce18
Reviewed-on: http://review.whamcloud.com/11070
Tested-by: Jenkins
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
13 files changed:
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/Makefile.am
libcfs/include/libcfs/libcfs.h
libcfs/include/libcfs/libcfs_ioctl.h
libcfs/include/libcfs/linux/kp30.h
libcfs/include/libcfs/linux/libcfs.h
libcfs/include/libcfs/posix/Makefile.am
libcfs/include/libcfs/posix/libcfs.h
libcfs/include/libcfs/posix/posix-types.h [deleted file]
libcfs/include/libcfs/posix/posix-wordsize.h [deleted file]
libcfs/include/libcfs/types.h [new file with mode: 0644]
lustre/include/lustre/ll_fiemap.h
lustre/include/lustre/lustre_user.h