Skip to content

Commit 7d05bc8

Browse files
committed
Fix crypt_r detection
And force use of our own php_crypt_r implementation to keep previous behavior despite that.
1 parent 38177dc commit 7d05bc8

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

configure.ac

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ alphasort \
531531
asctime_r \
532532
chroot \
533533
ctime_r \
534-
crypt \
535534
explicit_memset \
536535
flock \
537536
ftok \
@@ -648,11 +647,6 @@ AC_FUNC_ALLOCA
648647
PHP_TIME_R_TYPE
649648
PHP_CHECK_IN_ADDR_T
650649

651-
AC_CHECK_FUNCS(crypt_r, [ php_crypt_r="1" ], [ php_crypt_r="0" ])
652-
if test "x$php_crypt_r" = "x1"; then
653-
PHP_CRYPT_R_STYLE
654-
fi
655-
656650
AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d,
657651
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <arm_acle.h>]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])])
658652
if test "$ac_cv_func___crc32d" = "yes"; then

ext/standard/config.m4

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,10 @@ if test "$ac_cv_flush_io" = "yes"; then
5151
AC_DEFINE(HAVE_FLUSHIO, 1, [Define if flush should be called explicitly after a buffered io.])
5252
fi
5353

54-
dnl
55-
dnl Check for crypt() capabilities
56-
dnl
57-
if test "$ac_cv_func_crypt" = "no"; then
58-
AC_CHECK_LIB(crypt, crypt, [
59-
LIBS="-lcrypt $LIBS -lcrypt"
60-
AC_DEFINE(HAVE_CRYPT, 1, [ ])
61-
])
54+
PHP_CHECK_FUNC(crypt, crypt)
55+
PHP_CHECK_FUNC(crypt_r, crypt)
56+
if test "$ac_cv_func_crypt_r" = "yes"; then
57+
PHP_CRYPT_R_STYLE
6258
fi
6359

6460
AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
@@ -262,7 +258,8 @@ int main() {
262258
dnl
263259
dnl If one of them is missing, use our own implementation, portable code is then possible
264260
dnl
265-
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
261+
dnl TODO This is currently always enabled
262+
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
266263

267264
dnl
268265
dnl Check for __alignof__ support in the compiler

0 commit comments

Comments
 (0)