[haiku-development] Re: sigaction:sa_sigaction

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 22 Aug 2012 22:12:27 +0200

Axel Dörfler wrote:
> Am 22.08.2012 13:23, schrieb François Revol:
> > When porting dtc, make tests fail currently due to this code:
> >
> > struct sigaction sa_int = {
> > .sa_sigaction = sigint_handler,
> > };
> >
> > It seems gcc4 doesn't like it due to the unnamed union in our sigaction
> > declaration...
> > or maybe it's just too old and I should update my dev partition, anyone
> > with a recent gcc who could test it?
> >
> > I can work around it but IIRC it's not the first time I stumble on this.
> 
> One possible work-around would be to introduce a struct sigaction that 
> does not use an unnamed union that could be set free on some definition.

Not sure I understand what you mean.

Linux (or rather the glibc) uses a named union and defines sa_handler and 
sa_sigaction as macros. Not particularly beautiful, but would be a solution.

CU, Ingo

Other related posts: