diff th_endian.h @ 212:f99fceb09707

Get rid of TH_HAVE_64BIT.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 12 Feb 2016 18:13:22 +0200
parents e6a278f140c4
children 592bf6da0f1f
line wrap: on
line diff
--- 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!