Skip to content

Commit 9d45926

Browse files
authored
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.
1 parent b5acfd5 commit 9d45926

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

msgpack/sysdep.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@ typedef unsigned int _msgpack_atomic_counter_t;
6161
#endif
6262
#endif
6363

64-
#else
65-
#include <arpa/inet.h> /* __BYTE_ORDER */
6664
#endif
6765

6866
#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
69-
#if __BYTE_ORDER == __LITTLE_ENDIAN
67+
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
7068
#define __LITTLE_ENDIAN__
71-
#elif __BYTE_ORDER == __BIG_ENDIAN
69+
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
7270
#define __BIG_ENDIAN__
7371
#elif _WIN32
7472
#define __LITTLE_ENDIAN__

0 commit comments

Comments
 (0)