Index: third_party/sqlite/sqlite-src-3080704/tool/mksqlite3c-noext.tcl |
diff --git a/third_party/sqlite/sqlite-src-3070603/tool/mksqlite3c.tcl b/third_party/sqlite/sqlite-src-3080704/tool/mksqlite3c-noext.tcl |
similarity index 93% |
copy from third_party/sqlite/sqlite-src-3070603/tool/mksqlite3c.tcl |
copy to third_party/sqlite/sqlite-src-3080704/tool/mksqlite3c-noext.tcl |
index fa99f2df7b7a41fe70201bf5625873c63a02ec46..f54b347be140ed19f4728660e96ec2f122f32e10 100644 |
--- a/third_party/sqlite/sqlite-src-3070603/tool/mksqlite3c.tcl |
+++ b/third_party/sqlite/sqlite-src-3080704/tool/mksqlite3c-noext.tcl |
@@ -31,6 +31,11 @@ if {[lsearch $argv --nostatic]>=0} { |
} else { |
set addstatic 1 |
} |
+if {[lsearch $argv --linemacros]>=0} { |
+ set linemacros 1 |
+} else { |
+ set linemacros 0 |
+} |
set in [open tsrc/sqlite3.h] |
set cnt 0 |
set VERSION ????? |
@@ -46,6 +51,8 @@ close $in |
# of the file. |
# |
set out [open sqlite3.c w] |
+# Force the output to use unix line endings, even on Windows. |
+fconfigure $out -translation lf |
set today [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S UTC" -gmt 1] |
puts $out [subst \ |
{/****************************************************************************** |
@@ -86,22 +93,18 @@ if {$addstatic} { |
foreach hdr { |
btree.h |
btreeInt.h |
- fts3.h |
- fts3Int.h |
- fts3_hash.h |
- fts3_tokenizer.h |
hash.h |
hwtime.h |
keywordhash.h |
mutex.h |
opcodes.h |
os_common.h |
+ os_setup.h |
+ os_win.h |
os.h |
- os_os2.h |
pager.h |
parse.h |
pcache.h |
- rtree.h |
sqlite3ext.h |
sqlite3.h |
sqliteicu.h |
@@ -134,9 +137,11 @@ proc section_comment {text} { |
# process them approprately. |
# |
proc copy_file {filename} { |
- global seen_hdr available_hdr out addstatic |
+ global seen_hdr available_hdr out addstatic linemacros |
+ set ln 0 |
set tail [file tail $filename] |
section_comment "Begin file $tail" |
+ if {$linemacros} {puts $out "#line 1 \"$filename\""} |
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]+)\(} |
@@ -146,6 +151,7 @@ proc copy_file {filename} { |
set declpattern ^$declpattern |
while {![eof $in]} { |
set line [gets $in] |
+ incr ln |
if {[regexp {^\s*#\s*include\s+["<]([^">]+)[">]} $line all hdr]} { |
if {[info exists available_hdr($hdr)]} { |
if {$available_hdr($hdr)} { |
@@ -155,14 +161,17 @@ proc copy_file {filename} { |
section_comment "Include $hdr in the middle of $tail" |
copy_file tsrc/$hdr |
section_comment "Continuing where we left off in $tail" |
+ if {$linemacros} {puts $out "#line [expr {$ln+1}] \"$filename\""} |
} |
} elseif {![info exists seen_hdr($hdr)]} { |
set seen_hdr($hdr) 1 |
puts $out $line |
+ } else { |
+ puts $out "/* $line */" |
} |
} elseif {[regexp {^#ifdef __cplusplus} $line]} { |
puts $out "#if 0" |
- } elseif {[regexp {^#line} $line]} { |
+ } elseif {!$linemacros && [regexp {^#line} $line]} { |
# Skip #line directives. |
} elseif {$addstatic && ![regexp {^(static|typedef)} $line]} { |
regsub {^SQLITE_API } $line {} line |
@@ -225,18 +234,17 @@ foreach file { |
mem5.c |
mutex.c |
mutex_noop.c |
- mutex_os2.c |
mutex_unix.c |
mutex_w32.c |
malloc.c |
printf.c |
random.c |
+ threads.c |
utf.c |
util.c |
hash.c |
opcodes.c |
- os_os2.c |
os_unix.c |
os_win.c |
@@ -257,6 +265,7 @@ foreach file { |
vdbetrace.c |
vdbe.c |
vdbeblob.c |
+ vdbesort.c |
journal.c |
memjournal.c |
@@ -292,20 +301,6 @@ foreach file { |
main.c |
notify.c |
- |
- fts3.c |
- fts3_aux.c |
- fts3_expr.c |
- fts3_hash.c |
- fts3_porter.c |
- fts3_tokenizer.c |
- fts3_tokenizer1.c |
- fts3_write.c |
- fts3_snippet.c |
- |
- rtree.c |
- icu.c |
- fts3_icu.c |
} { |
copy_file tsrc/$file |
} |