diff src/dmlib.h @ 872:b01d04e44b6f

Assume we always have 64bit type.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 03 Feb 2015 20:58:34 +0200
parents fc272f5f2d15
children 26ea35e914ca
line wrap: on
line diff
--- a/src/dmlib.h	Tue Feb 03 20:27:12 2015 +0200
+++ b/src/dmlib.h	Tue Feb 03 20:58:34 2015 +0200
@@ -455,7 +455,6 @@
     (((Uint32) (value) & (Uint32) 0x00ff0000U) >>  8) | \
     (((Uint32) (value) & (Uint32) 0xff000000U) >> 24)))
 
-#ifdef DM_HAVE_64BIT
 #define DM_SWAP_64_LE_BE(value) ((Uint64) (                           \
     (((Uint64) (value) & (Uint64) 0x00000000000000ffULL) << 56) |   \
     (((Uint64) (value) & (Uint64) 0x000000000000ff00ULL) << 40) |   \
@@ -480,12 +479,10 @@
 #  define DM_NATIVE_TO_BE16(value) ((Uint16) (value))
 #  define DM_NATIVE_TO_BE32(value) ((Uint32) (value))
 
-#  ifdef DM_HAVE_64BIT
-#    define DM_LE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value)
-#    define DM_NATIVE_TO_LE64(value) DM_SWAP_64_LE_BE(value)
-#    define DM_BE64_TO_NATIVE(value) ((Uint64) (value))
-#    define DM_NATIVE_TO_BE64(value) ((Uint64) (value))
-#  endif
+#  define DM_LE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value)
+#  define DM_NATIVE_TO_LE64(value) DM_SWAP_64_LE_BE(value)
+#  define DM_BE64_TO_NATIVE(value) ((Uint64) (value))
+#  define DM_NATIVE_TO_BE64(value) ((Uint64) (value))
 
 #elif (SDL_BYTEORDER == SDL_LIL_ENDIAN)
 
@@ -499,12 +496,10 @@
 #  define DM_NATIVE_TO_BE16(value) DM_SWAP_16_LE_BE(value)
 #  define DM_NATIVE_TO_BE32(value) DM_SWAP_32_LE_BE(value)
 
-#  ifdef DM_HAVE_64BIT
-#    define DM_LE64_TO_NATIVE(value) ((Uint64) (value))
-#    define DM_NATIVE_TO_LE64(value) ((Uint64) (value))
-#    define DM_BE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value)
-#    define DM_NATIVE_TO_BE64(value) DM_SWAP_64_LE_BE(value)
-#  endif
+#  define DM_LE64_TO_NATIVE(value) ((Uint64) (value))
+#  define DM_NATIVE_TO_LE64(value) ((Uint64) (value))
+#  define DM_BE64_TO_NATIVE(value) DM_SWAP_64_LE_BE(value)
+#  define DM_NATIVE_TO_BE64(value) DM_SWAP_64_LE_BE(value)
 #endif