From: Christoph Hellwig Date: Thu, 15 Feb 2024 06:54:02 +0000 (+0100) Subject: include: stop using SIZEOF_LONG X-Git-Tag: v6.7.0~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b641cc085f6da992eb0f26f5875c8786933e5c4;p=thirdparty%2Fxfsprogs-dev.git include: stop using SIZEOF_LONG 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 Reviewed-by: "Darrick J. Wong" Signed-off-by: Carlos Maiolino --- diff --git a/configure.ac b/configure.ac index 9133f88d..8e7e8b2e 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 17262dcf..dce7154c 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -26,9 +26,7 @@ #include /* 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;