aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 2b57e7f9e..d1ac391eb 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -170,6 +170,13 @@
170# define bswap_32 __bswap32 170# define bswap_32 __bswap32
171# define bswap_16 __bswap16 171# define bswap_16 __bswap16
172# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) 172# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
173#elif ENABLE_PLATFORM_MINGW32
174# define __BIG_ENDIAN 0
175# define __LITTLE_ENDIAN 1
176# define __BYTE_ORDER __LITTLE_ENDIAN
177# define bswap_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0xFF) << 8))
178# define bswap_32(x) ((bswap_16(((x) & 0xFFFF0000L) >> 16)) | (bswap_16((x) & 0xFFFFL) << 16))
179# define bswap_64(x) ((bswap_32(((x) & 0xFFFFFFFF00000000LL) >> 32)) | (bswap_32((x) & 0xFFFFFFFFLL) << 32))
173#elif !defined __APPLE__ 180#elif !defined __APPLE__
174# include <byteswap.h> 181# include <byteswap.h>
175# include <endian.h> 182# include <endian.h>