diff --git a/include/wx/defs.h b/include/wx/defs.h index b3f79f8759..89bd409f3d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -3250,9 +3250,9 @@ typedef WXHWND WXWidget; #endif #ifdef __WIN64__ -typedef unsigned __int64 WXWPARAM; -typedef __int64 WXLPARAM; -typedef __int64 WXLRESULT; +typedef wxUint64 WXWPARAM; +typedef wxInt64 WXLPARAM; +typedef wxInt64 WXLRESULT; #else typedef wxW64 unsigned int WXWPARAM; typedef wxW64 long WXLPARAM; diff --git a/include/wx/platform.h b/include/wx/platform.h index 22fe9d9983..d1c18f320d 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -57,21 +57,6 @@ # endif /* !__WINDOWS__ */ #endif /* Any standard symbol indicating Windows */ -#if defined(_WIN64) -# ifndef _WIN32 - /* - a lot of code (mistakenly) uses #ifdef _WIN32 to either test for - Windows or to test for !__WIN16__, so we must define _WIN32 for - Win64 as well to ensure that the existing code continues to work. - */ -# define _WIN32 -# endif /* !_WIN32 */ - -# ifndef __WIN64__ -# define __WIN64__ -# endif /* !__WIN64__ */ -#endif /* _WIN64 */ - #if defined(__WINDOWS__) /* Select wxMSW under Windows if no other port is specified. */ # if !defined(__WXMSW__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) @@ -93,6 +78,15 @@ # ifndef __WIN32__ # define __WIN32__ # endif + + /* MSVC predefines _WIN64 for 64 bit builds, for gcc we use generic + architecture definitions. */ +# if defined(_WIN64) || defined(__x86_64__) +# ifndef __WIN64__ +# define __WIN64__ +# endif /* !__WIN64__ */ +# endif /* _WIN64 */ + #endif /* __WINDOWS__ */ /*