64 bit Cygwin target and _WIN64
Charles Wilson
cygwin@cwilson.fastmail.fm
Thu Jul 19 06:33:00 GMT 2012
On 7/18/2012 7:03 AM, Corinna Vinschen wrote:
> 3. In a core Mingw64 header:
>
> #ifdef __CYGWIN64__
> #define _WIN64
> #endif
This is basically what happens with _WIN32 and WIN32, right now, and the
existing w32api headers (see windef.h). (And, when you talk of "Mingw64
headers" with regards to how a cygwin compiler would use them, you
/must/ be talking about that portion of mingw64 that is "w32api-like"
and not the parts that are "mingw-runtime-like" correct?)
So, I really don't see that this is any different than the current
situation: if you #include any w32api headers, you need to be careful in
your own code about #ifdef _WIN32, and guard it with &&
!defined(__CYGWIN__) unless you want those windows-isms -- and as good
practice and for clarity, amplify with || defined(__CYGWIN__) if you
really want those windows-isms, just so some well-meaning chap doesn't
come along and "fix" it for you later.
I *wish* there was a better way, but at least this is no worse than
status quo, wrt the current w32api headers.
--
Chuck
More information about the Cygwin-developers
mailing list