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

Re: [MiNT] sa_sigaction issue



Paweł Góralski <nokturnal@nokturnal.pl> writes:

> The problem is that compiler complains that action struct doesn't have
> member 'sa_sigaction', so lines:

It's required by POSIX, but it also says: "The storage occupied by
sa_handler and sa_sigaction may overlap, and a conforming application
shall not use both simultaneously."

> if ( action.sa_handler == SIG_DFL && action.sa_sigaction ==
> (void*)SIG_DFL )
>
> and
> if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL )

The sa_sigaction field is only valid if the SA_SIGINFO flag is set, and
it never equals (void*)SIG_DFL in that case.

Complain loudly to the SDL people.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."