]> Savannah Git Hosting - gnulib.git/commitdiff
assert-h: Allow mixed use of gcc/g++ also on Haiku 2022.
authorBruno Haible <bruno@clisp.org>
Thu, 31 Oct 2024 03:34:29 +0000 (04:34 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 12 Nov 2024 00:45:52 +0000 (01:45 +0100)
* m4/assert_h.m4 (gl_ASSERT_H): Don't assume that in C mode, <assert.h>
defines static_assert.

ChangeLog
m4/assert_h.m4

index bf41e8e3c91dd30c2771b8a281fd497dd590de7e..db680fa94d1081c084b416c7ad9317201ae9eb4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-31  Bruno Haible  <bruno@clisp.org>
+
+       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, <assert.h>
+       defines static_assert.
+
 2024-10-29  Bruno Haible  <bruno@clisp.org>
 
        assert-h, stdbool: Allow mixed use of gcc/g++ and clang/clang++ again.
index 66f20fb262a627a48604ef5f31f1ebcb6760b269..9fecadcdfc9f09a1ffdce49206f54301773bb55f 100644 (file)
@@ -78,8 +78,9 @@ AC_DEFUN([gl_ASSERT_H],
   #undef/**/__ASSERT_H__
  #endif
  /* Solaris 11.4 <assert.h> 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 <assert.h> does not define static_assert at all.  */
+ #if (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
   #undef/**/static_assert
   #define static_assert _Static_assert
  #endif