[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sa_sigaction [was: snapshot in preparation for m4 1.4.12]

From: Eric Blake
Subject: sa_sigaction [was: snapshot in preparation for m4 1.4.12]
Date: Wed, 13 Aug 2008 20:14:43 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080708 Thunderbird/ Mnenhy/

According to Tom G. Christensen on 8/13/2008 2:45 PM:
Weird.  So Irix 5.3 has sigaction, but not sa_sigaction?  Can you please
post the definition of struct sigaction from <signal.h>?

From <sys/signal.h>:
typedef struct sigaction {
        int sa_flags;                   /* see below for values         */
        __sigret_t (*sa_handler)(_sigargs);     /* SIG_DFL, SIG_IGN, or *fn */
        sigset_t sa_mask;               /* additional set of sigs to be */
                                        /* blocked during handler execution */
        int sa_resv[2];
} sigaction_t;

Let's try resolving this one first. Does this program compile successfully (although it probably issues a warning)?

#include <signal.h>
#define sa_sigaction sa_handler

static void
handler (int i, siginfo_t *s, void *v)

int main()
  struct sigaction sa;
  sa.sa_sigaction = handler;
  sa.sa_flags = SA_SIGINFO;
  return 0;

If so, then we only need to adjust the docs (the presence of SA_SIGINFO is no longer a reliable flag for having sa_sigaction), and use HAVE_STRUCT_SIGACTION_SA_SIGACTION in signal.h.in. Everywhere except c-stack.c only cares about the name resolving for compilation to work, without actually trying to use it, and c-stack can easily be taught to avoid SA_SIGINFO if sa_sigaction doesn't work, and compiler warnings can be ignored. If not, then there is more work to do, but I think it is still possible.

Then, since your latest logs show:
libsigsegv: mips-sgi-irix5.3 | yes | yes | 2.5
it looks like c-stack will work with libsigsegv, once we downgrade the compiler error on sa_sigaction to a warning.

Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]