diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-31 08:57:20 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-31 08:57:39 -0700 |
commit | ab3086737c7ac8ab07fdaee7c35bb8f91fa8a5c0 (patch) | |
tree | 5fde2f9b48d05502badae4242337da0f513c806c /lib | |
parent | 017d5ddd82854911f0119691d91ea8a1438824d6 (diff) | |
download | autoconf-ab3086737c7ac8ab07fdaee7c35bb8f91fa8a5c0.tar.gz |
Port AC_CHECK_HEADER_STDBOOL to C++11
* lib/autoconf/headers.m4: Port to C++11.
Problem reported by David Seifert in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-05/msg00052.html
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoconf/headers.m4 | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index bb532e51..0c44973b 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -529,21 +529,25 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL], [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" + + #if __cplusplus < 201103 + #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 #endif + #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif |