]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
include: stop using SIZEOF_LONG
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Feb 2024 06:54:02 +0000 (07:54 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 13 Mar 2024 07:48:37 +0000 (08:48 +0100)
SIZEOF_LONG together with the unused SIZEOF_CHAR_P is the last thing that
really needs a generated configuration header.  Switch to just using
sizeof(long) so that we can stop generating platform_defs.h.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
configure.ac
include/platform_defs.h.in

index 9133f88d991bbbc1a51d62d3e2a78f80fcc5a72c..8e7e8b2edc595d8e8b5633af95de08c4cff29c28 100644 (file)
@@ -248,8 +248,6 @@ if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
        AC_MSG_ERROR([LTO not supported by compiler.])
 fi
 
-AC_CHECK_SIZEOF([long])
-AC_CHECK_SIZEOF([char *])
 AC_MANUAL_FORMAT
 AC_HAVE_LIBURCU_ATOMIC64
 
index 17262dcffee75e24898154c6120274adb2657796..dce7154cd1ba23f9003c3c7bdca5341773de92db 100644 (file)
@@ -26,9 +26,7 @@
 #include <urcu.h>
 
 /* long and pointer must be either 32 bit or 64 bit */
-#undef SIZEOF_LONG
-#undef SIZEOF_CHAR_P
-#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT)
+#define BITS_PER_LONG (sizeof(long) * CHAR_BIT)
 
 typedef unsigned short umode_t;