From ff7c280d5780089b38f9ff021a0c11427795be0f Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 28 Sep 2013 14:21:07 +0100 Subject: [PATCH] Fix portability issue with system sqlite 3.8 --- src/Navaids/NavDataCache.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Navaids/NavDataCache.cxx b/src/Navaids/NavDataCache.cxx index 0ecb29258..789622543 100644 --- a/src/Navaids/NavDataCache.cxx +++ b/src/Navaids/NavDataCache.cxx @@ -32,14 +32,18 @@ // boost #include + +#ifdef SYSTEM_SQLITE +// the standard sqlite3.h doesn't give a way to set SQLITE_UINT64_TYPE, +// so we have to hope sizeof(int64_t) matches sizeof(sqlite3_int64). +// otherwise things will go bad quickly. + #include "sqlite3.h" +#else // to ensure compatability between sqlite3_int64 and PositionedID, // force the type used by sqlite to match PositionedID explicitly #define SQLITE_INT64_TYPE int64_t #define SQLITE_UINT64_TYPE uint64_t -#ifdef SYSTEM_SQLITE - #include "sqlite3.h" -#else #include "fg_sqlite3.h" #endif