SQLite

Check-in [e1640876df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the ability to skip defining the localtime() function when being compiled for WinCE.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1640876df7ed6fb4e84292e5ce1f78635df64ab
User & Date: mistachkin 2013-02-07 05:12:25.598
Context
2013-02-07
09:33
Fix harmless compiler warnings. (check-in: 4a7b4ee011 user: drh tags: trunk)
05:12
Add the ability to skip defining the localtime() function when being compiled for WinCE. (check-in: e1640876df user: mistachkin tags: trunk)
2013-01-30
01:46
Remove some debugging logic accidently left in the limit.test module. (check-in: 7d346250e8 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/os_win.c.
1617
1618
1619
1620
1621
1622
1623

1624
1625
1626


1627
1628
1629
1630
1631
1632
1633
1617
1618
1619
1620
1621
1622
1623
1624
1625


1626
1627
1628
1629
1630
1631
1632
1633
1634







+

-
-
+
+







  }
}

#if SQLITE_OS_WINCE
/*************************************************************************
** 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)
{
  static struct tm y;
  FILETIME uTm, lTm;
  SYSTEMTIME pTm;
1643
1644
1645
1646
1647
1648
1649

1650
1651
1652
1653
1654
1655
1656
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658







+







  y.tm_wday = pTm.wDayOfWeek;
  y.tm_mday = pTm.wDay;
  y.tm_hour = pTm.wHour;
  y.tm_min = pTm.wMinute;
  y.tm_sec = pTm.wSecond;
  return &y;
}
#endif

#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]

/*
** Acquire a lock on the handle h
*/
static void winceMutexAcquire(HANDLE h){