gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. c9


From: gitolite
Subject: [GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. c99bb7febbe4ad5f36b1882c94c51e6429a0e7d4
Date: Wed, 16 Nov 2016 19:17:37 +0100 (CET)

The branch, master has been updated
       via  c99bb7febbe4ad5f36b1882c94c51e6429a0e7d4 (commit)
      from  194d72e1f9628d9dd3e732ef2e199f7d4c43afd6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c99bb7febbe4ad5f36b1882c94c51e6429a0e7d4
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Wed Nov 16 21:17:00 2016 +0300

    configure.ac: check for "true" and "false" and substitute a replacement if 
required.
    This will allow to use "true" and "false" in code, even if compiler don't 
support them internally.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/configure.ac b/configure.ac
index 9f2d9e0..a72df1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,63 @@ AC_CHECK_HEADER([stdbool.h],
   [AC_INCLUDES_DEFAULT]
 )
 
+AC_CACHE_CHECK([[whether "true" is defined or builtin]], 
[[mhd_cv_macro_true_defined]],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM(
+        [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+        ]], [[
+#if defined(true)
+    /* dummy */
+#else
+    (void)true;
+#endif
+        ]])
+     ], [[mhd_cv_macro_true_defined='yes']], 
[[mhd_cv_macro_true_defined='no']])
+  ])
+AS_VAR_IF([[mhd_cv_macro_true_defined]], [["yes"]], [[:]],
+  [AC_DEFINE([[true]],[[(!0)]], [Define to value interpreted by compiler as 
boolean "true", if "true" is not defined by system headers.])])
+
+AC_CACHE_CHECK([[whether "false" is defined or builtin]], 
[[mhd_cv_macro_false_defined]],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM(
+        [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+        ]], [[
+#if !defined(false)
+    (void)false;
+#else
+    /* dummy */
+#endif
+        ]])
+     ], [[mhd_cv_macro_false_defined='yes']], 
[[mhd_cv_macro_false_defined='no']])
+  ])
+AS_VAR_IF([[mhd_cv_macro_false_defined]], [["yes"]], [[:]],
+  [AC_DEFINE([[false]],[[0]], [Define to value interpreted by compiler as 
boolean "false", if "false" is not defined by system headers.])])
+
+AC_CACHE_CHECK([[whether "true" and "false" could be used]], 
[[mhd_cv_macro_true_false_valid]],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM(
+        [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+        ]], [[
+          int var1[true ? 1 : -1] = { 1 };
+          int var2[false ? -1 : 1] = { 2 };
+          if (var1[0] == var2[0])
+            return 1;
+        ]])
+     ], [[mhd_cv_macro_true_false_valid='yes']], 
[[mhd_cv_macro_true_false_valid='no']])
+  ])
+AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]], [[:]],
+  [AC_MSG_ERROR([[Value of "true" or value of "false" is not valid. Check 
config.log for details.]])])
+
+
 AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
                       [[errattr_CFLAGS="-Werror=attributes"]],
                       [[errattr_CFLAGS=""]], [], [])


hooks/post-receive
-- 
GNU libmicrohttpd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]