diff options
author | Dagobert Michelsen <dam@opencsw.org> | 2011-01-19 14:50:32 +0100 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2014-04-27 23:20:53 -0700 |
commit | 2fa661a77ff5712aad7e5b996b3bbc3636ef92b6 (patch) | |
tree | 86dc9092917a4307f201341c0a52bd3f04097117 /configure.ac | |
parent | fd39b1953b04b7dd9fdfe9a4f0d69e2225095ba0 (diff) | |
download | memcached-2fa661a77ff5712aad7e5b996b3bbc3636ef92b6.tar.gz |
Take endianness into account on alignment check
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
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 |