On 07/30/2014 10:22 PM, Eric Blake wrote: > On 07/30/2014 09:53 PM, Eric Blake wrote: > >> >> Meanwhile, './gnulib-tool --test stdnoreturn' is failing on cygwin, so
> > Looks like the cygwin headers are broken for misusing 'noreturn' instead > of __noreturn__ inside __attribute__; something that is easier to patch > in cygwin than work around in gnulib. I wonder if gnulib could work around this failure by having the replacement <stdnoreturn.h> do a #include of all broken headers prior to an #include_next of the real <stdnoreturn.h>; except that <stdnoreturn.h> only needs to define macros, and the gnulib code for probing how to do include_next depends on the system header having non-comment non-macro contents (so that the preprocessor output is not entirely elided). Anyways, determining the set of broken headers seems like a lot of work; it may be just simpler to do a configure probe whether any headers appear to be broken, and have <stdnoreturn.h> behave like it does for MSVC (that is, be a no-op with no definition of 'noreturn' because the system headers are buggy). I'll probably prepare a gnulib patch along these lines, because it may be a while before the next cygwin release that includes my patches for the broken headers. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature