Преглед изворни кода

fix android endianness macro

Julius Pfrommer пре 8 година
родитељ
комит
fb64058984
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      include/ua_config.h.in

+ 5 - 3
include/ua_config.h.in

@@ -82,7 +82,7 @@
 /**
  * Integer Endianness
  * ------------------ */
-#if defined(__LITTLE_ENDIAN__) || defined(_WIN32) || (!defined(__ANDROID__) && BYTE_ORDER == ORDER_LITTLE_ENDIAN)
+#if defined(__LITTLE_ENDIAN__) || defined(_WIN32)
 # define htole16(x) (x)
 # define htole32(x) (x)
 # define htole64(x) (x)
@@ -112,7 +112,6 @@
 #  define le16toh(x) OSSwapLittleToHostInt16(x)
 #  define le32toh(x) OSSwapLittleToHostInt32(x)
 #  define le64toh(x) OSSwapLittleToHostInt64(x)
-#  define __BYTE_ORDER BYTE_ORDER
 # elif defined(__QNX__) || defined(__QNXNTO__)
 #  include <gulliver.h>
 #  define htole16(x) ENDIAN_LE16(x)
@@ -132,7 +131,10 @@
  * ---------------- */
 
 /* Demote error to a warning on clang. There is no robust way to detect float
-   endianness here. */
+ * endianness here. On x86/x86-64, floats are always in the right IEEE 754
+ * format. Then, the "Unknown float representation warning" can be ignored or
+ * disabled and the UA_ENCODING_FLOAT_GENERIC definition removed to get faster
+ * speed. */
 #if defined(__clang__)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic warning "-W#warnings"