Fossil SCM
Cherrypick [http://www.sqlite.org/src/info/170e058520|170e058520]: Better support for MinGW 4.x. Together with minor fossil build adaptations such that a MinGW 4.x build reports the right mingw version. Remark: Building fossil with MinGW 4.x still doesn't produce a working fossil.exe, unless you patch MinGW's <dirent.h> slightly. See: [18cff45a4e] and [https://sourceforge.net/p/mingw/bugs/2106/]. This MinGW 4.x bug is already open for almost 5 months now.
Commit
e68f528bfa690f3e2027c0b6b96f8153cf4a911e
Parent
fb573e72030b574…
10 files changed
+11
-1
+11
-1
+1
-1
+1
-1
+34
-1
+34
-1
+1
-1
+1
-1
+1
-1
+1
-1
+11
-1
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -105,11 +105,21 @@ | ||
| 105 | 105 | # else |
| 106 | 106 | # define COMPILER_NAME "msc" |
| 107 | 107 | # endif |
| 108 | 108 | # elif defined(__MINGW32__) |
| 109 | 109 | # if !defined(COMPILER_VERSION) |
| 110 | -# if defined(__MINGW32_VERSION) | |
| 110 | +# if defined(__MINGW_VERSION) | |
| 111 | +# if defined(__GNUC__) | |
| 112 | +# if defined(__VERSION__) | |
| 113 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc-" __VERSION__ | |
| 114 | +# else | |
| 115 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc" | |
| 116 | +# endif | |
| 117 | +# else | |
| 118 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) | |
| 119 | +# endif | |
| 120 | +# elif defined(__MINGW32_VERSION) | |
| 111 | 121 | # if defined(__GNUC__) |
| 112 | 122 | # if defined(__VERSION__) |
| 113 | 123 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 114 | 124 | # else |
| 115 | 125 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 116 | 126 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -105,11 +105,21 @@ | |
| 105 | # else |
| 106 | # define COMPILER_NAME "msc" |
| 107 | # endif |
| 108 | # elif defined(__MINGW32__) |
| 109 | # if !defined(COMPILER_VERSION) |
| 110 | # if defined(__MINGW32_VERSION) |
| 111 | # if defined(__GNUC__) |
| 112 | # if defined(__VERSION__) |
| 113 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 114 | # else |
| 115 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 116 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -105,11 +105,21 @@ | |
| 105 | # else |
| 106 | # define COMPILER_NAME "msc" |
| 107 | # endif |
| 108 | # elif defined(__MINGW32__) |
| 109 | # if !defined(COMPILER_VERSION) |
| 110 | # if defined(__MINGW_VERSION) |
| 111 | # if defined(__GNUC__) |
| 112 | # if defined(__VERSION__) |
| 113 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc-" __VERSION__ |
| 114 | # else |
| 115 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc" |
| 116 | # endif |
| 117 | # else |
| 118 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) |
| 119 | # endif |
| 120 | # elif defined(__MINGW32_VERSION) |
| 121 | # if defined(__GNUC__) |
| 122 | # if defined(__VERSION__) |
| 123 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 124 | # else |
| 125 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 126 |
+11
-1
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -105,11 +105,21 @@ | ||
| 105 | 105 | # else |
| 106 | 106 | # define COMPILER_NAME "msc" |
| 107 | 107 | # endif |
| 108 | 108 | # elif defined(__MINGW32__) |
| 109 | 109 | # if !defined(COMPILER_VERSION) |
| 110 | -# if defined(__MINGW32_VERSION) | |
| 110 | +# if defined(__MINGW_VERSION) | |
| 111 | +# if defined(__GNUC__) | |
| 112 | +# if defined(__VERSION__) | |
| 113 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc-" __VERSION__ | |
| 114 | +# else | |
| 115 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc" | |
| 116 | +# endif | |
| 117 | +# else | |
| 118 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) | |
| 119 | +# endif | |
| 120 | +# elif defined(__MINGW32_VERSION) | |
| 111 | 121 | # if defined(__GNUC__) |
| 112 | 122 | # if defined(__VERSION__) |
| 113 | 123 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 114 | 124 | # else |
| 115 | 125 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 116 | 126 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -105,11 +105,21 @@ | |
| 105 | # else |
| 106 | # define COMPILER_NAME "msc" |
| 107 | # endif |
| 108 | # elif defined(__MINGW32__) |
| 109 | # if !defined(COMPILER_VERSION) |
| 110 | # if defined(__MINGW32_VERSION) |
| 111 | # if defined(__GNUC__) |
| 112 | # if defined(__VERSION__) |
| 113 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 114 | # else |
| 115 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 116 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -105,11 +105,21 @@ | |
| 105 | # else |
| 106 | # define COMPILER_NAME "msc" |
| 107 | # endif |
| 108 | # elif defined(__MINGW32__) |
| 109 | # if !defined(COMPILER_VERSION) |
| 110 | # if defined(__MINGW_VERSION) |
| 111 | # if defined(__GNUC__) |
| 112 | # if defined(__VERSION__) |
| 113 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc-" __VERSION__ |
| 114 | # else |
| 115 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) "-gcc" |
| 116 | # endif |
| 117 | # else |
| 118 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW_VERSION) |
| 119 | # endif |
| 120 | # elif defined(__MINGW32_VERSION) |
| 121 | # if defined(__GNUC__) |
| 122 | # if defined(__VERSION__) |
| 123 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 124 | # else |
| 125 | # define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc" |
| 126 |
+1
-1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -798,11 +798,11 @@ | ||
| 798 | 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | -lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H | |
| 803 | +lappend MINGW_SQLITE_OPTIONS -D_HAVE__MINGW_H | |
| 804 | 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | 806 | |
| 807 | 807 | set j " \\\n " |
| 808 | 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 | 809 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -798,11 +798,11 @@ | |
| 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | } |
| 801 | |
| 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H |
| 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | |
| 807 | set j " \\\n " |
| 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -798,11 +798,11 @@ | |
| 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | } |
| 801 | |
| 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | lappend MINGW_SQLITE_OPTIONS -D_HAVE__MINGW_H |
| 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | |
| 807 | set j " \\\n " |
| 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 |
+1
-1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -798,11 +798,11 @@ | ||
| 798 | 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | -lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H | |
| 803 | +lappend MINGW_SQLITE_OPTIONS -D_HAVE__MINGW_H | |
| 804 | 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | 806 | |
| 807 | 807 | set j " \\\n " |
| 808 | 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 | 809 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -798,11 +798,11 @@ | |
| 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | } |
| 801 | |
| 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H |
| 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | |
| 807 | set j " \\\n " |
| 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -798,11 +798,11 @@ | |
| 798 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 799 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 800 | } |
| 801 | |
| 802 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 803 | lappend MINGW_SQLITE_OPTIONS -D_HAVE__MINGW_H |
| 804 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 805 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 806 | |
| 807 | set j " \\\n " |
| 808 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 809 |
+34
-1
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -73,12 +73,45 @@ | ||
| 73 | 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | 74 | # endif |
| 75 | 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | 76 | #endif |
| 77 | 77 | |
| 78 | +/* | |
| 79 | +** For MinGW, check to see if we can include the header file containing its | |
| 80 | +** version information, among other things. Normally, this internal MinGW | |
| 81 | +** header file would [only] be included automatically by other MinGW header | |
| 82 | +** files; however, the contained version information is now required by this | |
| 83 | +** header file to work around binary compatibility issues (see below) and | |
| 84 | +** this is the only known way to reliably obtain it. This entire #if block | |
| 85 | +** would be completely unnecessary if there was any other way of detecting | |
| 86 | +** MinGW via their preprocessor (e.g. if they customized their GCC to define | |
| 87 | +** some MinGW-specific macros). When compiling for MinGW, either the | |
| 88 | +** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be | |
| 89 | +** defined; otherwise, detection of conditions specific to MinGW will be | |
| 90 | +** disabled. | |
| 91 | +*/ | |
| 92 | +#if defined(_HAVE_MINGW_H) | |
| 93 | +# include "mingw.h" | |
| 94 | +#elif defined(_HAVE__MINGW_H) | |
| 95 | +# include "_mingw.h" | |
| 96 | +#endif | |
| 97 | + | |
| 98 | +/* | |
| 99 | +** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T | |
| 100 | +** define is required to maintain binary compatibility with the MSVC runtime | |
| 101 | +** library in use (e.g. for Windows XP). | |
| 102 | +*/ | |
| 103 | +#if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \ | |
| 104 | + defined(_WIN32) && !defined(_WIN64) && \ | |
| 105 | + defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \ | |
| 106 | + defined(__MSVCRT__) | |
| 107 | +# define _USE_32BIT_TIME_T | |
| 108 | +#endif | |
| 109 | + | |
| 78 | 110 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 79 | -** first in QNX. | |
| 111 | +** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for | |
| 112 | +** MinGW. | |
| 80 | 113 | */ |
| 81 | 114 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 82 | 115 | /************** Begin file sqlite3.h *****************************************/ |
| 83 | 116 | /* |
| 84 | 117 | ** 2001 September 15 |
| 85 | 118 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -73,12 +73,45 @@ | |
| 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | # endif |
| 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | #endif |
| 77 | |
| 78 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 79 | ** first in QNX. |
| 80 | */ |
| 81 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 82 | /************** Begin file sqlite3.h *****************************************/ |
| 83 | /* |
| 84 | ** 2001 September 15 |
| 85 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -73,12 +73,45 @@ | |
| 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | # endif |
| 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | #endif |
| 77 | |
| 78 | /* |
| 79 | ** For MinGW, check to see if we can include the header file containing its |
| 80 | ** version information, among other things. Normally, this internal MinGW |
| 81 | ** header file would [only] be included automatically by other MinGW header |
| 82 | ** files; however, the contained version information is now required by this |
| 83 | ** header file to work around binary compatibility issues (see below) and |
| 84 | ** this is the only known way to reliably obtain it. This entire #if block |
| 85 | ** would be completely unnecessary if there was any other way of detecting |
| 86 | ** MinGW via their preprocessor (e.g. if they customized their GCC to define |
| 87 | ** some MinGW-specific macros). When compiling for MinGW, either the |
| 88 | ** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be |
| 89 | ** defined; otherwise, detection of conditions specific to MinGW will be |
| 90 | ** disabled. |
| 91 | */ |
| 92 | #if defined(_HAVE_MINGW_H) |
| 93 | # include "mingw.h" |
| 94 | #elif defined(_HAVE__MINGW_H) |
| 95 | # include "_mingw.h" |
| 96 | #endif |
| 97 | |
| 98 | /* |
| 99 | ** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T |
| 100 | ** define is required to maintain binary compatibility with the MSVC runtime |
| 101 | ** library in use (e.g. for Windows XP). |
| 102 | */ |
| 103 | #if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \ |
| 104 | defined(_WIN32) && !defined(_WIN64) && \ |
| 105 | defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \ |
| 106 | defined(__MSVCRT__) |
| 107 | # define _USE_32BIT_TIME_T |
| 108 | #endif |
| 109 | |
| 110 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 111 | ** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for |
| 112 | ** MinGW. |
| 113 | */ |
| 114 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 115 | /************** Begin file sqlite3.h *****************************************/ |
| 116 | /* |
| 117 | ** 2001 September 15 |
| 118 |
+34
-1
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -73,12 +73,45 @@ | ||
| 73 | 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | 74 | # endif |
| 75 | 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | 76 | #endif |
| 77 | 77 | |
| 78 | +/* | |
| 79 | +** For MinGW, check to see if we can include the header file containing its | |
| 80 | +** version information, among other things. Normally, this internal MinGW | |
| 81 | +** header file would [only] be included automatically by other MinGW header | |
| 82 | +** files; however, the contained version information is now required by this | |
| 83 | +** header file to work around binary compatibility issues (see below) and | |
| 84 | +** this is the only known way to reliably obtain it. This entire #if block | |
| 85 | +** would be completely unnecessary if there was any other way of detecting | |
| 86 | +** MinGW via their preprocessor (e.g. if they customized their GCC to define | |
| 87 | +** some MinGW-specific macros). When compiling for MinGW, either the | |
| 88 | +** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be | |
| 89 | +** defined; otherwise, detection of conditions specific to MinGW will be | |
| 90 | +** disabled. | |
| 91 | +*/ | |
| 92 | +#if defined(_HAVE_MINGW_H) | |
| 93 | +# include "mingw.h" | |
| 94 | +#elif defined(_HAVE__MINGW_H) | |
| 95 | +# include "_mingw.h" | |
| 96 | +#endif | |
| 97 | + | |
| 98 | +/* | |
| 99 | +** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T | |
| 100 | +** define is required to maintain binary compatibility with the MSVC runtime | |
| 101 | +** library in use (e.g. for Windows XP). | |
| 102 | +*/ | |
| 103 | +#if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \ | |
| 104 | + defined(_WIN32) && !defined(_WIN64) && \ | |
| 105 | + defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \ | |
| 106 | + defined(__MSVCRT__) | |
| 107 | +# define _USE_32BIT_TIME_T | |
| 108 | +#endif | |
| 109 | + | |
| 78 | 110 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 79 | -** first in QNX. | |
| 111 | +** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for | |
| 112 | +** MinGW. | |
| 80 | 113 | */ |
| 81 | 114 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 82 | 115 | /************** Begin file sqlite3.h *****************************************/ |
| 83 | 116 | /* |
| 84 | 117 | ** 2001 September 15 |
| 85 | 118 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -73,12 +73,45 @@ | |
| 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | # endif |
| 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | #endif |
| 77 | |
| 78 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 79 | ** first in QNX. |
| 80 | */ |
| 81 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 82 | /************** Begin file sqlite3.h *****************************************/ |
| 83 | /* |
| 84 | ** 2001 September 15 |
| 85 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -73,12 +73,45 @@ | |
| 73 | # define _FILE_OFFSET_BITS 64 |
| 74 | # endif |
| 75 | # define _LARGEFILE_SOURCE 1 |
| 76 | #endif |
| 77 | |
| 78 | /* |
| 79 | ** For MinGW, check to see if we can include the header file containing its |
| 80 | ** version information, among other things. Normally, this internal MinGW |
| 81 | ** header file would [only] be included automatically by other MinGW header |
| 82 | ** files; however, the contained version information is now required by this |
| 83 | ** header file to work around binary compatibility issues (see below) and |
| 84 | ** this is the only known way to reliably obtain it. This entire #if block |
| 85 | ** would be completely unnecessary if there was any other way of detecting |
| 86 | ** MinGW via their preprocessor (e.g. if they customized their GCC to define |
| 87 | ** some MinGW-specific macros). When compiling for MinGW, either the |
| 88 | ** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be |
| 89 | ** defined; otherwise, detection of conditions specific to MinGW will be |
| 90 | ** disabled. |
| 91 | */ |
| 92 | #if defined(_HAVE_MINGW_H) |
| 93 | # include "mingw.h" |
| 94 | #elif defined(_HAVE__MINGW_H) |
| 95 | # include "_mingw.h" |
| 96 | #endif |
| 97 | |
| 98 | /* |
| 99 | ** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T |
| 100 | ** define is required to maintain binary compatibility with the MSVC runtime |
| 101 | ** library in use (e.g. for Windows XP). |
| 102 | */ |
| 103 | #if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \ |
| 104 | defined(_WIN32) && !defined(_WIN64) && \ |
| 105 | defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \ |
| 106 | defined(__MSVCRT__) |
| 107 | # define _USE_32BIT_TIME_T |
| 108 | #endif |
| 109 | |
| 110 | /* The public SQLite interface. The _FILE_OFFSET_BITS macro must appear |
| 111 | ** first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for |
| 112 | ** MinGW. |
| 113 | */ |
| 114 | /************** Include sqlite3.h in the middle of sqliteInt.h ***************/ |
| 115 | /************** Begin file sqlite3.h *****************************************/ |
| 116 | /* |
| 117 | ** 2001 September 15 |
| 118 |
+1
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -1704,11 +1704,11 @@ | ||
| 1704 | 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | - -D_HAVE_SQLITE_CONFIG_H \ | |
| 1709 | + -D_HAVE__MINGW_H \ | |
| 1710 | 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | 1711 | -DSQLITE_USE_MSIZE |
| 1712 | 1712 | |
| 1713 | 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 | 1715 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE__MINGW_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
+1
-1
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -1704,11 +1704,11 @@ | ||
| 1704 | 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | - -D_HAVE_SQLITE_CONFIG_H \ | |
| 1709 | + -D_HAVE__MINGW_H \ | |
| 1710 | 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | 1711 | -DSQLITE_USE_MSIZE |
| 1712 | 1712 | |
| 1713 | 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 | 1715 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE__MINGW_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
+1
-1
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -1704,11 +1704,11 @@ | ||
| 1704 | 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | - -D_HAVE_SQLITE_CONFIG_H \ | |
| 1709 | + -D_HAVE__MINGW_H \ | |
| 1710 | 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | 1711 | -DSQLITE_USE_MSIZE |
| 1712 | 1712 | |
| 1713 | 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 | 1715 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE__MINGW_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
+1
-1
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -1704,11 +1704,11 @@ | ||
| 1704 | 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | - -D_HAVE_SQLITE_CONFIG_H \ | |
| 1709 | + -D_HAVE__MINGW_H \ | |
| 1710 | 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | 1711 | -DSQLITE_USE_MSIZE |
| 1712 | 1712 | |
| 1713 | 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 | 1715 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1704,11 +1704,11 @@ | |
| 1704 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1705 | -DSQLITE_THREADSAFE=0 \ |
| 1706 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1707 | -DSQLITE_OMIT_DEPRECATED \ |
| 1708 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1709 | -D_HAVE__MINGW_H \ |
| 1710 | -DSQLITE_USE_MALLOC_H \ |
| 1711 | -DSQLITE_USE_MSIZE |
| 1712 | |
| 1713 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1714 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1715 |