From: Paul Eggert Date: Wed, 14 Sep 2022 18:44:19 +0000 (-0500) Subject: assert-h: work around include confusion X-Git-Tag: v1.0~2019 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=cf28d454d27ca3430164a2c07b302212f6804239;p=gnulib.git assert-h: work around include confusion * m4/assert_h.m4 (gl_ASSERT_H): Arrange for to not include if assert is already defined. This works around bugs in packages that mistakenly include after including (typically due to double-inclusion of ). Found in coreutils, which I plan to fix. --- diff --git a/ChangeLog b/ChangeLog index 1846e7c381..199b088200 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2022-09-14 Paul Eggert + assert-h: work around include confusion + * m4/assert_h.m4 (gl_ASSERT_H): Arrange for to not + include if assert is already defined. This works + around bugs in packages that mistakenly include after + including (typically due to double-inclusion of + ). Found in coreutils, which I plan to fix. + stdbool: depend on C99 Record that stdbool depends on C99 these days. This matters only for ancient compilers that need special diff --git a/m4/assert_h.m4 b/m4/assert_h.m4 index ec756a970b..43937869ec 100644 --- a/m4/assert_h.m4 +++ b/m4/assert_h.m4 @@ -47,7 +47,7 @@ AC_DEFUN([gl_ASSERT_H], dnl including assert.h. Break the #undef apart with a comment dnl so that 'configure' does not comment it out. AH_VERBATIM([zzstatic_assert], -[#if (!defined HAVE_C_STATIC_ASSERT \ +[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ && __cpp_static_assert < 201411 && __GNUG__ < 6) #include #undef/**/assert