diff --git a/demo/regress/regex_test.cpp b/demo/regress/regex_test.cpp index 333962b8..62f18130 100644 --- a/demo/regress/regex_test.cpp +++ b/demo/regress/regex_test.cpp @@ -56,7 +56,7 @@ regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbas | regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed; template class reg_expression; -template class sub_match; +template struct sub_match; template class match_results; template bool regex_match(ra_it, diff --git a/demo/regress/wregex_test.cpp b/demo/regress/wregex_test.cpp index 26b55553..7c10baf7 100644 --- a/demo/regress/wregex_test.cpp +++ b/demo/regress/wregex_test.cpp @@ -52,7 +52,7 @@ regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbas | regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed; template class reg_expression; -template class sub_match; +template struct sub_match; template class match_results; template bool regex_match(ra_it, diff --git a/include/boost/re_detail/fileiter.hpp b/include/boost/re_detail/fileiter.hpp index 3e21a23f..f1f5fb0c 100644 --- a/include/boost/re_detail/fileiter.hpp +++ b/include/boost/re_detail/fileiter.hpp @@ -169,7 +169,7 @@ class BOOST_RE_IX_DECL mapfile_iterator; class BOOST_RE_IX_DECL mapfile { typedef char* pointer; - FILE* hfile; + std::FILE* hfile; long int _size; pointer* _first; pointer* _last; diff --git a/include/boost/re_detail/regex_compile.hpp b/include/boost/re_detail/regex_compile.hpp index 9adf0c5a..803c2232 100644 --- a/include/boost/re_detail/regex_compile.hpp +++ b/include/boost/re_detail/regex_compile.hpp @@ -162,7 +162,7 @@ inline bool BOOST_RE_CALL reg_expression::operator==(c { return (_flags == e.flags()) && (_expression_len == e._expression_len) - && (memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0); + && (std::memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0); } template @@ -172,7 +172,7 @@ bool BOOST_RE_CALL reg_expression::operator<(const reg // we can't offer a diffinitive ordering, but we can be consistant: if(_flags != e.flags()) return _flags < e.flags(); if(_expression_len != e._expression_len) return _expression_len < e._expression_len; - return memcmp(expression(), e.expression(), _expression_len); + return std::memcmp(expression(), e.expression(), _expression_len); } template diff --git a/include/boost/re_detail/regex_config.hpp b/include/boost/re_detail/regex_config.hpp index 43b226db..b0d3c5d0 100644 --- a/include/boost/re_detail/regex_config.hpp +++ b/include/boost/re_detail/regex_config.hpp @@ -287,10 +287,10 @@ Do not change this file unless you really really have to, add options to #ifdef __BASTRING__ #define BOOST_RE_NO_WCSTRING #endif - #if defined(__BEOS__) - #define BOOST_RE_NO_WCTYPE_H - #define BOOST_RE_NO_WCSTRING - #endif + // + // for now we'll always define these: + #define BOOST_RE_NO_WCTYPE_H + #define BOOST_RE_NO_WCSTRING #endif @@ -1249,5 +1249,6 @@ namespace std{ + diff --git a/include/boost/re_detail/regex_cstring.hpp b/include/boost/re_detail/regex_cstring.hpp index 03798eaa..f04db039 100644 --- a/include/boost/re_detail/regex_cstring.hpp +++ b/include/boost/re_detail/regex_cstring.hpp @@ -47,9 +47,9 @@ namespace boost{ // template -size_t BOOST_RE_CALL re_strlen(const charT *s) +std::size_t BOOST_RE_CALL re_strlen(const charT *s) { - size_t len = 0; + std::size_t len = 0; while(*s) { ++s; @@ -58,14 +58,14 @@ size_t BOOST_RE_CALL re_strlen(const charT *s) return len; } -inline size_t BOOST_RE_CALL re_strlen(const char *s) +inline std::size_t BOOST_RE_CALL re_strlen(const char *s) { return std::strlen(s); } #ifndef BOOST_RE_NO_WCSTRING -inline size_t BOOST_RE_CALL re_strlen(const wchar_t *s) +inline std::size_t BOOST_RE_CALL re_strlen(const wchar_t *s) { return std::wcslen(s); } @@ -136,3 +136,4 @@ inline void BOOST_RE_CALL re_strfree(charT* p) + diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp index 3e5b502d..c781778d 100644 --- a/src/c_regex_traits.cpp +++ b/src/c_regex_traits.cpp @@ -275,13 +275,13 @@ void BOOST_RE_CALL re_update_collate() { char* p1, *p2, *p3, *p4;; p1 = buf; - while(*p1 && isspace(*p1))++p1; + while(*p1 && std::isspace(*p1))++p1; p2 = p1; - while(*p2 && !isspace(*p2))++p2; + while(*p2 && !std::isspace(*p2))++p2; p3 = p2; - while(*p3 && isspace(*p3))++p3; + while(*p3 && std::isspace(*p3))++p3; p4 = p3; - while(*p4 && !isspace(*p4))++p4; + while(*p4 && !std::isspace(*p4))++p4; pcoll_names->push_back(collate_name_t(p1, p2, p3, p4)); ++i; re_get_message(buf, 256, i); @@ -641,15 +641,15 @@ void c_regex_traits::free() void BOOST_RE_CALL c_regex_traits::transform(std::string& out, const std::string& in) { BOOST_RE_GUARD_STACK - size_t n = strxfrm(0, in.c_str(), 0); - if(n == (size_t)(-1)) + std::size_t n = std::strxfrm(0, in.c_str(), 0); + if(n == (std::size_t)(-1)) { out = in; return; } scoped_array buf(new char[n+1]); - n = strxfrm(buf.get(), in.c_str(), n+1); - if(n == (size_t)(-1)) + n = std::strxfrm(buf.get(), in.c_str(), n+1); + if(n == (std::size_t)(-1)) { out = in; return; @@ -888,20 +888,20 @@ void BOOST_RE_CALL c_regex_traits::transform(std::basic_string { BOOST_RE_GUARD_STACK #ifndef BOOST_MSVC - size_t n = std::wcsxfrm(0, in.c_str(), 0); + std::size_t n = std::wcsxfrm(0, in.c_str(), 0); #else // broken wcsxfrm under VC6 doesn't check size of // output buffer, we have no choice but to guess! - size_t n = 100 * in.size(); + std::size_t n = 100 * in.size(); #endif - if((n == (size_t)(-1)) || (n == 0)) + if((n == (std::size_t)(-1)) || (n == 0)) { out = in; return; } scoped_array buf(new wchar_t[n+1]); n = std::wcsxfrm(buf.get(), in.c_str(), n+1); - if(n == (size_t)(-1)) + if(n == (std::size_t)(-1)) { out = in; return; diff --git a/src/fileiter.cpp b/src/fileiter.cpp index 9277b394..c0cd6235 100644 --- a/src/fileiter.cpp +++ b/src/fileiter.cpp @@ -264,7 +264,7 @@ void mapfile::unlock(pointer* node)const } } -long int get_file_length(FILE* hfile) +long int get_file_length(std::FILE* hfile) { BOOST_RE_GUARD_STACK long int result;