From: Vadim Zeitlin Date: Mon, 10 Jan 2000 15:58:59 +0000 (+0000) Subject: wxAPIENTRY fixes (?) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1222db7263d73d5a8abfaab2d644e85b24d6f6ef wxAPIENTRY fixes (?) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 7adcc6ae05..1b10e1a33b 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -328,15 +328,23 @@ typedef int wxWindowID; // portable calling conventions macros // ---------------------------------------------------------------------------- -// wxCALLBACK should be used for the functions which are called back by -// Windows (such as compare function for wxListCtrl) -#if defined(__WIN32__) - #if defined(__MINGW32__) || defined(__GNUWIN32__) +// stdcall is used for all functions called by Windows under Windows +#ifdef __WINDOWS__ + #if defined(__GNUWIN32__) #define wxCALLBACK __attribute__((stdcall)) #else // both VC++ and Borland understand this #define wxCALLBACK _stdcall #endif +#else // Win + // no such stupidness under Unix + #define wxSTDCALL +#endif // platform + +// wxCALLBACK should be used for the functions which are called back by +// Windows (such as compare function for wxListCtrl) +#if defined(__WIN32__) + #define wxCALLBACK wxSTDCALL #else // no stdcall under Unix nor Win16 #define wxCALLBACK @@ -1781,6 +1789,17 @@ typedef WXHWND WXWidget; #endif #endif +// the keywords needed for WinMain() declaration +#ifdef __WIN16__ + #ifndef FAR + #ifdef __VISUALC__ + #define FAR __far + #else // !VC++ + #define FAR _far + #endif + #endif // no FAR +#endif // Win16/32 + #endif // MSW #ifdef __WXMOTIF__