64 bit Cygwin target and _WIN64

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jul 18 11:47:00 GMT 2012


On Jul 18 06:17, Yaakov (Cygwin/X) wrote:
> On 2012-07-18 06:03, Corinna Vinschen wrote:
> >Now comes the time for _WIN64.  _WIN64 is used a *LOT* inside of the
> >Mingw64 headers to distinguish type definitions which differ from the
> >32 bit version, or to declare functions which only exist on 64 bit
> >machines, stuff like that.
> >
> >There are a couple of ways to help us along with this problem:
> >
> >1. Replace all
> >
> >     #ifdef _WIN64
> >
> >    with
> >
> >     #if defined (_WIN64) || defined (__CYGWIN64__)
> 
> Can't that just be #ifdef __x86_64__?

Nope.  Think Itanium.

> Also, I would suggest avoiding __CYGWIN64__:  IIRC we used to use
> __CYGWIN32__ until M$ trademarked "Win32", leaving us with just
> __CYGWIN__;  what happens if they decide to trademark "Win64"?

I don't see the issue here.  Cygwin is also a trademark and 32 bitg
gcc still defines __CYGWIN32__.  We just discouraged the use of it.
I think the __CYGWIN__ and __CYGWIN32__ defines on 32 bit and the
__CYGWIN__ and __CYGWIN64__ defines on a 64 bit system make sense
and are an easy way to distinguish the platforms.

> >4. Let the Cygwin 64 bit gcc define _WIN64 by default.
> 
> No way, for the same reason we don't define _WIN32.

But what about 2 and 3?


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-developers mailing list