summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2014-03-30 23:27:08 (GMT)
committerJason Evans <jasone@canonware.com>2014-03-30 23:27:08 (GMT)
commitdf3f27024f193b7baeedcd9f3799b4774dd20bbf (patch)
tree06db4fe0ab2fba5c80697c691ee0f72630f4cdfa /configure.ac
parentada8447cf6fb2c1f976b6311dade2e91026b3d83 (diff)
downloadjemalloc-df3f27024f193b7baeedcd9f3799b4774dd20bbf.zip
jemalloc-df3f27024f193b7baeedcd9f3799b4774dd20bbf.tar.gz
jemalloc-df3f27024f193b7baeedcd9f3799b4774dd20bbf.tar.bz2
Adapt hash tests to big-endian systems.
The hash code, which has MurmurHash3 at its core, generates different output depending on system endianness, so adapt the expected output on big-endian systems. MurmurHash3 code also makes the assumption that unaligned access is okay (not true on all systems), but jemalloc only hashes data structures that have sufficient alignment to dodge this limitation.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3837a78..d5c663e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,11 @@ if test "x$EXTRA_CFLAGS" != "x" ; then
fi
AC_PROG_CPP
+AC_C_BIGENDIAN([ac_cv_big_endian=1], [ac_cv_big_endian=0])
+if test "x${ac_cv_big_endian}" = "x1" ; then
+ AC_DEFINE_UNQUOTED([JEMALLOC_BIG_ENDIAN], [ ])
+fi
+
AC_CHECK_SIZEOF([void *])
if test "x${ac_cv_sizeof_void_p}" = "x8" ; then
LG_SIZEOF_PTR=3