summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/sqlite
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-07-19 11:29:45 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-21 03:54:07 +0200
commitde587d736a1fd661c3fddeebefce02e436a2c7a5 (patch)
treef269579dddf87dbad9507e4bcbbe3f3bf3fde1a6 /src/3rdparty/sqlite
parent968b54ff8991de73ac97874351b57be3efd4f0e9 (diff)
Forward port qt modifications for sqlite3.c
Forward port from: 1. c42bc88a9f366899747945a4478492cf765c7166 2. 0d61cf15358e1ff0b5125542ed4a9c4b7e96c141 Task-number: QTBUG-16607 Reviewed-by: Michael Goddard (cherry picked from commit 2156f7057df5c748b51a7fd16a044f39c60b872c) Change-Id: I21a4490c212e8e02ff3fc336b150d2e8bcf02c2b Reviewed-on: http://codereview.qt.nokia.com/1808 Reviewed-by: Charles Yin <charles.yin@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/3rdparty/sqlite')
-rw-r--r--src/3rdparty/sqlite/sqlite3.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index a701737811..fc64b027bb 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -13579,6 +13579,16 @@ static int osLocaltime(time_t *t, struct tm *pTm){
#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)
+static 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. If no error occurs,
** return this value and set *pRc to SQLITE_OK.
@@ -24316,6 +24326,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:
@@ -24424,7 +24436,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
@@ -31281,6 +31293,8 @@ SQLITE_API int sqlite3_os_end(void){
** desktops but not so well in embedded systems.
*/
+#include <qconfig.h>
+
#include <winbase.h>
#ifdef __CYGWIN__
@@ -31290,7 +31304,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