]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Revise the amalgamation tool to allow 'duplicate' include files to be retained manual... cygwinTempPath
authormistachkin <mistachkin@noemail.net>
Sat, 31 Aug 2013 18:06:52 +0000 (18:06 +0000)
committermistachkin <mistachkin@noemail.net>
Sat, 31 Aug 2013 18:06:52 +0000 (18:06 +0000)
FossilOrigin-Name: aa48284637b954d63bcf77e19b25e75c7ad1a6d3

manifest
manifest.uuid
src/os_win.c
tool/mksqlite3c.tcl

index c62353483bb7ff621c2afcd39407e238223109f9..8d15520f4c8651b59c2b0da27b7c395ba5729128 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Enhancements\sto\sthe\sWin32\sAPI\sdefinition\smacros.
-D 2013-08-31T17:01:56.739
+C Revise\sthe\samalgamation\stool\sto\sallow\s'duplicate'\sinclude\sfiles\sto\sbe\sretained\smanually\swhile\sstill\spreserving\sthe\sexisting\sline\snumbers.
+D 2013-08-31T18:06:52.923
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -203,7 +203,7 @@ F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be
 F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
 F src/os_unix.c 243fb37f47dc072fc59839ea241ff0a17c8d76e6
-F src/os_win.c 896581ee5a2ad261c3410fc84cfb0639ef2a1d56
+F src/os_win.c bb592dfb850e4ee3e4caecce461dca74dc40936d
 F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8
 F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c
 F src/parse.y 27c6b4138497d6f8360ba7847da6ed48033f957f
@@ -1079,7 +1079,7 @@ F tool/mkkeywordhash.c bb52064aa614e1426445e4b2b9b00eeecd23cc79
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
 F tool/mksqlite3c-noext.tcl 8bce31074e4cbe631bb7676526a048335f4c9f02
-F tool/mksqlite3c.tcl d8d51141424a0227aecfd7bd07a92304a946b8b2
+F tool/mksqlite3c.tcl d344cc3144a0271cd853c5e3df36e9f31d78d619
 F tool/mksqlite3h.tcl ba24038056f51fde07c0079c41885ab85e2cff12
 F tool/mksqlite3internalh.tcl 3dca7bb5374cee003379b8cbac73714f610ef795
 F tool/mkvsix.tcl 0be7f7a591f1e83f9199cb82911b66668ca484c9
@@ -1109,7 +1109,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 2fca6d784b000fd3a4d6890e38a0b087767f3a7f
-R 81d5e6e46adbe46f943b02ea53b00aff
+P b1811baab6e35ecb1ba920a7ed3302997758d309
+R c09e9aaa82ece462d9ada3bc7aee07de
 U mistachkin
-Z 8550f042a6eaddfa936a0e87c6856786
+Z 9761d739f96263a417653d62e6565ea2
index 64c97df68b07bd2226112f47ac7f6967c35379b3..f86d289b7db05136dd71e483dc8a296a5dd28431 100644 (file)
@@ -1 +1 @@
-b1811baab6e35ecb1ba920a7ed3302997758d309
\ No newline at end of file
+aa48284637b954d63bcf77e19b25e75c7ad1a6d3
\ No newline at end of file
index 34b5834eb8c2869735ffb156d67ba2d51ee5b38b..72d6e8ba5c6c59eb13387818efbbbde73481e62e 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifdef __CYGWIN__
 # include <sys/cygwin.h>
-# include <errno.h>
+# include <errno.h> /* amalgamator: keep */
 #endif
 
 /*
@@ -4020,6 +4020,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
        "/var/tmp",
        "/usr/tmp",
        "/tmp",
+       ".",
        0        /* List terminator */
     };
     unsigned int i;
index 8826f25b77cc8528aa55edceaa74a1cae731aee4..343f606cfec79e156e26f1fec1dadd92d519d755 100644 (file)
@@ -140,7 +140,7 @@ proc section_comment {text} {
 # process them appropriately.
 #
 proc copy_file {filename} {
-  global available_hdr out addstatic linemacros
+  global seen_hdr available_hdr out addstatic linemacros
   set ln 0
   set tail [file tail $filename]
   section_comment "Begin file $tail"
@@ -166,12 +166,17 @@ proc copy_file {filename} {
           section_comment "Continuing where we left off in $tail"
           if {$linemacros} {puts $out "#line [expr {$ln+1}] \"$filename\""}
         }
-      } else {
-        set suffix [string toupper [string map [list / _ . _] $hdr]]
-        puts $out "#ifndef SQLITE_HEADER_$suffix"
-        puts $out "#define SQLITE_HEADER_$suffix"
+      } elseif {![info exists seen_hdr($hdr)]} {
+        set seen_hdr($hdr) 1
+        puts $out $line
+      } elseif {[regexp {/\*\s+amalgamator:\s+keep\s+\*/} $line]} {
+        # This include file must be kept because there was a "keep"
+        # directive inside of a line comment.
         puts $out $line
-        puts $out "#endif"
+      } else {
+        # Comment out the entire line, replacing any nested comment
+        # begin/end markers with the harmless substring "**".
+        puts $out "/* [string map [list /* ** */ **] $line] */"
       }
     } elseif {[regexp {^#ifdef __cplusplus} $line]} {
       puts $out "#if 0"