The signal handlers in unix.c seem to be written in BSD-style using
`sigcontext' which is only available when you compile with /usr/ucb/cc
in Solaris (which compiles against the ucb compatibility includes and
libraries).
I rewrote this code for SVR4 sigaction-style handlers and for want of
anything better used #ifdef SVR4 around this code:
*** unix.c Thu Feb 25 14:32:00 1999
--- /tmp/scsh-0.5.1/unix.c Wed Apr 9 05:06:06 1997
***************
*** 117,130 ****
static RETSIGTYPE
when_keyboard_interrupt(sig, code, scp)
- #ifdef SVR4
- int sig;
- siginfo_t *code;
- void *scp;
- #else
int sig, code;
struct sigcontext *scp;
- #endif
{
Spending_interruptsS |= (1 << INTERRUPT_KEYBOARD);
/* The following might be necessary with signal(), but shouldn't be
--- 117,124 ----
***************
*** 135,148 ****
static RETSIGTYPE
when_alarm_interrupt(sig, code, scp)
- #ifdef SVR4
- int sig;
- siginfo_t *code;
- void *scp;
- #else
int sig, code;
struct sigcontext *scp;
- #endif
{
Spending_interruptsS |= (1 << INTERRUPT_ALARM);
return;
--- 129,136 ----
***************
*** 150,163 ****
static RETSIGTYPE
when_pipe_interrupt(sig, code, scp)
- #ifdef SVR4
- int sig;
- siginfo_t *code;
- void *scp;
- #else
int sig, code;
struct sigcontext *scp;
- #endif
{
return;
}
--- 138,145 ----
***************
*** 171,192 ****
void
sysdep_init()
{
- #ifdef SVR4
- keyboard_action.sa_sigaction = when_keyboard_interrupt;
- keyboard_action.sa_flags = SA_SIGINFO;
- #else
keyboard_action.sa_handler = when_keyboard_interrupt;
keyboard_action.sa_flags = 0;
- #endif
sigemptyset(&keyboard_action.sa_mask);
- #ifdef SVR4
- alarm_action.sa_sigaction = when_alarm_interrupt;
- alarm_action.sa_flags = SA_SIGINFO;
- #else
alarm_action.sa_handler = when_alarm_interrupt;
alarm_action.sa_flags = 0;
- #endif
sigemptyset(&alarm_action.sa_mask);
sigaction(SIGINT, &keyboard_action, NULL);
--- 153,164 ----
|