Skip to content

Commit

Permalink
Usef __BYTE_ORDER__ instead of __BYTE_ORDER (#513)
Browse files Browse the repository at this point in the history
__BYTE_ORDER__ is common predefined macro available on at least gcc and clang.
__BYTE_ORDER is macro defined in platform specific headers.
  • Loading branch information
kulikjak committed Aug 2, 2022
1 parent b5acfd5 commit 9d45926
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions msgpack/sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down

0 comments on commit 9d45926

Please sign in to comment.