From 459f812badc752b14c96ea294442c50390ee5030 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Wed, 1 Nov 2006 01:16:01 +0000 Subject: [PATCH] Generalized compilation fix for old compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/bitmap.h | 2 +- include/wx/gtk1/bitmap.h | 2 +- include/wx/msw/bitmap.h | 3 +-- include/wx/os2/bitmap.h | 2 +- include/wx/platform.h | 4 ++++ include/wx/x11/bitmap.h | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index e84582519e..e2dc786c5b 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -54,7 +54,7 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); -#if defined (__GNUC__) && __GNUC__ < 3 +#ifdef wxNEEDS_CHARPP // needed for old GCC wxBitmap(char** data) { diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index ecf23e1144..0d50267688 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -68,7 +68,7 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); -#if defined (__GNUC__) && __GNUC__ < 3 +#ifdef wxNEEDS_CHARPP // needed for old GCC wxBitmap(char** data) { diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 3d5fc34156..695030e453 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -45,8 +45,7 @@ public: // Initialize with XPM data wxBitmap(const char* const* data); -#if defined(__BORLANDC__) || (defined (__GNUC__) && __GNUC__ < 3) - // needed for Borland 5.5 +#ifdef wxNEEDS_CHARPP wxBitmap(char** data) { *this = wxBitmap(wx_const_cast(const char* const*, data)); diff --git a/include/wx/os2/bitmap.h b/include/wx/os2/bitmap.h index eeacd6e4c9..552cbe22d9 100644 --- a/include/wx/os2/bitmap.h +++ b/include/wx/os2/bitmap.h @@ -86,7 +86,7 @@ public: // Initialize with XPM data wxBitmap(const char* const* bits); -#if defined (__GNUC__) && __GNUC__ < 3 +#ifdef wxNEEDS_CHARPP // needed for old GCC wxBitmap(char** data) { diff --git a/include/wx/platform.h b/include/wx/platform.h index 71790c352d..faeaf6fd20 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -535,6 +535,10 @@ #define wxCHECK_GCC_VERSION( major, minor ) 0 #endif +#if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3) +#define wxNEEDS_CHARPP +#endif + /* This macro can be used to check that the version of mingw32 compiler is at least maj.min diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index d18be63a4e..84e7f3ebc0 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -74,7 +74,7 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); -#if defined (__GNUC__) && __GNUC__ < 3 +#ifdef wxNEEDS_CHARPP // needed for old GCC wxBitmap(char** data) {