On Jun 26 15:34, Kai Tietz wrote:
> Hi Corinna,
> 
> 2012/6/26 Corinna Vinschen <[email protected]>:
> > Hi,
> >
> > for a start in supporting Cygwin, I created this patch.  It doesn't
> > error out just because _WIN32 is not defined and the new _cygwin.h file
> > (which will probably get a lot more to do later on) just makes sure that
> > _mingw.h does not define POSIX types.
> >
> > Additionally, I changed vadefs.h so that it doesn't test for _WIN32
> > at all.  After all, it includes _mingw.h which runs this test anyway.
> >
> >
> > Hope that's ok,
> > Corinna
> > [...]
> > Index: mingw-w64-headers/crt/_mingw.h.in
> > ===================================================================
> > --- mingw-w64-headers/crt/_mingw.h.in   (revision 5132)
> > +++ mingw-w64-headers/crt/_mingw.h.in   (working copy)
> > @@ -12,6 +12,11 @@
> >  #include "_mingw_mac.h"
> >  #include "_mingw_secapi.h"
> >
> > +/* Include _cygwin.h if we're building a Cygwin application. */
> > +#ifdef __CYGWIN__
> > +#include "_cygwin.h"
> > +#endif
> > +
> >  /* C/C++ specific language defines.  */
> >  #ifdef _WIN64
> >  #ifdef __stdcall
> > @@ -242,7 +247,7 @@
> >  #endif /* __cplusplus */
> >  #endif /* __GNUC__ */
> >
> > -#ifndef _WIN32
> > +#if !defined(_WIN32) && !defined(__CYGWIN__)
> >  #error Only Win32 target is supported!
> >  #endif
> 
> Patch is ok.  Just one question, about _cygwin.h header.  Shouldn't
> this header simply check for definition of __CYGWIN___ as guard?  So
> later one we don't need to guard include of _cygwin.h in _mingw.h
> header?

Matter of taste, I guess.  Personally I'd prefer to see the
#ifdef __CYGWIN__ and the preceeding comment in _mingw.h so it's
crystal-clear for the observer of that file that the _cygwin.h header
is not an essential requirement for non-Cygwin targets.


Corinna

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to