64 bit Cygwin target and _WIN64

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jul 18 13:08:00 GMT 2012

On Jul 18 14:55, Corinna Vinschen wrote:
> On Jul 18 08:36, Earnie Boyd wrote:
> > On Wed, Jul 18, 2012 at 7:03 AM, Corinna Vinschen wrote:
> > > Consequentially, projects for which testing for _WIN64 is an important
> > > design choice are windows-centric anyway and probably no serious target
> > > for a Cygwin port.
> > >
> > 
> > Maybe not always though.  As _WIN64 specifics begin to creep into
> > those now supporting _WIN32.
> Thing is, an application which calls two different Windows functions
> depending on _WIN64 needs the _WIN64 define anyway when building its
> code.  So, if we define _WIN64 from within the Windows headers, we
> might even help the project along.
> On the other hand, an application which provides Windows and POSIX
> functions will test for _WIN32 with a high probability:
> #ifdef _WIN32
> #ifdef _WIN64
> call foo_win64
> #else
> call foo_win32
> #endif
> #else
> call foo_posix
> #endif
> And since Cygwin doesn't provide _WIN32, we will be default still not
> call the Windows functions, even on 64 bit with _WIN64 defined if a
> WIndows header is included.

...and apart from that, the inclusion of the Windows header itself
will be bound to the definition of _WIN32 as well, so there's only
a low chance that _WIN64 is defined accidentally.


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