[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? -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature