]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: move __u*/__s* typedefs to per-port headers
authorChristoph Hellwig <hch@lst.de>
Sun, 2 Aug 2015 23:58:22 +0000 (09:58 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 2 Aug 2015 23:58:22 +0000 (09:58 +1000)
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 <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
configure.ac
include/darwin.h
include/freebsd.h
include/gnukfreebsd.h
include/irix.h
include/linux.h
include/platform_defs.h.in
m4/package_types.m4

index fe991ccea19dd680a90a5cabd152a34b70f38d99..d6d1adc8e9f14d4d2145b5a53fbfbb88ce552b56 100644 (file)
@@ -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
 
index 30f0052889312d41b55a8ca6bc2eec6c57e42cbe..abdf4e3015f802c5e36f413272792029d36f52ef 100644 (file)
@@ -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
index e59b1e831a4754b2ad84eb72e5d42ee5f0530c2f..902b940296d572927ef926aa161ce3b4c22432ba 100644 (file)
@@ -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
index b83c1442af99fc8703bd5ae227d34edef2770754..95c4c13790d7f345b124d7024797b6b81c6fd6c0 100644 (file)
@@ -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)
index 31050c4182106082f9a3d951bf39891ee76c6b42..28564c8262847d2c5216bc38d2eddebc721ca1cc 100644 (file)
@@ -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
 
index 31c077a7d5cba6ce21b9234c85ad1ebb813e4367..cb6298f5dc9de2b153a62ed9b26b584b39c6eada 100644 (file)
@@ -28,6 +28,7 @@
 #include <getopt.h>
 #include <endian.h>
 #include <stdbool.h>
+#include <asm/types.h>
 
 static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
 {
index 81741c472cd0ba92b5062684a5f60f298337b51d..db6cb2e98187de8ccc69a1cf6b74a72052ab1ce4 100644 (file)
 #include <limits.h>
 #include <stdbool.h>
 
-#undef HAVE___U32
-#ifdef HAVE___U32
-#include <asm/types.h>
-#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__)
index c3645bc7dd653d15ecd2df356d8f14f64206a9f6..4aa09a5d133152232eb30fcf500635a14259d055 100644 (file)
@@ -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 <asm/types.h>
-#include <stdlib.h>
-#include <stddef.h>
-    ], [
-         __u32  u32;
-    ], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
-  ])
 #
 # Check if we have umode_t
 #