diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 18:27:25 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 18:27:25 +0000 |
commit | 997e22224e1062a4cd39373057a68879a1d7a3ac (patch) | |
tree | a90a9ce4272fc78f2459b1b2c78b52a3f6d4e5d3 /third_party/sqlite/tool/mksqlite3c.tcl | |
parent | 0d683c611a18dc6ea0e99f38c73b4fb96611041f (diff) | |
download | chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.zip chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.gz chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.bz2 |
Update sqlite to version 3.6.18, porting our patches.
Hopefully this will help to address some valgrind issues.
BUG=none
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/tool/mksqlite3c.tcl')
-rwxr-xr-x | third_party/sqlite/tool/mksqlite3c.tcl | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/third_party/sqlite/tool/mksqlite3c.tcl b/third_party/sqlite/tool/mksqlite3c.tcl index 98aede2..5a66e04 100755 --- a/third_party/sqlite/tool/mksqlite3c.tcl +++ b/third_party/sqlite/tool/mksqlite3c.tcl @@ -22,9 +22,9 @@ # The amalgamated SQLite code will be written into sqlite3.c # -# Begin by reading the "sqlite3.h" header file. Count the number of lines -# in this file and extract the version number. That information will be -# needed in order to generate the header of the amalgamation. +# Begin by reading the "sqlite3.h" header file. Extract the version number +# from in this file. The versioon number is needed to generate the header +# comment of the amalgamation. # if {[lsearch $argv --nostatic]>=0} { set addstatic 0 @@ -60,12 +60,12 @@ puts $out [subst \ ** This file is all you need to compile SQLite. To use SQLite in other ** programs, you need this file and the "sqlite3.h" header file that defines ** the programming interface to the SQLite library. (If you do not have -** the "sqlite3.h" header file at hand, you will find a copy in the first -** $cnt lines past this header comment.) Additional code files may be -** needed if you want a wrapper to interface SQLite with your choice of -** programming language. The code for the "sqlite3" command-line shell -** is also in a separate file. This file contains only code for the core -** SQLite library. +** the "sqlite3.h" header file at hand, you will find a copy embedded within +** the text of this file. Search for "Begin file sqlite3.h" to find the start +** of the embedded sqlite3.h header file.) Additional code files may be needed +** if you want a wrapper to interface SQLite with your choice of programming +** language. The code for the "sqlite3" command-line shell is also in a +** separate file. This file contains only code for the core SQLite library. ** ** This amalgamation was generated on $today. */ @@ -89,6 +89,7 @@ foreach hdr { btree.h btreeInt.h fts3.h + fts3_expr.h fts3_hash.h fts3_tokenizer.h hash.h @@ -101,9 +102,11 @@ foreach hdr { os_os2.h pager.h parse.h + pcache.h rtree.h sqlite3ext.h sqlite3.h + sqliteicu.h sqliteInt.h sqliteLimit.h vdbe.h @@ -137,14 +140,14 @@ proc copy_file {filename} { section_comment "Begin file $tail" set in [open $filename r] set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+(sqlite3[_a-zA-Z0-9]+)(\[|;| =)} - set declpattern {[a-zA-Z][a-zA-Z_0-9 ]+ \*?(sqlite3[_a-zA-Z0-9]+)\(} + set declpattern {[a-zA-Z][a-zA-Z_0-9 ]+ \**(sqlite3[_a-zA-Z0-9]+)\(} if {[file extension $filename]==".h"} { set declpattern " *$declpattern" } set declpattern ^$declpattern while {![eof $in]} { set line [gets $in] - if {[regexp {^#\s*include\s+["<]([^">]+)[">]} $line all hdr]} { + if {[regexp {^\s*#\s*include\s+["<]([^">]+)[">]} $line all hdr]} { if {[info exists available_hdr($hdr)]} { if {$available_hdr($hdr)} { if {$hdr!="os_common.h" && $hdr!="hwtime.h"} { @@ -163,6 +166,7 @@ proc copy_file {filename} { } elseif {[regexp {^#line} $line]} { # Skip #line directives. } elseif {$addstatic && ![regexp {^(static|typedef)} $line]} { + regsub {^SQLITE_API } $line {} line if {[regexp $declpattern $line all funcname]} { # Add the SQLITE_PRIVATE or SQLITE_API keyword before functions. # so that linkage can be modified at compile-time. @@ -178,12 +182,17 @@ proc copy_file {filename} { regsub {^extern } $line {} line puts $out "SQLITE_PRIVATE $line" } else { + if {[regexp {const char sqlite3_version\[\];} $line]} { + set line {const char sqlite3_version[] = SQLITE_VERSION;} + } regsub {^SQLITE_EXTERN } $line {} line puts $out "SQLITE_API $line" } } elseif {[regexp {^(SQLITE_EXTERN )?void \(\*sqlite3IoTrace\)} $line]} { regsub {^SQLITE_EXTERN } $line {} line puts $out "SQLITE_PRIVATE $line" + } elseif {[regexp {^void \(\*sqlite3Os} $line]} { + puts $out "SQLITE_PRIVATE $line" } else { puts $out $line } @@ -209,12 +218,13 @@ foreach file { os.c fault.c + mem0.c mem1.c mem2.c mem3.c mem5.c - mem6.c mutex.c + mutex_noop.c mutex_os2.c mutex_unix.c mutex_w32.c @@ -231,19 +241,25 @@ foreach file { os_win.c bitvec.c + pcache.c + pcache1.c + rowset.c pager.c btmutex.c btree.c + backup.c - vdbefifo.c vdbemem.c vdbeaux.c vdbeapi.c vdbe.c vdbeblob.c journal.c + memjournal.c + walker.c + resolve.c expr.c alter.c analyze.c @@ -272,8 +288,10 @@ foreach file { complete.c main.c + notify.c fts3.c + fts3_expr.c fts3_hash.c fts3_porter.c fts3_tokenizer.c @@ -281,6 +299,7 @@ foreach file { rtree.c icu.c + fts3_icu.c } { copy_file tsrc/$file } |