diff options
author | drh <drh@noemail.net> | 2013-08-19 12:49:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-08-19 12:49:06 +0000 |
commit | db78b96111f93c7b183744c76f687ad84e14c567 (patch) | |
tree | 455cba36272a9eaede190e1c5257bd0fb7d27cf3 /src/tclsqlite.c | |
parent | 700a7fdf833ce71ee46da1292f96e82afa2dd2f2 (diff) | |
parent | 77dfd5bb447381a23791abb35569d39046281f59 (diff) | |
download | sqlite-db78b96111f93c7b183744c76f687ad84e14c567.tar.gz sqlite-db78b96111f93c7b183744c76f687ad84e14c567.zip |
Merge in all the latest updates and enhancements from trunk.
FossilOrigin-Name: 67587a3348b84424b2ab1f2df1ea923a5168e2e4
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 78a03083b..322f84986 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -41,6 +41,18 @@ #endif #include <ctype.h> +/* Used to get the current process ID */ +#if !defined(_WIN32) +# include <unistd.h> +# define GETPID getpid +#elif !defined(_WIN32_WCE) +# ifndef SQLITE_AMALGAMATION +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +# endif +# define GETPID (int)GetCurrentProcessId +#endif + /* * Windows needs to know which symbols to export. Unix does not. * BUILD_sqlite should be undefined for Unix. @@ -3898,7 +3910,16 @@ static void init_all(Tcl_Interp *interp){ #define TCLSH_MAIN main /* Needed to fake out mktclapp */ int TCLSH_MAIN(int argc, char **argv){ Tcl_Interp *interp; - + +#if !defined(_WIN32_WCE) + if( getenv("BREAK") ){ + fprintf(stderr, + "attach debugger to process %d and press any key to continue.\n", + GETPID()); + fgetc(stdin); + } +#endif + /* Call sqlite3_shutdown() once before doing anything else. This is to ** test that sqlite3_shutdown() can be safely called by a process before ** sqlite3_initialize() is. */ |