From e7dad42bc6cdf38d194a564c6ecdeb60cd4204c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Nov 2010 22:53:13 -0500 Subject: 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. --- source4/heimdal/base/baselocl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4') 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 #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 -- cgit