X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7102772826e7034ae89536dcd018039526293d1..ee6dd41a508c2bf598c178696a43bb665e0d4c01:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 38f9991510..0738eb4ec8 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -72,6 +72,13 @@ # pragma warning(disable:4511) /* copy ctor couldn't be generated */ # pragma warning(disable:4512) /* operator=() couldn't be generated */ # pragma warning(disable:4710) /* function not inlined */ + +/* Deprecated functions such as sprintf, localtime */ +#if __VISUALC__ >= 1400 +#define _CRT_SECURE_NO_DEPRECATE 1 +#define _CRT_NON_CONFORMING_SWPRINTFS 1 +#endif + #endif /* __VISUALC__ */ /* suppress some Salford C++ warnings */ @@ -88,6 +95,19 @@ # pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */ #endif /* __BORLANDC__ */ +/* + g++ gives a warning when a class has private dtor if it has no friends but + this is a perfectly valid situation for a ref-counted class which destroys + itself when its ref count drops to 0, so provide a macro to suppress this + warning + */ +#ifdef __GNUG__ +# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) \ + friend class wxDummyFriendFor ## name; +#else /* !g++ */ +# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) +#endif + /* ---------------------------------------------------------------------------- */ /* wxWidgets version and compatibility defines */ /* ---------------------------------------------------------------------------- */ @@ -146,7 +166,7 @@ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500) /* Borland 5.0+ supports bool */ #define HAVE_BOOL - #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) + #elif wxCHECK_WATCOM_VERSION(1,0) /* Watcom 11+ supports bool */ #define HAVE_BOOL #elif defined(__DIGITALMARS__) @@ -609,7 +629,7 @@ typedef int wxWindowID; #define except(x) catch(...) #endif /* Metrowerks */ -#if defined(__WATCOMC__) && (__WATCOMC__ < 1240) +#if wxONLY_WATCOM_EARLIER_THAN(1,4) typedef short mode_t; #endif @@ -1006,7 +1026,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) #if defined(__PALMOS__) && !defined(HAVE_SSIZE_T) #define HAVE_SSIZE_T #endif -#if defined(__WATCOMC__) && __WATCOMC__ > 1230 +#if wxCHECK_WATCOM_VERSION(1,4) #define HAVE_SSIZE_T #endif #ifndef HAVE_SSIZE_T @@ -2821,6 +2841,11 @@ typedef GtkWidget *WXWidget; #define GTK_CLASS_TYPE(klass) ((klass)->type) #endif +#ifdef __WXGTK20__ +#define G_DISABLE_DEPRECATED +#define PANGO_DISABLE_DEPRECATED +#endif + #endif /* __WXGTK__ */ #if defined(__WXGTK20__) || (defined(__WXX11__) && wxUSE_UNICODE)