mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
htonu64() and ntohu64 added to endianconv.h.
This commit is contained in:
parent
3c9bb8751a
commit
da257afe57
@ -61,4 +61,14 @@ uint64_t intrev64(uint64_t v);
|
||||
#define intrev64ifbe(v) intrev64(v)
|
||||
#endif
|
||||
|
||||
/* The functions htonu64() and ntohu64() convert the specified value to
|
||||
* network byte ordering and back. In big endian systems they are no-ops. */
|
||||
#if (BYTE_ORDER == BIG_ENDIAN)
|
||||
#define htonu64(v) (v)
|
||||
#define ntohu64(v) (v)
|
||||
#else
|
||||
#define htonu64(v) intrev64(v)
|
||||
#define ntohu64(v) intrev64(v)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user