Skip to content

Commit 8276560

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: ext/hash: Swap the checking order of __has_builtin and __GNUC__ (#14185)
2 parents e976c2d + ccdbbdc commit 8276560

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: ext/hash/murmur/endianness.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ FORCE_INLINE int IsBigEndian(void)
1313
# define BSWAP32(u) _byteswap_ulong(u)
1414
# define BSWAP64(u) _byteswap_uint64(u)
1515
#else
16-
# ifdef __has_builtin
17-
# if __has_builtin(__builtin_bswap32)
18-
# define BSWAP32(u) __builtin_bswap32(u)
19-
# endif // __has_builtin(__builtin_bswap32)
20-
# if __has_builtin(__builtin_bswap64)
21-
# define BSWAP64(u) __builtin_bswap64(u)
22-
# endif // __has_builtin(__builtin_bswap64)
23-
# elif defined(__GNUC__) && ( \
16+
# if defined(__GNUC__) && ( \
2417
__GNUC__ > 4 || ( \
2518
__GNUC__ == 4 && ( \
2619
__GNUC_MINOR__ >= 3 \
@@ -29,6 +22,13 @@ FORCE_INLINE int IsBigEndian(void)
2922
)
3023
# define BSWAP32(u) __builtin_bswap32(u)
3124
# define BSWAP64(u) __builtin_bswap64(u)
25+
# elif defined(__has_builtin)
26+
# if __has_builtin(__builtin_bswap32)
27+
# define BSWAP32(u) __builtin_bswap32(u)
28+
# endif // __has_builtin(__builtin_bswap32)
29+
# if __has_builtin(__builtin_bswap64)
30+
# define BSWAP64(u) __builtin_bswap64(u)
31+
# endif // __has_builtin(__builtin_bswap64)
3232
# endif // __has_builtin
3333
#endif // defined(_MSC_VER)
3434

0 commit comments

Comments
 (0)