64 bit Cygwin target and _WIN64

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

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

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"?  Instead, 
this should be __CYGWIN__ && __x86_64__, just like other platforms have 
separate defines for OS and architecture.

> 4. Let the Cygwin 64 bit gcc define _WIN64 by default.

No way, for the same reason we don't define _WIN32.


More information about the Cygwin-developers mailing list