From be7a50b9ab4f17b224f82e32dddd249b17f6ba36 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Mar 2016 20:50:52 +0100 Subject: [PATCH] Move HAVE_ATTRIBUTE_ALIGNED check outside crypt block This is checked outside the crypt() implementation as well. --- ext/standard/config.m4 | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index c41593c54e..26eb056321 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -260,23 +260,6 @@ if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__]) fi - dnl - dnl Check for __attribute__ ((__aligned__)) support in the compiler - dnl - AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[ - AC_TRY_COMPILE([ - ],[ - unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int)))); - ],[ - ac_cv_attribute_aligned=yes - ],[ - ac_cv_attribute_aligned=no - ])]) - if test "$ac_cv_attribute_aligned" = "yes"; then - AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))]) - fi - - AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5]) PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c) @@ -284,6 +267,22 @@ else AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des]) fi +dnl +dnl Check for __attribute__ ((__aligned__)) support in the compiler +dnl +AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[ +AC_TRY_COMPILE([ +],[ + unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int)))); +],[ + ac_cv_attribute_aligned=yes +],[ + ac_cv_attribute_aligned=no +])]) +if test "$ac_cv_attribute_aligned" = "yes"; then + AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))]) +fi + dnl dnl Check for available functions dnl -- 2.50.1