]> arthur.barton.de Git - netatalk.git/commitdiff
Fix byte order detection
authorFrank Lahm <franklahm@googlemail.com>
Fri, 20 Apr 2012 10:19:23 +0000 (12:19 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Fri, 20 Apr 2012 10:19:23 +0000 (12:19 +0200)
NEWS
configure.ac
include/atalk/util.h

diff --git a/NEWS b/NEWS
index fec9ef872566143f8aa0bd5f6e1370dba0bba278..694ed71d5405e062ab8964c3169bd3241da634ce 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ Changes in 3.0 alpha3
        vol charset is same value as unix charset by default
 * FIX: afpd: Server info packet was malformed resulting in broken
        server names being displayed on clients
+* FIX: afpd: Byte order detection. Fixes an error where Netatalk on
+       OpenIndiana returned wrong volume size information.
 
 Changes in 3.0 alpha2
 =====================
index 76cf8cbe6cba9b10983b056b13051ab3facb7d85..87342dfa49c6a836c209ee3a7e523a4ec7385179 100644 (file)
@@ -23,8 +23,7 @@ AC_PROG_PERL
 AC_PROG_GREP
 AC_PROG_PS
 AM_PROG_CC_C_O
-
-dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_BIGENDIAN
 AC_C_INLINE
 
 dnl Check if we can use attribute unused (gcc only) from ethereal
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);