X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f4968e28101e75a121b3e3f45d45c1c90d82801..62ea506eafa485756b6bdb2f3cbb0d1fcb91b6d2:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 7adcc6ae05..d1717e5a40 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -62,7 +62,10 @@ #endif // Place other OS/2 compiler environment defines here - #define LINKAGEMODE _Optlink + #if defined(__VISAGECPP__) + // VisualAge is the only thing that understands _Optlink + #define LINKAGEMODE _Optlink + #endif #else // Windows #ifndef __WINDOWS__ #define __WINDOWS__ @@ -328,15 +331,24 @@ 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__) - #define wxCALLBACK __attribute__((stdcall)) +// stdcall is used for all functions called by Windows under Windows +#ifdef __WINDOWS__ + #if defined(__GNUWIN32__) + #define wxSTDCALL __attribute__((stdcall)) #else // both VC++ and Borland understand this - #define wxCALLBACK _stdcall + #define wxSTDCALL _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 +1793,19 @@ 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 +#else // Win32 + #define FAR +#endif // Win16/32 + #endif // MSW #ifdef __WXMOTIF__