summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.m42
-rw-r--r--src/php_snuffleupagus.h3
-rw-r--r--src/sp_pcre_compat.h8
3 files changed, 7 insertions, 6 deletions
diff --git a/src/config.m4 b/src/config.m4
index 52b6d04..e4cc1f5 100644
--- a/src/config.m4
+++ b/src/config.m4
@@ -24,7 +24,7 @@ CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
24CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2" 24CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2"
25CFLAGS="$CFLAGS -fstack-protector" 25CFLAGS="$CFLAGS -fstack-protector"
26 26
27LDFLAGS="$LDFLAGS -lpcre" 27LDFLAGS="$LDFLAGS `pcre2-config --libs8`"
28 28
29if test "$PHP_DEBUG" = "yes"; then 29if test "$PHP_DEBUG" = "yes"; then
30 AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages]) 30 AC_DEFINE(SP_DEBUG, 1, [Wether you want to enable debug messages])
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h
index 213e27e..532516f 100644
--- a/src/php_snuffleupagus.h
+++ b/src/php_snuffleupagus.h
@@ -14,7 +14,7 @@
14#include <errno.h> 14#include <errno.h>
15#include <fcntl.h> 15#include <fcntl.h>
16#include <inttypes.h> 16#include <inttypes.h>
17#include <pcre.h> 17#include "sp_pcre_compat.h"
18#include <stdbool.h> 18#include <stdbool.h>
19#include <stdio.h> 19#include <stdio.h>
20#include <stdlib.h> 20#include <stdlib.h>
@@ -34,7 +34,6 @@
34#include "ext/standard/info.h" 34#include "ext/standard/info.h"
35#include "ext/standard/url.h" 35#include "ext/standard/url.h"
36#include "ext/standard/php_var.h" 36#include "ext/standard/php_var.h"
37#include "ext/pcre/php_pcre.h"
38#include "ext/session/php_session.h" 37#include "ext/session/php_session.h"
39#include "php.h" 38#include "php.h"
40#include "php_ini.h" 39#include "php_ini.h"
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