allow compilation with tcl under windows
This commit is contained in:
parent
2c9e21a9c2
commit
4b10166e80
|
|
@ -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
|
2008-09-09 Lionel Sainte Cluque
|
||||||
* configure.in: tclspice checks moved before Operating System checks: To set
|
* configure.in: tclspice checks moved before Operating System checks: To set
|
||||||
no_x flag before it is used.
|
no_x flag before it is used.
|
||||||
|
|
|
||||||
|
|
@ -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` \
|
`ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \
|
||||||
/usr/local/tcl \
|
/usr/local/tcl \
|
||||||
/usr/local \
|
/usr/local \
|
||||||
/usr
|
/usr \
|
||||||
|
/mingw
|
||||||
do
|
do
|
||||||
if test -r "$dir/tclConfig.sh" ; then
|
if test -r "$dir/tclConfig.sh" ; then
|
||||||
tcl_config_sh="$dir/tclConfig.sh"
|
tcl_config_sh="$dir/tclConfig.sh"
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ typedef pthread_t threadId_t;
|
||||||
#endif /* HAVE_STRING_H */
|
#endif /* HAVE_STRING_H */
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
/* remove type incompatibility with winnt.h*/
|
||||||
|
#undef BOOLEAN
|
||||||
#include <windef.h>
|
#include <windef.h>
|
||||||
#include <winbase.h> /* Sleep */
|
#include <winbase.h> /* Sleep */
|
||||||
#ifndef srandom
|
#ifndef srandom
|
||||||
|
|
@ -89,7 +91,7 @@ typedef pthread_t threadId_t;
|
||||||
typedef void (*sighandler)(int);
|
typedef void (*sighandler)(int);
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
extern sigjmp_buf jbuf;
|
extern JMP_BUF jbuf;
|
||||||
|
|
||||||
/*Included for the module to access data*/
|
/*Included for the module to access data*/
|
||||||
#include <dvec.h>
|
#include <dvec.h>
|
||||||
|
|
@ -635,7 +637,7 @@ static int _run(int argc,char **argv){
|
||||||
|
|
||||||
/* Catch Ctrl-C to break simulations */
|
/* Catch Ctrl-C to break simulations */
|
||||||
oldHandler = signal(SIGINT,ft_sigintr);
|
oldHandler = signal(SIGINT,ft_sigintr);
|
||||||
if(sigsetjmp(jbuf, 1)!=0) {
|
if(SETJMP(jbuf, 1)!=0) {
|
||||||
signal(SIGINT,oldHandler);
|
signal(SIGINT,oldHandler);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -2141,7 +2143,7 @@ int Spice_Init(Tcl_Interp *interp) {
|
||||||
/* Read the user config files */
|
/* Read the user config files */
|
||||||
/* To catch interrupts during .spiceinit... */
|
/* To catch interrupts during .spiceinit... */
|
||||||
old_sigint = signal(SIGINT, ft_sigintr);
|
old_sigint = signal(SIGINT, ft_sigintr);
|
||||||
if (sigsetjmp(jbuf, 1) == 1) {
|
if (SETJMP(jbuf, 1) == 1) {
|
||||||
fprintf(cp_err, "Warning: error executing .spiceinit.\n");
|
fprintf(cp_err, "Warning: error executing .spiceinit.\n");
|
||||||
goto bot;
|
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, ...)
|
int tcl_printf(const char *format, ...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue