Refactored compile time option diagnostic support to use strings identifiers instead of bitmask.
FossilOrigin-Name: 76a0294ab4208a0858a13bab0858e1bc1448b651
This commit is contained in:
parent
440ac39bc0
commit
dc97a8cdc1
@ -204,6 +204,7 @@ SRC = \
|
||||
$(TOP)/src/build.c \
|
||||
$(TOP)/src/callback.c \
|
||||
$(TOP)/src/complete.c \
|
||||
$(TOP)/src/ctime.c \
|
||||
$(TOP)/src/date.c \
|
||||
$(TOP)/src/delete.c \
|
||||
$(TOP)/src/expr.c \
|
||||
@ -339,6 +340,7 @@ TESTSRC2 = \
|
||||
$(TOP)/src/btree.c \
|
||||
$(TOP)/src/build.c \
|
||||
$(TOP)/src/date.c \
|
||||
$(TOP)/src/ctime.c \
|
||||
$(TOP)/src/expr.c \
|
||||
$(TOP)/src/func.c \
|
||||
$(TOP)/src/insert.c \
|
||||
@ -542,6 +544,9 @@ callback.lo: $(TOP)/src/callback.c $(HDR)
|
||||
complete.lo: $(TOP)/src/complete.c $(HDR)
|
||||
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/complete.c
|
||||
|
||||
ctime.lo: $(TOP)/src/ctime.c $(HDR)
|
||||
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/ctime.c
|
||||
|
||||
date.lo: $(TOP)/src/date.c $(HDR)
|
||||
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/date.c
|
||||
|
||||
|
@ -231,6 +231,7 @@ SRC = \
|
||||
$(TOP)/src/build.c \
|
||||
$(TOP)/src/callback.c \
|
||||
$(TOP)/src/complete.c \
|
||||
$(TOP)/src/ctime.c \
|
||||
$(TOP)/src/date.c \
|
||||
$(TOP)/src/delete.c \
|
||||
$(TOP)/src/expr.c \
|
||||
@ -392,7 +393,7 @@ TESTSRC = \
|
||||
|
||||
TESTSRC2 = \
|
||||
$(TOP)/src/attach.c $(TOP)/src/backup.c $(TOP)/src/btree.c \
|
||||
$(TOP)/src/build.c $(TOP)/src/date.c \
|
||||
$(TOP)/src/build.c $(TOP)/src/ctime.c $(TOP)/src/date.c \
|
||||
$(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/os.c \
|
||||
$(TOP)/src/os_os2.c $(TOP)/src/os_unix.c $(TOP)/src/os_win.c \
|
||||
$(TOP)/src/pager.c $(TOP)/src/pragma.c $(TOP)/src/prepare.c \
|
||||
|
1
main.mk
1
main.mk
@ -86,6 +86,7 @@ SRC = \
|
||||
$(TOP)/src/build.c \
|
||||
$(TOP)/src/callback.c \
|
||||
$(TOP)/src/complete.c \
|
||||
$(TOP)/src/ctime.c \
|
||||
$(TOP)/src/date.c \
|
||||
$(TOP)/src/delete.c \
|
||||
$(TOP)/src/expr.c \
|
||||
|
29
manifest
29
manifest
@ -1,9 +1,9 @@
|
||||
C Fix\sa\ssegfault\sthat\scan\soccur\sif\sa\smalloc\sfails\sin\sATTACH\sin\sshared-cache\smode.
|
||||
D 2010-02-23T10:56:16
|
||||
C Refactored\scompile\stime\soption\sdiagnostic\ssupport\sto\suse\sstrings\sidentifiers\sinstead\sof\sbitmask.
|
||||
D 2010-02-23T20:08:36
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3
|
||||
F Makefile.in df88fba41a6d14b79ab8cd9afa2cff8fa30f201e
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
F Makefile.vxworks 10010ddbf52e2503c7c49c7c0b7c7a096f8638a6
|
||||
F Makefile.vxworks ab005d301296c40e021ccd0133ce49ca811e319f
|
||||
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
|
||||
F VERSION 2f8d921ecf804e9eb01e836a09512d0318ebd4d3
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
@ -89,7 +89,7 @@ F ext/rtree/tkt3363.test 2bf324f7908084a5f463de3109db9c6e607feb1b
|
||||
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F main.mk 93d7ab227d0110d996d0db430a9a27d42980c7be
|
||||
F main.mk 37efe9fdc797e5d410d3b09f4ce3d8e469709c2e
|
||||
F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
|
||||
F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f
|
||||
F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
|
||||
@ -115,12 +115,13 @@ F src/btreeInt.h 71ed5e7f009caf17b7dc304350b3cb64b5970135
|
||||
F src/build.c 254a273acb8923f3bdecc933d787f4f67737c489
|
||||
F src/callback.c 908f3e0172c3d4058f4ca0acd42c637c52e9669f
|
||||
F src/complete.c 4c8a742c4a4a6d9c835912648f5c8f032ea36c7b
|
||||
F src/ctime.c 97598003ee7177fc34f1cc008a689b10708e8843
|
||||
F src/date.c 485a4409a384310e6d93fd1104a9d0a8658becd9
|
||||
F src/delete.c 610dc008e88a9599f905f5cbe9577ac9c36e0581
|
||||
F src/expr.c d0a345e1d8995e142bc5d9f39a97b9981d7d8f23
|
||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||
F src/fkey.c e2116672a6bd610dc888e27df292ebc7999c9bb0
|
||||
F src/func.c 8854b7a234b4272a78941fcc899c117d1839cd4e
|
||||
F src/func.c 248e2e88e5b9ff38bbd18ab4e2899adf8dc7df15
|
||||
F src/global.c 5a9c1e3c93213ca574786ac1caa976ce8f709105
|
||||
F src/hash.c 458488dcc159c301b8e7686280ab209f1fb915af
|
||||
F src/hash.h 2894c932d84d9f892d4b4023a75e501f83050970
|
||||
@ -130,7 +131,7 @@ F src/journal.c b0ea6b70b532961118ab70301c00a33089f9315c
|
||||
F src/legacy.c 16f385490f377c2c80a6c7357391d499087defed
|
||||
F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e
|
||||
F src/loadext.c 1c7a61ce1281041f437333f366a96aa0d29bb581
|
||||
F src/main.c e75d96a0bd6f874a18d5dac855d330a4739de0b2
|
||||
F src/main.c 49c1133cd28dd45bb1b95c0000b786577ace2ee0
|
||||
F src/malloc.c 5fa175797f982b178eaf38afba9c588a866be729
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c 86f33483a343873bab8ae1b648c2eac55462da74
|
||||
@ -157,7 +158,7 @@ F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
|
||||
F src/pcache.c 815bcb3cf0e14b23212efd3f4981f667a5fd633e
|
||||
F src/pcache.h c683390d50f856d4cd8e24342ae62027d1bb6050
|
||||
F src/pcache1.c 2bb2261190b42a348038f5b1c285c8cef415fcc8
|
||||
F src/pragma.c 5febf8b5d88cc331effb3f2e14d0473488649b1e
|
||||
F src/pragma.c 1ee3a5bea3e79bd4ad2519eb9745e1781bf443ea
|
||||
F src/prepare.c d4cd38ccfb51f1424d0e61d4878a810b7e1ebb60
|
||||
F src/printf.c f5c160b471e4a4dd22b756cb4ffe0c6979fd6d24
|
||||
F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
|
||||
@ -165,7 +166,7 @@ F src/resolve.c a1648d98e869937b29f4f697461fe4d60f220a7b
|
||||
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
|
||||
F src/select.c 0109b993c360d649857523abb72919e1794f9b45
|
||||
F src/shell.c 31cd555125a1fda4a6d8dce019690f043a8e5d75
|
||||
F src/sqlite.h.in 451a5a8bb2f6183ac50ae65f45f6e2b8ef4c6439
|
||||
F src/sqlite.h.in d04ee7db03b3e7bc69581d2eed26ebf3d4d8177d
|
||||
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
|
||||
F src/sqliteInt.h d5fe1c8335b5bf376639837fa42124327cdb6767
|
||||
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
|
||||
@ -771,7 +772,7 @@ F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
|
||||
F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309
|
||||
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
|
||||
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
|
||||
F tool/mksqlite3c.tcl 1da28229695fdebdfe8a7d19902ef6c76d6c1c2d
|
||||
F tool/mksqlite3c.tcl e1245579315f821e83e06934e93732b4c60a0375
|
||||
F tool/mksqlite3h.tcl eb100dce83f24b501b325b340f8b5eb8e5106b3b
|
||||
F tool/mksqlite3internalh.tcl 7b43894e21bcb1bb39e11547ce7e38a063357e87
|
||||
F tool/omittest.tcl 27d6f6e3b1e95aeb26a1c140e6eb57771c6d794a
|
||||
@ -791,7 +792,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
P 833da702ff9bd99d62640756d80e094256efff5c
|
||||
R 266d27e76a2b37d15f5a03e24c556a22
|
||||
U dan
|
||||
Z 060e5b129e7fc7dc7958eb9fd3924fd7
|
||||
P 875f8fa32708b8dbf314fd7056fac2fefdacfa36
|
||||
R cdc4eebebe40861bae38fc9e53a75e94
|
||||
U shaneh
|
||||
Z a7385ef8c8d8c43ce8853ca9ce26557f
|
||||
|
@ -1 +1 @@
|
||||
875f8fa32708b8dbf314fd7056fac2fefdacfa36
|
||||
76a0294ab4208a0858a13bab0858e1bc1448b651
|
368
src/ctime.c
Normal file
368
src/ctime.c
Normal file
@ -0,0 +1,368 @@
|
||||
/*
|
||||
** 2010 February 23
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
**
|
||||
** May you do good and not evil.
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
**
|
||||
** This file implements routines used to report what compile-time options
|
||||
** SQLite was built with.
|
||||
*/
|
||||
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
|
||||
#include "sqliteInt.h"
|
||||
|
||||
/*
|
||||
** An array of names of all compile-time options.
|
||||
**
|
||||
** This array looks large, but in a typical installation actually uses
|
||||
** only a handful of compile-time options, so most this array is usually
|
||||
** rather short and uses little memory space.
|
||||
*/
|
||||
static const char * const azCompileOpt[] = {
|
||||
#ifdef SQLITE_32BIT_ROWID
|
||||
"32BIT_ROWID",
|
||||
#endif
|
||||
#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC
|
||||
"4_BYTE_ALIGNED_MALLOC",
|
||||
#endif
|
||||
#ifdef SQLITE_CASE_SENSITIVE_LIKE
|
||||
"CASE_SENSITIVE_LIKE",
|
||||
#endif
|
||||
#ifdef SQLITE_CHECK_PAGES
|
||||
"CHECK_PAGES",
|
||||
#endif
|
||||
#ifdef SQLITE_COVERAGE_TEST
|
||||
"COVERAGE_TEST",
|
||||
#endif
|
||||
#ifdef SQLITE_DEBUG
|
||||
"DEBUG",
|
||||
#endif
|
||||
#ifdef SQLITE_DISABLE_DIRSYNC
|
||||
"DISABLE_DIRSYNC",
|
||||
#endif
|
||||
#ifdef SQLITE_DISABLE_LFS
|
||||
"DISABLE_LFS",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
|
||||
"ENABLE_ATOMIC_WRITE",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_CEROD
|
||||
"ENABLE_CEROD",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
||||
"ENABLE_COLUMN_METADATA",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
|
||||
"ENABLE_EXPENSIVE_ASSERT",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS1
|
||||
"ENABLE_FTS1",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS2
|
||||
"ENABLE_FTS2",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS3
|
||||
"ENABLE_FTS3",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS
|
||||
"ENABLE_FTS3_PARENTHESIS",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS4
|
||||
"ENABLE_FTS4",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_ICU
|
||||
"ENABLE_ICU",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_IOTRACE
|
||||
"ENABLE_IOTRACE",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_LOAD_EXTENSION
|
||||
"ENABLE_LOAD_EXTENSION",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_LOCKING_STYLE
|
||||
"ENABLE_LOCKING_STYLE",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
|
||||
"ENABLE_MEMORY_MANAGEMENT",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMSYS3
|
||||
"ENABLE_MEMSYS3",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMSYS5
|
||||
"ENABLE_MEMSYS5",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
|
||||
"ENABLE_OVERSIZE_CELL_CHECK",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_RTREE
|
||||
"ENABLE_RTREE",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_STAT2
|
||||
"ENABLE_STAT2",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
"ENABLE_UNLOCK_NOTIFY",
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
"ENABLE_UPDATE_DELETE_LIMIT",
|
||||
#endif
|
||||
#ifdef SQLITE_HAS_CODEC
|
||||
"HAS_CODEC",
|
||||
#endif
|
||||
#ifdef SQLITE_HAVE_ISNAN
|
||||
"HAVE_ISNAN",
|
||||
#endif
|
||||
#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
|
||||
"HOMEGROWN_RECURSIVE_MUTEX",
|
||||
#endif
|
||||
#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
|
||||
"IGNORE_AFP_LOCK_ERRORS",
|
||||
#endif
|
||||
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
|
||||
"IGNORE_FLOCK_LOCK_ERRORS",
|
||||
#endif
|
||||
#ifdef SQLITE_INT64_TYPE
|
||||
"INT64_TYPE",
|
||||
#endif
|
||||
#ifdef SQLITE_LOCK_TRACE
|
||||
"LOCK_TRACE",
|
||||
#endif
|
||||
#ifdef SQLITE_MEMDEBUG
|
||||
"MEMDEBUG",
|
||||
#endif
|
||||
#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
|
||||
"MIXED_ENDIAN_64BIT_FLOAT",
|
||||
#endif
|
||||
#ifdef SQLITE_NO_SYNC
|
||||
"NO_SYNC",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ALTERTABLE
|
||||
"OMIT_ALTERTABLE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ANALYZE
|
||||
"OMIT_ANALYZE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ATTACH
|
||||
"OMIT_ATTACH",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTHORIZATION
|
||||
"OMIT_AUTHORIZATION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOINCREMENT
|
||||
"OMIT_AUTOINCREMENT",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOINIT
|
||||
"OMIT_AUTOINIT",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOVACUUM
|
||||
"OMIT_AUTOVACUUM",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION
|
||||
"OMIT_BETWEEN_OPTIMIZATION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BLOB_LITERAL
|
||||
"OMIT_BLOB_LITERAL",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BTREECOUNT
|
||||
"OMIT_BTREECOUNT",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BUILTIN_TEST
|
||||
"OMIT_BUILTIN_TEST",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_CAST
|
||||
"OMIT_CAST",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_CHECK
|
||||
"OMIT_CHECK",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
"OMIT_COMPILEOPTION_DIAGS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_COMPLETE
|
||||
"OMIT_COMPLETE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_COMPOUND_SELECT
|
||||
"OMIT_COMPOUND_SELECT",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DATETIME_FUNCS
|
||||
"OMIT_DATETIME_FUNCS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DECLTYPE
|
||||
"OMIT_DECLTYPE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DEPRECATED
|
||||
"OMIT_DEPRECATED",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DISKIO
|
||||
"OMIT_DISKIO",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_EXPLAIN
|
||||
"OMIT_EXPLAIN",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FLAG_PRAGMAS
|
||||
"OMIT_FLAG_PRAGMAS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FLOATING_POINT
|
||||
"OMIT_FLOATING_POINT",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FOREIGN_KEY
|
||||
"OMIT_FOREIGN_KEY",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_GET_TABLE
|
||||
"OMIT_GET_TABLE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_GLOBALRECOVER
|
||||
"OMIT_GLOBALRECOVER",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_INCRBLOB
|
||||
"OMIT_INCRBLOB",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_INTEGRITY_CHECK
|
||||
"OMIT_INTEGRITY_CHECK",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION
|
||||
"OMIT_LIKE_OPTIMIZATION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOAD_EXTENSION
|
||||
"OMIT_LOAD_EXTENSION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOCALTIME
|
||||
"OMIT_LOCALTIME",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOOKASIDE
|
||||
"OMIT_LOOKASIDE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_MEMORYDB
|
||||
"OMIT_MEMORYDB",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_OR_OPTIMIZATION
|
||||
"OMIT_OR_OPTIMIZATION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PAGER_PRAGMAS
|
||||
"OMIT_PAGER_PRAGMAS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PRAGMA
|
||||
"OMIT_PRAGMA",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
"OMIT_PROGRESS_CALLBACK",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_QUICKBALANCE
|
||||
"OMIT_QUICKBALANCE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_REINDEX
|
||||
"OMIT_REINDEX",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS
|
||||
"OMIT_SCHEMA_PRAGMAS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
|
||||
"OMIT_SCHEMA_VERSION_PRAGMAS",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SHARED_CACHE
|
||||
"OMIT_SHARED_CACHE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SUBQUERY
|
||||
"OMIT_SUBQUERY",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TCL_VARIABLE
|
||||
"OMIT_TCL_VARIABLE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TEMPDB
|
||||
"OMIT_TEMPDB",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRACE
|
||||
"OMIT_TRACE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRIGGER
|
||||
"OMIT_TRIGGER",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
|
||||
"OMIT_TRUNCATE_OPTIMIZATION",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_UTF16
|
||||
"OMIT_UTF16",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VACUUM
|
||||
"OMIT_VACUUM",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VIEW
|
||||
"OMIT_VIEW",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VIRTUALTABLE
|
||||
"OMIT_VIRTUALTABLE",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_WSD
|
||||
"OMIT_WSD",
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_XFER_OPT
|
||||
"OMIT_XFER_OPT",
|
||||
#endif
|
||||
#ifdef SQLITE_PERFORMANCE_TRACE
|
||||
"PERFORMANCE_TRACE",
|
||||
#endif
|
||||
#ifdef SQLITE_PROXY_DEBUG
|
||||
"PROXY_DEBUG",
|
||||
#endif
|
||||
#ifdef SQLITE_SECURE_DELETE
|
||||
"SECURE_DELETE",
|
||||
#endif
|
||||
#ifdef SQLITE_SMALL_STACK
|
||||
"SMALL_STACK",
|
||||
#endif
|
||||
#ifdef SQLITE_SOUNDEX
|
||||
"SOUNDEX",
|
||||
#endif
|
||||
#ifdef SQLITE_TCL
|
||||
"TCL",
|
||||
#endif
|
||||
#ifdef SQLITE_TEST
|
||||
"TEST",
|
||||
#endif
|
||||
#ifdef SQLITE_USE_ALLOCA
|
||||
"USE_ALLOCA",
|
||||
#endif
|
||||
#ifdef SQLITE_ZERO_MALLOC
|
||||
"ZERO_MALLOC",
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
** Given the name of a compile-time option, return true if that option
|
||||
** was used and false if not.
|
||||
**
|
||||
** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
|
||||
** is not required for a match.
|
||||
*/
|
||||
int sqlite3_compileoption_used(const char *zOptName){
|
||||
int i, n;
|
||||
if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
|
||||
n = sqlite3Strlen30(zOptName);
|
||||
|
||||
/* Since ArraySize(azCompileOpt) is normally in single digits, a
|
||||
** linear search is adequate. No need for a binary search. */
|
||||
for(i=0; i<ArraySize(azCompileOpt); i++){
|
||||
if( sqlite3StrNICmp(zOptName, azCompileOpt[i], n+1)==0 ) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the N-th compile-time option string. If N is out of range,
|
||||
** return a NULL pointer.
|
||||
*/
|
||||
const char * const sqlite3_compileoption_get(int N){
|
||||
if( N>=0 && N<ArraySize(azCompileOpt) ){
|
||||
return azCompileOpt[N];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
52
src/func.c
52
src/func.c
@ -775,19 +775,50 @@ static void sourceidFunc(
|
||||
}
|
||||
|
||||
/*
|
||||
** Implementation of the sqlite_compile_opts() function. The result is a string
|
||||
** that identifies the compiler options used to build SQLite.
|
||||
** Implementation of the sqlite_compileoption_used() function.
|
||||
** The result is an integer that identifies if the compiler option
|
||||
** was used to build SQLite.
|
||||
*/
|
||||
static void compileoptsFunc(
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
static void compileoptionusedFunc(
|
||||
sqlite3_context *context,
|
||||
int NotUsed,
|
||||
sqlite3_value **NotUsed2
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
UNUSED_PARAMETER2(NotUsed, NotUsed2);
|
||||
const char *zOptName;
|
||||
assert( argc==1 );
|
||||
UNUSED_PARAMETER(argc);
|
||||
/* IMP: R-xxxx This function is an SQL wrapper around the
|
||||
** sqlite3_compileopts() C interface. */
|
||||
sqlite3_result_text(context, sqlite3_compileopts(), -1, SQLITE_STATIC);
|
||||
** sqlite3_compileoption_used() C interface. */
|
||||
if ( ( sqlite3_value_type(argv[0])==SQLITE_TEXT )
|
||||
&& ( (zOptName = sqlite3_value_text(argv[0]))!=0 )){
|
||||
sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));
|
||||
}else{
|
||||
sqlite3_result_null(context);
|
||||
}
|
||||
}
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
|
||||
/*
|
||||
** Implementation of the sqlite_compileoption_get() function.
|
||||
** The result is a string that identifies the compiler options
|
||||
** used to build SQLite.
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
static void compileoptiongetFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
int n;
|
||||
assert( argc==1 );
|
||||
UNUSED_PARAMETER(argc);
|
||||
/* IMP: R-xxxx This function is an SQL wrapper around the
|
||||
** sqlite3_compileoption_get() C interface. */
|
||||
n = sqlite3_value_int(argv[0]);
|
||||
sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
|
||||
/* Array for converting from half-bytes (nybbles) into ASCII hex
|
||||
** digits. */
|
||||
@ -1520,7 +1551,10 @@ void sqlite3RegisterGlobalFunctions(void){
|
||||
FUNCTION(nullif, 2, 0, 1, nullifFunc ),
|
||||
FUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
|
||||
FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
|
||||
FUNCTION(sqlite_compile_opts,0, 0, 0, compileoptsFunc ),
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
FUNCTION(sqlite_compile_option_used,1, 0, 0, compileoptionusedFunc ),
|
||||
FUNCTION(sqlite_compile_option_get, 1, 0, 0, compileoptiongetFunc ),
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
FUNCTION(quote, 1, 0, 0, quoteFunc ),
|
||||
FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid),
|
||||
FUNCTION(changes, 0, 0, 0, changes ),
|
||||
|
340
src/main.c
340
src/main.c
@ -36,339 +36,6 @@ const char *sqlite3_libversion(void){ return sqlite3_version; }
|
||||
const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
|
||||
int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
|
||||
int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
|
||||
const char *sqlite3_compileopts(void){
|
||||
static char zOpts[32] = "";
|
||||
sqlite_int64 iEnable = 0; /* bitmask of all the SQLITE_ENABLE* defines */
|
||||
sqlite_int64 iOmit = 0; /* bitmask of all the SQLITE_OMIT* defines */
|
||||
sqlite_int64 iOther = 0; /* bitmask of all the SQLITE_* defines except */
|
||||
/* SQLITE_MAX* and SQLITE_DEF* */
|
||||
|
||||
#ifdef SQLITE_32BIT_ROWID
|
||||
iOther |= ((sqlite_int64)1<<0);
|
||||
#endif
|
||||
#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC
|
||||
iOther |= ((sqlite_int64)1<<1);
|
||||
#endif
|
||||
#ifdef SQLITE_API
|
||||
iOther |= ((sqlite_int64)1<<2);
|
||||
#endif
|
||||
#ifdef SQLITE_CASE_SENSITIVE_LIKE
|
||||
iOther |= ((sqlite_int64)1<<3);
|
||||
#endif
|
||||
#ifdef SQLITE_CHECK_PAGES
|
||||
iOther |= ((sqlite_int64)1<<4);
|
||||
#endif
|
||||
#ifdef SQLITE_COVERAGE_TEST
|
||||
iOther |= ((sqlite_int64)1<<5);
|
||||
#endif
|
||||
#ifdef SQLITE_DEBUG
|
||||
iOther |= ((sqlite_int64)1<<6);
|
||||
#endif
|
||||
#ifdef SQLITE_DISABLE_DIRSYNC
|
||||
iOther |= ((sqlite_int64)1<<7);
|
||||
#endif
|
||||
#ifdef SQLITE_DISABLE_LFS
|
||||
iOther |= ((sqlite_int64)1<<8);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
|
||||
iEnable |= ((sqlite_int64)1<<0);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_CEROD
|
||||
iEnable |= ((sqlite_int64)1<<1);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_COLUMN_METADATA
|
||||
iEnable |= ((sqlite_int64)1<<2);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
|
||||
iEnable |= ((sqlite_int64)1<<3);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS1
|
||||
iEnable |= ((sqlite_int64)1<<4);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS2
|
||||
iEnable |= ((sqlite_int64)1<<5);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS3
|
||||
iEnable |= ((sqlite_int64)1<<6);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS
|
||||
iEnable |= ((sqlite_int64)1<<7);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_FTS4
|
||||
iEnable |= ((sqlite_int64)1<<8);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_ICU
|
||||
iEnable |= ((sqlite_int64)1<<9);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_IOTRACE
|
||||
iEnable |= ((sqlite_int64)1<<10);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_LOAD_EXTENSION
|
||||
iEnable |= ((sqlite_int64)1<<11);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_LOCKING_STYLE
|
||||
iEnable |= ((sqlite_int64)1<<12);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
|
||||
iEnable |= ((sqlite_int64)1<<13);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMSYS3
|
||||
iEnable |= ((sqlite_int64)1<<14);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_MEMSYS5
|
||||
iEnable |= ((sqlite_int64)1<<15);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
|
||||
iEnable |= ((sqlite_int64)1<<16);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_RTREE
|
||||
iEnable |= ((sqlite_int64)1<<17);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_STAT2
|
||||
iEnable |= ((sqlite_int64)1<<18);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
iEnable |= ((sqlite_int64)1<<19);
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
iEnable |= ((sqlite_int64)1<<20);
|
||||
#endif
|
||||
#ifdef SQLITE_HAS_CODEC
|
||||
iOther |= ((sqlite_int64)1<<9);
|
||||
#endif
|
||||
#ifdef SQLITE_HAVE_ISNAN
|
||||
iOther |= ((sqlite_int64)1<<10);
|
||||
#endif
|
||||
#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
|
||||
iOther |= ((sqlite_int64)1<<11);
|
||||
#endif
|
||||
#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
|
||||
iOther |= ((sqlite_int64)1<<12);
|
||||
#endif
|
||||
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
|
||||
iOther |= ((sqlite_int64)1<<13);
|
||||
#endif
|
||||
#ifdef SQLITE_INT64_TYPE
|
||||
iOther |= ((sqlite_int64)1<<14);
|
||||
#endif
|
||||
#ifdef SQLITE_LOCK_TRACE
|
||||
iOther |= ((sqlite_int64)1<<15);
|
||||
#endif
|
||||
#ifdef SQLITE_MEMDEBUG
|
||||
iOther |= ((sqlite_int64)1<<16);
|
||||
#endif
|
||||
#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
|
||||
iOther |= ((sqlite_int64)1<<17);
|
||||
#endif
|
||||
#ifdef SQLITE_MUTEX_NOOP
|
||||
iOther |= ((sqlite_int64)1<<18);
|
||||
#endif
|
||||
#ifdef SQLITE_MUTEX_OMIT
|
||||
iOther |= ((sqlite_int64)1<<19);
|
||||
#endif
|
||||
#ifdef SQLITE_MUTEX_OS2
|
||||
iOther |= ((sqlite_int64)1<<20);
|
||||
#endif
|
||||
#ifdef SQLITE_MUTEX_PTHREADS
|
||||
iOther |= ((sqlite_int64)1<<21);
|
||||
#endif
|
||||
#ifdef SQLITE_MUTEX_W32
|
||||
iOther |= ((sqlite_int64)1<<22);
|
||||
#endif
|
||||
#ifdef SQLITE_NO_SYNC
|
||||
iOther |= ((sqlite_int64)1<<23);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ALTERTABLE
|
||||
iOmit |= ((sqlite_int64)1<<0);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ANALYZE
|
||||
iOmit |= ((sqlite_int64)1<<1);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_ATTACH
|
||||
iOmit |= ((sqlite_int64)1<<2);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTHORIZATION
|
||||
iOmit |= ((sqlite_int64)1<<3);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOINCREMENT
|
||||
iOmit |= ((sqlite_int64)1<<4);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOINIT
|
||||
iOmit |= ((sqlite_int64)1<<5);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_AUTOVACUUM
|
||||
iOmit |= ((sqlite_int64)1<<6);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION
|
||||
iOmit |= ((sqlite_int64)1<<7);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BLOB_LITERAL
|
||||
iOmit |= ((sqlite_int64)1<<8);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BTREECOUNT
|
||||
iOmit |= ((sqlite_int64)1<<9);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_BUILTIN_TEST
|
||||
iOmit |= ((sqlite_int64)1<<10);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_CAST
|
||||
iOmit |= ((sqlite_int64)1<<11);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_CHECK
|
||||
iOmit |= ((sqlite_int64)1<<12);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_COMPLETE
|
||||
iOmit |= ((sqlite_int64)1<<13);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_COMPOUND_SELECT
|
||||
iOmit |= ((sqlite_int64)1<<14);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DATETIME_FUNCS
|
||||
iOmit |= ((sqlite_int64)1<<15);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DECLTYPE
|
||||
iOmit |= ((sqlite_int64)1<<16);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DEPRECATED
|
||||
iOmit |= ((sqlite_int64)1<<17);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_DISKIO
|
||||
iOmit |= ((sqlite_int64)1<<18);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_EXPLAIN
|
||||
iOmit |= ((sqlite_int64)1<<19);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FLAG_PRAGMAS
|
||||
iOmit |= ((sqlite_int64)1<<20);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FLOATING_POINT
|
||||
iOmit |= ((sqlite_int64)1<<21);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_FOREIGN_KEY
|
||||
iOmit |= ((sqlite_int64)1<<22);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_GET_TABLE
|
||||
iOmit |= ((sqlite_int64)1<<23);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_GLOBALRECOVER
|
||||
iOmit |= ((sqlite_int64)1<<24);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_INCRBLOB
|
||||
iOmit |= ((sqlite_int64)1<<25);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_INTEGRITY_CHECK
|
||||
iOmit |= ((sqlite_int64)1<<26);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION
|
||||
iOmit |= ((sqlite_int64)1<<27);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOAD_EXTENSION
|
||||
iOmit |= ((sqlite_int64)1<<28);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOCALTIME
|
||||
iOmit |= ((sqlite_int64)1<<29);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_LOOKASIDE
|
||||
iOmit |= ((sqlite_int64)1<<30);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_MEMORYDB
|
||||
iOmit |= ((sqlite_int64)1<<31);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_OR_OPTIMIZATION
|
||||
iOmit |= ((sqlite_int64)1<<32);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PAGER_PRAGMAS
|
||||
iOmit |= ((sqlite_int64)1<<33);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PRAGMA
|
||||
iOmit |= ((sqlite_int64)1<<34);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
iOmit |= ((sqlite_int64)1<<35);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_QUICKBALANCE
|
||||
iOmit |= ((sqlite_int64)1<<36);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_REINDEX
|
||||
iOmit |= ((sqlite_int64)1<<37);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS
|
||||
iOmit |= ((sqlite_int64)1<<38);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
|
||||
iOmit |= ((sqlite_int64)1<<39);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SHARED_CACHE
|
||||
iOmit |= ((sqlite_int64)1<<40);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_SUBQUERY
|
||||
iOmit |= ((sqlite_int64)1<<41);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TCL_VARIABLE
|
||||
iOmit |= ((sqlite_int64)1<<42);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TEMPDB
|
||||
iOmit |= ((sqlite_int64)1<<43);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRACE
|
||||
iOmit |= ((sqlite_int64)1<<44);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRIGGER
|
||||
iOmit |= ((sqlite_int64)1<<45);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
|
||||
iOmit |= ((sqlite_int64)1<<46);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_UTF16
|
||||
iOmit |= ((sqlite_int64)1<<47);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VACUUM
|
||||
iOmit |= ((sqlite_int64)1<<48);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VIEW
|
||||
iOmit |= ((sqlite_int64)1<<49);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VIRTUALTABLE
|
||||
iOmit |= ((sqlite_int64)1<<50);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_WSD
|
||||
iOmit |= ((sqlite_int64)1<<51);
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_XFER_OPT
|
||||
iOmit |= ((sqlite_int64)1<<52);
|
||||
#endif
|
||||
#ifdef SQLITE_PERFORMANCE_TRACE
|
||||
iOther |= ((sqlite_int64)1<<24);
|
||||
#endif
|
||||
#ifdef SQLITE_PROXY_DEBUG
|
||||
iOther |= ((sqlite_int64)1<<25);
|
||||
#endif
|
||||
#ifdef SQLITE_SECURE_DELETE
|
||||
iOther |= ((sqlite_int64)1<<26);
|
||||
#endif
|
||||
#ifdef SQLITE_SMALL_STACK
|
||||
iOther |= ((sqlite_int64)1<<27);
|
||||
#endif
|
||||
#ifdef SQLITE_SOUNDEX
|
||||
iOther |= ((sqlite_int64)1<<28);
|
||||
#endif
|
||||
#ifdef SQLITE_TCL
|
||||
iOther |= ((sqlite_int64)1<<29);
|
||||
#endif
|
||||
#ifdef SQLITE_TEST
|
||||
iOther |= ((sqlite_int64)1<<30);
|
||||
#endif
|
||||
#ifdef SQLITE_USE_ALLOCA
|
||||
iOther |= ((sqlite_int64)1<<31);
|
||||
#endif
|
||||
#ifdef SQLITE_ZERO_MALLOC
|
||||
iOther |= ((sqlite_int64)1<<32);
|
||||
#endif
|
||||
|
||||
sqlite3_snprintf(sizeof(zOpts)-1, zOpts,
|
||||
"%016llx%016llx%016llx", iEnable, iOmit, iOther);
|
||||
return zOpts;
|
||||
}
|
||||
|
||||
#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
|
||||
/*
|
||||
@ -717,7 +384,12 @@ int sqlite3_config(int op, ...){
|
||||
** NULL.
|
||||
*/
|
||||
case SQLITE_CONFIG_LOG: {
|
||||
sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
|
||||
/* MSVC is picky about pulling func ptrs from va lists.
|
||||
** http://support.microsoft.com/kb/47961
|
||||
** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
|
||||
*/
|
||||
typedef void(*LOGFUNC_t)(void*,int,const char*);
|
||||
sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t);
|
||||
sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
|
||||
break;
|
||||
}
|
||||
|
28
src/pragma.c
28
src/pragma.c
@ -1359,6 +1359,34 @@ void sqlite3Pragma(
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */
|
||||
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
/*
|
||||
** PRAGMA compile_options
|
||||
** PRAGMA compile_option(<option>)
|
||||
**
|
||||
** The first form returns a single row for each option that was
|
||||
** defined at compile time. The second form returns 0 or 1
|
||||
** indicating whether the specified option was defined at
|
||||
** compile time.
|
||||
*/
|
||||
if( sqlite3StrICmp(zLeft, "compile_option")==0 && zRight ){
|
||||
int used = sqlite3_compileoption_used(zRight);
|
||||
returnSingleInt(pParse, zRight, used);
|
||||
}else
|
||||
|
||||
if( sqlite3StrICmp(zLeft, "compile_options")==0 && !zRight ){
|
||||
int i = 0;
|
||||
const char *zOpt;
|
||||
sqlite3VdbeSetNumCols(v, 1);
|
||||
pParse->nMem = 1;
|
||||
sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "compile_option", SQLITE_STATIC);
|
||||
while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){
|
||||
sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zOpt, 0);
|
||||
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
|
||||
}
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
|
||||
#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
|
||||
/*
|
||||
** Report the current state of file logs for all databases
|
||||
|
@ -108,7 +108,7 @@ extern "C" {
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
** KEYWORDS: sqlite3_version
|
||||
** KEYWORDS: sqlite3_version, sqlite3_sourceid
|
||||
**
|
||||
** These interfaces provide the same information as the [SQLITE_VERSION],
|
||||
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
|
||||
@ -132,18 +132,41 @@ extern "C" {
|
||||
** sqlite3_libversion_number() function returns an integer equal to
|
||||
** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
|
||||
** a pointer to a string constant whose value is the same as the
|
||||
** [SQLITE_SOURCE_ID] C preprocessor macro. ^The sqlite3_compileopts()
|
||||
** function returns a pointer to a string constant whose value describes
|
||||
** the compiler options used.
|
||||
** [SQLITE_SOURCE_ID] C preprocessor macro.
|
||||
**
|
||||
** See also: [sqlite_version()], [sqlite_source_id()],
|
||||
** and [sqlite_compile_opts()].
|
||||
** See also: [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
SQLITE_EXTERN const char sqlite3_version[];
|
||||
const char *sqlite3_libversion(void);
|
||||
const char *sqlite3_sourceid(void);
|
||||
int sqlite3_libversion_number(void);
|
||||
const char *sqlite3_compileopts(void);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
|
||||
** KEYWORDS: sqlite3_compileoption_used, sqlite3_compileoption_get
|
||||
**
|
||||
** ^The sqlite3_compileoption_used() function returns 0 or 1
|
||||
** indicating whether the specified option was defined at
|
||||
** compile time. ^The SQLITE_ prefix may be omitted from the
|
||||
** option name passed to sqlite3_compileoption_used().
|
||||
**
|
||||
** ^The sqlite3_compileoption_get() function allows interating
|
||||
** over the list of options that were defined at compile time by
|
||||
** returning the N-th compile time option string. ^If N is out of range,
|
||||
** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_
|
||||
** prefix is omitted from any strings returned by
|
||||
** sqlite3_compileoption_get().
|
||||
**
|
||||
** ^Support for the diagnostic functions sqlite3_compileoption_used()
|
||||
** and sqlite3_compileoption_get() may be omitted by specifing the
|
||||
** SQLITE_OMIT_COMPILEOPTION_DIAGS option at compile time.
|
||||
**
|
||||
** See also: [sqlite_compile_option_used()] and [sqlite_compile_option_get()].
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
int sqlite3_compileoption_used(const char *zOptName);
|
||||
const char * const sqlite3_compileoption_get(int N);
|
||||
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Test To See If The Library Is Threadsafe
|
||||
|
@ -266,6 +266,7 @@ foreach file {
|
||||
auth.c
|
||||
build.c
|
||||
callback.c
|
||||
ctime.c
|
||||
delete.c
|
||||
func.c
|
||||
fkey.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user