summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub KulĂ­k <Kulikjak@gmail.com>2022-08-02 06:19:56 +0200
committerGitHub <noreply@github.com>2022-08-02 13:19:56 +0900
commit9d45926a596028e39ec59dd909a56eb5e9e8fee7 (patch)
tree261c03e9553d2f0311d9613611361ef1dbc0f938
parentb5acfd53833c3dbd379e539cc6e540cec83d0a99 (diff)
downloadmsgpack-python-9d45926a596028e39ec59dd909a56eb5e9e8fee7.tar.gz
Usef `__BYTE_ORDER__` instead of `__BYTE_ORDER` (#513)
__BYTE_ORDER__ is common predefined macro available on at least gcc and clang. __BYTE_ORDER is macro defined in platform specific headers.
-rw-r--r--msgpack/sysdep.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/msgpack/sysdep.h b/msgpack/sysdep.h
index ed9c1bc..ae28f0c 100644
--- a/msgpack/sysdep.h
+++ b/msgpack/sysdep.h
@@ -61,14 +61,12 @@ typedef unsigned int _msgpack_atomic_counter_t;
#endif
#endif
-#else
-#include <arpa/inet.h> /* __BYTE_ORDER */
#endif
#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__
-#elif __BYTE_ORDER == __BIG_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define __BIG_ENDIAN__
#elif _WIN32
#define __LITTLE_ENDIAN__