1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-28 02:38:43 +00:00

hashindex: detect mingw byte order

This commit is contained in:
Marian Beermann 2017-01-21 15:04:01 +01:00
parent ca0c1dab11
commit 90ae9076a4

View file

@ -13,10 +13,12 @@
#endif #endif
#if (defined(BYTE_ORDER)&&(BYTE_ORDER == BIG_ENDIAN)) || \ #if (defined(BYTE_ORDER)&&(BYTE_ORDER == BIG_ENDIAN)) || \
(defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) || \
(defined(_BIG_ENDIAN)&&defined(__SVR4)&&defined(__sun)) (defined(_BIG_ENDIAN)&&defined(__SVR4)&&defined(__sun))
#define _le32toh(x) __builtin_bswap32(x) #define _le32toh(x) __builtin_bswap32(x)
#define _htole32(x) __builtin_bswap32(x) #define _htole32(x) __builtin_bswap32(x)
#elif (defined(BYTE_ORDER)&&(BYTE_ORDER == LITTLE_ENDIAN)) || \ #elif (defined(BYTE_ORDER)&&(BYTE_ORDER == LITTLE_ENDIAN)) || \
(defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \
(defined(_LITTLE_ENDIAN)&&defined(__SVR4)&&defined(__sun)) (defined(_LITTLE_ENDIAN)&&defined(__SVR4)&&defined(__sun))
#define _le32toh(x) (x) #define _le32toh(x) (x)
#define _htole32(x) (x) #define _htole32(x) (x)