31#ifndef BYTEORDER_INCLUDED
32#define BYTEORDER_INCLUDED
38#ifndef STANDALONE_BINLOG
51#ifdef HAVE_ENDIAN_CONVERSION_MACROS
63#ifndef WORDS_BIGENDIAN
66 return ((x >> 8) | (x << 8));
79#ifndef WORDS_BIGENDIAN
82 return (((x >> 24) & 0xff) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
83 ((x << 24) & 0xff000000));
96#ifndef WORDS_BIGENDIAN
97 return (((x >> 24) & 0xff) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
98 ((x << 24) & 0xff000000));
113#ifndef WORDS_BIGENDIAN
116 x = ((x << 8) & 0xff00ff00ff00ff00ULL) | ((x >> 8) & 0x00ff00ff00ff00ffULL);
117 x = ((x << 16) & 0xffff0000ffff0000ULL) | ((x >> 16) & 0x0000ffff0000ffffULL);
118 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
uint32_t be32toh(uint32_t x)
Converting a 32 bit integer from big-endian byte order to host byteorder.
Definition: byteorder.h:95
uint64_t le64toh(uint64_t x)
Converting a 64 bit integer from little-endian byte order to host byteorder.
Definition: byteorder.h:112
Header for compiler-dependent features.