]> git.mxchange.org Git - flightgear.git/commitdiff
Fix portability issue with system sqlite 3.8
authorJames Turner <zakalawe@mac.com>
Sat, 28 Sep 2013 13:21:07 +0000 (14:21 +0100)
committerJames Turner <zakalawe@mac.com>
Sat, 28 Sep 2013 13:34:01 +0000 (14:34 +0100)
src/Navaids/NavDataCache.cxx

index 0ecb29258243a31305bc5145f262496f5755fd27..7896225431171f136b2271b33ccd1fab112d6141 100644 (file)
 // boost
 #include <boost/foreach.hpp>
 
+
+#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