/ Check-in [e1640876]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1640876df7ed6fb4e84292e5ce1f78635df64ab
User & Date: mistachkin 2013-02-07 05:12:25
Context
2013-02-07
09:33
Fix harmless compiler warnings. check-in: 4a7b4ee0 user: drh tags: trunk
05:12
Add the ability to skip defining the localtime() function when being compiled for WinCE. check-in: e1640876 user: mistachkin tags: trunk
2013-01-30
01:46
Remove some debugging logic accidently left in the limit.test module. check-in: 7d346250 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

  1617   1617     }
  1618   1618   }
  1619   1619   
  1620   1620   #if SQLITE_OS_WINCE
  1621   1621   /*************************************************************************
  1622   1622   ** This section contains code for WinCE only.
  1623   1623   */
         1624  +#if !defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API
  1624   1625   /*
  1625         -** Windows CE does not have a localtime() function.  So create a
  1626         -** substitute.
         1626  +** The MSVC CRT on Windows CE may not have a localtime() function.  So
         1627  +** create a substitute.
  1627   1628   */
  1628   1629   #include <time.h>
  1629   1630   struct tm *__cdecl localtime(const time_t *t)
  1630   1631   {
  1631   1632     static struct tm y;
  1632   1633     FILETIME uTm, lTm;
  1633   1634     SYSTEMTIME pTm;
................................................................................
  1643   1644     y.tm_wday = pTm.wDayOfWeek;
  1644   1645     y.tm_mday = pTm.wDay;
  1645   1646     y.tm_hour = pTm.wHour;
  1646   1647     y.tm_min = pTm.wMinute;
  1647   1648     y.tm_sec = pTm.wSecond;
  1648   1649     return &y;
  1649   1650   }
         1651  +#endif
  1650   1652   
  1651   1653   #define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
  1652   1654   
  1653   1655   /*
  1654   1656   ** Acquire a lock on the handle h
  1655   1657   */
  1656   1658   static void winceMutexAcquire(HANDLE h){