From 72caa3f9cac83d0b60c3bb4ee84119781ed0cd4b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 10 Dec 2000 11:52:26 +0000 Subject: [PATCH] regex: tweeks for linux. + Beos: compiler status [SVN r8445] --- include/boost/re_detail/regex_config.hpp | 11 ++++++++--- src/cpp_regex_traits.cpp | 9 +++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/boost/re_detail/regex_config.hpp b/include/boost/re_detail/regex_config.hpp index 3031bd43..cfbc3d10 100644 --- a/include/boost/re_detail/regex_config.hpp +++ b/include/boost/re_detail/regex_config.hpp @@ -288,9 +288,13 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_WCSTRING #endif // - // for now we'll always define these: - #define BOOST_RE_NO_WCTYPE_H - #define BOOST_RE_NO_WCSTRING + // for now we'll always define these + // unless we know that the platform can cope + // with woide character strings: + #if !defined(linux) + #define BOOST_RE_NO_WCTYPE_H + #define BOOST_RE_NO_WCSTRING + #endif #endif @@ -1257,5 +1261,6 @@ namespace std{ + diff --git a/src/cpp_regex_traits.cpp b/src/cpp_regex_traits.cpp index 2328e037..1dee8204 100644 --- a/src/cpp_regex_traits.cpp +++ b/src/cpp_regex_traits.cpp @@ -436,7 +436,11 @@ std::string BOOST_RE_CALL to_narrow(const std::basic_string& is, const scoped_array t(pc); //typedef std::codecvt cvt_type; //const cvt_type& cvt = BOOST_RE_USE_FACET(l, cvt_type); + #ifdef BOOST_MSVC std::mbstate_t state = 0; + #else + std::mbstate_t state = std::mbstate_t(); + #endif const wchar_t* next_in; char* next_out; @@ -474,7 +478,12 @@ std::wstring BOOST_RE_CALL to_wide(const std::string& is, const std::codecvt t(pc); //typedef std::codecvt cvt_type; //const cvt_type& cvt = BOOST_RE_USE_FACET(l, cvt_type); + #ifdef BOOST_MSVC std::mbstate_t state = 0; + #else + std::mbstate_t state = std::mbstate_t(); + #endif + wchar_t* next_out; const char* next_in;