]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/util.h
Merge 2-2
[netatalk.git] / include / atalk / util.h
index 25067af051bdb22219f500ce48cbf295003dda52..c5b23ee6f9eaeca3687c0a884d6b5a0c5c614c63 100644 (file)
 #define MIN(a,b) ((a) < (b) ? a : b)
 #endif
 
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
 #define hton64(x)       (x)
 #define ntoh64(x)       (x)
-#else /* BYTE_ORDER == BIG_ENDIAN */
+#else
 #define hton64(x)       ((uint64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
                          (uint64_t) ((htonl(x) & 0xffffffffLL) << 32))
 #define ntoh64(x)       (hton64(x))
-#endif /* BYTE_ORDER == BIG_ENDIAN */
+#endif
 
 #ifdef WITH_SENDFILE
 extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);