From 60e98600ca34909206e845079089bcd683ed4b59 Mon Sep 17 00:00:00 2001 From: dormando Date: Tue, 28 Jun 2016 13:21:21 -0700 Subject: don't fail on systems without 64bit atomics We only explicitly tested for short atomics. Then I added 8byte atomic usage in the logger: now separately test for those.. since some systems can have one but not the other, I'd rather use atomics where available then fall back to a mutex when necessary. Reproduced this on a raspberry pi 2. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 57c2c7c..9311332 100644 --- a/configure.ac +++ b/configure.ac @@ -535,6 +535,19 @@ AC_TRY_LINK([],[ AC_DEFINE(HAVE_GCC_ATOMICS, 1, [GCC Atomics available])]) AC_MSG_RESULT($have_gcc_atomics) +dnl Check for usage of 64bit atomics +dnl 32bit systems shouldn't have these. +have_gcc_64atomics=no +AC_MSG_CHECKING(for GCC 64bit atomics) +AC_TRY_LINK([],[ + uint64_t a; + uint64_t b; + b = __sync_add_and_fetch(&a, 1); + b = __sync_sub_and_fetch(&a, 2); + ],[have_gcc_64atomics=yes + AC_DEFINE(HAVE_GCC_64ATOMICS, 1, [GCC 64bit Atomics available])]) +AC_MSG_RESULT($have_gcc_64atomics) + dnl Check for the requirements for running memcached with less privileges dnl than the default privilege set. On Solaris we need setppriv and priv.h dnl If you want to add support for other platforms you should check for -- cgit v1.2.1