From 6a6ea041d96f19c89c0f68741502f08e5cee97ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 10 Oct 2007 09:48:00 +0000 Subject: [PATCH] compilation fix for Mingw: it doesn't have std::wostream git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 7 +++++++ include/wx/string.h | 4 ++-- src/common/string.cpp | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 838021c9c8..8e387b61ed 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -449,6 +449,13 @@ typedef int wxWindowID; #endif /* HAVE_VARIADIC_MACROS */ +#ifndef HAVE_WOSTREAM + // Mingw <=3.4 doesn't have std::wostream + #if !defined(__MINGW32__) || wxCHECK_GCC_VERSION(4,0) + #define HAVE_WOSTREAM + #endif +#endif /* HAVE_WOSTREAM */ + /* ---------------------------------------------------------------------------- */ /* portable calling conventions macros */ /* ---------------------------------------------------------------------------- */ diff --git a/include/wx/string.h b/include/wx/string.h index 9f403dab07..ba651e5d97 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3031,13 +3031,13 @@ WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCharBuffer&); WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxWCharBuffer&); #endif -#if wxUSE_UNICODE +#if wxUSE_UNICODE && defined(HAVE_WOSTREAM) WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxString&); WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxCStrData&); WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxWCharBuffer&); -#endif // wxUSE_UNICODE +#endif // wxUSE_UNICODE && defined(HAVE_WOSTREAM) #endif // wxUSE_STD_IOSTREAM diff --git a/src/common/string.cpp b/src/common/string.cpp index a032dec82f..9b05497c37 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -96,7 +96,7 @@ wxSTD ostream& operator<<(wxSTD ostream& os, const wxWCharBuffer& str) } #endif -#if wxUSE_UNICODE +#if wxUSE_UNICODE && defined(HAVE_WOSTREAM) wxSTD wostream& operator<<(wxSTD wostream& wos, const wxString& str) { @@ -113,7 +113,7 @@ wxSTD wostream& operator<<(wxSTD wostream& wos, const wxWCharBuffer& str) return wos << str.data(); } -#endif // wxUSE_UNICODE +#endif // wxUSE_UNICODE && defined(HAVE_WOSTREAM) #endif // wxUSE_STD_IOSTREAM