summaryrefslogtreecommitdiff
path: root/Utilities/cmlibrhash
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-08 11:33:09 -0500
committerBrad King <brad.king@kitware.com>2016-11-10 08:29:36 -0500
commit0bd333bc2eb6590f939ccabb7caf102f13443600 (patch)
treee5c5eb111347ef621b362615307a3249e326258a /Utilities/cmlibrhash
parent7189d62c32e6f53dab5637f928917e59055f5e41 (diff)
downloadcmake-0bd333bc2eb6590f939ccabb7caf102f13443600.tar.gz
librhash: Implement bswap_64 even in strict C90 mode
Diffstat (limited to 'Utilities/cmlibrhash')
-rw-r--r--Utilities/cmlibrhash/librhash/byte_order.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Utilities/cmlibrhash/librhash/byte_order.h b/Utilities/cmlibrhash/librhash/byte_order.h
index a43906cba7..6ed8668811 100644
--- a/Utilities/cmlibrhash/librhash/byte_order.h
+++ b/Utilities/cmlibrhash/librhash/byte_order.h
@@ -120,8 +120,8 @@ static inline uint32_t bswap_32(uint32_t x) {
# define bswap_64(x) __builtin_bswap64(x)
#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */
# define bswap_64(x) _byteswap_uint64((__int64)x)
-#elif !defined(__STRICT_ANSI__)
-static inline uint64_t bswap_64(uint64_t x) {
+#else
+static uint64_t bswap_64(uint64_t x) {
union {
uint64_t ll;
uint32_t l[2];
@@ -131,8 +131,6 @@ static inline uint64_t bswap_64(uint64_t x) {
r.l[1] = bswap_32(w.l[0]);
return r.ll;
}
-#else
-#error "bswap_64 unsupported"
#endif
#ifdef CPU_BIG_ENDIAN