gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 02/03: MYSQL: Use autoconf-based my_bool detection


From: gnunet
Subject: [gnunet] 02/03: MYSQL: Use autoconf-based my_bool detection
Date: Wed, 01 Feb 2023 10:58:57 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit ac40efdae723f850bfff62c0cddad130a37f425e
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Feb 1 18:57:09 2023 +0900

    MYSQL: Use autoconf-based my_bool detection
    
    NEWS: We now detect MySQL's strange, version-dependent my_bool type on 
configure.
---
 configure.ac                      | 13 +++++++++++++
 src/include/gnunet_mysql_compat.h | 10 ----------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7ba1d27a7..ec89fd4c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -935,6 +935,19 @@ AC_ARG_WITH([mysql],
 AC_SUBST(MYSQL_LDFLAGS)
 AC_SUBST(MYSQL_CPPFLAGS)
 
+# check for my_bool
+AS_IF([test "x$mysql" = "xtrue"],
+  [AC_MSG_CHECKING([for my_bool])
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+     [[#include <mysql/mysql.h>]],
+     [[#ifndef my_bool
+#no my_bool found
+#endif]])],
+      [AC_MSG_RESULT([yes])
+       AC_DEFINE_UNQUOTED([MYSQL_BOOL], [my_bool], [Bool variable for some 
mysql versions])],
+      [AC_MSG_RESULT([no])
+       AC_DEFINE_UNQUOTED([MYSQL_BOOL], [bool], [Normal boolean value])])])
+
 # additional version checks for mysql
 AS_IF([test "x$mysql" = "xtrue"],
   [AC_MSG_CHECKING([for mysql version])
diff --git a/src/include/gnunet_mysql_compat.h 
b/src/include/gnunet_mysql_compat.h
index 9fb9db30f..38c7ecc63 100644
--- a/src/include/gnunet_mysql_compat.h
+++ b/src/include/gnunet_mysql_compat.h
@@ -41,16 +41,6 @@ extern "C"
 #endif
 #endif
 
-#ifndef LIBMARIADB
-#if MYSQL_VERSION_ID >= 80000
-#define MYSQL_BOOL bool
-#else
-#define MYSQL_BOOL my_bool /* MySQL < 8 wants this */
-#endif
-#else
-#define MYSQL_BOOL my_bool /* MariaDB still uses my_bool */
-#endif
-
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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