mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 10:38:20 +08:00
mdbx-test: portability - define bswap() macros conditionally.
Change-Id: I44d7daf71bd4dd66f8821af926f0c26578624e92
This commit is contained in:
parent
f37a760dda
commit
fac0c4c5c0
@ -26,9 +26,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC_PREREQ(4, 4) || defined(__clang__)
|
#if __GNUC_PREREQ(4, 4) || defined(__clang__)
|
||||||
|
#ifndef bswap64
|
||||||
#define bswap64(v) __builtin_bswap64(v)
|
#define bswap64(v) __builtin_bswap64(v)
|
||||||
|
#endif
|
||||||
|
#ifndef bswap32
|
||||||
#define bswap32(v) __builtin_bswap32(v)
|
#define bswap32(v) __builtin_bswap32(v)
|
||||||
#if __GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16)
|
#endif
|
||||||
|
#if (__GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16)) && \
|
||||||
|
!defined(bswap16)
|
||||||
#define bswap16(v) __builtin_bswap16(v)
|
#define bswap16(v) __builtin_bswap16(v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user