summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDagobert Michelsen <dam@opencsw.org>2011-01-19 14:50:32 +0100
committerdormando <dormando@rydia.net>2014-04-27 23:20:53 -0700
commit2fa661a77ff5712aad7e5b996b3bbc3636ef92b6 (patch)
tree86dc9092917a4307f201341c0a52bd3f04097117 /configure.ac
parentfd39b1953b04b7dd9fdfe9a4f0d69e2225095ba0 (diff)
downloadmemcached-2fa661a77ff5712aad7e5b996b3bbc3636ef92b6.tar.gz
Take endianness into account on alignment check
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7f22f21..0f602cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -495,7 +495,13 @@ AC_DEFUN([AC_C_ALIGNMENT],
// catch unaligned word access (ARM cpus)
*buf = 1; *(buf +1) = 2; *(buf + 2) = 2; *(buf + 3) = 3; *(buf + 4) = 4;
int* i = (int*)(buf+1);
- return (84148994 == i) ? 0 : 1;
+ return (
+#ifdef ENDIAN_BIG
+ 0x02030405
+#else
+ 0x05040302
+#endif
+ == *i) ? 0 : 1;
])
],[
ac_cv_c_alignment=none