1
0
Fork 0

Fix 0165fe1: Native OSX doesn't have a __BYTE_ORDER macro but defines a differently named macro.

pull/6749/merge
Michael Lutz 2018-04-30 22:55:17 +02:00
parent bb5584c835
commit 9959cd9522
1 changed files with 14 additions and 7 deletions

View File

@ -28,6 +28,13 @@
/* Windows has always LITTLE_ENDIAN */
#if defined(WIN32) || defined(__OS2__) || defined(WIN64)
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
#elif defined(OSX)
# include <sys/types.h>
# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
# else
# define TTD_ENDIAN TTD_BIG_ENDIAN
# endif
#elif !defined(TESTING)
# include <sys/param.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN