/ Check-in [1cc72845]
Login

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

Overview
Comment: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).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:1cc72845f92198f2f6c1d34957921cd8f5bc82eaccab9f844006993f0b8d7a96
User & Date: dan 2018-07-23 10:57:53
Context
2018-07-23
18:32
Attempt to improve the documentation for snapshots. No changes to code. check-in: 46dd076a user: drh tags: trunk
10:57
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). check-in: 1cc72845 user: dan tags: trunk
2018-07-22
21:23
Fix more harmless compiler warnings seen with MSVC. check-in: edab5666 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/ctime.c.

    26     26   #endif
    27     27   
    28     28   /* These macros are provided to "stringify" the value of the define
    29     29   ** for those options in which the value is meaningful. */
    30     30   #define CTIMEOPT_VAL_(opt) #opt
    31     31   #define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
    32     32   
           33  +/* Like CTIMEOPT_VAL, but especially for SQLITE_DEFAULT_LOOKASIDE. This
           34  +** option requires a separate macro because legal values contain a single
           35  +** comma. e.g. (-DSQLITE_DEFAULT_LOOKASIDE="100,100") */
           36  +#define CTIMEOPT_VAL2_(opt1,opt2) #opt1 "," #opt2
           37  +#define CTIMEOPT_VAL2(opt) CTIMEOPT_VAL2_(opt)
           38  +
    33     39   /*
    34     40   ** An array of names of all compile-time options.  This array should 
    35     41   ** be sorted A-Z.
    36     42   **
    37     43   ** This array looks large, but in a typical installation actually uses
    38     44   ** only a handful of compile-time options, so most times this array is usually
    39     45   ** rather short and uses little memory space.
................................................................................
   109    115   #ifdef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT
   110    116     "DEFAULT_JOURNAL_SIZE_LIMIT=" CTIMEOPT_VAL(SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT),
   111    117   #endif
   112    118   #ifdef SQLITE_DEFAULT_LOCKING_MODE
   113    119     "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
   114    120   #endif
   115    121   #ifdef SQLITE_DEFAULT_LOOKASIDE
   116         -  "DEFAULT_LOOKASIDE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOOKASIDE),
          122  +  "DEFAULT_LOOKASIDE=" CTIMEOPT_VAL2(SQLITE_DEFAULT_LOOKASIDE),
   117    123   #endif
   118    124   #if SQLITE_DEFAULT_MEMSTATUS
   119    125     "DEFAULT_MEMSTATUS",
   120    126   #endif
   121    127   #ifdef SQLITE_DEFAULT_MMAP_SIZE
   122    128     "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
   123    129   #endif