Replace REG_BASIC with 0. Some platforms don't define REG_BASIC.

This commit is contained in:
Robin Mills 2015-04-17 10:58:16 +00:00
parent 5f3d095aa7
commit 8424bdaa71
2 changed files with 3 additions and 3 deletions

View File

@ -571,7 +571,7 @@ namespace Action {
!result && g != Params::instance().greps_.end(); ++g)
{
#if EXV_HAVE_REGEX
result = regexec( &(*g), key.c_str(), 0, NULL, REG_BASIC) == 0 ;
result = regexec( &(*g), key.c_str(), 0, NULL, 0) == 0 ;
#else
result = key.find(*g) != std::string::npos;
#endif

View File

@ -151,8 +151,8 @@ static void output(std::ostream& os,const exv_grep_keys_t& greps,const char* nam
!bPrint && g != greps.end() ; ++g
) {
#if EXV_HAVE_REGEX
bPrint = ( 0 == regexec( &(*g), name , 0, NULL, REG_BASIC)
|| 0 == regexec( &(*g), value.c_str(), 0, NULL, REG_BASIC)
bPrint = ( 0 == regexec( &(*g), name , 0, NULL, 0)
|| 0 == regexec( &(*g), value.c_str(), 0, NULL, 0)
);
#else
bPrint = std::string(name).find(*g) != std::string::npos || value.find(*g) != std::string::npos;