summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorPremysl Hruby <dfenze@gmail.com>2012-02-26 09:59:32 +0100
committerantirez <antirez@gmail.com>2012-02-26 11:45:52 +0100
commit80ff1fc6d0e3da53ae7bea0354216a38f7303971 (patch)
treee5681dfc6b03aa1106527c6a65ea330f7b7ed03a /src/config.h
parent59132e42125c43299c428e86f9107493e173883e (diff)
downloadredis-80ff1fc6d0e3da53ae7bea0354216a38f7303971.tar.gz
use gcc sync builtins for memory counter when possible
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index 323a3ddd1..2bf0f9340 100644
--- a/src/config.h
+++ b/src/config.h
@@ -96,4 +96,13 @@
#error "Undefined or invalid BYTE_ORDER"
#endif
+#if (__i386 || __amd64) && __GNUC__
+ #include <features.h>
+
+ #if __GNUC_PREREQ(4,1)
+ #define HAVE_ATOMIC
+ #endif
+#endif
+
+
#endif