projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5ec07e
)
Fix conditional on byteorder to work on Solaris
author
Dagobert Michelsen
<dam@opencsw.org>
Wed, 4 Apr 2018 12:34:15 +0000
(14:34 +0200)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Mon, 21 May 2018 04:56:48 +0000
(11:56 +0700)
src/stdendian.h
patch
|
blob
|
history
diff --git
a/src/stdendian.h
b/src/stdendian.h
index
4d32b15
..
f84a03d
100644
(file)
--- a/
src/stdendian.h
+++ b/
src/stdendian.h
@@
-211,7
+211,7
@@
/* Host swap macros */
#ifndef __HOSTSWAP_DEFINED
/* Host swap macros */
#ifndef __HOSTSWAP_DEFINED
-#if _
_BYTE_ORDER == _
_LITTLE_ENDIAN
+#if _
BYTE_ORDER ==
_LITTLE_ENDIAN
#define htobe16(x) bswap16((x))
#define htole16(x) ((uint16_t)(x))
#define be16toh(x) bswap16((x))
#define htobe16(x) bswap16((x))
#define htole16(x) ((uint16_t)(x))
#define be16toh(x) bswap16((x))
@@
-226,7
+226,7
@@
#define htole64(x) ((uint64_t)(x))
#define be64toh(x) bswap64((x))
#define le64toh(x) ((uint64_t)(x))
#define htole64(x) ((uint64_t)(x))
#define be64toh(x) bswap64((x))
#define le64toh(x) ((uint64_t)(x))
-#elif _
_BYTE_ORDER == _
_BIG_ENDIAN
+#elif _
BYTE_ORDER ==
_BIG_ENDIAN
#define htobe16(x) ((uint16_t)(x))
#define htole16(x) bswap16((x))
#define be16toh(x) ((uint16_t)(x))
#define htobe16(x) ((uint16_t)(x))
#define htole16(x) bswap16((x))
#define be16toh(x) ((uint16_t)(x))