diff options
author | Bruno Haible <bruno@clisp.org> | 2023-02-08 22:31:57 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-02-08 22:31:57 +0100 |
commit | 0f3415afeeef8ca61e3b3f679399d163d263ed14 (patch) | |
tree | a8a394dfb4643697cd16c126d8b277d31bd89cdf /m4 | |
parent | 97f54920a3c2bd9a536ef8c1cb7667584bd84eaf (diff) | |
download | gnulib-0f3415afeeef8ca61e3b3f679399d163d263ed14.tar.gz |
assert-h: Fix test failure on IRIX 6.5.
* m4/assert_h.m4 (gl_ASSERT_H): Ensure that on IRIX, including
<assert.h> after <config.h> actually defines the assert macro.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/assert_h.m4 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/m4/assert_h.m4 b/m4/assert_h.m4 index 3801452ef0..d255855d31 100644 --- a/m4/assert_h.m4 +++ b/m4/assert_h.m4 @@ -46,10 +46,13 @@ AC_DEFUN([gl_ASSERT_H], gl_NEXT_HEADERS([assert.h])]) dnl The "zz" puts this toward config.h's end, to avoid potential - dnl collisions with other definitions. #undef assert so that - dnl programs are not tempted to use it without specifically - dnl including assert.h. Break the #undef apart with a comment - dnl so that 'configure' does not comment it out. + dnl collisions with other definitions. + dnl #undef assert so that programs are not tempted to use it without + dnl specifically including assert.h. + dnl #undef __ASSERT_H__ so that on IRIX, when programs later include + dnl <assert.h>, this include actually defines assert. + dnl Break the #undef_s apart with a comment so that 'configure' does + dnl not comment them out. AH_VERBATIM([zzstatic_assert], [#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ && (!defined __cplusplus \ @@ -57,6 +60,9 @@ AC_DEFUN([gl_ASSERT_H], && __GNUG__ < 6 && __clang_major__ < 6))) #include <assert.h> #undef/**/assert + #ifdef __sgi + #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 |