endian.h 384 B

12345678910111213141516171819
  1. #ifndef __MACHINE_ENDIAN_H__
  2. #ifndef BIG_ENDIAN
  3. #define BIG_ENDIAN 4321
  4. #endif
  5. #ifndef LITTLE_ENDIAN
  6. #define LITTLE_ENDIAN 1234
  7. #endif
  8. #ifndef BYTE_ORDER
  9. #if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
  10. #define BYTE_ORDER LITTLE_ENDIAN
  11. #else
  12. #define BYTE_ORDER BIG_ENDIAN
  13. #endif
  14. #endif
  15. #endif /* __MACHINE_ENDIAN_H__ */