From ad6bbb5071eb4ac00e91e358ded85eeca87f030a Mon Sep 17 00:00:00 2001 From: Fergus Henderson Date: Sun, 24 May 1998 06:46:01 +0000 Subject: [PATCH] Commit Hans Boehm's modifications to my previous fix: Estimated hours taken: 0.25 boehm_gc/os_dep.c: Commit Hans Boehm's modifications to my previous fix: my fix did the right thing for Irix 5.x, but with Hans's modifications it now also does the right thing for Irix 6.x. --- boehm_gc/os_dep.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/boehm_gc/os_dep.c b/boehm_gc/os_dep.c index a8c64e4fb..75f89b58b 100644 --- a/boehm_gc/os_dep.c +++ b/boehm_gc/os_dep.c @@ -1652,14 +1652,16 @@ void GC_dirty_init() # else sigaction(SIGSEGV, &act, &oldact); # endif -# ifdef IRIX5 +# if defined(_sigargs) + /* This is Irix 5.x, not 6.x. Irix 5.x does not have */ + /* sa_sigaction. */ + GC_old_segv_handler = oldact.sa_handler; +# else /* Irix 6.x or SUNOS5SIGS */ + if (oldact.sa_flags & SA_SIGINFO) { + GC_old_segv_handler = (SIG_PF)(oldact.sa_sigaction); + } else { GC_old_segv_handler = oldact.sa_handler; -# else - if (oldact.sa_flags & SA_SIGINFO) { - GC_old_segv_handler = (SIG_PF)(oldact.sa_sigaction); - } else { - GC_old_segv_handler = oldact.sa_handler; - } + } # endif if (GC_old_segv_handler == SIG_IGN) { GC_err_printf0("Previously ignored segmentation violation!?");