diff options
author | Brad King <brad.king@kitware.com> | 2016-11-03 18:04:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-10 13:29:37 (GMT) |
commit | d0ff3e701c63caab5a44c48ac70e3ab75af9ee88 (patch) | |
tree | b444b1c2d19c000788974e1ae7ab1a56932a78e2 /Utilities/cmlibrhash/librhash/byte_order.h | |
parent | 465a85fb4615f4cfa20058c534bf3bfe71df1732 (diff) | |
download | CMake-d0ff3e701c63caab5a44c48ac70e3ab75af9ee88.zip CMake-d0ff3e701c63caab5a44c48ac70e3ab75af9ee88.tar.gz CMake-d0ff3e701c63caab5a44c48ac70e3ab75af9ee88.tar.bz2 |
librhash: Port to KWIML for ABI and integer type information
Diffstat (limited to 'Utilities/cmlibrhash/librhash/byte_order.h')
-rw-r--r-- | Utilities/cmlibrhash/librhash/byte_order.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/Utilities/cmlibrhash/librhash/byte_order.h b/Utilities/cmlibrhash/librhash/byte_order.h index f8330e1..d34a020 100644 --- a/Utilities/cmlibrhash/librhash/byte_order.h +++ b/Utilities/cmlibrhash/librhash/byte_order.h @@ -4,10 +4,6 @@ #include "ustd.h" #include <stdlib.h> -#ifdef __GLIBC__ -# include <endian.h> -#endif - #ifdef __cplusplus extern "C" { #endif @@ -32,22 +28,12 @@ extern "C" { /* detect CPU endianness */ -#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \ - __BYTE_ORDER == __LITTLE_ENDIAN) || \ - defined(CPU_IA32) || defined(CPU_X64) || \ - defined(__ia64) || defined(__ia64__) || defined(__alpha__) || defined(_M_ALPHA) || \ - defined(vax) || defined(MIPSEL) || defined(_ARM_) || defined(__arm__) +#include <cm_kwiml.h> +#if KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_LITTLE # define CPU_LITTLE_ENDIAN # define IS_BIG_ENDIAN 0 # define IS_LITTLE_ENDIAN 1 -#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \ - __BYTE_ORDER == __BIG_ENDIAN) || \ - defined(__sparc) || defined(__sparc__) || defined(sparc) || \ - defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) || \ - defined(__POWERPC__) || defined(POWERPC) || defined(__powerpc) || \ - defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || \ - defined(__hpux) || defined(_MIPSEB) || defined(mc68000) || \ - defined(__s390__) || defined(__s390x__) || defined(sel) +#elif KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_BIG # define CPU_BIG_ENDIAN # define IS_BIG_ENDIAN 1 # define IS_LITTLE_ENDIAN 0 |