Mercurial > gnulib
changeset 18326:531eb5d80adc
stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11
* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11.
Copyright-paperwork-exempt: true
author | David Seifert <soap@gentoo.org> |
---|---|
date | Mon, 30 May 2016 22:54:32 +0200 |
parents | 33db65a13e67 |
children | c2b547926f34 |
files | ChangeLog m4/stdbool.m4 |
diffstat | 2 files changed, 26 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 30 12:18:19 2016 -0700 +++ b/ChangeLog Mon May 30 22:54:32 2016 +0200 @@ -1,3 +1,8 @@ +2016-05-31 David Seifert <soap@gentoo.org> (tiny change) + + stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11 + * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11. + 2016-05-30 Paul Eggert <eggert@cs.ucla.edu> Use GCC_LINT, not lint
--- a/m4/stdbool.m4 Mon May 30 12:18:19 2016 -0700 +++ b/m4/stdbool.m4 Mon May 30 22:54:32 2016 +0200 @@ -5,7 +5,7 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -#serial 5 +#serial 6 # Prepare for substituting <stdbool.h> if it is not supported. @@ -43,23 +43,26 @@ [AC_LANG_PROGRAM( [[ #include <stdbool.h> - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" + + #if __cplusplus < 201103L + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif #endif struct s { _Bool s: 1; _Bool t; } s;