1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1559 remove the #define POSIX_REGEX and thus the use of regexec. Fix up the code changing #ifdef _MSC_VER to #ifdef POSIX_REGEX, where it applies to regexec.

This commit is contained in:
David Hall
2019-07-24 12:59:59 -05:00
parent 41b7560b65
commit 78eb20ef4e
6 changed files with 27 additions and 30 deletions

View File

@ -205,11 +205,11 @@ ConstantColumn::ConstantColumn( const ConstantColumn& rhs):
if (fRegex.get() != NULL)
{
fRegex.reset(new CNX_Regex());
#ifdef _MSC_VER
*fRegex = dataconvert::DataConvert::constructRegexp(fResult.strVal);
#else
#ifdef POSIX_REGEX
string str = dataconvert::DataConvert::constructRegexp(fResult.strVal);
regcomp(fRegex.get(), str.c_str(), REG_NOSUB | REG_EXTENDED);
#else
*fRegex = dataconvert::DataConvert::constructRegexp(fResult.strVal);
#endif
}
}
@ -256,7 +256,7 @@ ConstantColumn::ConstantColumn(const uint64_t val, TYPE type) :
ConstantColumn::~ConstantColumn()
{
#ifndef _MSC_VER
#ifdef POSIX_REGEX
if (fRegex.get() != NULL)
regfree(fRegex.get());
@ -394,11 +394,11 @@ void ConstantColumn::constructRegex()
{
//fRegex = new regex_t();
fRegex.reset(new CNX_Regex());
#ifdef _MSC_VER
*fRegex = dataconvert::DataConvert::constructRegexp(fResult.strVal);
#else
#ifdef POSIX_REGEX
string str = dataconvert::DataConvert::constructRegexp(fResult.strVal);
regcomp(fRegex.get(), str.c_str(), REG_NOSUB | REG_EXTENDED);
#else
*fRegex = dataconvert::DataConvert::constructRegexp(fResult.strVal);
#endif
}