1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add the ability to skip defining the localtime() function when being compiled for WinCE.

FossilOrigin-Name: e1640876df7ed6fb4e84292e5ce1f78635df64ab
This commit is contained in:
mistachkin
2013-02-07 05:12:25 +00:00
parent 28a3bcba0a
commit 2bfe1df01b
3 changed files with 12 additions and 10 deletions

View File

@@ -1621,9 +1621,10 @@ static void logIoerr(int nRetry){
/*************************************************************************
** This section contains code for WinCE only.
*/
#if !defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API
/*
** Windows CE does not have a localtime() function. So create a
** substitute.
** 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)
@@ -1647,6 +1648,7 @@ struct tm *__cdecl localtime(const time_t *t)
y.tm_sec = pTm.wSecond;
return &y;
}
#endif
#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]