[WIP] mingw64 related changes to Cygwin configure and other assorted files with departed w32api/mingw

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Tue Nov 13 18:44:00 GMT 2012

On Tue, Nov 13, 2012 at 07:19:08PM +0100, Corinna Vinschen wrote:
>On Nov 13 12:39, Christopher Faylor wrote:
>> On Tue, Nov 13, 2012 at 10:33:01AM +0100, Corinna Vinschen wrote:
>> >I would also like to keep the ifndef/define brackets in
>> >the headers since
>> >
>> >  #ifndef _CYGWIN_IF_H_
>> >  #define _CYGWIN_IF_H_
>> >
>> >can be tested for in other headers while #pragma once can not.
>> I think that testing for "BLAH_DECLARED" for individual definitions is a
>> much better way to see if something is defined than relying on an
>> implementation detail like "_CYGWIN_IF_H".
>This might not be of much interest for the headers in the include/cygwin
>subdir, but there are applications out there which test for such header
>defines, and there are also applications using system-specific headers
>liberally.  Out of curiosity I had a look and none of the Linux/glibc
>headers seem to use #pragma once either for some reason.

I do see some '#pragma once's in my /usr/include tree but they don't
come from glibc.  Maybe it's a conscious decision not to use this or
maybe nobody could be bothered to make the change.  I don't see any
discussion in the libc-alpha mailing list about this but I only spent 10
seconds googling.

>An alternative might be something like
>  #pragma once
>  #define _CYGWIN_IF_H_
>It would introduce the new pragma and keep the definition available.

Yeah, that would work but you're still adding a define that shouldn't
really be used to the cygnosphere.


More information about the Cygwin-patches mailing list