summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@opensolaris.home.tridgell.net>2010-11-15 22:53:13 -0500
committerAndrew Tridgell <tridge@samba.org>2010-11-17 23:55:39 +1100
commite7dad42bc6cdf38d194a564c6ecdeb60cd4204c6 (patch)
treee0a9678c4a398785c68e901c10443b3f138dd687 /source4
parent6041938908962ab89527671dd5fb8ce58f530f34 (diff)
downloadsamba-e7dad42bc6cdf38d194a564c6ecdeb60cd4204c6.tar.gz
samba-e7dad42bc6cdf38d194a564c6ecdeb60cd4204c6.tar.bz2
samba-e7dad42bc6cdf38d194a564c6ecdeb60cd4204c6.zip
heimdal: added HEIM_BASE_NON_ATOMIC option
This allows heimdal to build without gcc, by not using atomic operations. We don't need heimdal to be atomic in Samba.
Diffstat (limited to 'source4')
-rw-r--r--source4/heimdal/base/baselocl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/heimdal/base/baselocl.h b/source4/heimdal/base/baselocl.h
index 3932378b2d..06806d2762 100644
--- a/source4/heimdal/base/baselocl.h
+++ b/source4/heimdal/base/baselocl.h
@@ -50,7 +50,14 @@
#include <dispatch/dispatch.h>
#endif
-#ifdef __GNUC__
+#if HEIM_BASE_NON_ATOMIC
+/* non-atomic varients */
+#define heim_base_atomic_inc(x) ++(*(x))
+#define heim_base_atomic_dec(x) --(*(x))
+#define heim_base_atomic_type unsigned int
+#define heim_base_atomic_max UINT_MAX
+
+#elif defined(__GNUC__)
#define heim_base_atomic_inc(x) __sync_add_and_fetch((x), 1)
#define heim_base_atomic_dec(x) __sync_sub_and_fetch((x), 1)
#define heim_base_atomic_type unsigned int