1 #ifndef __endian_compat_h
2 #define __endian_compat_h
4 #if defined(__linux__) || defined(__CYGWIN__)
6 #include_next <endian.h>
7 #elif defined(__APPLE__)
8 #include <machine/endian.h>
9 #include <machine/byte_order.h>
10 #elif defined(__FreeBSD__)
11 #include <sys/endian.h>
12 #elif defined(__OpenBSD__)
13 #include <sys/types.h>
15 #include <machine/endian.h>
19 #define __BYTE_ORDER BYTE_ORDER
22 #define __BIG_ENDIAN BIG_ENDIAN
24 #ifndef __LITTLE_ENDIAN
25 #define __LITTLE_ENDIAN LITTLE_ENDIAN