diff options
author | drh <drh@noemail.net> | 2010-07-12 16:47:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-07-12 16:47:48 +0000 |
commit | 3a0f13ff839487759799f8ce993aefb1db42c641 (patch) | |
tree | 9b5318dc01ab10f9cffde909498474b194eb15cd /src/tclsqlite.c | |
parent | d846c5e047e39fc7b4fe653e5e62523c1b2c81ac (diff) | |
download | sqlite-3a0f13ff839487759799f8ce993aefb1db42c641.tar.gz sqlite-3a0f13ff839487759799f8ce993aefb1db42c641.zip |
Fix makefiles so that they build sqlite3_analyzer again. Tweaks to comments
in test_stat.c. Fix tclsqlite.c to build the sqlite3_analyzer again.
FossilOrigin-Name: e6cd15451d8c47bfc86d07565655920134b494fe
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 23b7e8e84..a2d352c3b 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -3488,6 +3488,11 @@ static char zMainloop[] = "}\n" ; #endif +#if TCLSH==2 +static char zMainloop[] = +#include "spaceanal_tcl.h" +; +#endif #ifdef SQLITE_TEST static void init_all(Tcl_Interp *); @@ -3609,6 +3614,9 @@ int TCLSH_MAIN(int argc, char **argv){ ** sqlite3_initialize() is. */ sqlite3_shutdown(); +#if TCLSH==2 + sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); +#endif Tcl_FindExecutable(argv[0]); interp = Tcl_CreateInterp(); @@ -3624,14 +3632,14 @@ int TCLSH_MAIN(int argc, char **argv){ Tcl_SetVar(interp, "argv", argv[i], TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT | TCL_APPEND_VALUE); } - if( Tcl_EvalFile(interp, argv[1])!=TCL_OK ){ + if( TCLSH==1 && Tcl_EvalFile(interp, argv[1])!=TCL_OK ){ const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp); fprintf(stderr,"%s: %s\n", *argv, zInfo); return 1; } } - if( argc<=1 ){ + if( TCLSH==2 || argc<=1 ){ Tcl_GlobalEval(interp, zMainloop); } return 0; |