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:
Misty De Meo 2015-12-30 22:40:12 -04:00 committed by Paul Beckingham
parent ae47fb7265
commit 3215e3d78e

View file

@ -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 |