mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Use memmove() unconditionally in the code (#13647)
The memmove() function is C99 standard function [1] and check was left for the PCRE2 bundled library. It can be simplified by passing the compile option instead of checking always available function on current systems. External PCRE2 library on the system doesn't need this. [1]: https://port70.net/~nsz/c/c99/n1256.html#7.21.2.2
This commit is contained in:
@@ -599,7 +599,6 @@ localtime_r \
|
||||
lchown \
|
||||
memcntl \
|
||||
memfd_create \
|
||||
memmove \
|
||||
mkstemp \
|
||||
mmap \
|
||||
nice \
|
||||
|
||||
@@ -10,7 +10,7 @@ AC_DEFINE('PCRE2_CODE_UNIT_WIDTH', 8, 'Have PCRE library');
|
||||
AC_DEFINE("PCRE2_STATIC", 1, "");
|
||||
PHP_PCRE="yes";
|
||||
PHP_INSTALL_HEADERS("ext/pcre", "php_pcre.h pcre2lib/");
|
||||
ADD_FLAG("CFLAGS_PCRE", " /D HAVE_CONFIG_H");
|
||||
ADD_FLAG("CFLAGS_PCRE", " /D HAVE_CONFIG_H /D HAVE_MEMMOVE");
|
||||
|
||||
ARG_WITH("pcre-jit", "Enable PCRE JIT support", "yes");
|
||||
if (PHP_PCRE_JIT != "no") {
|
||||
|
||||
@@ -66,7 +66,7 @@ else
|
||||
pcre2lib/pcre2_string_utils.c pcre2lib/pcre2_study.c pcre2lib/pcre2_substitute.c pcre2lib/pcre2_substring.c \
|
||||
pcre2lib/pcre2_tables.c pcre2lib/pcre2_ucd.c pcre2lib/pcre2_valid_utf.c pcre2lib/pcre2_xclass.c \
|
||||
pcre2lib/pcre2_find_bracket.c pcre2lib/pcre2_convert.c pcre2lib/pcre2_extuni.c pcre2lib/pcre2_script_run.c"
|
||||
PHP_PCRE_CFLAGS="-Wno-implicit-fallthrough -DHAVE_CONFIG_H -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
PHP_PCRE_CFLAGS="-Wno-implicit-fallthrough -DHAVE_CONFIG_H -DHAVE_MEMMOVE -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
|
||||
AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ])
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#undef HAVE_STRUCT_STAT_ST_BLOCKS
|
||||
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
||||
#define HAVE_GETLOGIN 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_SHUTDOWN 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
Reference in New Issue
Block a user