From: shaneh Date: Wed, 24 Feb 2010 19:36:10 +0000 (+0000) Subject: Changes to compile time option diags to report values for some defines. X-Git-Tag: version-3.7.2~583 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=915c8bdbbdbeb1cf01e733caa293cfc5e8cc4697;p=thirdparty%2Fsqlite.git Changes to compile time option diags to report values for some defines. Added test cases to TCL test suite (ctime.test). FossilOrigin-Name: dd480f62afa56ff85c2dd57ee7a16eee427e823f --- diff --git a/manifest b/manifest index e65efe1116..5bbc634bb5 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -C Add\sa\ssqlite3_log()\scall\son\sanonymous\sconstraint\sfailures.\nFix\sthe\soutput\sof\stest\scases\shaving\sto\sdo\swith\simproved\sreprepare\sreporting.\nFix\sthe\sVACUUM\scommand\sto\sreport\smore\shelpful\serror\smessages\swhen\sthings\sgo\nwrong. -D 2010-02-24T19:23:56 +C Changes\sto\scompile\stime\soption\sdiags\sto\sreport\svalues\sfor\ssome\sdefines.\s\s\nAdded\stest\scases\sto\sTCL\stest\ssuite\s(ctime.test). +D 2010-02-24T19:36:10 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -118,7 +115,7 @@ F src/btreeInt.h 71ed5e7f009caf17b7dc304350b3cb64b5970135 F src/build.c 254a273acb8923f3bdecc933d787f4f67737c489 F src/callback.c 908f3e0172c3d4058f4ca0acd42c637c52e9669f F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac -F src/ctime.c af27b864e4f6aa179cae9488e20d9bc281200e50 +F src/ctime.c ceb247eb31620bba66a94c3f697db489a1652353 F src/date.c 485a4409a384310e6d93fd1104a9d0a8658becd9 F src/delete.c 610dc008e88a9599f905f5cbe9577ac9c36e0581 F src/expr.c d0a345e1d8995e142bc5d9f39a97b9981d7d8f23 @@ -189,7 +186,7 @@ F src/test_async.c c1656facbaf43cb2e71b62621e5b9eb080e2621c F src/test_autoext.c 30e7bd98ab6d70a62bb9ba572e4c7df347fe645e F src/test_backup.c c129c91127e9b46e335715ae2e75756e25ba27de F src/test_btree.c 47cd771250f09cdc6e12dda5bc71bc0b3abc96e2 -F src/test_config.c 220a67047af393756f55760fdf442d935d0d88f3 +F src/test_config.c 5844274bf6cec4af3e6461fb3e2d349082635e81 F src/test_devsym.c de3c9af2bb9a8b1e44525c449e4ec3f88e3d4110 F src/test_func.c 13b582345fb1185a93e46c53310fae8547dcce20 F src/test_hexio.c 1237f000ec7a491009b1233f5c626ea71bce1ea2 @@ -321,6 +318,7 @@ F test/crash8.test 5b32966fcb58fd616d24ce94303420351d076eb9 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272 F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c +F test/ctime.test aa0953d27564dac33d6c3fd5903312788b7fa383 F test/date.test 0b8473ed9ab6fd4283b4a01f035e1067762ba734 F test/default.test 6faf23ccb300114924353007795aa9a8ec0aa9dc F test/delete.test f7629d9eb245dfca170169cc5c7a735dec34aeb4 @@ -794,14 +792,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P a8c984c1d6cb6e2fc95a07eb32befeea122e8ed3 -R 2b722edc5008cbf38737ae2ef5623db4 -U drh -Z 8f72e9f3a584b7bfbd7a9cae96339e61 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQFLhXzPoxKgR168RlERAhuKAJ0bK7dYcMKjnA8nUy8KJNd03rqo5gCfbk0E -IcFdGuxfI3OrBOGRpsZhtkE= -=e87x ------END PGP SIGNATURE----- +P 69a493182fd77bec91598516ee42c11a6db1d039 +R 0595378132dd801ca4b7473a352dc602 +U shaneh +Z ced54587bc46e680be6da59f4025dfb3 diff --git a/manifest.uuid b/manifest.uuid index 0b734ae578..53793aad9e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -69a493182fd77bec91598516ee42c11a6db1d039 \ No newline at end of file +dd480f62afa56ff85c2dd57ee7a16eee427e823f \ No newline at end of file diff --git a/src/ctime.c b/src/ctime.c index 63e577015a..dacdc5883c 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -19,13 +19,20 @@ #include "sqliteInt.h" /* -** An array of names of all compile-time options. +** An array of names of all compile-time options. This array should +** be sorted A-Z. ** ** This array looks large, but in a typical installation actually uses -** only a handful of compile-time options, so most this array is usually +** only a handful of compile-time options, so most times this array is usually ** rather short and uses little memory space. */ static const char * const azCompileOpt[] = { + +/* These macros are provided to "stringify" the value of the define +** for those options in which the value is meaningful. */ +#define CTIMEOPT_VAL_(opt) #opt +#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt) + #ifdef SQLITE_32BIT_ROWID "32BIT_ROWID", #endif @@ -44,6 +51,9 @@ static const char * const azCompileOpt[] = { #ifdef SQLITE_DEBUG "DEBUG", #endif +#ifdef SQLITE_DEFAULT_LOCKING_MODE + "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE), +#endif #ifdef SQLITE_DISABLE_DIRSYNC "DISABLE_DIRSYNC", #endif @@ -87,7 +97,7 @@ static const char * const azCompileOpt[] = { "ENABLE_LOAD_EXTENSION", #endif #ifdef SQLITE_ENABLE_LOCKING_STYLE - "ENABLE_LOCKING_STYLE", + "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE), #endif #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT "ENABLE_MEMORY_MANAGEMENT", @@ -323,14 +333,20 @@ static const char * const azCompileOpt[] = { #ifdef SQLITE_TCL "TCL", #endif +#ifdef SQLITE_TEMP_STORE + "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE), +#endif #ifdef SQLITE_TEST "TEST", #endif +#ifdef SQLITE_THREADSAFE + "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE), +#endif #ifdef SQLITE_USE_ALLOCA "USE_ALLOCA", #endif #ifdef SQLITE_ZERO_MALLOC - "ZERO_MALLOC", + "ZERO_MALLOC" #endif }; @@ -349,7 +365,8 @@ int sqlite3_compileoption_used(const char *zOptName){ /* Since ArraySize(azCompileOpt) is normally in single digits, a ** linear search is adequate. No need for a binary search. */ for(i=0; i