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)

_______________________________________________
Bug-GNUnet mailing list
Bug-GNUnet@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnunet

Reply via email to