mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
fix setting of 32-bit value on big-endian systems
This commit is contained in:
parent
0502920928
commit
d3cea8b054
@ -6,10 +6,10 @@ PHP_ARG_ENABLE(phar, for phar archive support,
|
||||
|
||||
if test "$PHP_PHAR" != "no"; then
|
||||
PHP_C_BIGENDIAN
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_MSG_WARN([Disabling Phar due to crash bugs on big endian systems])
|
||||
PHP_PHAR=no
|
||||
else
|
||||
dnl if test $ac_cv_c_bigendian_php = yes; then
|
||||
dnl AC_MSG_WARN([Disabling Phar due to crash bugs on big endian systems])
|
||||
dnl PHP_PHAR=no
|
||||
dnl else
|
||||
PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared)
|
||||
AC_MSG_CHECKING([for phar openssl support])
|
||||
if test "$PHP_HASH_SHARED" != "yes"; then
|
||||
@ -32,5 +32,5 @@ if test "$PHP_PHAR" != "no"; then
|
||||
PHP_ADD_EXTENSION_DEP(phar, hash, true)
|
||||
PHP_ADD_EXTENSION_DEP(phar, spl, true)
|
||||
PHP_ADD_MAKEFILE_FRAGMENT
|
||||
fi
|
||||
dnl fi
|
||||
fi
|
||||
|
@ -1084,10 +1084,10 @@ nostub:
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define PHAR_SET_32(var, buffer) \
|
||||
*(php_uint32 *)(var) = (((((unsigned char*)(buffer))[3]) << 24) \
|
||||
| ((((unsigned char*)(buffer))[2]) << 16) \
|
||||
| ((((unsigned char*)(buffer))[1]) << 8) \
|
||||
| (((unsigned char*)(buffer))[0]))
|
||||
*(php_uint32 *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \
|
||||
| ((((unsigned char*)&(buffer))[2]) << 16) \
|
||||
| ((((unsigned char*)&(buffer))[1]) << 8) \
|
||||
| (((unsigned char*)&(buffer))[0]))
|
||||
#else
|
||||
# define PHAR_SET_32(var, buffer) *(php_uint32 *)(var) = (php_uint32) (buffer)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user