#include <stdio.h>
#include <errno.h>
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-
#if defined(__linux__) || defined(__CYGWIN__)
#include <byteswap.h>
#include <endian.h>
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
#define cpu_to_be64(x) bswap_64(x)
#define cpu_to_be32(x) bswap_32(x)
#define cpu_to_be16(x) bswap_16(x)