[PATCH 04/27] include: stop using SIZEOF_LONG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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 482b2452c..e4da95638 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 17262dcff..dce7154cd 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -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;
 
-- 
2.39.2





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux