2004-05-08 04:29:24 +08:00
|
|
|
#ifndef __MACHINE_ENDIAN_H__
|
|
|
|
|
|
|
|
#include <sys/config.h>
|
|
|
|
|
|
|
|
#ifndef BIG_ENDIAN
|
|
|
|
#define BIG_ENDIAN 4321
|
|
|
|
#endif
|
|
|
|
#ifndef LITTLE_ENDIAN
|
|
|
|
#define LITTLE_ENDIAN 1234
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BYTE_ORDER
|
2010-06-19 00:26:25 +08:00
|
|
|
#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
|
2004-05-08 04:29:24 +08:00
|
|
|
#define BYTE_ORDER LITTLE_ENDIAN
|
|
|
|
#else
|
|
|
|
#define BYTE_ORDER BIG_ENDIAN
|
|
|
|
#endif
|
2004-05-09 01:13:38 +08:00
|
|
|
#endif
|
2004-05-08 04:29:24 +08:00
|
|
|
|
|
|
|
#endif /* __MACHINE_ENDIAN_H__ */
|