summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2011-10-04 12:30:40 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-01-30 20:52:59 (GMT)
commit4095205c7946002ade51c52c92d8951256ab99bf (patch)
treefde865a12e6fdd434248ab2c17d407025fb66833 /src/3rdparty
parentc9d65d796e342d69389d92cf0bd8e8f63145663f (diff)
downloadQt-4095205c7946002ade51c52c92d8951256ab99bf.zip
Qt-4095205c7946002ade51c52c92d8951256ab99bf.tar.gz
Qt-4095205c7946002ade51c52c92d8951256ab99bf.tar.bz2
Fixed sqlite for Windows CE.
Windows CE does not declare the localtime function, for this reason sqlite3.c defines it for Windows CE. However the localtime define was too late in sqlite.c code since the osLocaltime function introduced inside ifndef SQLITE_OMIT_LOCALTIME needs it also. Task-number: QTBUG-22508 Change-Id: I97b9bc6316809178cbcf7e304c5dcd7deb9005cb Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com> (cherry picked from commit 1135aeb1d89b802ab3e3b7cc2c32122e9b91770f)
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/sqlite/sqlite3.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index fc64b02..b901da5 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -13540,6 +13540,16 @@ 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)
+static struct tm *__cdecl localtime(const time_t *t);
+#endif
+
+/*
** The following routine implements the rough equivalent of localtime_r()
** using whatever operating-system specific localtime facility that
** is available. This routine returns 0 on success and
@@ -13574,19 +13584,6 @@ static int osLocaltime(time_t *t, struct tm *pTm){
#endif /* HAVE_LOCALTIME_R || HAVE_LOCALTIME_S */
return rc;
}
-#endif /* SQLITE_OMIT_LOCALTIME */
-
-
-#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