summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-06-28 13:21:21 -0700
committerdormando <dormando@rydia.net>2016-07-01 17:52:07 -0700
commit60e98600ca34909206e845079089bcd683ed4b59 (patch)
tree418563856b54f12f756a747794973ece08cb059b /configure.ac
parent1eec5d41a552b5c1edd98cce6e09fc915e2beafb (diff)
downloadmemcached-60e98600ca34909206e845079089bcd683ed4b59.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
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