qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1101185 - /qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h
Date Mon, 09 May 2011 19:56:30 GMT
Author: astitcher
Date: Mon May  9 19:56:29 2011
New Revision: 1101185

URL: http://svn.apache.org/viewvc?rev=1101185&view=rev
Log:
QPID-3004: Get Clang to compile qpid c++
- Make clang use slow mutex protected AtomicValue
  This is the simplest solution to clang not supporting 64 bit
  atomic builtins.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h?rev=1101185&r1=1101184&r2=1101185&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/AtomicValue.h Mon May  9 19:56:29 2011
@@ -22,7 +22,12 @@
  *
  */
 
-#if defined( __GNUC__ ) && __GNUC__ >= 4 && ( defined( __i686__ ) || defined(
__x86_64__ ) )
+// Have to check for clang before gcc as clang pretends to be gcc too
+#if defined( __clang__ )
+// Use the clang doesn't support atomic builtins for 64 bit values, so use the slow versions
+#include "qpid/sys/AtomicValue_mutex.h"
+
+#elif defined( __GNUC__ ) && __GNUC__ >= 4 && ( defined( __i686__ ) ||
defined( __x86_64__ ) )
 // Use the Gnu C built-in atomic operations if compiling with gcc on a suitable platform.
 #include "qpid/sys/AtomicValue_gcc.h"
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message