|
Message-Id: <1d37970aa453a70e60639aa4f7a1b33431432bcd.1685521571.git.Jens.Gustedt@inria.fr> Date: Wed, 31 May 2023 10:45:50 +0200 From: Jens Gustedt <Jens.Gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: [C23 feature tests 3/4] 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 9d0d3724..46eca334 100644 --- a/include/features.h +++ b/include/features.h @@ -57,10 +57,14 @@ #define __REDIR(x,y) __typeof__(x) x __asm__(#y) -// 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.