#ifndef _IV_BYTEORDER_H_ #define _IV_BYTEORDER_H_ #include #if defined(__FreeBSD__) || defined(__APPLE__) #if defined(__FreeBSD__) #include #else #include #endif // defined(__FreeBSD__) #define __BYTE_ORDER BYTE_ORDER #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __BIG_ENDIAN BIG_ENDIAN #elif defined(__GNUC__) #include #endif #if !defined(__BYTE_ORDER) || (__BYTE_ORDER != __LITTLE_ENDIAN && __BYTE_ORDER != __BIG_ENDIAN) #error BYTE_ORDER not defined. you shoud define __LITTLE_ENDIAN or __BIG_ENDIAN #endif #if (__BYTE_ORDER == __LITTLE_ENDIAN) #define IV_IS_LITTLE_ENDIAN #else #define IV_IS_BIG_ENDIAN #endif #endif // _IV_BYTEORDER_H_