This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [RFC][patch] cygwin/singal.h is not compatible with -std=c89 or -std=c99
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 27 Nov 2006 10:17:59 -0500
- Subject: Re: [RFC][patch] cygwin/singal.h is not compatible with -std=c89 or -std=c99
- References: <4568655E.6030403@sh.cvut.cz> <20061127083341.GB8385@calimero.vinschen.de>
- Reply-to: cygwin-patches at cygwin dot com
On Mon, Nov 27, 2006 at 09:33:41AM +0100, Corinna Vinschen wrote:
>On Nov 25 16:46, V?clav Haisman wrote:
>> [FreeBSD]
>> struct sigaction {
>> union {
>> void (*__sa_handler)(int);
>> void (*__sa_sigaction)(int, struct __siginfo *, void *);
>> } __sigaction_u; /* signal handler */
>> int sa_flags; /* see signal options below */
>> sigset_t sa_mask; /* signal mask to apply */
>> };
>>
>> #define sa_handler __sigaction_u.__sa_handler
>>
>> So, the attached patch is the minimal patch [...]
>
>> struct sigaction
>> {
>> ! __extension__ union
>> {
>> _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
>> void (*sa_sigaction) ( int, siginfo_t *, void * );
>
>Thanks for the patch. Looking into this, I'd rather use the FreeBSD
>approach, which is similary used in Linux. Please try the below patch.
How about the alternative "Don't do that" approach? I think there are
other parts of the header files which won't work with -std=c89. I've
always been coding with the understanding that this is a GNU C environment.
I'm not sure that I am comfortable making a lot of accommodations for
a non GNU environment.
cgf