Index: regex_timer.cpp =================================================================== --- regex_timer.cpp (revision 41062) +++ regex_timer.cpp (working copy) @@ -143,7 +143,7 @@ boost::match_results::iterator> dm; std::string s1, s2, ts; std::deque ds; - boost::regex_t r; + boost::regex_tA r; boost::scoped_array matches; std::size_t nsubs; boost::timer t; @@ -175,11 +175,11 @@ cout << "Error in expression: \"" << e.what() << "\"" << endl; continue; } - int code = regcomp(&r, s1.c_str(), boost::REG_PERL); + int code = regcompA(&r, s1.c_str(), boost::REG_PERL); if(code != 0) { char buf[256]; - regerror(code, &r, buf, 256); + regerrorA(code, &r, buf, 256); cout << "regcomp error: \"" << buf << "\"" << endl; continue; } @@ -324,13 +324,13 @@ iters = 10; tim = 1.1; // cache load: - regexec(&r, s2.c_str(), nsubs, matches.get(), 0); + regexecA(&r, s2.c_str(), nsubs, matches.get(), 0); do{ iters *= (tim > 0.001) ? (1.1/tim) : 100; t.restart(); for(i = 0; i < iters; ++i) { - result = regexec(&r, s2.c_str(), nsubs, matches.get(), 0); + result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0); } tim = t.elapsed(); }while(tim < wait_time); @@ -360,7 +360,7 @@ cout << "\" (matched=" << (matches[0].rm_eo != s2.size()) << ")" << endl << endl; } } - regfree(&r); + regfreeA(&r); } if(pbuf) @@ -372,7 +372,7 @@ return 0; } -#if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE) +#if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(UNDER_CE) #pragma comment(lib, "user32.lib") #endif