/ Check-in [b35bb928]
Login

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

Overview
Comment:Further refinements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winCeLocalTime
Files: files | file ages | folders
SHA1: b35bb928b25492f6dd71ccf9c250cb9f0cce09ff
User & Date: mistachkin 2016-04-11 22:45:45
Context
2016-04-12
16:11
Add and adjust comments. Closed-Leaf check-in: 541c6da2 user: mistachkin tags: winCeLocalTime
2016-04-11
22:45
Further refinements. check-in: b35bb928 user: mistachkin tags: winCeLocalTime
22:24
Merge updates from trunk. check-in: b8094166 user: mistachkin tags: winCeLocalTime
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/date.c.

46
47
48
49
50
51
52








53
54
55
56
57
58
59
#include "sqliteInt.h"
#include <stdlib.h>
#include <assert.h>
#include <time.h>

#ifndef SQLITE_OMIT_DATETIME_FUNCS










/*
** A structure for holding a single date and time.
*/
typedef struct DateTime DateTime;
struct DateTime {
  sqlite3_int64 iJD; /* The julian day number times 86400000 */







>
>
>
>
>
>
>
>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "sqliteInt.h"
#include <stdlib.h>
#include <assert.h>
#include <time.h>

#ifndef SQLITE_OMIT_DATETIME_FUNCS

/*
** The MSVC CRT on Windows CE may not have a localtime() function.  So
** declare a substitute.
*/
#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \
    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
struct tm *__cdecl localtime(const time_t *);
#endif

/*
** A structure for holding a single date and time.
*/
typedef struct DateTime DateTime;
struct DateTime {
  sqlite3_int64 iJD; /* The julian day number times 86400000 */

Changes to src/os_win.c.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
....
2128
2129
2130
2131
2132
2133
2134
2135
2136

2137
2138
2139
2140
2141
2142
2143
#include "os_common.h"

/*
** Include the header file for the Windows VFS.
*/
#include "os_win.h"

/*
** The MSVC CRT on Windows CE may not have a localtime() function.  So
** declare a substitute.
*/
#if SQLITE_OS_WINCE && \
    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
#  include <time.h>
struct tm *__cdecl localtime(const time_t *);
#endif

/*
** Compiling and using WAL mode requires several APIs that are only
** available in Windows platforms based on the NT kernel.
*/
#if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)
#  error "WAL mode requires support from the Windows NT kernel, compile\
 with SQLITE_OMIT_WAL."
................................................................................
  }
}

/*
** The MSVC CRT on Windows CE may not have a localtime() function.  So
** define a substitute.
*/
#if SQLITE_OS_WINCE && \
    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)

struct tm *__cdecl localtime(const time_t *t)
{
  static struct tm y;
  FILETIME uTm, lTm;
  SYSTEMTIME pTm;
  sqlite3_int64 t64;
  t64 = *t;







<
<
<
<
<
<
<
<
<
<







 







|

>







21
22
23
24
25
26
27










28
29
30
31
32
33
34
....
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
#include "os_common.h"

/*
** Include the header file for the Windows VFS.
*/
#include "os_win.h"











/*
** Compiling and using WAL mode requires several APIs that are only
** available in Windows platforms based on the NT kernel.
*/
#if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)
#  error "WAL mode requires support from the Windows NT kernel, compile\
 with SQLITE_OMIT_WAL."
................................................................................
  }
}

/*
** The MSVC CRT on Windows CE may not have a localtime() function.  So
** define a substitute.
*/
#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \
    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
#  include <time.h>
struct tm *__cdecl localtime(const time_t *t)
{
  static struct tm y;
  FILETIME uTm, lTm;
  SYSTEMTIME pTm;
  sqlite3_int64 t64;
  t64 = *t;