You've already forked mariadb-columnstore-engine
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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user