Skip to content
Closed
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
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ PHP NEWS
return value check). (nielsdos, botovq)
. Fix error return check of EVP_CIPHER_CTX_ctrl(). (nielsdos)

- Readline:
. Fixed bug GH-19250 and bug #51360 (Invalid conftest for rl_pending_input).
(petk, nielsdos)

- SOAP:
. Fixed bug GH-18640 (heap-use-after-free ext/soap/php_encoding.c:299:32
in soap_check_zval_ref). (nielsdos)
Expand Down
27 changes: 20 additions & 7 deletions ext/readline/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
])

PHP_CHECK_LIBRARY(readline, rl_pending_input,
[], [
AC_MSG_ERROR([invalid readline installation detected. Try --with-libedit instead.])
], [
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
])

PHP_CHECK_LIBRARY(readline, rl_callback_read_char,
[
AC_DEFINE(HAVE_RL_CALLBACK_READ_CHAR, 1, [ ])
Expand All @@ -75,6 +68,26 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
])

CFLAGS_SAVE=$CFLAGS
LDFLAGS_SAVE=$LDFLAGS
LIBS_SAVE=$LIBS
CFLAGS="$CFLAGS $INCLUDES"
LDFLAGS="$LDFLAGS -L$READLINE_DIR/$PHP_LIBDIR"
LIBS="$LIBS -lreadline"

dnl Sanity and minimum version check if readline library has variable
dnl rl_pending_input.
AC_CHECK_DECL([rl_pending_input],, [AC_MSG_FAILURE([
Invalid readline installation detected. Try --with-libedit instead.
])], [
#include <stdio.h>
#include <readline/readline.h>
])

CFLAGS=$CFLAGS_SAVE
LDFLAGS=$LDFLAGS_SAVE
LIBS=$LIBS_SAVE

AC_DEFINE(HAVE_HISTORY_LIST, 1, [ ])
AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])

Expand Down
Loading