[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix crypt_r detection
Browse files Browse the repository at this point in the history
And force use of our own php_crypt_r implementation to keep
previous behavior despite that.
  • Loading branch information
nikic committed Jun 24, 2020
1 parent 38177dc commit 7d05bc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
6 changes: 0 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ alphasort \
asctime_r \
chroot \
ctime_r \
crypt \
explicit_memset \
flock \
ftok \
Expand Down Expand Up @@ -648,11 +647,6 @@ AC_FUNC_ALLOCA
PHP_TIME_R_TYPE
PHP_CHECK_IN_ADDR_T

AC_CHECK_FUNCS(crypt_r, [ php_crypt_r="1" ], [ php_crypt_r="0" ])
if test "x$php_crypt_r" = "x1"; then
PHP_CRYPT_R_STYLE
fi

AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <arm_acle.h>]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])])
if test "$ac_cv_func___crc32d" = "yes"; then
Expand Down
15 changes: 6 additions & 9 deletions ext/standard/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ if test "$ac_cv_flush_io" = "yes"; then
AC_DEFINE(HAVE_FLUSHIO, 1, [Define if flush should be called explicitly after a buffered io.])
fi

dnl
dnl Check for crypt() capabilities
dnl
if test "$ac_cv_func_crypt" = "no"; then
AC_CHECK_LIB(crypt, crypt, [
LIBS="-lcrypt $LIBS -lcrypt"
AC_DEFINE(HAVE_CRYPT, 1, [ ])
])
PHP_CHECK_FUNC(crypt, crypt)
PHP_CHECK_FUNC(crypt_r, crypt)
if test "$ac_cv_func_crypt_r" = "yes"; then
PHP_CRYPT_R_STYLE
fi

AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
Expand Down Expand Up @@ -262,7 +258,8 @@ int main() {
dnl
dnl If one of them is missing, use our own implementation, portable code is then possible
dnl
if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "x$php_crypt_r" = "x0"; then
dnl TODO This is currently always enabled
if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || true; then

dnl
dnl Check for __alignof__ support in the compiler
Expand Down

0 comments on commit 7d05bc8

Please sign in to comment.