| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <4BD5E165.6070907@gmail.com> |
| Date: | Mon, 26 Apr 2010 19:54:29 +0100 |
| From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
| User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Cygwin's GCC doesn't like this .sa_handler initialization for some reason |
| References: | <20100425113232 DOT GA11541 AT sbox> <4BD5C311 DOT 2060708 AT redhat DOT com> |
| In-Reply-To: | <4BD5C311.2060708@redhat.com> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 26/04/2010 17:45, Eric Blake wrote:
> [this was originally raised on the libvirt list]
>
> On 04/25/2010 05:32 AM, Matthias Bolte wrote:
>> + struct sigaction action_stop;
>>
>> - struct sigaction action_stop = {
>> - .sa_handler = stop
>> - };
>> + memset(&action_stop, 0, sizeof action_stop);
>> +
>> + action_stop.sa_handler = stop;
>
> This is because on Linux, sa_handler is a macro that expands into an
> access of a named member of a named union, whereas on cygwin, sa_handler
> is a directly named member of an anonymous union. Is this a gcc bug, or
> should we be changing cygwin/signal.h to follow Linux' lead of using
> macros to access named unions to allow source compatibility, since gcc
> falls flat at performing named initialization of a member of gcc's
> extension of an anonymous union?
This is the long-standing PR10676 :-(
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
Given the rate of progress so far, I reckon we should adopt Linux'
workaround. Hopefully we'll be able to take it back out again someday.
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |