|
![](/i/fill.gif) |
Ken Cecka <cec### [at] alumni washington edu> writes:
> That's pretty wierd! Not really familiar with IRIX, but I though it was
> standard for signal handlers to be called with an integer parameter - maybe
> they just have their protypes mixed up. You could try explicit casting to
> make the compiler happy:
>
> signal(SIGTERM, ((void (*)()) UNIX_Abort_Handler);
>
> ...although no promises on whether the signal handling will behave as
> expected.
>
> Ken
From the IRIX signal(2) manpage
C:
void (*signal (int sig, void (*func)()))();
C++:
void (*signal (int sig, void (*func)(int)))(int);
#if _XOPEN_SOURCE
void (*signal (int sig, void (*func)(int)))(int);
#endif
So it looks like an additional test in the configure script and
setting _XOPEN_SOURCE should get the right proto. Not that I've
tested this nor checked with other things _XOPEN_SOURCE affects.
Alternatively...
#define _BSD_SIGNALS or _BSD_COMPAT before including <signal.h>
and you get the slightly different and non-SYSV-compatible BSD proto:
int (*signal(int sig, int (*func)(int, ...)))(int, ...);
Rohan
Post a reply to this message
|
![](/i/fill.gif) |