diff --git a/ChangeLog b/ChangeLog index 002f442e2..ec5415179 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-13 Holger Vogt + * configure.in: add /mingw as search path for tcl + * tclspice.c: replace sigsetjump and sigjmp_buf with macros from macros.h + 2008-09-09 Lionel Sainte Cluque * configure.in: tclspice checks moved before Operating System checks: To set no_x flag before it is used. diff --git a/configure.in b/configure.in index 9abd525cd..84675a852 100644 --- a/configure.in +++ b/configure.in @@ -329,7 +329,8 @@ if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ /usr/local/tcl \ /usr/local \ - /usr + /usr \ + /mingw do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" diff --git a/src/tclspice.c b/src/tclspice.c index fcaf74d40..bce309395 100755 --- a/src/tclspice.c +++ b/src/tclspice.c @@ -54,6 +54,8 @@ typedef pthread_t threadId_t; #endif /* HAVE_STRING_H */ #ifdef __MINGW32__ #include + /* remove type incompatibility with winnt.h*/ + #undef BOOLEAN #include #include /* Sleep */ #ifndef srandom @@ -89,7 +91,7 @@ typedef pthread_t threadId_t; typedef void (*sighandler)(int); #include -extern sigjmp_buf jbuf; +extern JMP_BUF jbuf; /*Included for the module to access data*/ #include @@ -635,7 +637,7 @@ static int _run(int argc,char **argv){ /* Catch Ctrl-C to break simulations */ oldHandler = signal(SIGINT,ft_sigintr); - if(sigsetjmp(jbuf, 1)!=0) { + if(SETJMP(jbuf, 1)!=0) { signal(SIGINT,oldHandler); return TCL_OK; } @@ -2141,7 +2143,7 @@ int Spice_Init(Tcl_Interp *interp) { /* Read the user config files */ /* To catch interrupts during .spiceinit... */ old_sigint = signal(SIGINT, ft_sigintr); - if (sigsetjmp(jbuf, 1) == 1) { + if (SETJMP(jbuf, 1) == 1) { fprintf(cp_err, "Warning: error executing .spiceinit.\n"); goto bot; } @@ -2341,7 +2343,7 @@ int tcl_fprintf(FILE *f, const char *format, ...) } /*----------------------------------------------------------------------*/ -/* Reimplement fprintf() as a call to Tcl_Eval(). */ +/* Reimplement printf() as a call to Tcl_Eval(). */ /*----------------------------------------------------------------------*/ int tcl_printf(const char *format, ...)