the Cygwin compiler doesn't define _WIN32 and _WIN64, but _WIN64 is
used throughout the SDK headers. Changing all the headers to use
another preprocessor check is pretty intrusive, so I think we should
just go with defining _WIN64 for now, if called by a 64 bit Cygwin
targeting compiler. Ok to apply?
* _cygwin.h (_WIN64): Define if targeting x86_64.
--- _cygwin.h (revision 5234)
+++ _cygwin.h (working copy)
@@ -26,4 +26,12 @@
#define _ERRCODE_DEFINED /* FIXME? errno_t is no POSIX type. */
+/* _WIN64 is defined by the compiler specs when targeting Windows.
+ The Cygwin-targeting gcc does not define it by default, same as
+ with _WIN32. Therefore we set it here. The result is that _WIN64
+ is only defined if Windows headers are included. */
#endif /* _INC_CYGWIN */
From: Kai Tietz <ktietz70@go...> - 2012-07-19 12:40:26
Hmm, well, patch is ok. I am still thinking that we should handle
_WIN64 and _WIN32 in a push/pop macro header. As we discussed on IRC,
it might be the case that some ventures already are checking for
_WIN64 for probing for native Windows.
On Jul 19 14:40, Kai Tietz wrote:
> Hi Corinna,
> Hmm, well, patch is ok. I am still thinking that we should handle
> _WIN64 and _WIN32 in a push/pop macro header. As we discussed on IRC,
> it might be the case that some ventures already are checking for
> _WIN64 for probing for native Windows.
Per the discussion on the cygwin-developers mailing list, this is
probaly not a problem. See especially