[Box Backup-dev] COMMIT r286 - in box/trunk: . lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Wed, 28 Dec 2005 07:35:19 +0000 (GMT)
Author: martin
Date: 2005-12-28 07:35:17 +0000 (Wed, 28 Dec 2005)
New Revision: 286
Modified:
box/trunk/configure.ac
box/trunk/lib/common/Box.h
Log:
Don't use betoh64/be64tonh to avoid name hassle
Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac 2005-12-26 01:09:36 UTC (rev 285)
+++ box/trunk/configure.ac 2005-12-28 07:35:17 UTC (rev 286)
@@ -112,7 +112,7 @@
AC_FUNC_ERROR_AT_LINE
AC_TYPE_SIGNAL
AC_FUNC_STAT
-AC_CHECK_FUNCS([be64toh getpeereid kqueue lchown setproctitle])
+AC_CHECK_FUNCS([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-26 01:09:36 UTC (rev 285)
+++ box/trunk/lib/common/Box.h 2005-12-28 07:35:17 UTC (rev 286)
@@ -137,12 +137,10 @@
#else
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
+ // betoh64 (OpenBSD) is sometimes called be64toh (FreeBSD, NetBSD).
+ // Rather than check for it just reuse htobe64 since they are symmetrical
#define box_hton64(x) htobe64(x)
- #ifdef HAVE_BE64TOH
- #define box_ntoh64(x) be64toh(x)
- #else
- #define box_ntoh64(x) betoh64(x)
- #endif
+ #define box_ntoh64(x) htobe64(x)
#elif HAVE_ASM_BYTEORDER_H
#include <asm/byteorder.h>
#define box_hton64(x) __cpu_to_be64(x)