mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/hash: Swap the checking order of __has_builtin and __GNUC__ (#14185)
closes #14185
This commit is contained in:
parent
b8aa68bc09
commit
12dc51976b
2 changed files with 12 additions and 8 deletions
4
NEWS
4
NEWS
|
@ -17,6 +17,10 @@ PHP NEWS
|
||||||
. Fix crash when calling childNodes next() when iterator is exhausted.
|
. Fix crash when calling childNodes next() when iterator is exhausted.
|
||||||
(nielsdos)
|
(nielsdos)
|
||||||
|
|
||||||
|
- Hash:
|
||||||
|
. ext/hash: Swap the checking order of `__has_builtin` and `__GNUC__`
|
||||||
|
(Saki Takamachi)
|
||||||
|
|
||||||
- Opcache:
|
- Opcache:
|
||||||
. Fixed bug GH-14109 (Fix accidental persisting of internal class constant in
|
. Fixed bug GH-14109 (Fix accidental persisting of internal class constant in
|
||||||
shm). (ilutov)
|
shm). (ilutov)
|
||||||
|
|
|
@ -13,14 +13,7 @@ FORCE_INLINE int IsBigEndian(void)
|
||||||
# define BSWAP32(u) _byteswap_ulong(u)
|
# define BSWAP32(u) _byteswap_ulong(u)
|
||||||
# define BSWAP64(u) _byteswap_uint64(u)
|
# define BSWAP64(u) _byteswap_uint64(u)
|
||||||
#else
|
#else
|
||||||
# ifdef __has_builtin
|
# if defined(__GNUC__) && ( \
|
||||||
# if __has_builtin(__builtin_bswap32)
|
|
||||||
# define BSWAP32(u) __builtin_bswap32(u)
|
|
||||||
# endif // __has_builtin(__builtin_bswap32)
|
|
||||||
# if __has_builtin(__builtin_bswap64)
|
|
||||||
# define BSWAP64(u) __builtin_bswap64(u)
|
|
||||||
# endif // __has_builtin(__builtin_bswap64)
|
|
||||||
# elif defined(__GNUC__) && ( \
|
|
||||||
__GNUC__ > 4 || ( \
|
__GNUC__ > 4 || ( \
|
||||||
__GNUC__ == 4 && ( \
|
__GNUC__ == 4 && ( \
|
||||||
__GNUC_MINOR__ >= 3 \
|
__GNUC_MINOR__ >= 3 \
|
||||||
|
@ -29,6 +22,13 @@ FORCE_INLINE int IsBigEndian(void)
|
||||||
)
|
)
|
||||||
# define BSWAP32(u) __builtin_bswap32(u)
|
# define BSWAP32(u) __builtin_bswap32(u)
|
||||||
# define BSWAP64(u) __builtin_bswap64(u)
|
# define BSWAP64(u) __builtin_bswap64(u)
|
||||||
|
# elif defined(__has_builtin)
|
||||||
|
# if __has_builtin(__builtin_bswap32)
|
||||||
|
# define BSWAP32(u) __builtin_bswap32(u)
|
||||||
|
# endif // __has_builtin(__builtin_bswap32)
|
||||||
|
# if __has_builtin(__builtin_bswap64)
|
||||||
|
# define BSWAP64(u) __builtin_bswap64(u)
|
||||||
|
# endif // __has_builtin(__builtin_bswap64)
|
||||||
# endif // __has_builtin
|
# endif // __has_builtin
|
||||||
#endif // defined(_MSC_VER)
|
#endif // defined(_MSC_VER)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue