Bugs item #427995, was updated on 2001-05-28 10:28
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=427995&group_id=10493
Category: build
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian D. Carlstrom (bdc)
Assigned to: Olin Shivers (olin-shivers)
Summary: BSD sigcontext vs SVR4 sigaction
Initial Comment:
from: Noel Hunt <noel@jpmorgan.com>
Sender: noel@jpmorgan.com
to: scsh-bugs@martigny.ai.mit.edu
subject: Build 0.5 on Solaris 2.6
Date: Thu, 25 Feb 1999 14:48:52 +0900
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 ----
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=427995&group_id=10493
|