[Box Backup-dev] COMMIT r283 - in box/trunk: . lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 25 Dec 2005 18:28:29 +0000 (GMT)
Author: martin
Date: 2005-12-25 18:28:26 +0000 (Sun, 25 Dec 2005)
New Revision: 283
Modified:
box/trunk/configure.ac
box/trunk/lib/common/Box.h
Log:
Attempt to fix box_ntoh64 for FreeBSD which renames betoh64 to be64toh
Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac 2005-12-22 23:57:28 UTC (rev 282)
+++ box/trunk/configure.ac 2005-12-25 18:28:26 UTC (rev 283)
@@ -112,7 +112,7 @@
AC_FUNC_ERROR_AT_LINE
AC_TYPE_SIGNAL
AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle])
+AC_CHECK_FUNCS([be64toh getpeereid kqueue lchown setproctitle])
AX_FUNC_SYSCALL
AX_CHECK_SYSCALL_LSEEK
Modified: box/trunk/lib/common/Box.h
===================================================================
--- box/trunk/lib/common/Box.h 2005-12-22 23:57:28 UTC (rev 282)
+++ box/trunk/lib/common/Box.h 2005-12-25 18:28:26 UTC (rev 283)
@@ -138,7 +138,11 @@
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#define box_hton64(x) htobe64(x)
- #define box_ntoh64(x) betoh64(x)
+ #ifdef HAVE_BE64TOH
+ #define box_ntoh64(x) be64toh(x)
+ #else
+ #define box_ntoh64(x) betoh64(x)
+ #endif
#elif HAVE_ASM_BYTEORDER_H
#include <asm/byteorder.h>
#define box_hton64(x) __cpu_to_be64(x)