summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2022-07-10 12:06:11 -0400
committerZack Weinberg <zackw@panix.com>2022-07-10 15:05:31 -0400
commit56b21590f64b85bf69ce6a264975a0f3ef0fb2f9 (patch)
tree5445642447a076389d36b58bc62b79e3f0fd0281 /lib
parentdb7205a8647f5c197953a60d1e86a9993e1a9dca (diff)
downloadautoconf-56b21590f64b85bf69ce6a264975a0f3ef0fb2f9.tar.gz
Fix testsuite failures on Darwin (aka macOS).
Tests of AC_{CHECK_,}HEADER_STDBOOL were failing on Darwin for two reasons: an m4 quoting bug in tests/local.at causing Darwin sed to throw syntax errors, and an excessively precise interpretation of how C99 and C++11 interact. The latter is worth mentioning in NEWS. * tests/local.at (_AT_DEFINES_CMP_PRUNE): Insert [] before ‘dnl’ in two places to keep it separate from the result of the m4_bpatsubsts operation that immediately precedes it. * lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): Allow ‘bool’, ‘true’, and ‘false’ not to be macros, after including stdbool.h, whenever __cplusplus is defined. * NEWS: Document change to AC_{CHECK_,}HEADER_STDBOOL.
Diffstat (limited to 'lib')
-rw-r--r--lib/autoconf/headers.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 8944da41..5cd1f4d5 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -633,8 +633,10 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
bool *pp = &p;
/* C 1999 specifies that bool, true, and false are to be
- macros, but C++ 2011 and later overrule this. */
- #if __cplusplus < 201103
+ macros, but C++ 2011 overrules this. The C++ committee
+ was codifying existing practice, so we allow them to
+ not be macros whenever __cplusplus is defined. */
+ #ifndef __cplusplus
#ifndef bool
#error "bool is not defined"
#endif