diff options
author | Bill King <bill.king@nokia.com> | 2009-10-21 02:48:30 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-10-21 05:02:06 (GMT) |
commit | c42bc88a9f366899747945a4478492cf765c7166 (patch) | |
tree | 3f1238626002b26074c56db8b0ecd5cf15e4b660 /src/3rdparty | |
parent | bbbf570f8a590b4d9ea2f8b2de592ea790f9cd50 (diff) | |
download | Qt-c42bc88a9f366899747945a4478492cf765c7166.zip Qt-c42bc88a9f366899747945a4478492cf765c7166.tar.gz Qt-c42bc88a9f366899747945a4478492cf765c7166.tar.bz2 |
Trolltech modifications to SQLite.
* Include <qconfig.h> and rely on Qt's QT_NO_THREAD
instdead of SQLite's THREADSAFE to toggle source code
releated to threading in SQLite.
* compilation for Windows CE 6
While for WinCE 5 localtime is declared but not defined
in the libraries, for CE 6 they are not even declared.
That usually makes sense but sqlite relies on it being
present in time.h. As sqlite defines their own localtime
for Windows CE, we "only" need to forward declare it
earlier.
Conflicts:
src/3rdparty/sqlite/sqlite3.c
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/sqlite/sqlite3.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c index 8ca6a82..e61cd38 100644 --- a/src/3rdparty/sqlite/sqlite3.c +++ b/src/3rdparty/sqlite/sqlite3.c @@ -11405,8 +11405,19 @@ static void clearYMD_HMS_TZ(DateTime *p){ #ifndef SQLITE_OMIT_LOCALTIME /* +** Windows CE does not declare the localtime +** function as it is not defined anywhere. +** Anyway we need the forward-declaration to be +** able to define it later on. +*/ +#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600) +struct tm *__cdecl localtime(const time_t *t); +#endif + +/* ** Compute the difference (in milliseconds) ** between localtime and UTC (a.k.a. GMT) + ** for the time value p where p is in UTC. */ static sqlite3_int64 localtimeOffset(DateTime *p){ @@ -21387,6 +21398,8 @@ SQLITE_API int sqlite3_os_end(void){ */ #if SQLITE_OS_UNIX /* This file is used on unix only */ +#include <qconfig.h> + /* ** There are various methods for file locking used for concurrency ** control: @@ -21476,7 +21489,7 @@ SQLITE_API int sqlite3_os_end(void){ ** If we are to be thread-safe, include the pthreads header and define ** the SQLITE_UNIX_THREADS macro. */ -#if SQLITE_THREADSAFE +#ifndef QT_NO_THREAD # define SQLITE_UNIX_THREADS 1 #endif @@ -26995,6 +27008,8 @@ SQLITE_API int sqlite3_os_end(void){ ** desktops but not so well in embedded systems. */ +#include <qconfig.h> + #include <winbase.h> #ifdef __CYGWIN__ @@ -27004,7 +27019,7 @@ SQLITE_API int sqlite3_os_end(void){ /* ** Macros used to determine whether or not to use threads. */ -#if defined(THREADSAFE) && THREADSAFE +#ifndef QT_NO_THREAD # define SQLITE_W32_THREADS 1 #endif |