Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 May 2023 14:57:54 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [C23 feature tests 4/6] Add a feature test for the _BitInt types.

This test is not needed for the configuration of musl itself, but only
for the interfaces that are offered through headers.
---
 include/features.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/features.h b/include/features.h
index 4083436d..f200a6b4 100644
--- a/include/features.h
+++ b/include/features.h
@@ -61,10 +61,14 @@
 #define __has_VA_OPT1(...) __has_VA_OPT2(__VA_OPT__(,) 1, 0,)
 #define __has_VA_OPT __has_VA_OPT1(C23)
 
-// If the platform supports the 128 integer type and has _BitInt(N)
-// support where N large enough (all C23 compiler should have the
-// latter)
-#if __SIZEOF_INT128__ && (__BITINT_MAXWIDTH__ >= 128)
+// If the platform supports the _BitInt(128) types (all C23 compiler
+// should have that)
+#if __BITINT_MAXWIDTH__ >= 128 || BITINT_MAXWIDTH >= 128
+#define __has_bitint128 1
+#endif
+
+// If the platform supports the 128 integer type and has _BitInt(128)
+#if __SIZEOF_INT128__ && __has_bitint128
 #define __has_int128_t 1
 #endif
 
-- 
2.34.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.