RX: test for presence of REG_ENHANCED
Instead of checking for Darwin, check whether REG_ENHANCED is defined, since that's the only difference between the two options. This fixes compiling on older versions of OS X, where REG_ENHANCED is not defined.
This commit is contained in:
committed by
Paul Beckingham
parent
ae47fb7265
commit
3215e3d78e
@@ -85,7 +85,7 @@ void RX::compile ()
|
|||||||
|
|
||||||
int result;
|
int result;
|
||||||
if ((result = regcomp (&_regex, _pattern.c_str (),
|
if ((result = regcomp (&_regex, _pattern.c_str (),
|
||||||
#ifdef DARWIN
|
#if defined REG_ENHANCED
|
||||||
REG_ENHANCED | REG_EXTENDED | REG_NEWLINE |
|
REG_ENHANCED | REG_EXTENDED | REG_NEWLINE |
|
||||||
#else
|
#else
|
||||||
REG_EXTENDED | REG_NEWLINE |
|
REG_EXTENDED | REG_NEWLINE |
|
||||||
|
|||||||
Reference in New Issue
Block a user