]> Savannah Git Hosting - gnulib.git/commitdiff
stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11
authorDavid Seifert <soap@gentoo.org>
Mon, 30 May 2016 20:54:32 +0000 (22:54 +0200)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2016 16:03:38 +0000 (09:03 -0700)
* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11.
Copyright-paperwork-exempt: true

ChangeLog
m4/stdbool.m4

index 8525a803bf44a37ee48474d79f5b2b119542e81e..02a7c8665279bcaec13cb97b8649629608551192 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 625520ff078bbe1ae4c3c93a546d9f14abedfdb9..0863847c59fd100640b9fdd681100b9de99aaca7 100644 (file)
@@ -5,7 +5,7 @@ dnl This file is free software; the Free Software Foundation
 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_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"
-             #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;