diff options
| author | jvoisin | 2020-11-12 16:28:42 +0000 |
|---|---|---|
| committer | GitHub | 2020-11-12 16:28:42 +0000 |
| commit | f4bc388f1e4adb1b9dde5f3af77785101ad19857 (patch) | |
| tree | bf54083ec2b2b1857bb7206972c86c2bf7792c2a /src/sp_pcre_compat.h | |
| parent | c0c0cf70a8579095d5b7c0fb53f86fca21799e52 (diff) | |
Snuffleupagus now uses pcre2 by default
Diffstat (limited to 'src/sp_pcre_compat.h')
| -rw-r--r-- | src/sp_pcre_compat.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sp_pcre_compat.h b/src/sp_pcre_compat.h index 093a9c3..b429683 100644 --- a/src/sp_pcre_compat.h +++ b/src/sp_pcre_compat.h | |||
| @@ -7,17 +7,19 @@ | |||
| 7 | #undef pcre_exec | 7 | #undef pcre_exec |
| 8 | #undef pcre_compile | 8 | #undef pcre_compile |
| 9 | 9 | ||
| 10 | /* We're not supporting pcre2 when it's not bundled with php7, | 10 | /* We're not supporting pcre when it's not bundled with php7, |
| 11 | * yet. Pull-requests are welcome. */ | 11 | * yet. Pull-requests are welcome. */ |
| 12 | #if HAVE_BUNDLED_PCRE | 12 | #if HAVE_BUNDLED_PCRE |
| 13 | #if PHP_VERSION_ID >= 70300 | 13 | #if PHP_VERSION_ID >= 70300 |
| 14 | #define SP_HAS_PCRE2 | 14 | #define SP_HAS_PCRE2 |
| 15 | #include "ext/pcre/pcre2lib/pcre2.h" | 15 | #include "ext/pcre/php_pcre.h" |
| 16 | #else | 16 | #else |
| 17 | #include "ext/pcre/pcrelib/pcre.h" | 17 | #include "ext/pcre/pcrelib/pcre.h" |
| 18 | #endif | 18 | #endif |
| 19 | #else | 19 | #else |
| 20 | #include "pcre.h" | 20 | #define SP_HAS_PCRE2 |
| 21 | #define PCRE2_CODE_UNIT_WIDTH 8 | ||
| 22 | #include "pcre2.h" | ||
| 21 | #endif | 23 | #endif |
| 22 | 24 | ||
| 23 | #ifdef SP_HAS_PCRE2 | 25 | #ifdef SP_HAS_PCRE2 |
