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

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Nov 13 18:19:00 GMT 2012


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".

Sure.

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.

An alternative might be something like

  #pragma once
  #define _CYGWIN_IF_H_

It would introduce the new pragma and keep the definition available.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-patches mailing list