# HG changeset patch # User Matti Hamalainen # Date 1455293602 -7200 # Node ID f99fceb09707f8f24375709600a585ef9e0532d4 # Parent a2b2106943a87cebd2293077d8c62cf41ca29bd2 Get rid of TH_HAVE_64BIT. diff -r a2b2106943a8 -r f99fceb09707 th_endian.h --- a/th_endian.h Fri Feb 12 06:08:04 2016 +0200 +++ b/th_endian.h Fri Feb 12 18:13:22 2016 +0200 @@ -40,7 +40,6 @@ (((uint32_t) (value) & (uint32_t) 0x00ff0000U) >> 8) | \ (((uint32_t) (value) & (uint32_t) 0xff000000U) >> 24))) -#ifdef TH_HAVE_64BIT #define TH_SWAP_64_LE_BE(value) ((uint64_t) ( \ (((uint64_t) (value) & (uint64_t) 0x00000000000000ffULL) << 56) | \ (((uint64_t) (value) & (uint64_t) 0x000000000000ff00ULL) << 40) | \ @@ -50,7 +49,7 @@ (((uint64_t) (value) & (uint64_t) 0x0000ff0000000000ULL) >> 24) | \ (((uint64_t) (value) & (uint64_t) 0x00ff000000000000ULL) >> 40) | \ (((uint64_t) (value) & (uint64_t) 0xff00000000000000ULL) >> 56))) -#endif + /* Macros that swap only when needed ... */ @@ -66,12 +65,10 @@ #define TH_NATIVE_TO_BE16(value) ((uint16_t) (value)) #define TH_NATIVE_TO_BE32(value) ((uint32_t) (value)) -#ifdef TH_HAVE_64BIT #define TH_LE64_TO_NATIVE(value) TH_SWAP_64_LE_BE(value) #define TH_NATIVE_TO_LE64(value) TH_SWAP_64_LE_BE(value) #define TH_BE64_TO_NATIVE(value) ((uint64_t) (value)) #define TH_NATIVE_TO_BE64(value) ((uint64_t) (value)) -#endif // !TH_BIG_ENDIAN #elif (TH_BYTEORDER == TH_LITTLE_ENDIAN) @@ -86,12 +83,10 @@ #define TH_NATIVE_TO_BE16(value) TH_SWAP_16_LE_BE(value) #define TH_NATIVE_TO_BE32(value) TH_SWAP_32_LE_BE(value) -#ifdef TH_HAVE_64BIT #define TH_LE64_TO_NATIVE(value) ((uint64_t) (value)) #define TH_NATIVE_TO_LE64(value) ((uint64_t) (value)) #define TH_BE64_TO_NATIVE(value) TH_SWAP_64_LE_BE(value) #define TH_NATIVE_TO_BE64(value) TH_SWAP_64_LE_BE(value) -#endif #else # error Unsupported byte order! diff -r a2b2106943a8 -r f99fceb09707 th_ioctx.c --- a/th_ioctx.c Fri Feb 12 06:08:04 2016 +0200 +++ b/th_ioctx.c Fri Feb 12 18:13:22 2016 +0200 @@ -320,10 +320,8 @@ TH_DEFINE_FUNC(be16, uint16_t, BE16) TH_DEFINE_FUNC(be32, uint32_t, BE32) -#ifdef TH_HAVE_64BIT TH_DEFINE_FUNC(le64, uint64_t, LE64) TH_DEFINE_FUNC(be64, uint64_t, BE64) -#endif #undef TH_DEFINE_FUNC