diff options
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 |
