From e568299c2c2f438cbbee687aa57d0a6cdecf7e0b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 1 Jan 2014 20:42:13 +0100 Subject: build: make configure fail if both __atomic and __sync are not available --- compat/atomics.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compat') diff --git a/compat/atomics.h b/compat/atomics.h index 368476a964..14f0f2720f 100644 --- a/compat/atomics.h +++ b/compat/atomics.h @@ -24,7 +24,9 @@ #if HAVE_ATOMIC_BUILTINS # define mp_memory_barrier() __atomic_thread_fence(__ATOMIC_SEQ_CST) # define mp_atomic_add_and_fetch(a, b) __atomic_add_fetch(a, b,__ATOMIC_SEQ_CST) -#else +#elif HAVE_SYNC_BUILTINS # define mp_memory_barrier() __sync_synchronize() # define mp_atomic_add_and_fetch(a, b) __sync_add_and_fetch(a, b) +#else +# error "this should have been a configuration error, report a bug please" #endif -- cgit v1.2.3