Index: acinclude.m4 =================================================================== RCS file: /repository/php-src/acinclude.m4,v retrieving revision 1.332.2.14.2.6 diff -r1.332.2.14.2.6 acinclude.m4 2592a2593,2644 > dnl > dnl PHP_CRYPT_R_STYLE > dnl detect the style of crypt_r() is any is available > dnl see APR_CHECK_CRYPT_R_STYLE() for original version > dnl > AC_DEFUN([PHP_CRYPT_R_STYLE], > [ > AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[ > php_cv_crypt_r_style=none > AC_TRY_COMPILE([ > #include > ],[ > CRYPTD buffer; > crypt_r("passwd", "hash", &buffer); > ], > php_cv_crypt_r_style=cryptd) > > if test "$php_cv_crypt_r_style" = "none"; then > AC_TRY_COMPILE([ > #include > ],[ > struct crypt_data buffer; > crypt_r("passwd", "hash", &buffer); > ], > php_cv_crypt_r_style=struct_crypt_data) > fi > > if test "$php_cv_crypt_r_style" = "none"; then > AC_TRY_COMPILE([ > #define _GNU_SOURCE > #include > ],[ > struct crypt_data buffer; > crypt_r("passwd", "hash", &buffer); > ], > php_cv_crypt_r_style=struct_crypt_data_gnu_source) > fi > ]) > > if test "$php_cv_crypt_r_style" = "cryptd"; then > AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD]) > fi > if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then > AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data]) > fi > if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then > AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE]) > fi > if test "$php_cv_crypt_r_style" = "none"; then > AC_MSG_ERROR([Unable to detect data struct is used by crypt_r]) > fi > ]) Index: configure.in =================================================================== RCS file: /repository/php-src/configure.in,v retrieving revision 1.579.2.52.2.29 diff -r1.579.2.52.2.29 configure.in 470d469 < crypt_r \ 602a602,606 > 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 > Index: ext/standard/crypt.c =================================================================== RCS file: /repository/php-src/ext/standard/crypt.c,v retrieving revision 1.62.2.1.2.2 diff -r1.62.2.1.2.2 crypt.c 30a31,33 > #if defined(CRYPT_R_GNU_SOURCE) && !defined(_GNU_SOURCE) > #define _GNU_SOURCE > #endif 149a153 > #if defined(CRYPT_R_STRUCT_CRYPT_DATA) 151a156,161 > #elif defined(CRYPT_R_CRYPTD) > CRYPTD buffer; > #else > #error Data struct used by crypt_r() is unknown. Please report. > #endif >