bug-gnunet
[Top][All Lists]
Advanced

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

Re: [bug-GNUnet] build fixes


From: Christian Grothoff
Subject: Re: [bug-GNUnet] build fixes
Date: Fri, 13 Aug 2010 18:41:46 +0200
User-agent: KMail/1.13.2 (Linux/2.6.32-24-generic; KDE/4.4.2; i686; ; )

Hi Brian,

This is from my sqlite.h header:

#define SQLITE_VERSION        "3.6.22"
#define SQLITE_VERSION_NUMBER 3006022
#define SQLITE_SOURCE_ID      "2010-01-05 15:30:36 
28d0d7710761114a44a1a3a425a6883c661f06e7"

/*
** CAPI3REF: 64-Bit Integer Types
** KEYWORDS: sqlite_int64 sqlite_uint64
**
** Because there is no cross-platform way to specify 64-bit integer types
** SQLite includes typedefs for 64-bit signed and unsigned integers.
**
** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
** The sqlite_int64 and sqlite_uint64 types are supported for backwards
** compatibility only.
**
** ^The sqlite3_int64 and sqlite_int64 types can store integer values
** between -9223372036854775808 and +9223372036854775807 inclusive.  ^The
** sqlite3_uint64 and sqlite_uint64 types can store integer values 
** between 0 and +18446744073709551615 inclusive.
*/
#ifdef SQLITE_INT64_TYPE
  typedef SQLITE_INT64_TYPE sqlite_int64;
  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
  typedef __int64 sqlite_int64;
  typedef unsigned __int64 sqlite_uint64;
#else
  typedef long long int sqlite_int64;
  typedef unsigned long long int sqlite_uint64;
#endif
typedef sqlite_int64 sqlite3_int64;
typedef sqlite_uint64 sqlite3_uint64;


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?

I've applied the other part of the patch (SVN 12521).

Happy hacking!

Christian

On Thursday, August 12, 2010 06:30:44 pm Brian Gough wrote:
> Hello
> 
> I'm compiling gnunet on fencepost.gnu.org.  Here are a couple of minor
> changes (below) I needed to get the svn head to build.
> 
> In plugin_datastore_sqlite.c sqlite3_int64 doesn't seem to exist, I
> only found sqlite_int64 in the sqlite headers.
> 
> The version of sqlite installed is:
> ii  libsqlite3-dev    3.4.2-2   SQLite 3 development files
> 
> The other change is to support an arbitrary libiconv in addition to
> the system one.  Otherwise the link fails with an undefined reference
> to libiconv functions.
> 
> 
> Index: src/datastore/plugin_datastore_sqlite.c
> ===================================================================
> --- src/datastore/plugin_datastore_sqlite.c   (revision 12519)
> +++ src/datastore/plugin_datastore_sqlite.c   (working copy)
> @@ -756,7 +756,7 @@
>        (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
>        (SQLITE_OK != sqlite3_bind_int (stmt, 3, priority)) ||
>        (SQLITE_OK != sqlite3_bind_int (stmt, 4, anonymity)) ||
> -      (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, (sqlite3_int64)
> expiration.value)) || +      (SQLITE_OK != sqlite3_bind_int64 (stmt, 5,
> (sqlite_int64) expiration.value)) || (SQLITE_OK !=
>         sqlite3_bind_blob (stmt, 6, key, sizeof (GNUNET_HashCode),
>                            SQLITE_TRANSIENT)) ||
> Index: src/util/Makefile.am
> ===================================================================
> --- src/util/Makefile.am      (revision 12519)
> +++ src/util/Makefile.am      (working copy)
> @@ -72,6 +72,7 @@
>  libgnunetutil_la_LIBADD = \
>    $(GCLIBADD) $(WINLIB) \
>    $(LIBGCRYPT_LIBS) \
> +  $(LTLIBICONV) \
>    -lgmp -lltdl -lz $(XLIB)
> 
>  libgnunetutil_la_LDFLAGS = \
> 
> _______________________________________________
> Bug-GNUnet mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gnunet



reply via email to

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