From: Christoph Hellwig Date: Sun, 2 Aug 2015 23:58:22 +0000 (+1000) Subject: xfsprogs: move __u*/__s* typedefs to per-port headers X-Git-Tag: v4.2.0-rc1~2^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24842c5c81900c7ce92e334d4156ce81f8016fab;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: move __u*/__s* typedefs to per-port headers Currently we have to install the autoconf-generated platform_defs.h to get the defintions for these. But they are clearly a feature of Linux vs non-Linux platforms so move them to the per-port headers instead. Note: in the long run it might be a good idea to just the standard uint*_t/int*_t types instead. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/configure.ac b/configure.ac index fe991ccea..d6d1adc8e 100644 --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,6 @@ AC_HAVE_READDIR AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([char *]) -AC_TYPE_U32 AC_TYPE_UMODE_T AC_MANUAL_FORMAT diff --git a/include/darwin.h b/include/darwin.h index 30f005288..abdf4e301 100644 --- a/include/darwin.h +++ b/include/darwin.h @@ -109,6 +109,15 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src) memcpy(dst, src, sizeof(uuid_t)); } +typedef unsigned char __u8; +typedef signed char __s8; +typedef unsigned short __u16; +typedef signed short __s16; +typedef unsigned int __u32; +typedef signed int __s32; +typedef unsigned long long int __u64; +typedef signed long long int __s64; + #define __int8_t int8_t #define __int16_t int16_t #define __int32_t int32_t diff --git a/include/freebsd.h b/include/freebsd.h index e59b1e831..902b94029 100644 --- a/include/freebsd.h +++ b/include/freebsd.h @@ -53,6 +53,15 @@ typedef __uint64_t xfs_ino_t; typedef __uint32_t xfs_dev_t; typedef __int64_t xfs_daddr_t; +typedef unsigned char __u8; +typedef signed char __s8; +typedef unsigned short __u16; +typedef signed short __s16; +typedef unsigned int __u32; +typedef signed int __s32; +typedef unsigned long long int __u64; +typedef signed long long int __s64; + #define O_LARGEFILE 0 #define HAVE_FID 1 diff --git a/include/gnukfreebsd.h b/include/gnukfreebsd.h index b83c1442a..95c4c1379 100644 --- a/include/gnukfreebsd.h +++ b/include/gnukfreebsd.h @@ -42,6 +42,15 @@ typedef __uint64_t xfs_ino_t; typedef __uint32_t xfs_dev_t; typedef __int64_t xfs_daddr_t; +typedef unsigned char __u8; +typedef signed char __s8; +typedef unsigned short __u16; +typedef signed short __s16; +typedef unsigned int __u32; +typedef signed int __s32; +typedef unsigned long long int __u64; +typedef signed long long int __s64; + #define HAVE_FID 1 static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p) diff --git a/include/irix.h b/include/irix.h index 31050c418..28564c826 100644 --- a/include/irix.h +++ b/include/irix.h @@ -47,6 +47,15 @@ typedef __int64_t xfs_ino_t; typedef __int32_t xfs_dev_t; typedef __int64_t xfs_daddr_t; +typedef unsigned char __u8; +typedef signed char __s8; +typedef unsigned short __u16; +typedef signed short __s16; +typedef unsigned int __u32; +typedef signed int __s32; +typedef unsigned long long int __u64; +typedef signed long long int __s64; + #define xfs_flock64 flock64 #define xfs_flock64_t struct flock64 diff --git a/include/linux.h b/include/linux.h index 31c077a7d..cb6298f5d 100644 --- a/include/linux.h +++ b/include/linux.h @@ -28,6 +28,7 @@ #include #include #include +#include static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p) { diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 81741c472..db6cb2e98 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -36,20 +36,6 @@ #include #include -#undef HAVE___U32 -#ifdef HAVE___U32 -#include -#else -typedef unsigned char __u8; -typedef signed char __s8; -typedef unsigned short __u16; -typedef signed short __s16; -typedef unsigned int __u32; -typedef signed int __s32; -typedef unsigned long long int __u64; -typedef signed long long int __s64; -#endif - typedef struct filldir filldir_t; #if defined(__linux__) diff --git a/m4/package_types.m4 b/m4/package_types.m4 index c3645bc7d..4aa09a5d1 100644 --- a/m4/package_types.m4 +++ b/m4/package_types.m4 @@ -1,16 +1,3 @@ -# -# Check if we have a type for __u32 -# -AC_DEFUN([AC_TYPE_U32], - [ AC_MSG_CHECKING([for __u32 ]) - AC_TRY_COMPILE([ -#include -#include -#include - ], [ - __u32 u32; - ], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) - ]) # # Check if we have umode_t #