1
0

endian.h 571 B

12345678910111213141516171819202122232425262728
  1. #ifndef __endian_compat_h
  2. #define __endian_compat_h
  3. #if defined(__linux__) || defined(__CYGWIN__)
  4. #include <byteswap.h>
  5. #include_next <endian.h>
  6. #elif defined(__APPLE__)
  7. #include <machine/endian.h>
  8. #include <machine/byte_order.h>
  9. #elif defined(__FreeBSD__)
  10. #include <sys/endian.h>
  11. #elif defined(__OpenBSD__)
  12. #include <sys/types.h>
  13. #else
  14. #include <machine/endian.h>
  15. #endif
  16. #ifndef __BYTE_ORDER
  17. #define __BYTE_ORDER BYTE_ORDER
  18. #endif
  19. #ifndef __BIG_ENDIAN
  20. #define __BIG_ENDIAN BIG_ENDIAN
  21. #endif
  22. #ifndef __LITTLE_ENDIAN
  23. #define __LITTLE_ENDIAN LITTLE_ENDIAN
  24. #endif
  25. #endif