Unconditionally depend on libpcre >= 8.10 (#2472)
Even Debian oldstable has 8.30, so let’s get rid of conditional compilation where we don’t actually need it.
This commit is contained in:
committed by
GitHub
parent
f4f9b7102d
commit
c93056b2d8
@ -28,11 +28,9 @@ struct regex *regex_new(const char *pattern) {
|
||||
struct regex *re = scalloc(1, sizeof(struct regex));
|
||||
re->pattern = sstrdup(pattern);
|
||||
int options = PCRE_UTF8;
|
||||
#ifdef PCRE_HAS_UCP
|
||||
/* We use PCRE_UCP so that \B, \b, \D, \d, \S, \s, \W, \w and some POSIX
|
||||
* character classes play nicely with Unicode */
|
||||
options |= PCRE_UCP;
|
||||
#endif
|
||||
while (!(re->regex = pcre_compile2(pattern, options, &errorcode, &error, &offset, NULL))) {
|
||||
/* If the error is that PCRE was not compiled with UTF-8 support we
|
||||
* disable it and try again */
|
||||
|
Reference in New Issue
Block a user