From: Václav Slavík Date: Wed, 10 Oct 2007 09:48:00 +0000 (+0000) Subject: compilation fix for Mingw: it doesn't have std::wostream X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a6ea041d96f19c89c0f68741502f08e5cee97ec?hp=1583600031e1737cd11ed2b40e31aad1b610a876 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 --- 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