From 4b641cc085f6da992eb0f26f5875c8786933e5c4 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 15 Feb 2024 07:54:02 +0100 Subject: [PATCH] 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 --- configure.ac | 2 -- include/platform_defs.h.in | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) 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; -- 2.47.2