|
@@ -211,22 +211,16 @@ extern "C" {
|
|
* ^^^^^^^^^^^^^^^^^^
|
|
* ^^^^^^^^^^^^^^^^^^
|
|
* The definition ``UA_BINARY_OVERLAYABLE_INTEGER`` is true when the integer
|
|
* The definition ``UA_BINARY_OVERLAYABLE_INTEGER`` is true when the integer
|
|
* representation of the target architecture is little-endian. */
|
|
* representation of the target architecture is little-endian. */
|
|
-#if defined(_WIN32) || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
|
|
|
- (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
|
|
|
|
|
+#if defined(_WIN32)
|
|
# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
-#elif defined(__ANDROID__) /* Andoid */
|
|
|
|
-# include <endian.h>
|
|
|
|
-# if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
|
|
-# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
|
|
-# endif
|
|
|
|
-#elif defined(__linux__) /* Linux */
|
|
|
|
|
|
+#elif (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
|
|
|
+ (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
|
|
|
+# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
|
|
+#elif defined(__linux__) /* Linux (including Android) */
|
|
# include <endian.h>
|
|
# include <endian.h>
|
|
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
# define UA_BINARY_OVERLAYABLE_INTEGER 1
|
|
# endif
|
|
# endif
|
|
-# if __FLOAT_BYTE_ORDER == __LITTLE_ENDIAN
|
|
|
|
-# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
|
|
-# endif
|
|
|
|
#elif defined(__OpenBSD__) /* OpenBSD */
|
|
#elif defined(__OpenBSD__) /* OpenBSD */
|
|
# include <sys/endian.h>
|
|
# include <sys/endian.h>
|
|
# if BYTE_ORDER == LITTLE_ENDIAN
|
|
# if BYTE_ORDER == LITTLE_ENDIAN
|
|
@@ -268,6 +262,11 @@ extern "C" {
|
|
#elif defined(__FLOAT_WORD_ORDER) && defined(__LITTLE_ENDIAN) && \
|
|
#elif defined(__FLOAT_WORD_ORDER) && defined(__LITTLE_ENDIAN) && \
|
|
(__FLOAT_WORD_ORDER == __LITTLE_ENDIAN) /* Defined only in GCC */
|
|
(__FLOAT_WORD_ORDER == __LITTLE_ENDIAN) /* Defined only in GCC */
|
|
# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
|
|
+#elif defined(__linux__) /* Linux (including Android) */
|
|
|
|
+# include <endian.h>
|
|
|
|
+# if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
|
|
|
|
+# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
|
|
+# endif
|
|
#elif defined(_WRS_KERNEL)
|
|
#elif defined(_WRS_KERNEL)
|
|
# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
# define UA_BINARY_OVERLAYABLE_FLOAT 1
|
|
#endif
|
|
#endif
|