/ Check-in [016481b3]
Login

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

Overview
Comment:Fix some compilation issues.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winCeLocalTime
Files: files | file ages | folders
SHA1:016481b39f8b23b4f0f851053068d8eaee6122e1
User & Date: mistachkin 2016-04-11 22:10:26
Context
2016-04-11
22:24
Merge updates from trunk. check-in: b8094166 user: mistachkin tags: winCeLocalTime
22:10
Fix some compilation issues. check-in: 016481b3 user: mistachkin tags: winCeLocalTime
2016-04-05
17:59
Merge updates from trunk. check-in: 00990020 user: mistachkin tags: winCeLocalTime
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

    21     21   #include "os_common.h"
    22     22   
    23     23   /*
    24     24   ** Include the header file for the Windows VFS.
    25     25   */
    26     26   #include "os_win.h"
    27     27   
           28  +/*
           29  +** The MSVC CRT on Windows CE may not have a localtime() function.  So
           30  +** declare a substitute.
           31  +*/
           32  +#if SQLITE_OS_WINCE && \
           33  +    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
           34  +#  include <time.h>
           35  +struct tm *__cdecl localtime(const time_t *);
           36  +#endif
           37  +
    28     38   /*
    29     39   ** Compiling and using WAL mode requires several APIs that are only
    30     40   ** available in Windows platforms based on the NT kernel.
    31     41   */
    32     42   #if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)
    33     43   #  error "WAL mode requires support from the Windows NT kernel, compile\
    34     44    with SQLITE_OMIT_WAL."
................................................................................
  2115   2125         "delayed %dms for lock/sharing conflict at line %d",
  2116   2126         winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno
  2117   2127       );
  2118   2128     }
  2119   2129   }
  2120   2130   
  2121   2131   /*
  2122         -** This #if cannot use SQLITE_OS_WINCE because the corresponding section
  2123         -** in "sqliteInt.h" does not use it.
  2124         -*/
  2125         -#if defined(_WIN32_WCE) && \
  2126         -    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
  2127         -/*
  2128   2132   ** The MSVC CRT on Windows CE may not have a localtime() function.  So
  2129         -** create a substitute.
         2133  +** define a substitute.
  2130   2134   */
         2135  +#if SQLITE_OS_WINCE && \
         2136  +    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
  2131   2137   struct tm *__cdecl localtime(const time_t *t)
  2132   2138   {
  2133   2139     static struct tm y;
  2134   2140     FILETIME uTm, lTm;
  2135   2141     SYSTEMTIME pTm;
  2136   2142     sqlite3_int64 t64;
  2137   2143     t64 = *t;

Changes to src/sqliteInt.h.

   207    207   #      pragma intrinsic(_ReadWriteBarrier)
   208    208   #    else
   209    209   #      include <cmnintrin.h>
   210    210   #    endif
   211    211   #  endif
   212    212   #endif
   213    213   
   214         -/*
   215         -** The MSVC CRT on Windows CE may not have a localtime() function.  So
   216         -** declare a substitute.  The function itself is defined in "os_win.c".
   217         -*/
   218         -#if defined(_WIN32_WCE) && \
   219         -    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
   220         -#  include <time.h>
   221         -struct tm *__cdecl localtime(const time_t *);
   222         -#endif
   223         -
   224    214   /*
   225    215   ** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
   226    216   ** 0 means mutexes are permanently disable and the library is never
   227    217   ** threadsafe.  1 means the library is serialized which is the highest
   228    218   ** level of threadsafety.  2 means the library is multithreaded - multiple
   229    219   ** threads can use SQLite as long as no two threads try to use the same
   230    220   ** database connection at the same time.