From e57e178abed551ff55b9f48414be47bb538812e4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 31 Oct 2024 04:34:29 +0100 Subject: [PATCH] assert-h: Allow mixed use of gcc/g++ also on Haiku 2022. * m4/assert_h.m4 (gl_ASSERT_H): Don't assume that in C mode, defines static_assert. --- ChangeLog | 6 ++++++ m4/assert_h.m4 | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13c28bc3c8..e10863c5db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-10-31 Bruno Haible + + assert-h: Allow mixed use of gcc/g++ also on Haiku 2022. + * m4/assert_h.m4 (gl_ASSERT_H): Don't assume that in C mode, + defines static_assert. + 2024-10-29 Bruno Haible assert-h, stdbool: Allow mixed use of gcc/g++ and clang/clang++ again. diff --git a/m4/assert_h.m4 b/m4/assert_h.m4 index 711cc6f7ea..fbf8d75e31 100644 --- a/m4/assert_h.m4 +++ b/m4/assert_h.m4 @@ -1,5 +1,5 @@ # assert_h.m4 -# serial 3 +# serial 4 dnl Copyright (C) 2011-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -79,8 +79,9 @@ AC_DEFUN([gl_ASSERT_H], #undef/**/__ASSERT_H__ #endif /* Solaris 11.4 defines static_assert as a macro with 2 arguments. - We need it also to be invocable with a single argument. */ - #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + We need it also to be invocable with a single argument. + Haiku 2022 does not define static_assert at all. */ + #if (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus #undef/**/static_assert #define static_assert _Static_assert #endif -- 2.39.5