Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9d45926

Browse filesBrowse 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
Copy full SHA for 9d45926

File tree

1 file changed

+2
-4
lines changed
Filter options

1 file changed

+2
-4
lines changed

‎msgpack/sysdep.h

Copy file name to clipboardExpand all lines: msgpack/sysdep.h
+2-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.