diff options
author | Jose <jose@zeroc.com> | 2012-10-24 14:54:22 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-10-24 14:54:22 +0200 |
commit | a2094cb4e2ae6d3b2053cdc85b4b2af056c553d0 (patch) | |
tree | 29e1efb37c17078317093908c72175cbd1f1e13c /cpp/src/Ice/MetricsAdminI.cpp | |
parent | Add slice2cs to VC90 builds, for .NET CF (diff) | |
download | ice-a2094cb4e2ae6d3b2053cdc85b4b2af056c553d0.tar.bz2 ice-a2094cb4e2ae6d3b2053cdc85b4b2af056c553d0.tar.xz ice-a2094cb4e2ae6d3b2053cdc85b4b2af056c553d0.zip |
MinGW metrics ifdef regex out
Diffstat (limited to 'cpp/src/Ice/MetricsAdminI.cpp')
-rw-r--r-- | cpp/src/Ice/MetricsAdminI.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index 2d04aa58bf4..bf448237de4 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -94,7 +94,12 @@ parseRule(const PropertiesPtr& properties, const string& name) MetricsMapI::RegExp::RegExp(const string& attribute, const string& regexp) : _attribute(attribute) { -#ifndef ICE_CPP11_REGEXP +#ifdef __MINGW32__ + // + // No regexp support with MinGW, when MinGW C++11 mode is not experimental + // we can use std::regex. + // +#elif defined(ICE_CPP11_REGEXP) if(regcomp(&_preg, regexp.c_str(), REG_EXTENDED | REG_NOSUB) != 0) { throw SyscallException(__FILE__, __LINE__); @@ -110,7 +115,12 @@ MetricsMapI::RegExp::RegExp(const string& attribute, const string& regexp) : _at MetricsMapI::RegExp::~RegExp() { -#ifndef ICE_CPP11_REGEXP +#ifdef __MINGW32__ + // + // No regexp support with MinGW, when MinGW C++11 mode is not experimental + // we can use std::regex. + // +#elif defined(ICE_CPP11_REGEXP) regfree(&_preg); #endif } @@ -118,7 +128,13 @@ MetricsMapI::RegExp::~RegExp() bool MetricsMapI::RegExp::match(const string& value) { -#ifndef ICE_CPP11_REGEXP +#ifdef __MINGW32__ + // + // No regexp support with MinGW, when MinGW C++11 mode is not experimental + // we can use std::regex. + // + return false; +#elif defined(ICE_CPP11_REGEXP) return regexec(&_preg, value.c_str(), 0, 0, 0) == 0; #else # if _MSC_VER < 1600 |