Cleanup localtime() support for Windows CE.
FossilOrigin-Name: 39759a553208d8ef72964bdd539a0883e1d99cf6
This commit is contained in:
+1
-1
@@ -418,6 +418,7 @@ static void clearYMD_HMS_TZ(DateTime *p){
|
||||
p->validTZ = 0;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_LOCALTIME
|
||||
/*
|
||||
** On recent Windows platforms, the localtime_s() function is available
|
||||
** as part of the "Secure CRT". It is essentially equivalent to
|
||||
@@ -436,7 +437,6 @@ static void clearYMD_HMS_TZ(DateTime *p){
|
||||
#define HAVE_LOCALTIME_S 1
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_OMIT_LOCALTIME
|
||||
/*
|
||||
** The following routine implements the rough equivalent of localtime_r()
|
||||
** using whatever operating-system specific localtime facility that
|
||||
|
||||
+9
-5
@@ -1986,16 +1986,16 @@ static void winLogIoerr(int nRetry, int lineno){
|
||||
}
|
||||
}
|
||||
|
||||
#if SQLITE_OS_WINCE
|
||||
/*************************************************************************
|
||||
** This section contains code for WinCE only.
|
||||
/*
|
||||
** This #if cannot use SQLITE_OS_WINCE because the corresponding section
|
||||
** in "sqliteInt.h" does not use it.
|
||||
*/
|
||||
#if !defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API
|
||||
#if defined(_WIN32_WCE) && \
|
||||
(!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
|
||||
/*
|
||||
** The MSVC CRT on Windows CE may not have a localtime() function. So
|
||||
** create a substitute.
|
||||
*/
|
||||
#include <time.h>
|
||||
struct tm *__cdecl localtime(const time_t *t)
|
||||
{
|
||||
static struct tm y;
|
||||
@@ -2019,6 +2019,10 @@ struct tm *__cdecl localtime(const time_t *t)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SQLITE_OS_WINCE
|
||||
/*************************************************************************
|
||||
** This section contains code for WinCE only.
|
||||
*/
|
||||
#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
|
||||
|
||||
/*
|
||||
|
||||
@@ -218,6 +218,16 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The MSVC CRT on Windows CE may not have a localtime() function. So
|
||||
** declare a substitute. The function itself is defined in "os_win.c".
|
||||
*/
|
||||
#if defined(_WIN32_WCE) && \
|
||||
(!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
|
||||
# include <time.h>
|
||||
struct tm *__cdecl localtime(const time_t *);
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
|
||||
** 0 means mutexes are permanently disable and the library is never
|
||||
|
||||
Reference in New Issue
Block a user