List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 27 2010 1:25pm
Subject:bzr commit into mysql-trunk-bugfixing branch (davi:3155) Bug#52261
View as plain text  
# At a local mysql-trunk-bugfixing repository of davi

 3155 Davi Arnaut	2010-07-27
      Bug#52261: 64 bit atomic operations do not work on Solaris i386 ..
      
      Workaround a interface problem with the atomic macros that was
      causing warnings. The correct type is retrieved using typeof if
      compiling with GCC.

    modified:
      include/atomic/solaris.h
=== modified file 'include/atomic/solaris.h'
--- a/include/atomic/solaris.h	2009-12-25 15:49:21 +0000
+++ b/include/atomic/solaris.h	2010-07-27 13:25:11 +0000
@@ -20,11 +20,17 @@
 
 #define	MY_ATOMIC_MODE	"solaris-atomic"
 
+#if defined(__GNUC__)
+#define atomic_typeof(T,V)      __typeof__(V)
+#else
+#define atomic_typeof(T,V)      T
+#endif
+
 #define uintptr_t void *
 #define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
 
 #define make_atomic_cas_body(S)                         \
-  uint ## S ## _t sav;                                  \
+  atomic_typeof(uint ## S ## _t, *cmp) sav;             \
   sav = atomic_cas_ ## S(                               \
            (volatile uint ## S ## _t *)a,               \
            (uint ## S ## _t)*cmp,                       \


Attachment: [text/bzr-bundle] bzr/davi.arnaut@oracle.com-20100727132511-fx4bd0xn57p8o52h.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (davi:3155) Bug#52261Davi Arnaut27 Jul