You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

big_bswap.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef ETHERBOOT_BIG_BSWAP_H
  2. #define ETHERBOOT_BIG_BSWAP_H
  3. #define htonll(x) (x)
  4. #define ntohll(x) (x)
  5. #define ntohl(x) (x)
  6. #define htonl(x) (x)
  7. #define ntohs(x) (x)
  8. #define htons(x) (x)
  9. #define cpu_to_le64(x) __bswap_64(x)
  10. #define cpu_to_le32(x) __bswap_32(x)
  11. #define cpu_to_le16(x) __bswap_16(x)
  12. #define cpu_to_be64(x) (x)
  13. #define cpu_to_be32(x) (x)
  14. #define cpu_to_be16(x) (x)
  15. #define le64_to_cpu(x) __bswap_64(x)
  16. #define le32_to_cpu(x) __bswap_32(x)
  17. #define le16_to_cpu(x) __bswap_16(x)
  18. #define be64_to_cpu(x) (x)
  19. #define be32_to_cpu(x) (x)
  20. #define be16_to_cpu(x) (x)
  21. #define cpu_to_le64s(x) __bswap_64s(x)
  22. #define cpu_to_le32s(x) __bswap_32s(x)
  23. #define cpu_to_le16s(x) __bswap_16s(x)
  24. #define cpu_to_be64s(x) do {} while (0)
  25. #define cpu_to_be32s(x) do {} while (0)
  26. #define cpu_to_be16s(x) do {} while (0)
  27. #define le64_to_cpus(x) __bswap_64s(x)
  28. #define le32_to_cpus(x) __bswap_32s(x)
  29. #define le16_to_cpus(x) __bswap_16s(x)
  30. #define be64_to_cpus(x) do {} while (0)
  31. #define be32_to_cpus(x) do {} while (0)
  32. #define be16_to_cpus(x) do {} while (0)
  33. #endif /* ETHERBOOT_BIG_BSWAP_H */