diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-24 12:08:31 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-24 12:09:49 +0200 |
commit | 7d05bc863070c847614f712d53976efaf98b6541 (patch) | |
tree | d89eca1a647e9c44c0794cb9d319d26e11502c91 | |
parent | 38177dcb421cafef18fd903c6ae170ddc40ae599 (diff) | |
download | php-git-7d05bc863070c847614f712d53976efaf98b6541.tar.gz |
Fix crypt_r detection
And force use of our own php_crypt_r implementation to keep
previous behavior despite that.
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | ext/standard/config.m4 | 15 |
2 files changed, 6 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index df2c205f19..2a62ca6eb8 100644 --- a/configure.ac +++ b/configure.ac @@ -531,7 +531,6 @@ alphasort \ asctime_r \ chroot \ ctime_r \ -crypt \ explicit_memset \ flock \ ftok \ @@ -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 diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 9f82ab1afa..5081a6b677 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -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,[ @@ -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 |