From 6487590b4fd55dddd59b43f1fcf2ebd8d56f20ac Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 20 Sep 2017 10:51:22 +0200 Subject: Add travis --- src/php_snuffleupagus.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/php_snuffleupagus.h') diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index e7a3d59..9f85cc1 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h @@ -16,6 +16,7 @@ #include "SAPI.h" #include "ext/standard/info.h" +#include "ext/pcre/php_pcre.h" #include "php.h" #include "php_ini.h" #include "zend_hash.h" @@ -37,6 +38,7 @@ #include "sp_upload_validation.h" #include "sp_utils.h" + extern zend_module_entry snuffleupagus_module_entry; #define phpext_snuffleupagus_ptr &snuffleupagus_module_entry @@ -64,6 +66,18 @@ ZEND_END_MODULE_GLOBALS(snuffleupagus) ZEND_TSRMLS_CACHE_EXTERN() #endif +#if HAVE_BUNDLED_PCRE + #include "ext/pcre/pcrelib/pcre.h" + #undef pcre_exec + #undef pcre_compile + #define sp_pcre_exec pcre_exec + #define sp_pcre_compile pcre_compile +#else + #include "pcre.h" + #define sp_pcre_exec pcre_exec + #define sp_pcre_compile pcre_compile +#endif + PHP_FUNCTION(check_disabled_function); static inline void sp_terminate() { zend_bailout(); } -- cgit v1.3