Browse Source

Supplement other 64-bit endian swap macros

Luke Dashjr 13 years ago
parent
commit
58eec8793b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      miner.h

+ 6 - 0
miner.h

@@ -157,15 +157,21 @@ static inline int fsync (int fd)
 # if __BYTE_ORDER == __LITTLE_ENDIAN
 #  define be32toh(x) bswap_32(x)
 #  define htobe32(x) bswap_32(x)
+#  define be64toh(x) bswap_64(x)
 #  define htobe64(x) bswap_64(x)
 #  define le32toh(x) (x)
 #  define htole32(x) (x)
+#  define le64toh(x) (x)
+#  define htole64(x) (x)
 # elif __BYTE_ORDER == __BIG_ENDIAN
 #  define be32toh(x) (x)
 #  define htobe32(x) (x)
+#  define be64toh(x) (x)
 #  define htobe64(x) (x)
 #  define le32toh(x) bswap_32(x)
 #  define htole32(x) bswap_32(x)
+#  define le64toh(x) bswap_64(x)
+#  define htole64(x) bswap_64(x)
 #else
 #error UNKNOWN BYTE ORDER
 #endif