aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2018-07-23 10:57:53 +0000
committerdan <dan@noemail.net>2018-07-23 10:57:53 +0000
commit78ccff100e3e3369bf4e5ff8369b16aed45775c9 (patch)
tree6865cc84d890222d49aea62ff7d18684f04db6a7 /src
parent709c822f5e2be7773ac10d31c2e3a304d3af1483 (diff)
downloadsqlite-78ccff100e3e3369bf4e5ff8369b16aed45775c9.tar.gz
sqlite-78ccff100e3e3369bf4e5ff8369b16aed45775c9.zip
Fix the macros used to generate the output of "PRAGMA compile_options" so that
they handle valid values for the SQLITE_DEFAULT_LOOKASIDE macro (which contain a "," character). FossilOrigin-Name: 1cc72845f92198f2f6c1d34957921cd8f5bc82eaccab9f844006993f0b8d7a96
Diffstat (limited to 'src')
-rw-r--r--src/ctime.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ctime.c b/src/ctime.c
index da79f3a35..f408a3b5f 100644
--- a/src/ctime.c
+++ b/src/ctime.c
@@ -30,6 +30,12 @@
#define CTIMEOPT_VAL_(opt) #opt
#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
+/* Like CTIMEOPT_VAL, but especially for SQLITE_DEFAULT_LOOKASIDE. This
+** option requires a separate macro because legal values contain a single
+** comma. e.g. (-DSQLITE_DEFAULT_LOOKASIDE="100,100") */
+#define CTIMEOPT_VAL2_(opt1,opt2) #opt1 "," #opt2
+#define CTIMEOPT_VAL2(opt) CTIMEOPT_VAL2_(opt)
+
/*
** An array of names of all compile-time options. This array should
** be sorted A-Z.
@@ -113,7 +119,7 @@ static const char * const sqlite3azCompileOpt[] = {
"DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
#endif
#ifdef SQLITE_DEFAULT_LOOKASIDE
- "DEFAULT_LOOKASIDE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOOKASIDE),
+ "DEFAULT_LOOKASIDE=" CTIMEOPT_VAL2(SQLITE_DEFAULT_LOOKASIDE),
#endif
#if SQLITE_DEFAULT_MEMSTATUS
"DEFAULT_MEMSTATUS",