Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use memmove() unconditionally in the code
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
  • Loading branch information
petk committed Mar 9, 2024
commit 7fd87717dbc111e06f333cb44f7a5683c0980aee
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ localtime_r \
lchown \
memcntl \
memfd_create \
memmove \
mkstemp \
mmap \
nice \
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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, [ ])

Expand Down
1 change: 0 additions & 1 deletion win32/build/config.w32.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down