bug-gnunet
[Top][All Lists]
Advanced

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

Re: [bug-GNUnet] build fixes


From: Brian Gough
Subject: Re: [bug-GNUnet] build fixes
Date: Wed, 18 Aug 2010 21:07:55 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

At Fri, 13 Aug 2010 18:41:46 +0200,
Christian Grothoff wrote:
> Now, I don't know when exactly this type was introduced, but it is clearly 
> the 
> preferred form at this point.  I've also not hit an sqlite3 installation that 
> does not have it -- could you double-check that the compiler is not picking 
> up 
> some "older" version of the header somehow?

Hello..  I've checked the installed version (sqlite 3.4.2) and the
sqlite3_int64 definition is not present in that version, they must
have changed it after that.

(Fencepost is using Ubuntu 8.04 LTS, which is old but fairly common.)

As an alternative, here's a patch which tests for sqlite3_int64 in the
configure script and uses the appropriate definition otherwise.
 

Index: src/datastore/plugin_datastore_sqlite.c
===================================================================
--- src/datastore/plugin_datastore_sqlite.c     (revision 12650)
+++ src/datastore/plugin_datastore_sqlite.c     (working copy)
@@ -29,6 +29,12 @@
 #include "plugin_datastore.h"
 #include <sqlite3.h>
 
+/* For compatibility with older versions of sqlite3 */
+#if !defined(HAVE_SQLITE3_INT64) && defined(HAVE_SQLITE_INT64)
+typedef sqlite_int64 sqlite3_int64;
+typedef sqlite_uint64 sqlite3_uint64;
+#endif
+
 #define DEBUG_SQLITE GNUNET_NO
 
 /**
Index: configure.ac
===================================================================
--- configure.ac        (revision 12650)
+++ configure.ac        (working copy)
@@ -312,6 +312,11 @@
 AC_SUBST(SQLITE_CPPFLAGS)
 AC_SUBST(SQLITE_LDFLAGS)
 
+if test x$sqlite = xtrue
+then
+ AC_CHECK_TYPES([sqlite3_int64,sqlite_int64],[],[],[#include <sqlite3.h>])
+fi
+
 # test for postgres
 postgres=false
 AC_MSG_CHECKING(for postgres)



reply via email to

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