diff options
Diffstat (limited to 'Parser/intrcheck.c')
-rw-r--r-- | Parser/intrcheck.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c index 5278d76..34a3425 100644 --- a/Parser/intrcheck.c +++ b/Parser/intrcheck.c @@ -30,17 +30,17 @@ int Py_AddPendingCall(int (*func)(ANY *), ANY *arg); #include <io.h> void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { _wyield(); } @@ -66,18 +66,18 @@ PyOS_InterruptOccurred() #include <go32.h> void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { _go32_want_ctrl_break(1 /* TRUE */); } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { return _go32_was_ctrl_break_hit(); } @@ -87,17 +87,17 @@ PyOS_InterruptOccurred() /* This might work for MS-DOS (untested though): */ void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { int interrupted = 0; while (kbhit()) { @@ -136,21 +136,21 @@ PyOS_InterruptOccurred() static int interrupted; void -PyErr_SetInterrupt() +PyErr_SetInterrupt(void) { interrupted = 1; } -extern int PyErr_CheckSignals(); +extern int PyErr_CheckSignals(void); + +static int +checksignals_witharg(void * arg) +{ + return PyErr_CheckSignals(); +} -/* ARGSUSED */ static RETSIGTYPE -#if defined(_M_IX86) && !defined(__QNX__) -intcatcher(int sig) /* So the C compiler shuts up */ -#else /* _M_IX86 */ -intcatcher(sig) - int sig; /* Not used by required by interface */ -#endif /* _M_IX86 */ +intcatcher(int sig) { extern void Py_Exit(int); static char message[] = @@ -167,13 +167,13 @@ intcatcher(sig) break; } signal(SIGINT, intcatcher); - Py_AddPendingCall(PyErr_CheckSignals, NULL); + Py_AddPendingCall(checksignals_witharg, NULL); } -static RETSIGTYPE (*old_siginthandler)() = SIG_DFL; +static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; void -PyOS_InitInterrupts() +PyOS_InitInterrupts(void) { if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) signal(SIGINT, intcatcher); @@ -189,13 +189,13 @@ PyOS_InitInterrupts() } void -PyOS_FiniInterrupts() +PyOS_FiniInterrupts(void) { signal(SIGINT, old_siginthandler); } int -PyOS_InterruptOccurred() +PyOS_InterruptOccurred(void) { if (!interrupted) return 0; @@ -206,6 +206,6 @@ PyOS_InterruptOccurred() #endif /* !OK */ void -PyOS_AfterFork() +PyOS_AfterFork(void) { } |