From 9768d71f41383d7cd6b8bf1e502c95db8edba601 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 16 Jun 2025 18:27:31 +0200 Subject: [PATCH] Add HAVE_MEMMOVE to ext/pcre The pcre2 library still needs HAVE_MEMMOVE defined to use the system (C99 standard) memmove() function, otherwise emulation is used. On Windows, this is already enabled. --- ext/pcre/config0.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index bf48aa53130c5..d049cc538c0f5 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -99,7 +99,14 @@ else [PHP_PCRE_CFLAGS="$PHP_PCRE_CFLAGS -Wno-implicit-fallthrough"],, [-Werror]) - PHP_PCRE_CFLAGS="$PHP_PCRE_CFLAGS -DHAVE_CONFIG_H -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" + PHP_PCRE_CFLAGS=m4_normalize([" + $PHP_PCRE_CFLAGS + -DHAVE_CONFIG_H + -DHAVE_MEMMOVE + -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 + -I@ext_srcdir@/pcre2lib + "]) + AC_DEFINE([HAVE_BUNDLED_PCRE], [1], [Define to 1 if PHP uses the bundled PCRE library.]) AC_DEFINE([PCRE2_CODE_UNIT_WIDTH], [8])