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>
This commit is contained in:
Janne Anttila 2011-10-04 15:30:40 +03:00 committed by Qt by Nokia
parent bdce610022
commit 1135aeb1d8

View File

@ -13539,6 +13539,16 @@ static void clearYMD_HMS_TZ(DateTime *p){
#endif
#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
@ -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