From a99300e264a0db66520329e972de902109dafe19 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Sat, 19 Dec 2009 12:48:39 +0100 Subject: Fixed solaris builds --- include/my_atomic.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/my_atomic.h b/include/my_atomic.h index 23c3dc749ab..fbeacb66e1d 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -69,8 +69,16 @@ #endif #ifndef make_atomic_cas_body +/* + When implementing atomics using solaris.h we will end up here. + In this case we have already implemented all atomic functions + and no more work is needed, this is indicated by MY_ATOMICS_MADE + being defined but not make_atomic_cas_body. +*/ +#ifndef MY_ATOMICS_MADE /* nolock.h was not able to generate even a CAS function, fall back */ #include "atomic/rwlock.h" +#endif #else /* define missing functions by using the already generated ones */ #ifndef make_atomic_add_body -- cgit v1.2.1 From d60b5fa2606e5b1b48dde4795f9afe990171f76a Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Sat, 19 Dec 2009 17:44:45 +0100 Subject: Fixed Solaris build issues --- include/my_atomic.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/my_atomic.h b/include/my_atomic.h index fbeacb66e1d..f0d193c2528 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -68,18 +68,12 @@ #include "atomic/nolock.h" #endif -#ifndef make_atomic_cas_body -/* - When implementing atomics using solaris.h we will end up here. - In this case we have already implemented all atomic functions - and no more work is needed, this is indicated by MY_ATOMICS_MADE - being defined but not make_atomic_cas_body. -*/ -#ifndef MY_ATOMICS_MADE +#ifndef MY_ATOMIC_NOLOCK /* nolock.h was not able to generate even a CAS function, fall back */ #include "atomic/rwlock.h" #endif -#else + +#ifndef MY_ATOMICS_MADE /* define missing functions by using the already generated ones */ #ifndef make_atomic_add_body #define make_atomic_add_body(S) \ @@ -102,7 +96,6 @@ #define make_atomic_store_body(S) \ (void)(my_atomic_fas ## S (a, v)); #endif -#endif /* transparent_union doesn't work in g++ @@ -295,6 +288,7 @@ make_atomic_store(ptr) #undef make_atomic_store_body #undef make_atomic_fas_body #undef intptr +#endif /* the macro below defines (as an expression) the code that -- cgit v1.2.1 From d4f23f0cf6db38731a161c5c7b0b056fc67e5c02 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Sat, 19 Dec 2009 18:24:52 +0100 Subject: Yet one more fix for Solaris atomics in builds --- include/my_atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/my_atomic.h b/include/my_atomic.h index f0d193c2528..751afcb77db 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -287,8 +287,8 @@ make_atomic_store(ptr) #undef make_atomic_load_body #undef make_atomic_store_body #undef make_atomic_fas_body -#undef intptr #endif +#undef intptr /* the macro below defines (as an expression) the code that -- cgit v1.2.1