/ Check-in [109d6767]
Login

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

Overview
Comment:Omit sqlite3_compileoption_used() entries that are not explicitly stated on the compiler command-line, except keep SQLITE_THREADSAFE around so that there is always at least one compilation option.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:109d6767d2626741db1d15ed55e699ac3184a536
User & Date: drh 2013-04-16 18:24:34
Context
2013-04-17
12:19
Update the command-line shell to give an exit code of 0 when the ".quit" command is run from the command-line. check-in: 467e2181 user: drh tags: trunk
2013-04-16
18:24
Omit sqlite3_compileoption_used() entries that are not explicitly stated on the compiler command-line, except keep SQLITE_THREADSAFE around so that there is always at least one compilation option. check-in: 109d6767 user: drh tags: trunk
14:58
Remove the unused SQLITE_CURDIR macro. check-in: 16f7ba4a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/ctime.c.

    50     50   #endif
    51     51   #ifdef SQLITE_DEBUG
    52     52     "DEBUG",
    53     53   #endif
    54     54   #ifdef SQLITE_DEFAULT_LOCKING_MODE
    55     55     "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
    56     56   #endif
    57         -#ifdef SQLITE_DEFAULT_MMAP_SIZE
           57  +#if defined(SQLITE_DEFAULT_MMAP_SIZE) && !defined(SQLITE_DEFAULT_MMAP_SIZE_xc)
    58     58     "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
    59     59   #endif
    60     60   #ifdef SQLITE_DISABLE_DIRSYNC
    61     61     "DISABLE_DIRSYNC",
    62     62   #endif
    63     63   #ifdef SQLITE_DISABLE_LFS
    64     64     "DISABLE_LFS",
................................................................................
   143    143   #endif
   144    144   #ifdef SQLITE_INT64_TYPE
   145    145     "INT64_TYPE",
   146    146   #endif
   147    147   #ifdef SQLITE_LOCK_TRACE
   148    148     "LOCK_TRACE",
   149    149   #endif
   150         -#ifdef SQLITE_MAX_MMAP_SIZE
          150  +#if defined(SQLITE_MAX_MMAP_SIZE) && !defined(SQLITE_MAX_MMAP_SIZE_xc)
   151    151     "MAX_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE),
   152    152   #endif
   153    153   #ifdef SQLITE_MAX_SCHEMA_RETRY
   154    154     "MAX_SCHEMA_RETRY=" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),
   155    155   #endif
   156    156   #ifdef SQLITE_MEMDEBUG
   157    157     "MEMDEBUG",
................................................................................
   203    203   #endif
   204    204   #ifdef SQLITE_OMIT_CAST
   205    205     "OMIT_CAST",
   206    206   #endif
   207    207   #ifdef SQLITE_OMIT_CHECK
   208    208     "OMIT_CHECK",
   209    209   #endif
   210         -/* // redundant
   211         -** #ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS
   212         -**   "OMIT_COMPILEOPTION_DIAGS",
   213         -** #endif
   214         -*/
   215    210   #ifdef SQLITE_OMIT_COMPLETE
   216    211     "OMIT_COMPLETE",
   217    212   #endif
   218    213   #ifdef SQLITE_OMIT_COMPOUND_SELECT
   219    214     "OMIT_COMPOUND_SELECT",
   220    215   #endif
   221    216   #ifdef SQLITE_OMIT_DATETIME_FUNCS
................................................................................
   349    344   #endif
   350    345   #ifdef SQLITE_SOUNDEX
   351    346     "SOUNDEX",
   352    347   #endif
   353    348   #ifdef SQLITE_TCL
   354    349     "TCL",
   355    350   #endif
   356         -#ifdef SQLITE_TEMP_STORE
          351  +#if defined(SQLITE_TEMP_STORE) && !defined(SQLITE_TEMP_STORE_xc)
   357    352     "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
   358    353   #endif
   359    354   #ifdef SQLITE_TEST
   360    355     "TEST",
   361    356   #endif
   362         -#ifdef SQLITE_THREADSAFE
          357  +#if defined(SQLITE_THREADSAFE)
   363    358     "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
   364    359   #endif
   365    360   #ifdef SQLITE_USE_ALLOCA
   366    361     "USE_ALLOCA",
   367    362   #endif
   368    363   #ifdef SQLITE_ZERO_MALLOC
   369    364     "ZERO_MALLOC"
................................................................................
   381    376     int i, n;
   382    377     if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
   383    378     n = sqlite3Strlen30(zOptName);
   384    379   
   385    380     /* Since ArraySize(azCompileOpt) is normally in single digits, a
   386    381     ** linear search is adequate.  No need for a binary search. */
   387    382     for(i=0; i<ArraySize(azCompileOpt); i++){
   388         -    if(   (sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0)
   389         -       && ( (azCompileOpt[i][n]==0) || (azCompileOpt[i][n]=='=') ) ) return 1;
          383  +    if( sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0
          384  +     && sqlite3CtypeMap[azCompileOpt[i][n]]==0
          385  +    ){
          386  +      return 1;
          387  +    }
   390    388     }
   391    389     return 0;
   392    390   }
   393    391   
   394    392   /*
   395    393   ** Return the N-th compile-time option string.  If N is out of range,
   396    394   ** return a NULL pointer.

Changes to src/sqliteInt.h.

   118    118   ** threads can use SQLite as long as no two threads try to use the same
   119    119   ** database connection at the same time.
   120    120   **
   121    121   ** Older versions of SQLite used an optional THREADSAFE macro.
   122    122   ** We support that for legacy.
   123    123   */
   124    124   #if !defined(SQLITE_THREADSAFE)
   125         -#if defined(THREADSAFE)
   126         -# define SQLITE_THREADSAFE THREADSAFE
   127         -#else
   128         -# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
   129         -#endif
          125  +# if defined(THREADSAFE)
          126  +#   define SQLITE_THREADSAFE THREADSAFE
          127  +# else
          128  +#   define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
          129  +# endif
   130    130   #endif
   131    131   
   132    132   /*
   133    133   ** Powersafe overwrite is on by default.  But can be turned off using
   134    134   ** the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option.
   135    135   */
   136    136   #ifndef SQLITE_POWERSAFE_OVERWRITE
................................................................................
   388    388   
   389    389   /*
   390    390   ** Provide a default value for SQLITE_TEMP_STORE in case it is not specified
   391    391   ** on the command-line
   392    392   */
   393    393   #ifndef SQLITE_TEMP_STORE
   394    394   # define SQLITE_TEMP_STORE 1
          395  +# define SQLITE_TEMP_STORE_xc 1  /* Exclude from ctime.c */
   395    396   #endif
   396    397   
   397    398   /*
   398    399   ** GCC does not define the offsetof() macro so we'll have to do it
   399    400   ** ourselves.
   400    401   */
   401    402   #ifndef offsetof
................................................................................
   562    563     || defined(_WIN32) \
   563    564     || (defined(__APPLE__) && defined(__MACH__)) \
   564    565     || defined(__sun)
   565    566   #   define SQLITE_MAX_MMAP_SIZE 2147483648
   566    567   # else
   567    568   #   define SQLITE_MAX_MMAP_SIZE 0
   568    569   # endif
          570  +# define SQLITE_MAX_MMAP_SIZE_xc 1 /* exclude from ctime.c */
   569    571   #endif
   570    572   
   571    573   /*
   572    574   ** The default MMAP_SIZE is zero on all platforms.  Or, even if a larger
   573    575   ** default MMAP_SIZE is specified at compile-time, make sure that it does
   574    576   ** not exceed the maximum mmap size.
   575    577   */
   576    578   #ifndef SQLITE_DEFAULT_MMAP_SIZE
   577    579   # define SQLITE_DEFAULT_MMAP_SIZE 0
          580  +# define SQLITE_DEFAULT_MMAP_SIZE_xc 1  /* Exclude from ctime.c */
   578    581   #endif
   579    582   #if SQLITE_DEFAULT_MMAP_SIZE>SQLITE_MAX_MMAP_SIZE
   580    583   # undef SQLITE_DEFAULT_MMAP_SIZE
   581    584   # define SQLITE_DEFAULT_MMAP_SIZE SQLITE_MAX_MMAP_SIZE
   582    585   #endif
   583    586   
   584    587   /*