2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-16 08:11:31 +00:00
xNBA/src/include/little_bswap.h

34 lines
1.1 KiB
C
Raw Normal View History

2005-03-08 18:53:11 +00:00
#ifndef ETHERBOOT_LITTLE_BSWAP_H
#define ETHERBOOT_LITTLE_BSWAP_H
#define ntohl(x) __bswap_32(x)
#define htonl(x) __bswap_32(x)
#define ntohs(x) __bswap_16(x)
#define htons(x) __bswap_16(x)
2006-05-13 11:40:39 +00:00
#define cpu_to_le64(x) (x)
2005-03-08 18:53:11 +00:00
#define cpu_to_le32(x) (x)
#define cpu_to_le16(x) (x)
2006-05-13 11:40:39 +00:00
#define cpu_to_be64(x) __bswap_64(x)
2005-03-08 18:53:11 +00:00
#define cpu_to_be32(x) __bswap_32(x)
#define cpu_to_be16(x) __bswap_16(x)
2006-05-13 11:40:39 +00:00
#define le64_to_cpu(x) (x)
2005-03-08 18:53:11 +00:00
#define le32_to_cpu(x) (x)
#define le16_to_cpu(x) (x)
2006-05-13 11:40:39 +00:00
#define be64_to_cpu(x) __bswap_64(x)
2005-03-08 18:53:11 +00:00
#define be32_to_cpu(x) __bswap_32(x)
#define be16_to_cpu(x) __bswap_16(x)
2006-09-11 17:54:19 +00:00
#define cpu_to_le64s(x) do {} while (0)
#define cpu_to_le32s(x) do {} while (0)
#define cpu_to_le16s(x) do {} while (0)
#define cpu_to_be64s(x) __bswap_64s(x)
#define cpu_to_be32s(x) __bswap_32s(x)
#define cpu_to_be16s(x) __bswap_16s(x)
#define le64_to_cpus(x) do {} while (0)
#define le32_to_cpus(x) do {} while (0)
#define le16_to_cpus(x) do {} while (0)
#define be64_to_cpus(x) __bswap_64s(x)
#define be32_to_cpus(x) __bswap_32s(x)
#define be16_to_cpus(x) __bswap_16s(x)
2005-03-08 18:53:11 +00:00
#endif /* ETHERBOOT_LITTLE_BSWAP_H */