From be70f42de7c9ec0e6158ce9ec9d21f0dac24897f Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 19 Jun 2025 21:49:36 +0200 Subject: [PATCH] Add HAVE_MEMMOVE to ext/pcre (#18862) 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 bf48aa53130..d049cc538c0 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])