aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.c
diff options
context:
space:
mode:
authordrh <>2024-10-11 17:02:37 +0000
committerdrh <>2024-10-11 17:02:37 +0000
commit17408fbbd85e970be0aeb42c0bf87e6dcb486059 (patch)
tree0326ab15d6174dd14ef378d33fb4587d1d14dd7e /src/tclsqlite.c
parentb23cce9a16a6b90fed2bd3e189fe4e9f2ff63b68 (diff)
downloadsqlite-17408fbbd85e970be0aeb42c0bf87e6dcb486059.tar.gz
sqlite-17408fbbd85e970be0aeb42c0bf87e6dcb486059.zip
An improved method for statically linking sqlite3_analyzer.exe using Tcl9.
Enable wildcard expansion of arguments to testfiture on Windows. FossilOrigin-Name: 9b87ea219bce5689a69efac31063b9b11928e59124c0d36194715ff7faa5129d
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r--src/tclsqlite.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 1fd214fe8..9ed666951 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -4037,6 +4037,20 @@ EXTERN int sqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp);}
static const char *tclsh_main_loop(void){
static const char zMainloop[] =
"if {[llength $argv]>=1} {\n"
+#ifdef WIN32
+ "set new [list]\n"
+ "foreach arg $argv {\n"
+ "if {[file exists $arg]} {\n"
+ "lappend new $arg\n"
+ "} else {\n"
+ "foreach match [lsort [glob -nocomplain $arg]] {\n"
+ "lappend new $match\n"
+ "}\n"
+ "}\n"
+ "}\n"
+ "set argv $new\n"
+ "unset new\n"
+#endif
"set argv0 [lindex $argv 0]\n"
"set argv [lrange $argv 1 end]\n"
"source $argv0\n"