64 bit Cygwin target and _WIN64

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Wed Jul 18 20:11:00 GMT 2012

On 2012-07-18 06:47, Corinna Vinschen wrote:
> On Jul 18 06:17, Yaakov (Cygwin/X) wrote:
>> On 2012-07-18 06:03, Corinna Vinschen wrote:
>>> 1. Replace all
>>>      #ifdef _WIN64
>>>     with
>>>      #if defined (_WIN64) || defined (__CYGWIN64__)
>> Can't that just be #ifdef __x86_64__?
> Nope.  Think Itanium.

Oh, right, I forgot about Itanium.  Hmm, I wonder why? :-)

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

BTW, __CYGWIN32__ will still be defined on x64, right?

>>> 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?

AFAICS 3 is the status quo; iff you #include <windows.h>, you get _WIN32 
(and have to deal with the consequences), otherwise not.  That's worked 
pretty well so far, so let's stick with it.


More information about the Cygwin-developers mailing list