/ Check-in [170e0585]
Login

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

Overview
Comment:Better support for MinGW 4.x.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:170e0585202eec6882e9513eba05e6d5767bfc5b
User & Date: mistachkin 2014-03-06 00:28:57
Context
2014-03-06
00:30
Better loadable extension handling in the Win32 VFS when compiled for Cygwin. check-in: 29b0a4f1 user: mistachkin tags: trunk
00:28
Better support for MinGW 4.x. check-in: 170e0585 user: mistachkin tags: trunk
2014-03-05
19:36
Always include the ctype.h header in the spellfix.c extension. check-in: bfd75f47 user: drh tags: trunk
2014-02-16
19:20
Use the modern MinGW major version macro, not the deprecated one. Closed-Leaf check-in: 057c16ee user: mistachkin tags: mingw4x
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

    43     43   # define _LARGE_FILE       1
    44     44   # ifndef _FILE_OFFSET_BITS
    45     45   #   define _FILE_OFFSET_BITS 64
    46     46   # endif
    47     47   # define _LARGEFILE_SOURCE 1
    48     48   #endif
    49     49   
           50  +/*
           51  +** For MinGW, check to see if we can include the header file containing its
           52  +** version information, among other things.  Normally, this internal MinGW
           53  +** header file would [only] be included automatically by other MinGW header
           54  +** files; however, the contained version information is now required by this
           55  +** header file to work around binary compatibility issues (see below) and
           56  +** this is the only known way to reliably obtain it.  This entire #if block
           57  +** would be completely unnecessary if there was any other way of detecting
           58  +** MinGW via their preprocessor (e.g. if they customized their GCC to define
           59  +** some MinGW-specific macros).  When compiling for MinGW, either the
           60  +** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be
           61  +** defined; otherwise, detection of conditions specific to MinGW will be
           62  +** disabled.
           63  +*/
           64  +#if defined(_HAVE_MINGW_H)
           65  +# include "mingw.h"
           66  +#elif defined(_HAVE__MINGW_H)
           67  +# include "_mingw.h"
           68  +#endif
           69  +
           70  +/*
           71  +** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T
           72  +** define is required to maintain binary compatibility with the MSVC runtime
           73  +** library in use (e.g. for Windows XP).
           74  +*/
           75  +#if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \
           76  +    defined(_WIN32) && !defined(_WIN64) && \
           77  +    defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \
           78  +    defined(__MSVCRT__)
           79  +# define _USE_32BIT_TIME_T
           80  +#endif
           81  +
    50     82   /* The public SQLite interface.  The _FILE_OFFSET_BITS macro must appear
    51         -** first in QNX.
           83  +** first in QNX.  Also, the _USE_32BIT_TIME_T macro must appear first for
           84  +** MinGW.
    52     85   */
    53     86   #include "sqlite3.h"
    54     87   
    55     88   /*
    56     89   ** Include the configuration header output by 'configure' if we're using the
    57     90   ** autoconf-based build
    58     91   */