Skip to content

Commit be7a50b

Browse files
committed
Move HAVE_ATTRIBUTE_ALIGNED check outside crypt block
This is checked outside the crypt() implementation as well.
1 parent 786effa commit be7a50b

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

ext/standard/config.m4

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -260,30 +260,29 @@ if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test
260260
AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__])
261261
fi
262262

263-
dnl
264-
dnl Check for __attribute__ ((__aligned__)) support in the compiler
265-
dnl
266-
AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
267-
AC_TRY_COMPILE([
268-
],[
269-
unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
270-
],[
271-
ac_cv_attribute_aligned=yes
272-
],[
273-
ac_cv_attribute_aligned=no
274-
])])
275-
if test "$ac_cv_attribute_aligned" = "yes"; then
276-
AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
277-
fi
278-
279-
280263
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])
281264

282265
PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
283266
else
284267
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
285268
fi
286269

270+
dnl
271+
dnl Check for __attribute__ ((__aligned__)) support in the compiler
272+
dnl
273+
AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
274+
AC_TRY_COMPILE([
275+
],[
276+
unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
277+
],[
278+
ac_cv_attribute_aligned=yes
279+
],[
280+
ac_cv_attribute_aligned=no
281+
])])
282+
if test "$ac_cv_attribute_aligned" = "yes"; then
283+
AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
284+
fi
285+
287286
dnl
288287
dnl Check for available functions
289288
dnl

0 commit comments

Comments
 (0)