From b7146cbec5ae3c75cbf3e259ca1697efec7d9e52 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Jul 2005 19:44:17 +0000 Subject: [PATCH] compilation fix for IBM xlC (closes 1230392) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/string.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 922fe4c912..84ae5a39c2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -13,6 +13,7 @@ All: - Added new methods to wxMediaCtrl (wxURI version of Load, ShowPlayerControls) - Added wxZipFSHandler::Cleanup() (Stas Sergeev) - Added wxImage::RotateHue() and RGB <-> HSV conversions (John Anderson) +- Fixed compilation with IBM xlC compiler All (GUI): diff --git a/include/wx/string.h b/include/wx/string.h index d39b0c9188..dcf8f9058d 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1274,6 +1274,17 @@ public: { return (wxString&)wxStringBase::operator+=(ch); } }; +// IBM xlC compiler needs these operators to be declared in global scope, +// although this shouldn't be a problem for the other compilers we prefer to +// only do it for it in stable 2.6 branch +#ifdef __IBMCPP__ +wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxChar ch); +wxString WXDLLIMPEXP_BASE operator+(wxChar ch, const wxString& string); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz); +wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string); +#endif // __IBMCPP__ + // define wxArrayString, for compatibility #if WXWIN_COMPATIBILITY_2_4 && !wxUSE_STL #include "wx/arrstr.h" -- 2.45.2