Fixed Bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc)
authorXinchen Hui <laruence@php.net>
Mon, 10 Aug 2015 14:58:58 +0000 (22:58 +0800)
committerXinchen Hui <laruence@php.net>
Mon, 10 Aug 2015 14:58:58 +0000 (22:58 +0800)
NEWS
Zend/zend_types.h

diff --git a/NEWS b/NEWS
index a29f54cbf04ca6fe38dd9b459c59e8611183e429..83de487cf899aee5281bab2fa96d0c0b4ffd1c28 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
   . Fixed bug #70223 (Incrementing value returned by magic getter). (Laruence)
   . Fixed bug #70215 (Segfault when __invoke is static). (Bob)
   . Fixed bug #70207 (Finally is broken with opcache). (Laruence, Dmitry)
+  . Fixed bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc).
+    (Laruence, cmb)
 
 - CLI server:
   . Fixed bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE).
index 50a46984a3be0a0f5e9dc24ce724e18c3084d05d..edcbe47f06b00a826bbbb4fcc42c7e077450282b 100644 (file)
@@ -112,9 +112,8 @@ typedef union _zend_value {
        zend_class_entry *ce;
        zend_function    *func;
        struct {
-               ZEND_ENDIAN_LOHI(
-                       uint32_t w1,
-                       uint32_t w2)
+               uint32_t w1;
+               uint32_t w2;
        } ww;
 } zend_value;
 
@@ -822,23 +821,13 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) {
 }
 
 #if SIZEOF_SIZE_T == 4
-# ifdef WORDS_BIGENDIAN
-#  define ZVAL_COPY_VALUE_EX(z, v, gc, t)                              \
-       do {                                                                                            \
-               uint32_t _w1 = v->value.ww.w1;                                  \
-               Z_COUNTED_P(z) = gc;                                                    \
-               z->value.ww.w1 = _w1;                                                   \
-               Z_TYPE_INFO_P(z) = t;                                                   \
-       } while (0)
-# else
-#  define ZVAL_COPY_VALUE_EX(z, v, gc, t)                              \
+# define ZVAL_COPY_VALUE_EX(z, v, gc, t)                               \
        do {                                                                                            \
                uint32_t _w2 = v->value.ww.w2;                                  \
                Z_COUNTED_P(z) = gc;                                                    \
                z->value.ww.w2 = _w2;                                                   \
                Z_TYPE_INFO_P(z) = t;                                                   \
        } while (0)
-# endif
 #elif SIZEOF_SIZE_T == 8
 # define ZVAL_COPY_VALUE_EX(z, v, gc, t)                               \
        do {                                                                                            \