33#ifndef BYTEORDER_INCLUDED
34#define BYTEORDER_INCLUDED
49#ifdef HAVE_ENDIAN_CONVERSION_MACROS
62#ifndef WORDS_BIGENDIAN
65 return static_cast<uint16_t
>((x >> 8) | (x << 8));
79#ifndef WORDS_BIGENDIAN
82 return (((x >> 24) & 0xff) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
83 ((x << 24) & 0xff000000));
97#ifndef WORDS_BIGENDIAN
100 x = ((x << 8) & 0xff00ff00ff00ff00ULL) | ((x >> 8) & 0x00ff00ff00ff00ffULL);
101 x = ((x << 16) & 0xffff0000ffff0000ULL) | ((x >> 16) & 0x0000ffff0000ffffULL);
102 return (x << 32) | (x >> 32);
117#ifndef WORDS_BIGENDIAN
120 return static_cast<uint16_t
>((x >> 8) | (x << 8));
135#ifndef WORDS_BIGENDIAN
138 return (((x >> 24) & 0xff) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
139 ((x << 24) & 0xff000000));
154#ifndef WORDS_BIGENDIAN
157 x = ((x << 8) & 0xff00ff00ff00ff00ULL) | ((x >> 8) & 0x00ff00ff00ff00ffULL);
158 x = ((x << 16) & 0xffff0000ffff0000ULL) | ((x >> 16) & 0x0000ffff0000ffffULL);
159 return (x << 32) | (x >> 32);
Include only the necessary part of Sun RPC for Windows builds.
uint16_t le16toh(uint16_t x)
Converting a 16 bit integer from little-endian byte order to host byteorder.
Definition: byteorder.h:62
uint32_t le32toh(uint32_t x)
Converting a 32 bit integer from little-endian byte order to host byteorder.
Definition: byteorder.h:78