/ Check-in [cdd4cf4c]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Change the OS_XXX pre-processor symbols to SQLITE_OS_XXX. Symbols "OS_UNIX", "OS_WIN", "OS_WINCE", "OS_OS2" and "OS_OTHER" are now "SQLITE_OS_UNIX", "SQLITE_OS_WIN", "SQLITE_OS_WINCE", "SQLITE_OS_OS2" and "SQLITE_OS_OTHER", respectively. (CVS 5311)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cdd4cf4ce2ab363ddc3f27c5e44896e17269a161
User & Date: danielk1977 2008-06-26 10:41:19
Context
2008-06-26
10:54
Change the TEMP_STORE preprocessor symbol to SQLITE_TEMP_STORE. (CVS 5312) check-in: 1e3b8308 user: danielk1977 tags: trunk
10:41
Change the OS_XXX pre-processor symbols to SQLITE_OS_XXX. Symbols "OS_UNIX", "OS_WIN", "OS_WINCE", "OS_OS2" and "OS_OTHER" are now "SQLITE_OS_UNIX", "SQLITE_OS_WIN", "SQLITE_OS_WINCE", "SQLITE_OS_OS2" and "SQLITE_OS_OTHER", respectively. (CVS 5311) check-in: cdd4cf4c user: danielk1977 tags: trunk
08:29
Fix a race condition in sqlite3_initialize(). (CVS 5310) check-in: 70b2ed2a user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.arm-wince-mingw32ce-gcc.

    59     59   #    SQLite uses some expensive assert() statements in the inner loop.
    60     60   #    You can make the library go almost twice as fast if you compile
    61     61   #    with -DNDEBUG=1
    62     62   #
    63     63   #OPTS = -DSQLITE_DEBUG=2
    64     64   #OPTS = -DSQLITE_DEBUG=1
    65     65   #OPTS = 
    66         -OPTS = -DNDEBUG=1 -DOS_WIN=1 -D_WIN32_WCE=1
           66  +OPTS = -DNDEBUG=1 -DSQLITE_OS_WIN=1 -D_WIN32_WCE=1
    67     67   #OPTS += -DHAVE_FDATASYNC=1
    68     68   
    69     69   #### The suffix to add to executable files.  ".exe" for windows.
    70     70   #    Nothing for unix.
    71     71   #
    72     72   EXE = .exe
    73     73   #EXE =

Changes to configure.

     1      1   #! /bin/sh
     2      2   # Guess values for system-dependent variables and create Makefiles.
     3         -# Generated by GNU Autoconf 2.59 for sqlite 3.5.9.
            3  +# Generated by GNU Autoconf 2.59 for sqlite 3.6.0.
     4      4   #
     5      5   # Copyright (C) 2003 Free Software Foundation, Inc.
     6      6   # This configure script is free software; the Free Software Foundation
     7      7   # gives unlimited permission to copy, distribute and modify it.
     8      8   ## --------------------- ##
     9      9   ## M4sh Initialization.  ##
    10     10   ## --------------------- ##
................................................................................
   412    412   # This variable seems obsolete.  It should probably be removed, and
   413    413   # only ac_max_sed_lines should be used.
   414    414   : ${ac_max_here_lines=38}
   415    415   
   416    416   # Identity of this package.
   417    417   PACKAGE_NAME='sqlite'
   418    418   PACKAGE_TARNAME='sqlite'
   419         -PACKAGE_VERSION='3.5.9'
   420         -PACKAGE_STRING='sqlite 3.5.9'
          419  +PACKAGE_VERSION='3.6.0'
          420  +PACKAGE_STRING='sqlite 3.6.0'
   421    421   PACKAGE_BUGREPORT=''
   422    422   
   423    423   # Factoring default headers for most tests.
   424    424   ac_includes_default="\
   425    425   #include <stdio.h>
   426    426   #if HAVE_SYS_TYPES_H
   427    427   # include <sys/types.h>
................................................................................
   453    453   #  include <stdint.h>
   454    454   # endif
   455    455   #endif
   456    456   #if HAVE_UNISTD_H
   457    457   # include <unistd.h>
   458    458   #endif"
   459    459   
   460         -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LIBTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR STRIP ac_ct_STRIP RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK TCLSH_CMD program_prefix VERSION RELEASE VERSION_NUMBER BUILD_CC SQLITE_THREADSAFE XTHREADCONNECT THREADSOVERRIDELOCKS ALLOWRELEASE TEMP_STORE BUILD_EXEEXT OS_UNIX OS_WIN OS_OS2 TARGET_EXEEXT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE TARGET_DEBUG USE_AMALGAMATION LOADEXTENSION_FLAGS USE_GCOV BUILD_CFLAGS LIBOBJS LTLIBOBJS'
          460  +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LIBTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR STRIP ac_ct_STRIP RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK TCLSH_CMD program_prefix VERSION RELEASE VERSION_NUMBER BUILD_CC SQLITE_THREADSAFE XTHREADCONNECT THREADSOVERRIDELOCKS ALLOWRELEASE TEMP_STORE BUILD_EXEEXT SQLITE_OS_UNIX SQLITE_OS_WIN SQLITE_OS_OS2 TARGET_EXEEXT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE TARGET_DEBUG USE_AMALGAMATION LOADEXTENSION_FLAGS USE_GCOV BUILD_CFLAGS LIBOBJS LTLIBOBJS'
   461    461   ac_subst_files=''
   462    462   
   463    463   # Initialize some variables set by options.
   464    464   ac_init_help=
   465    465   ac_init_version=false
   466    466   # The variables have the same names as the options, with
   467    467   # dashes changed to underlines.
................................................................................
   922    922   #
   923    923   # Report the --help message.
   924    924   #
   925    925   if test "$ac_init_help" = "long"; then
   926    926     # Omit some internal or obsolete options to make the list less imposing.
   927    927     # This message is too long to be a string in the A/UX 3.1 sh.
   928    928     cat <<_ACEOF
   929         -\`configure' configures sqlite 3.5.9 to adapt to many kinds of systems.
          929  +\`configure' configures sqlite 3.6.0 to adapt to many kinds of systems.
   930    930   
   931    931   Usage: $0 [OPTION]... [VAR=VALUE]...
   932    932   
   933    933   To assign environment variables (e.g., CC, CFLAGS...), specify them as
   934    934   VAR=VALUE.  See below for descriptions of some of the useful variables.
   935    935   
   936    936   Defaults for the options are specified in brackets.
................................................................................
   983    983     --build=BUILD     configure for building on BUILD [guessed]
   984    984     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
   985    985   _ACEOF
   986    986   fi
   987    987   
   988    988   if test -n "$ac_init_help"; then
   989    989     case $ac_init_help in
   990         -     short | recursive ) echo "Configuration of sqlite 3.5.9:";;
          990  +     short | recursive ) echo "Configuration of sqlite 3.6.0:";;
   991    991      esac
   992    992     cat <<\_ACEOF
   993    993   
   994    994   Optional Features:
   995    995     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   996    996     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   997    997     --enable-shared[=PKGS]
................................................................................
  1133   1133       cd $ac_popdir
  1134   1134     done
  1135   1135   fi
  1136   1136   
  1137   1137   test -n "$ac_init_help" && exit 0
  1138   1138   if $ac_init_version; then
  1139   1139     cat <<\_ACEOF
  1140         -sqlite configure 3.5.9
         1140  +sqlite configure 3.6.0
  1141   1141   generated by GNU Autoconf 2.59
  1142   1142   
  1143   1143   Copyright (C) 2003 Free Software Foundation, Inc.
  1144   1144   This configure script is free software; the Free Software Foundation
  1145   1145   gives unlimited permission to copy, distribute and modify it.
  1146   1146   _ACEOF
  1147   1147     exit 0
  1148   1148   fi
  1149   1149   exec 5>config.log
  1150   1150   cat >&5 <<_ACEOF
  1151   1151   This file contains any messages produced by compilers while
  1152   1152   running configure, to aid debugging if configure makes a mistake.
  1153   1153   
  1154         -It was created by sqlite $as_me 3.5.9, which was
         1154  +It was created by sqlite $as_me 3.6.0, which was
  1155   1155   generated by GNU Autoconf 2.59.  Invocation command line was
  1156   1156   
  1157   1157     $ $0 $@
  1158   1158   
  1159   1159   _ACEOF
  1160   1160   {
  1161   1161   cat <<_ASUNAME
................................................................................
  1485   1485   
  1486   1486   
  1487   1487   
  1488   1488   
  1489   1489   
  1490   1490   
  1491   1491   # The following RCS revision string applies to configure.in
  1492         -# $Revision: 1.60 $
         1492  +# $Revision: 1.61 $
  1493   1493   
  1494   1494   #########
  1495   1495   # Programs needed
  1496   1496   #
  1497   1497   case `pwd` in
  1498   1498     *\ * | *\	*)
  1499   1499       { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
................................................................................
 11257  11257   if test x"$cross_compiling" = xno; then
 11258  11258     TARGET_EXEEXT=$BUILD_EXEEXT
 11259  11259   else
 11260  11260     TARGET_EXEEXT=$config_TARGET_EXEEXT
 11261  11261   fi
 11262  11262   if test "$TARGET_EXEEXT" = ".exe"; then
 11263  11263     if test $OS2_SHELL ; then
 11264         -    OS_UNIX=0
 11265         -    OS_WIN=0
 11266         -    OS_OS2=1
 11267         -    CFLAGS="$CFLAGS -DOS_OS2=1"
        11264  +    SQLITE_OS_UNIX=0
        11265  +    SQLITE_OS_WIN=0
        11266  +    SQLITE_OS_OS2=1
        11267  +    CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1"
 11268  11268       if test "$ac_compiler_gnu" = "yes" ; then
 11269  11269         CFLAGS="$CFLAGS -Zomf -Zexe -Zmap"
 11270  11270         BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe"
 11271  11271       fi
 11272  11272     else
 11273         -    OS_UNIX=0
 11274         -    OS_WIN=1
 11275         -    OS_OS2=0
        11273  +    SQLITE_OS_UNIX=0
        11274  +    SQLITE_OS_WIN=1
        11275  +    SQLITE_OS_OS2=0
 11276  11276       tclsubdir=win
 11277         -    CFLAGS="$CFLAGS -DOS_WIN=1"
        11277  +    CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
 11278  11278     fi
 11279  11279   else
 11280         -  OS_UNIX=1
 11281         -  OS_WIN=0
 11282         -  OS_OS2=0
        11280  +  SQLITE_OS_UNIX=1
        11281  +  SQLITE_OS_WIN=0
        11282  +  SQLITE_OS_OS2=0
 11283  11283     tclsubdir=unix
 11284         -  CFLAGS="$CFLAGS -DOS_UNIX=1"
        11284  +  CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
 11285  11285   fi
 11286  11286   
 11287  11287   
 11288  11288   
 11289  11289   
 11290  11290   
 11291  11291   
................................................................................
 12457  12457     echo
 12458  12458     sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 12459  12459   ## Running $as_me. ##
 12460  12460   _ASBOX
 12461  12461   } >&5
 12462  12462   cat >&5 <<_CSEOF
 12463  12463   
 12464         -This file was extended by sqlite $as_me 3.5.9, which was
        12464  +This file was extended by sqlite $as_me 3.6.0, which was
 12465  12465   generated by GNU Autoconf 2.59.  Invocation command line was
 12466  12466   
 12467  12467     CONFIG_FILES    = $CONFIG_FILES
 12468  12468     CONFIG_HEADERS  = $CONFIG_HEADERS
 12469  12469     CONFIG_LINKS    = $CONFIG_LINKS
 12470  12470     CONFIG_COMMANDS = $CONFIG_COMMANDS
 12471  12471     $ $0 $@
................................................................................
 12520  12520   $config_commands
 12521  12521   
 12522  12522   Report bugs to <bug-autoconf@gnu.org>."
 12523  12523   _ACEOF
 12524  12524   
 12525  12525   cat >>$CONFIG_STATUS <<_ACEOF
 12526  12526   ac_cs_version="\\
 12527         -sqlite config.status 3.5.9
        12527  +sqlite config.status 3.6.0
 12528  12528   configured by $0, generated by GNU Autoconf 2.59,
 12529  12529     with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 12530  12530   
 12531  12531   Copyright (C) 2003 Free Software Foundation, Inc.
 12532  12532   This config.status script is free software; the Free Software Foundation
 12533  12533   gives unlimited permission to copy, distribute and modify it."
 12534  12534   srcdir=$srcdir
................................................................................
 13030  13030   s,@BUILD_CC@,$BUILD_CC,;t t
 13031  13031   s,@SQLITE_THREADSAFE@,$SQLITE_THREADSAFE,;t t
 13032  13032   s,@XTHREADCONNECT@,$XTHREADCONNECT,;t t
 13033  13033   s,@THREADSOVERRIDELOCKS@,$THREADSOVERRIDELOCKS,;t t
 13034  13034   s,@ALLOWRELEASE@,$ALLOWRELEASE,;t t
 13035  13035   s,@TEMP_STORE@,$TEMP_STORE,;t t
 13036  13036   s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
 13037         -s,@OS_UNIX@,$OS_UNIX,;t t
 13038         -s,@OS_WIN@,$OS_WIN,;t t
 13039         -s,@OS_OS2@,$OS_OS2,;t t
        13037  +s,@SQLITE_OS_UNIX@,$SQLITE_OS_UNIX,;t t
        13038  +s,@SQLITE_OS_WIN@,$SQLITE_OS_WIN,;t t
        13039  +s,@SQLITE_OS_OS2@,$SQLITE_OS_OS2,;t t
 13040  13040   s,@TARGET_EXEEXT@,$TARGET_EXEEXT,;t t
 13041  13041   s,@TCL_VERSION@,$TCL_VERSION,;t t
 13042  13042   s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
 13043  13043   s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
 13044  13044   s,@TCL_LIBS@,$TCL_LIBS,;t t
 13045  13045   s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
 13046  13046   s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t

Changes to configure.ac.

    88     88   # the corresponding code.
    89     89   #
    90     90   AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
    91     91   
    92     92   dnl Put the RCS revision string after AC_INIT so that it will also
    93     93   dnl show in in configure.
    94     94   # The following RCS revision string applies to configure.in
    95         -# $Revision: 1.45 $
           95  +# $Revision: 1.46 $
    96     96   
    97     97   #########
    98     98   # Programs needed
    99     99   #
   100    100   AC_PROG_LIBTOOL
   101    101   AC_PROG_INSTALL
   102    102   AC_PROG_AWK
................................................................................
   336    336   if test x"$cross_compiling" = xno; then
   337    337     TARGET_EXEEXT=$BUILD_EXEEXT
   338    338   else
   339    339     TARGET_EXEEXT=$config_TARGET_EXEEXT
   340    340   fi
   341    341   if test "$TARGET_EXEEXT" = ".exe"; then
   342    342     if test $OS2_SHELL ; then
   343         -    OS_UNIX=0
   344         -    OS_WIN=0
   345         -    OS_OS2=1
   346         -    CFLAGS="$CFLAGS -DOS_OS2=1"
          343  +    SQLITE_OS_UNIX=0
          344  +    SQLITE_OS_WIN=0
          345  +    SQLITE_OS_OS2=1
          346  +    CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1"
   347    347       if test "$ac_compiler_gnu" = "yes" ; then
   348    348         CFLAGS="$CFLAGS -Zomf -Zexe -Zmap"
   349    349         BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe"
   350    350       fi
   351    351     else
   352         -    OS_UNIX=0
   353         -    OS_WIN=1
   354         -    OS_OS2=0
          352  +    SQLITE_OS_UNIX=0
          353  +    SQLITE_OS_WIN=1
          354  +    SQLITE_OS_OS2=0
   355    355       tclsubdir=win
   356         -    CFLAGS="$CFLAGS -DOS_WIN=1"
          356  +    CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
   357    357     fi
   358    358   else
   359         -  OS_UNIX=1
   360         -  OS_WIN=0
   361         -  OS_OS2=0
          359  +  SQLITE_OS_UNIX=1
          360  +  SQLITE_OS_WIN=0
          361  +  SQLITE_OS_OS2=0
   362    362     tclsubdir=unix
   363         -  CFLAGS="$CFLAGS -DOS_UNIX=1"
          363  +  CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
   364    364   fi
   365    365   
   366    366   AC_SUBST(BUILD_EXEEXT)
   367         -AC_SUBST(OS_UNIX)
   368         -AC_SUBST(OS_WIN)
   369         -AC_SUBST(OS_OS2)
          367  +AC_SUBST(SQLITE_OS_UNIX)
          368  +AC_SUBST(SQLITE_OS_WIN)
          369  +AC_SUBST(SQLITE_OS_OS2)
   370    370   AC_SUBST(TARGET_EXEEXT)
   371    371   
   372    372   ##########
   373    373   # Figure out all the parameters needed to compile against Tcl.
   374    374   #
   375    375   # This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
   376    376   # macros in the in the tcl.m4 file of the standard TCL distribution.

Changes to mkdll.sh.

     6      6   # library.  "tclsqlite3.dll" contains the TCL bindings and is the
     7      7   # library that is loaded into TCL in order to run SQLite.
     8      8   #
     9      9   make sqlite3.c
    10     10   PATH=$PATH:/opt/mingw/bin
    11     11   TCLDIR=/home/drh/tcltk/846/win/846win
    12     12   TCLSTUBLIB=$TCLDIR/libtcl84stub.a
    13         -OPTS='-DUSE_TCL_STUBS=1 -DSQLITE_THREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
           13  +OPTS='-DUSE_TCL_STUBS=1 -DSQLITE_THREADSAFE=1 -DBUILD_sqlite=1 -DSQLITE_OS_WIN=1'
    14     14   OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1"
    15     15   CC="i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR"
    16     16   NM="i386-mingw32msvc-nm"
    17     17   CMD="$CC -c sqlite3.c"
    18     18   echo $CMD
    19     19   $CMD
    20     20   CMD="$CC -c tclsqlite3.c"

Changes to mkextw.sh.

     1      1   #!/bin/sh
     2      2   #
     3      3   # This script is used to compile SQLite extensions into DLLs.
     4      4   #
     5      5   make fts2amal.c
     6      6   PATH=$PATH:/opt/mingw/bin
     7         -OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
            7  +OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DSQLITE_OS_WIN=1'
     8      8   CC="i386-mingw32msvc-gcc -O2 $OPTS -Itsrc"
     9      9   NM="i386-mingw32msvc-nm"
    10     10   CMD="$CC -c fts2amal.c"
    11     11   echo $CMD
    12     12   $CMD
    13     13   echo 'EXPORTS' >fts2.def
    14     14   echo 'sqlite3_extension_init' >>fts2.def

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.463 2008/06/26 08:29:34 danielk1977 Exp $
           17  +** $Id: main.c,v 1.464 2008/06/26 10:41:19 danielk1977 Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <ctype.h>
    21     21   
    22     22   #ifdef SQLITE_ENABLE_FTS3
    23     23   # include "fts3.h"
    24     24   #endif
................................................................................
   520    520   ** an integer number of milliseconds passed in as the first
   521    521   ** argument.
   522    522   */
   523    523   static int sqliteDefaultBusyCallback(
   524    524    void *ptr,               /* Database connection */
   525    525    int count                /* Number of times table has been busy */
   526    526   ){
   527         -#if OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
          527  +#if SQLITE_OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
   528    528     static const u8 delays[] =
   529    529        { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50, 100 };
   530    530     static const u8 totals[] =
   531    531        { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228 };
   532    532   # define NDELAY (sizeof(delays)/sizeof(delays[0]))
   533    533     sqlite3 *db = (sqlite3 *)ptr;
   534    534     int timeout = db->busyTimeout;

Changes to src/mutex.h.

    15     15   ** to all source files.  We break it out in an effort to keep the code
    16     16   ** better organized.
    17     17   **
    18     18   ** NOTE:  source files should *not* #include this header file directly.
    19     19   ** Source files should #include the sqliteInt.h file and let that file
    20     20   ** include this one indirectly.
    21     21   **
    22         -** $Id: mutex.h,v 1.7 2008/06/19 01:50:09 drh Exp $
           22  +** $Id: mutex.h,v 1.8 2008/06/26 10:41:19 danielk1977 Exp $
    23     23   */
    24     24   
    25     25   
    26     26   #ifdef SQLITE_MUTEX_APPDEF
    27     27   /*
    28     28   ** If SQLITE_MUTEX_APPDEF is defined, then this whole module is
    29     29   ** omitted and equivalent functionality must be provided by the
................................................................................
    49     49   **   SQLITE_MUTEX_OS2          For multi-threaded applications on OS/2.
    50     50   */
    51     51   #define SQLITE_MUTEX_NOOP 1   /* The default */
    52     52   #if defined(SQLITE_DEBUG) && !SQLITE_THREADSAFE
    53     53   # undef SQLITE_MUTEX_NOOP
    54     54   # define SQLITE_MUTEX_NOOP_DEBUG
    55     55   #endif
    56         -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_UNIX
           56  +#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_UNIX
    57     57   # undef SQLITE_MUTEX_NOOP
    58     58   # define SQLITE_MUTEX_PTHREADS
    59     59   #endif
    60         -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_WIN
           60  +#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_WIN
    61     61   # undef SQLITE_MUTEX_NOOP
    62     62   # define SQLITE_MUTEX_W32
    63     63   #endif
    64         -#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_OS2
           64  +#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_OS2
    65     65   # undef SQLITE_MUTEX_NOOP
    66     66   # define SQLITE_MUTEX_OS2
    67     67   #endif
    68     68   
    69     69   #ifdef SQLITE_MUTEX_NOOP
    70     70   /*
    71     71   ** If this is a no-op implementation, implement everything as macros.

Changes to src/mutex_w32.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains the C functions that implement mutexes for win32
    13     13   **
    14         -** $Id: mutex_w32.c,v 1.10 2008/06/19 16:07:07 drh Exp $
           14  +** $Id: mutex_w32.c,v 1.11 2008/06/26 10:41:19 danielk1977 Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   
    18     18   /*
    19     19   ** The code in this file is only used if we are compiling multithreaded
    20     20   ** on a win32 system.
    21     21   */
................................................................................
    38     38   ** Here is an interesting observation:  Win95, Win98, and WinME lack
    39     39   ** the LockFileEx() API.  But we can still statically link against that
    40     40   ** API as long as we don't call it win running Win95/98/ME.  A call to
    41     41   ** this routine is used to determine if the host is Win95/98/ME or
    42     42   ** WinNT/2K/XP so that we will know whether or not we can safely call
    43     43   ** the LockFileEx() API.
    44     44   */
    45         -#if OS_WINCE
           45  +#if SQLITE_OS_WINCE
    46     46   # define mutexIsNT()  (1)
    47     47   #else
    48     48     static int mutexIsNT(void){
    49     49       static int osType = 0;
    50     50       if( osType==0 ){
    51     51         OSVERSIONINFO sInfo;
    52     52         sInfo.dwOSVersionInfoSize = sizeof(sInfo);
    53     53         GetVersionEx(&sInfo);
    54     54         osType = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
    55     55       }
    56     56       return osType==2;
    57     57     }
    58         -#endif /* OS_WINCE */
           58  +#endif /* SQLITE_OS_WINCE */
    59     59   
    60     60   
    61     61   #ifdef SQLITE_DEBUG
    62     62   /*
    63     63   ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
    64     64   ** intended for use only inside assert() statements.
    65     65   */

Changes to src/os.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains OS interface code that is common to all
    14     14   ** architectures.
    15     15   **
    16         -** $Id: os.c,v 1.117 2008/06/26 08:29:34 danielk1977 Exp $
           16  +** $Id: os.c,v 1.118 2008/06/26 10:41:19 danielk1977 Exp $
    17     17   */
    18     18   #define _SQLITE_OS_C_ 1
    19     19   #include "sqliteInt.h"
    20     20   #undef _SQLITE_OS_C_
    21     21   
    22     22   /*
    23     23   ** The default SQLite sqlite3_vfs implementations do not allocate
................................................................................
    32     32   **     sqlite3OsOpen()
    33     33   **     sqlite3OsRead()
    34     34   **     sqlite3OsWrite()
    35     35   **     sqlite3OsSync()
    36     36   **     sqlite3OsLock()
    37     37   **
    38     38   */
    39         -#if defined(SQLITE_TEST) && (OS_WIN==0)
           39  +#if defined(SQLITE_TEST) && (SQLITE_OS_WIN==0)
    40     40     #define DO_OS_MALLOC_TEST if (1) {            \
    41     41       void *pTstAlloc = sqlite3Malloc(10);       \
    42     42       if (!pTstAlloc) return SQLITE_IOERR_NOMEM;  \
    43     43       sqlite3_free(pTstAlloc);                    \
    44     44     }
    45     45   #else
    46     46     #define DO_OS_MALLOC_TEST

Changes to src/os.h.

    13     13   ** This header file (together with is companion C source-code file
    14     14   ** "os.c") attempt to abstract the underlying operating system so that
    15     15   ** the SQLite library will work on both POSIX and windows systems.
    16     16   **
    17     17   ** This header file is #include-ed by sqliteInt.h and thus ends up
    18     18   ** being included by every source file.
    19     19   **
    20         -** $Id: os.h,v 1.104 2008/06/25 17:19:01 danielk1977 Exp $
           20  +** $Id: os.h,v 1.105 2008/06/26 10:41:19 danielk1977 Exp $
    21     21   */
    22     22   #ifndef _SQLITE_OS_H_
    23     23   #define _SQLITE_OS_H_
    24     24   
    25     25   /*
    26     26   ** Figure out if we are dealing with Unix, Windows, or some other
    27     27   ** operating system.  After the following block of preprocess macros,
    28         -** all of OS_UNIX, OS_WIN, OS_OS2, and OS_OTHER will defined to either
    29         -** 1 or 0.  One of the four will be 1.  The other three will be 0.
           28  +** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
           29  +** will defined to either 1 or 0.  One of the four will be 1.  The other 
           30  +** three will be 0.
    30     31   */
    31         -#if defined(OS_OTHER)
    32         -# if OS_OTHER==1
    33         -#   undef OS_UNIX
    34         -#   define OS_UNIX 0
    35         -#   undef OS_WIN
    36         -#   define OS_WIN 0
    37         -#   undef OS_OS2
    38         -#   define OS_OS2 0
           32  +#if defined(SQLITE_OS_OTHER)
           33  +# if SQLITE_OS_OTHER==1
           34  +#   undef SQLITE_OS_UNIX
           35  +#   define SQLITE_OS_UNIX 0
           36  +#   undef SQLITE_OS_WIN
           37  +#   define SQLITE_OS_WIN 0
           38  +#   undef SQLITE_OS_OS2
           39  +#   define SQLITE_OS_OS2 0
    39     40   # else
    40         -#   undef OS_OTHER
           41  +#   undef SQLITE_OS_OTHER
    41     42   # endif
    42     43   #endif
    43         -#if !defined(OS_UNIX) && !defined(OS_OTHER)
    44         -# define OS_OTHER 0
    45         -# ifndef OS_WIN
           44  +#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
           45  +# define SQLITE_OS_OTHER 0
           46  +# ifndef SQLITE_OS_WIN
    46     47   #   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
    47         -#     define OS_WIN 1
    48         -#     define OS_UNIX 0
    49         -#     define OS_OS2 0
           48  +#     define SQLITE_OS_WIN 1
           49  +#     define SQLITE_OS_UNIX 0
           50  +#     define SQLITE_OS_OS2 0
    50     51   #   elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__)
    51         -#     define OS_WIN 0
    52         -#     define OS_UNIX 0
    53         -#     define OS_OS2 1
           52  +#     define SQLITE_OS_WIN 0
           53  +#     define SQLITE_OS_UNIX 0
           54  +#     define SQLITE_OS_OS2 1
    54     55   #   else
    55         -#     define OS_WIN 0
    56         -#     define OS_UNIX 1
    57         -#     define OS_OS2 0
           56  +#     define SQLITE_OS_WIN 0
           57  +#     define SQLITE_OS_UNIX 1
           58  +#     define SQLITE_OS_OS2 0
    58     59   #  endif
    59     60   # else
    60         -#  define OS_UNIX 0
    61         -#  define OS_OS2 0
           61  +#  define SQLITE_OS_UNIX 0
           62  +#  define SQLITE_OS_OS2 0
    62     63   # endif
    63     64   #else
    64         -# ifndef OS_WIN
    65         -#  define OS_WIN 0
           65  +# ifndef SQLITE_OS_WIN
           66  +#  define SQLITE_OS_WIN 0
    66     67   # endif
    67     68   #endif
    68     69   
    69     70   /*
    70     71   ** Determine if we are dealing with WindowsCE - which has a much
    71     72   ** reduced API.
    72     73   */
    73     74   #if defined(_WIN32_WCE)
    74         -# define OS_WINCE 1
           75  +# define SQLITE_OS_WINCE 1
    75     76   #else
    76         -# define OS_WINCE 0
           77  +# define SQLITE_OS_WINCE 0
    77     78   #endif
    78     79   
    79     80   
    80     81   /*
    81     82   ** Define the maximum size of a temporary filename
    82     83   */
    83         -#if OS_WIN
           84  +#if SQLITE_OS_WIN
    84     85   # include <windows.h>
    85     86   # define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
    86         -#elif OS_OS2
           87  +#elif SQLITE_OS_OS2
    87     88   # if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY)
    88     89   #  include <os2safe.h> /* has to be included before os2.h for linking to work */
    89     90   # endif
    90     91   # define INCL_DOSDATETIME
    91     92   # define INCL_DOSFILEMGR
    92     93   # define INCL_DOSERRORS
    93     94   # define INCL_DOSMISC

Changes to src/os_os2.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to OS/2.
    14     14   **
    15         -** $Id: os_os2.c,v 1.46 2008/06/25 17:19:01 danielk1977 Exp $
           15  +** $Id: os_os2.c,v 1.47 2008/06/26 10:41:19 danielk1977 Exp $
    16     16   */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   
    20         -#if OS_OS2
           20  +#if SQLITE_OS_OS2
    21     21   
    22     22   /*
    23     23   ** A Note About Memory Allocation:
    24     24   **
    25     25   ** This driver uses malloc()/free() directly rather than going through
    26     26   ** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
    27     27   ** are designed for use on embedded systems where memory is scarce and
................................................................................
  1073   1073     sqlite3_vfs_register(&os2Vfs, 1);
  1074   1074     return SQLITE_OK; 
  1075   1075   }
  1076   1076   int sqlite3_os_end(void){ 
  1077   1077     return SQLITE_OK; 
  1078   1078   }
  1079   1079   
  1080         -#endif /* OS_OS2 */
         1080  +#endif /* SQLITE_OS_OS2 */

Changes to src/os_unix.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to Unix systems.
    14     14   **
    15         -** $Id: os_unix.c,v 1.189 2008/06/25 17:19:01 danielk1977 Exp $
           15  +** $Id: os_unix.c,v 1.190 2008/06/26 10:41:19 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18         -#if OS_UNIX              /* This file is used on unix only */
           18  +#if SQLITE_OS_UNIX              /* This file is used on unix only */
    19     19   
    20     20   /* #define SQLITE_ENABLE_LOCKING_STYLE 0 */
    21     21   
    22     22   /*
    23     23   ** These #defines should enable >2GB file support on Posix if the
    24     24   ** underlying operating system supports it.  If the OS lacks
    25     25   ** large file support, these should be no-ops.
................................................................................
  2807   2807     sqlite3_vfs_register(&unixVfs, 1);
  2808   2808     return SQLITE_OK; 
  2809   2809   }
  2810   2810   int sqlite3_os_end(void){ 
  2811   2811     return SQLITE_OK; 
  2812   2812   }
  2813   2813    
  2814         -#endif /* OS_UNIX */
         2814  +#endif /* SQLITE_OS_UNIX */

Changes to src/os_win.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to windows.
    14     14   **
    15         -** $Id: os_win.c,v 1.128 2008/06/25 17:19:01 danielk1977 Exp $
           15  +** $Id: os_win.c,v 1.129 2008/06/26 10:41:19 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18         -#if OS_WIN               /* This file is used for windows only */
           18  +#if SQLITE_OS_WIN               /* This file is used for windows only */
    19     19   
    20     20   
    21     21   /*
    22     22   ** A Note About Memory Allocation:
    23     23   **
    24     24   ** This driver uses malloc()/free() directly rather than going through
    25     25   ** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
................................................................................
    62     62   */
    63     63   #include "os_common.h"
    64     64   
    65     65   /*
    66     66   ** Determine if we are dealing with WindowsCE - which has a much
    67     67   ** reduced API.
    68     68   */
    69         -#if defined(OS_WINCE)
           69  +#if defined(SQLITE_OS_WINCE)
    70     70   # define AreFileApisANSI() 1
    71     71   #endif
    72     72   
    73     73   /*
    74     74   ** WinCE lacks native support for file locking so we have to fake it
    75     75   ** with some code of our own.
    76     76   */
    77         -#if OS_WINCE
           77  +#if SQLITE_OS_WINCE
    78     78   typedef struct winceLock {
    79     79     int nReaders;       /* Number of reader locks obtained */
    80     80     BOOL bPending;      /* Indicates a pending lock has been obtained */
    81     81     BOOL bReserved;     /* Indicates a reserved lock has been obtained */
    82     82     BOOL bExclusive;    /* Indicates an exclusive lock has been obtained */
    83     83   } winceLock;
    84     84   #endif
................................................................................
    89     89   */
    90     90   typedef struct winFile winFile;
    91     91   struct winFile {
    92     92     const sqlite3_io_methods *pMethod;/* Must be first */
    93     93     HANDLE h;               /* Handle for accessing the file */
    94     94     unsigned char locktype; /* Type of lock currently held on this file */
    95     95     short sharedLockByte;   /* Randomly chosen byte used as a shared lock */
    96         -#if OS_WINCE
           96  +#if SQLITE_OS_WINCE
    97     97     WCHAR *zDeleteOnClose;  /* Name of file to delete when closing */
    98     98     HANDLE hMutex;          /* Mutex used to control access to shared lock */  
    99     99     HANDLE hShared;         /* Shared memory segment used for locking */
   100    100     winceLock local;        /* Locks obtained by this instance of winFile */
   101    101     winceLock *shared;      /* Global shared lock memory for the file  */
   102    102   #endif
   103    103   };
................................................................................
   128    128   ** Here is an interesting observation:  Win95, Win98, and WinME lack
   129    129   ** the LockFileEx() API.  But we can still statically link against that
   130    130   ** API as long as we don't call it win running Win95/98/ME.  A call to
   131    131   ** this routine is used to determine if the host is Win95/98/ME or
   132    132   ** WinNT/2K/XP so that we will know whether or not we can safely call
   133    133   ** the LockFileEx() API.
   134    134   */
   135         -#if OS_WINCE
          135  +#if SQLITE_OS_WINCE
   136    136   # define isNT()  (1)
   137    137   #else
   138    138     static int isNT(void){
   139    139       if( sqlite3_os_type==0 ){
   140    140         OSVERSIONINFO sInfo;
   141    141         sInfo.dwOSVersionInfoSize = sizeof(sInfo);
   142    142         GetVersionEx(&sInfo);
   143    143         sqlite3_os_type = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
   144    144       }
   145    145       return sqlite3_os_type==2;
   146    146     }
   147         -#endif /* OS_WINCE */
          147  +#endif /* SQLITE_OS_WINCE */
   148    148   
   149    149   /*
   150    150   ** Convert a UTF-8 string to microsoft unicode (UTF-16?). 
   151    151   **
   152    152   ** Space to hold the returned string is obtained from malloc.
   153    153   */
   154    154   static WCHAR *utf8ToUnicode(const char *zFilename){
................................................................................
   271    271       return 0;
   272    272     }
   273    273     zFilenameMbcs = unicodeToMbcs(zTmpWide);
   274    274     free(zTmpWide);
   275    275     return zFilenameMbcs;
   276    276   }
   277    277   
   278         -#if OS_WINCE
          278  +#if SQLITE_OS_WINCE
   279    279   /*************************************************************************
   280    280   ** This section contains code for WinCE only.
   281    281   */
   282    282   /*
   283    283   ** WindowsCE does not have a localtime() function.  So create a
   284    284   ** substitute.
   285    285   */
................................................................................
   575    575       return winceLockFile(phFile, SHARED_FIRST, 0, 1, 0);
   576    576     }
   577    577     return FALSE;
   578    578   }
   579    579   /*
   580    580   ** End of the special code for wince
   581    581   *****************************************************************************/
   582         -#endif /* OS_WINCE */
          582  +#endif /* SQLITE_OS_WINCE */
   583    583   
   584    584   /*****************************************************************************
   585    585   ** The next group of routines implement the I/O methods specified
   586    586   ** by the sqlite3_io_methods object.
   587    587   ******************************************************************************/
   588    588   
   589    589   /*
................................................................................
   600    600   static int winClose(sqlite3_file *id){
   601    601     int rc, cnt = 0;
   602    602     winFile *pFile = (winFile*)id;
   603    603     OSTRACE2("CLOSE %d\n", pFile->h);
   604    604     do{
   605    605       rc = CloseHandle(pFile->h);
   606    606     }while( rc==0 && cnt++ < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
   607         -#if OS_WINCE
          607  +#if SQLITE_OS_WINCE
   608    608   #define WINCE_DELETION_ATTEMPTS 3
   609    609     winceDestroyLock(pFile);
   610    610     if( pFile->zDeleteOnClose ){
   611    611       int cnt = 0;
   612    612       while(
   613    613              DeleteFileW(pFile->zDeleteOnClose)==0
   614    614           && GetFileAttributesW(pFile->zDeleteOnClose)!=0xffffffff 
................................................................................
  1175   1175     }
  1176   1176     if( flags & SQLITE_OPEN_MAIN_DB ){
  1177   1177       dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
  1178   1178     }else{
  1179   1179       dwShareMode = 0;
  1180   1180     }
  1181   1181     if( flags & SQLITE_OPEN_DELETEONCLOSE ){
  1182         -#if OS_WINCE
         1182  +#if SQLITE_OS_WINCE
  1183   1183       dwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;
  1184   1184   #else
  1185   1185       dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY
  1186   1186                                  | FILE_ATTRIBUTE_HIDDEN
  1187   1187                                  | FILE_FLAG_DELETE_ON_CLOSE;
  1188   1188   #endif
  1189   1189       isTemp = 1;
................................................................................
  1200   1200          dwShareMode,
  1201   1201          NULL,
  1202   1202          dwCreationDisposition,
  1203   1203          dwFlagsAndAttributes,
  1204   1204          NULL
  1205   1205       );
  1206   1206     }else{
  1207         -#if OS_WINCE
         1207  +#if SQLITE_OS_WINCE
  1208   1208       return SQLITE_NOMEM;
  1209   1209   #else
  1210   1210       h = CreateFileA((char*)zConverted,
  1211   1211          dwDesiredAccess,
  1212   1212          dwShareMode,
  1213   1213          NULL,
  1214   1214          dwCreationDisposition,
................................................................................
  1232   1232       }else{
  1233   1233         *pOutFlags = SQLITE_OPEN_READONLY;
  1234   1234       }
  1235   1235     }
  1236   1236     memset(pFile, 0, sizeof(*pFile));
  1237   1237     pFile->pMethod = &winIoMethod;
  1238   1238     pFile->h = h;
  1239         -#if OS_WINCE
         1239  +#if SQLITE_OS_WINCE
  1240   1240     if( (flags & (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)) ==
  1241   1241                  (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)
  1242   1242          && !winceCreateLock(zName, pFile)
  1243   1243     ){
  1244   1244       CloseHandle(h);
  1245   1245       free(zConverted);
  1246   1246       return SQLITE_CANTOPEN;
................................................................................
  1283   1283     SimulateIOError(return SQLITE_IOERR_DELETE);
  1284   1284     if( isNT() ){
  1285   1285       do{
  1286   1286         DeleteFileW(zConverted);
  1287   1287       }while( (rc = GetFileAttributesW(zConverted))!=0xffffffff 
  1288   1288               && cnt++ < MX_DELETION_ATTEMPTS && (Sleep(100), 1) );
  1289   1289     }else{
  1290         -#if OS_WINCE
         1290  +#if SQLITE_OS_WINCE
  1291   1291       return SQLITE_NOMEM;
  1292   1292   #else
  1293   1293       do{
  1294   1294         DeleteFileA(zConverted);
  1295   1295       }while( (rc = GetFileAttributesA(zConverted))!=0xffffffff
  1296   1296               && cnt++ < MX_DELETION_ATTEMPTS && (Sleep(100), 1) );
  1297   1297   #endif
................................................................................
  1315   1315     void *zConverted = convertUtf8Filename(zFilename);
  1316   1316     if( zConverted==0 ){
  1317   1317       return SQLITE_NOMEM;
  1318   1318     }
  1319   1319     if( isNT() ){
  1320   1320       attr = GetFileAttributesW((WCHAR*)zConverted);
  1321   1321     }else{
  1322         -#if OS_WINCE
         1322  +#if SQLITE_OS_WINCE
  1323   1323       return SQLITE_NOMEM;
  1324   1324   #else
  1325   1325       attr = GetFileAttributesA((char*)zConverted);
  1326   1326   #endif
  1327   1327     }
  1328   1328     free(zConverted);
  1329   1329     switch( flags ){
................................................................................
  1355   1355   ){
  1356   1356   
  1357   1357   #if defined(__CYGWIN__)
  1358   1358     cygwin_conv_to_full_win32_path(zRelative, zFull);
  1359   1359     return SQLITE_OK;
  1360   1360   #endif
  1361   1361   
  1362         -#if OS_WINCE
         1362  +#if SQLITE_OS_WINCE
  1363   1363     /* WinCE has no concept of a relative pathname, or so I am told. */
  1364   1364     sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zRelative);
  1365   1365     return SQLITE_OK;
  1366   1366   #endif
  1367   1367   
  1368         -#if !OS_WINCE && !defined(__CYGWIN__)
         1368  +#if !SQLITE_OS_WINCE && !defined(__CYGWIN__)
  1369   1369     int nByte;
  1370   1370     void *zConverted;
  1371   1371     char *zOut;
  1372   1372     zConverted = convertUtf8Filename(zRelative);
  1373   1373     if( isNT() ){
  1374   1374       WCHAR *zTemp;
  1375   1375       nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, 0) + 3;
................................................................................
  1419   1419     void *zConverted = convertUtf8Filename(zFilename);
  1420   1420     if( zConverted==0 ){
  1421   1421       return 0;
  1422   1422     }
  1423   1423     if( isNT() ){
  1424   1424       h = LoadLibraryW((WCHAR*)zConverted);
  1425   1425     }else{
  1426         -#if OS_WINCE
         1426  +#if SQLITE_OS_WINCE
  1427   1427       return 0;
  1428   1428   #else
  1429   1429       h = LoadLibraryA((char*)zConverted);
  1430   1430   #endif
  1431   1431     }
  1432   1432     free(zConverted);
  1433   1433     return (void*)h;
  1434   1434   }
  1435   1435   static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
  1436         -#if OS_WINCE
         1436  +#if SQLITE_OS_WINCE
  1437   1437     int error = GetLastError();
  1438   1438     if( error>0x7FFFFFF ){
  1439   1439       sqlite3_snprintf(nBuf, zBufOut, "OsError 0x%x", error);
  1440   1440     }else{
  1441   1441       sqlite3_snprintf(nBuf, zBufOut, "OsError %d", error);
  1442   1442     }
  1443   1443   #else
................................................................................
  1449   1449       zBufOut,
  1450   1450       nBuf-1,
  1451   1451       0
  1452   1452     );
  1453   1453   #endif
  1454   1454   }
  1455   1455   void *winDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
  1456         -#if OS_WINCE
         1456  +#if SQLITE_OS_WINCE
  1457   1457     /* The GetProcAddressA() routine is only available on wince. */
  1458   1458     return GetProcAddressA((HANDLE)pHandle, zSymbol);
  1459   1459   #else
  1460   1460     /* All other windows platforms expect GetProcAddress() to take
  1461   1461     ** an Ansi string regardless of the _UNICODE setting */
  1462   1462     return GetProcAddress((HANDLE)pHandle, zSymbol);
  1463   1463   #endif
................................................................................
  1527   1527   */
  1528   1528   int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
  1529   1529     FILETIME ft;
  1530   1530     /* FILETIME structure is a 64-bit value representing the number of 
  1531   1531        100-nanosecond intervals since January 1, 1601 (= JD 2305813.5). 
  1532   1532     */
  1533   1533     double now;
  1534         -#if OS_WINCE
         1534  +#if SQLITE_OS_WINCE
  1535   1535     SYSTEMTIME time;
  1536   1536     GetSystemTime(&time);
  1537   1537     SystemTimeToFileTime(&time,&ft);
  1538   1538   #else
  1539   1539     GetSystemTimeAsFileTime( &ft );
  1540   1540   #endif
  1541   1541     now = ((double)ft.dwHighDateTime) * 4294967296.0; 
................................................................................
  1580   1580     sqlite3_vfs_register(&winVfs, 1);
  1581   1581     return SQLITE_OK; 
  1582   1582   }
  1583   1583   int sqlite3_os_end(void){ 
  1584   1584     return SQLITE_OK;
  1585   1585   }
  1586   1586   
  1587         -#endif /* OS_WIN */
         1587  +#endif /* SQLITE_OS_WIN */

Changes to src/shell.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code to implement the "sqlite" command line
    13     13   ** utility for accessing SQLite databases.
    14     14   **
    15         -** $Id: shell.c,v 1.181 2008/06/23 21:26:05 mihailim Exp $
           15  +** $Id: shell.c,v 1.182 2008/06/26 10:41:19 danielk1977 Exp $
    16     16   */
    17     17   #include <stdlib.h>
    18     18   #include <string.h>
    19     19   #include <stdio.h>
    20     20   #include <assert.h>
    21     21   #include "sqlite3.h"
    22     22   #include <ctype.h>
................................................................................
  1942   1942         i++;
  1943   1943       }else if( strcmp(argv[i],"-init")==0 ){
  1944   1944         i++;
  1945   1945         zInitFile = argv[i];
  1946   1946       }
  1947   1947     }
  1948   1948     if( i<argc ){
  1949         -#if defined(OS_OS2) && OS_OS2
         1949  +#if defined(SQLITE_OS_OS2) && SQLITE_OS_OS2
  1950   1950       data.zDbFilename = (const char *)convertCpPathToUtf8( argv[i++] );
  1951   1951   #else
  1952   1952       data.zDbFilename = argv[i++];
  1953   1953   #endif
  1954   1954     }else{
  1955   1955   #ifndef SQLITE_OMIT_MEMORYDB
  1956   1956       data.zDbFilename = ":memory:";

Changes to src/test1.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing all sorts of SQLite interfaces.  This code
    13     13   ** is not included in the SQLite library.  It is used for automated
    14     14   ** testing of the SQLite library.
    15     15   **
    16         -** $Id: test1.c,v 1.306 2008/06/19 02:52:25 drh Exp $
           16  +** $Id: test1.c,v 1.307 2008/06/26 10:41:19 danielk1977 Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "tcl.h"
    20     20   #include <stdlib.h>
    21     21   #include <string.h>
    22     22   
    23     23   /*
................................................................................
  4732   4732     extern int sqlite3_opentemp_count;
  4733   4733     extern int sqlite3_like_count;
  4734   4734     extern int sqlite3_xferopt_count;
  4735   4735     extern int sqlite3_pager_readdb_count;
  4736   4736     extern int sqlite3_pager_writedb_count;
  4737   4737     extern int sqlite3_pager_writej_count;
  4738   4738     extern int sqlite3_pager_pgfree_count;
  4739         -#if OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
         4739  +#if SQLITE_OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
  4740   4740     extern int threadsOverrideEachOthersLocks;
  4741   4741   #endif
  4742         -#if OS_WIN
         4742  +#if SQLITE_OS_WIN
  4743   4743     extern int sqlite3_os_type;
  4744   4744   #endif
  4745   4745   #ifdef SQLITE_DEBUG
  4746   4746     extern int sqlite3WhereTrace;
  4747   4747     extern int sqlite3OSTrace;
  4748   4748     extern int sqlite3VdbeAddopTrace;
  4749   4749   #endif
................................................................................
  4784   4784         (char*)&sqlite3_pager_writej_count, TCL_LINK_INT);
  4785   4785     Tcl_LinkVar(interp, "sqlite3_pager_pgfree_count",
  4786   4786         (char*)&sqlite3_pager_pgfree_count, TCL_LINK_INT);
  4787   4787   #ifndef SQLITE_OMIT_UTF16
  4788   4788     Tcl_LinkVar(interp, "unaligned_string_counter",
  4789   4789         (char*)&unaligned_string_counter, TCL_LINK_INT);
  4790   4790   #endif
  4791         -#if OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
         4791  +#if SQLITE_OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
  4792   4792     Tcl_LinkVar(interp, "threadsOverrideEachOthersLocks",
  4793   4793         (char*)&threadsOverrideEachOthersLocks, TCL_LINK_INT);
  4794   4794   #endif
  4795   4795   #ifndef SQLITE_OMIT_UTF16
  4796   4796     Tcl_LinkVar(interp, "sqlite_last_needed_collation",
  4797   4797         (char*)&pzNeededCollation, TCL_LINK_STRING|TCL_LINK_READ_ONLY);
  4798   4798   #endif
  4799         -#if OS_WIN
         4799  +#if SQLITE_OS_WIN
  4800   4800     Tcl_LinkVar(interp, "sqlite_os_type",
  4801   4801         (char*)&sqlite3_os_type, TCL_LINK_INT);
  4802   4802   #endif
  4803   4803   #ifdef SQLITE_TEST
  4804   4804     Tcl_LinkVar(interp, "sqlite_query_plan",
  4805   4805         (char*)&query_plan, TCL_LINK_STRING|TCL_LINK_READ_ONLY);
  4806   4806   #endif

Changes to src/test4.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing the the SQLite library in a multithreaded environment.
    13     13   **
    14         -** $Id: test4.c,v 1.21 2007/08/22 11:41:18 drh Exp $
           14  +** $Id: test4.c,v 1.22 2008/06/26 10:41:19 danielk1977 Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   #include "tcl.h"
    18         -#if defined(OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE
           18  +#if defined(SQLITE_OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE
    19     19   #include <stdlib.h>
    20     20   #include <string.h>
    21     21   #include <pthread.h>
    22     22   #include <sched.h>
    23     23   #include <ctype.h>
    24     24   
    25     25   /*
................................................................................
   709    709     for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){
   710    710       Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0);
   711    711     }
   712    712     return TCL_OK;
   713    713   }
   714    714   #else
   715    715   int Sqlitetest4_Init(Tcl_Interp *interp){ return TCL_OK; }
   716         -#endif /* OS_UNIX */
          716  +#endif /* SQLITE_OS_UNIX */

Changes to src/test7.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing the client/server version of the SQLite library.
    13     13   ** Derived from test4.c.
    14     14   **
    15         -** $Id: test7.c,v 1.10 2007/10/05 15:04:13 danielk1977 Exp $
           15  +** $Id: test7.c,v 1.11 2008/06/26 10:41:19 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #include "tcl.h"
    19     19   
    20     20   /*
    21     21   ** This test only works on UNIX with a SQLITE_THREADSAFE build that includes
    22     22   ** the SQLITE_SERVER option.
    23     23   */
    24     24   #if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE) && \
    25         -    defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
           25  +    defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
    26     26   
    27     27   #include <stdlib.h>
    28     28   #include <string.h>
    29     29   #include <pthread.h>
    30     30   #include <sched.h>
    31     31   #include <ctype.h>
    32     32   
................................................................................
   716    716     for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){
   717    717       Tcl_CreateCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0);
   718    718     }
   719    719     return TCL_OK;
   720    720   }
   721    721   #else
   722    722   int Sqlitetest7_Init(Tcl_Interp *interp){ return TCL_OK; }
   723         -#endif /* OS_UNIX */
          723  +#endif /* SQLITE_OS_UNIX */

Changes to src/test_async.c.

     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   **
    13         -** $Id: test_async.c,v 1.44 2008/06/06 11:11:26 danielk1977 Exp $
           13  +** $Id: test_async.c,v 1.45 2008/06/26 10:41:19 danielk1977 Exp $
    14     14   **
    15     15   ** This file contains an example implementation of an asynchronous IO 
    16     16   ** backend for SQLite.
    17     17   **
    18     18   ** WHAT IS ASYNCHRONOUS I/O?
    19     19   **
    20     20   ** With asynchronous I/O, write requests are handled by a separate thread
................................................................................
   113    113   #endif
   114    114   #include <tcl.h>
   115    115   
   116    116   /*
   117    117   ** This test uses pthreads and hence only works on unix and with
   118    118   ** a threadsafe build of SQLite.
   119    119   */
   120         -#if OS_UNIX && SQLITE_THREADSAFE
          120  +#if SQLITE_OS_UNIX && SQLITE_THREADSAFE
   121    121   
   122    122   /*
   123    123   ** This demo uses pthreads.  If you do not have a pthreads implementation
   124    124   ** for your operating system, you will need to recode the threading 
   125    125   ** logic.
   126    126   */
   127    127   #include <pthread.h>
................................................................................
  1692   1692     }else{
  1693   1693       ASYNC_TRACE(("NO-WAIT\n"));
  1694   1694     }
  1695   1695     return TCL_OK;
  1696   1696   }
  1697   1697   
  1698   1698   
  1699         -#endif  /* OS_UNIX and SQLITE_THREADSAFE */
         1699  +#endif  /* SQLITE_OS_UNIX and SQLITE_THREADSAFE */
  1700   1700   
  1701   1701   /*
  1702   1702   ** This routine registers the custom TCL commands defined in this
  1703   1703   ** module.  This should be the only procedure visible from outside
  1704   1704   ** of this module.
  1705   1705   */
  1706   1706   int Sqlitetestasync_Init(Tcl_Interp *interp){
  1707         -#if OS_UNIX && SQLITE_THREADSAFE
         1707  +#if SQLITE_OS_UNIX && SQLITE_THREADSAFE
  1708   1708     Tcl_CreateObjCommand(interp,"sqlite3async_enable",testAsyncEnable,0,0);
  1709   1709     Tcl_CreateObjCommand(interp,"sqlite3async_halt",testAsyncHalt,0,0);
  1710   1710     Tcl_CreateObjCommand(interp,"sqlite3async_delay",testAsyncDelay,0,0);
  1711   1711     Tcl_CreateObjCommand(interp,"sqlite3async_start",testAsyncStart,0,0);
  1712   1712     Tcl_CreateObjCommand(interp,"sqlite3async_wait",testAsyncWait,0,0);
  1713   1713     Tcl_LinkVar(interp, "sqlite3async_trace",
  1714   1714         (char*)&sqlite3async_trace, TCL_LINK_INT);
  1715         -#endif  /* OS_UNIX and SQLITE_THREADSAFE */
         1715  +#endif  /* SQLITE_OS_UNIX and SQLITE_THREADSAFE */
  1716   1716     return TCL_OK;
  1717   1717   }

Changes to src/test_config.c.

    12     12   ** 
    13     13   ** This file contains code used for testing the SQLite system.
    14     14   ** None of the code in this file goes into a deliverable build.
    15     15   ** 
    16     16   ** The focus of this file is providing the TCL testing layer
    17     17   ** access to compile-time constants.
    18     18   **
    19         -** $Id: test_config.c,v 1.28 2008/06/25 14:57:54 danielk1977 Exp $
           19  +** $Id: test_config.c,v 1.29 2008/06/26 10:41:19 danielk1977 Exp $
    20     20   */
    21     21   
    22     22   #include "sqliteLimit.h"
    23     23   
    24     24   #include "sqliteInt.h"
    25     25   #include "tcl.h"
    26     26   #include <stdlib.h>
................................................................................
   179    179   
   180    180   #ifdef SQLITE_OMIT_CONFLICT_CLAUSE
   181    181     Tcl_SetVar2(interp, "sqlite_options", "conflict", "0", TCL_GLOBAL_ONLY);
   182    182   #else
   183    183     Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY);
   184    184   #endif
   185    185   
   186         -#if OS_UNIX
          186  +#if SQLITE_OS_UNIX
   187    187     Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL_GLOBAL_ONLY);
   188    188   #else
   189    189     Tcl_SetVar2(interp, "sqlite_options", "crashtest", "0", TCL_GLOBAL_ONLY);
   190    190   #endif
   191    191   
   192    192   #ifdef SQLITE_OMIT_DATETIME_FUNCS
   193    193     Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL_GLOBAL_ONLY);

Changes to src/test_server.c.

     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13         -** $Id: test_server.c,v 1.7 2008/05/16 04:51:55 danielk1977 Exp $
           13  +** $Id: test_server.c,v 1.8 2008/06/26 10:41:19 danielk1977 Exp $
    14     14   **
    15     15   ** This file contains demonstration code.  Nothing in this file gets compiled
    16     16   ** or linked into the SQLite library unless you use a non-standard option:
    17     17   **
    18     18   **      -DSQLITE_SERVER=1
    19     19   **
    20     20   ** The configure script will never generate a Makefile with the option
................................................................................
   204    204   #include "sqliteInt.h"
   205    205   
   206    206   /*
   207    207   ** Only compile the code in this file on UNIX with a SQLITE_THREADSAFE build
   208    208   ** and only if the SQLITE_SERVER macro is defined.
   209    209   */
   210    210   #if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE)
   211         -#if defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
          211  +#if defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
   212    212   
   213    213   /*
   214    214   ** We require only pthreads and the public interface of SQLite.
   215    215   */
   216    216   #include <pthread.h>
   217    217   #include "sqlite3.h"
   218    218   
................................................................................
   485    485   void sqlite3_server_stop(void){
   486    486     g.serverHalt = 1;
   487    487     pthread_cond_broadcast(&g.serverWakeup);
   488    488     pthread_mutex_lock(&g.serverMutex);
   489    489     pthread_mutex_unlock(&g.serverMutex);
   490    490   }
   491    491   
   492         -#endif /* defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE */
          492  +#endif /* defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE */
   493    493   #endif /* defined(SQLITE_SERVER) */

Changes to tool/omittest.tcl.

     1      1   
     2         -set rcsid {$Id: omittest.tcl,v 1.3 2007/09/14 16:20:01 danielk1977 Exp $}
            2  +set rcsid {$Id: omittest.tcl,v 1.4 2008/06/26 10:41:19 danielk1977 Exp $}
     3      3   
     4      4   # Documentation for this script. This may be output to stderr
     5      5   # if the script is invoked incorrectly.
     6      6   set ::USAGE_MESSAGE {
     7      7   This Tcl script is used to test the various compile time options 
     8      8   available for omitting code (the SQLITE_OMIT_xxx options). It
     9      9   should be invoked as follows:
................................................................................
    43     43   # when doing so. For example:
    44     44   #
    45     45   #     run_quick_test /tmp/testdir {SQLITE_OMIT_TRIGGER SQLITE_OMIT_VIEW}
    46     46   #
    47     47   #
    48     48   proc run_quick_test {dir omit_symbol_list} {
    49     49     # Compile the value of the OPTS Makefile variable.
    50         -  set opts "-DSQLITE_MEMDEBUG=2 -DSQLITE_DEBUG -DOS_UNIX" 
           50  +  set opts "-DSQLITE_MEMDEBUG=2 -DSQLITE_DEBUG -DSQLITE_OS_UNIX" 
    51     51     foreach sym $omit_symbol_list {
    52     52       append opts " -D${sym}=1"
    53     53     }
    54     54   
    55     55     # Create the directory and do the build. If an error occurs return
    56     56     # early without attempting to run the test suite.
    57     57     file mkdir $dir

Changes to tool/soak1.tcl.

    74     74     SQLITE_ENABLE_MEMORY_MANAGEMENT=1
    75     75     SQLITE_ENABLE_COLUMN_METADATA=1
    76     76     SQLITE_ENABLE_LOAD_EXTENSION=1 HAVE_DLOPEN=1
    77     77     SQLITE_ENABLE_MEMORY_MANAGEMENT=1
    78     78   }
    79     79   scenario 3 {Customer-1} {
    80     80     SQLITE_DEBUG=1 SQLITE_MEMDEBUG=1
    81         -  THREADSAFE=1 OS_UNIX=1
           81  +  THREADSAFE=1 SQLITE_OS_UNIX=1
    82     82     SQLITE_DISABLE_LFS=1
    83     83     SQLITE_DEFAULT_AUTOVACUUM=1
    84     84     SQLITE_DEFAULT_PAGE_SIZE=1024
    85     85     SQLITE_MAX_PAGE_SIZE=4096
    86     86     SQLITE_DEFAULT_CACHE_SIZE=64
    87     87     SQLITE_DEFAULT_TEMP_CACHE_SIZE=32
    88     88     TEMP_STORE=3
................................................................................
    89     89     SQLITE_OMIT_PROGRESS_CALLBACK=1
    90     90     SQLITE_OMIT_LOAD_EXTENSION=1
    91     91     SQLITE_OMIT_VIRTUALTABLE=1
    92     92     SQLITE_ENABLE_IOTRACE=1
    93     93   }
    94     94   scenario 4 {Small-Cache} {
    95     95     SQLITE_DEBUG=1 SQLITE_MEMDEBUG=1
    96         -  THREADSAFE=1 OS_UNIX=1
           96  +  THREADSAFE=1 SQLITE_OS_UNIX=1
    97     97     SQLITE_DEFAULT_AUTOVACUUM=1
    98     98     SQLITE_DEFAULT_PAGE_SIZE=1024
    99     99     SQLITE_MAX_PAGE_SIZE=2048
   100    100     SQLITE_DEFAULT_CACHE_SIZE=13
   101    101     SQLITE_DEFAULT_TEMP_CACHE_SIZE=11
   102    102     TEMP_STORE=1
   103    103   }