diff Core/Endianness.h @ 2546:6d5e36e1256f

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 17 Apr 2018 19:19:27 +0200
parents 98a04e75f15e
children 0511feaf0ec2
line wrap: on
line diff
--- a/Core/Endianness.h	Tue Apr 17 21:01:08 2018 +0200
+++ b/Core/Endianness.h	Tue Apr 17 19:19:27 2018 +0200
@@ -69,7 +69,7 @@
 #    define be32toh(x) __builtin_bswap32(x)
 #    define be64toh(x) __builtin_bswap64(x)
 #  else
-//   MinGW <= 4.2, we must manually implement the byte swapping
+//   MinGW <= 4.2, we must manually implement the byte swapping (*)
 #    define ORTHANC_HAS_BUILTIN_BYTE_SWAP 0
 #    define be16toh(x) __orthanc_bswap16(x)
 #    define be32toh(x) __orthanc_bswap32(x)
@@ -170,7 +170,9 @@
           static_cast<uint64_t>(p[7]));
 }
 
-#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
+#if defined(_WIN32)
+// Implemented above (*)
+#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
 #  if __BYTE_ORDER == __LITTLE_ENDIAN
 #    define be16toh(x) __orthanc_bswap16(x)
 #    define be32toh(x) __orthanc_bswap32(x)