summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2014-02-28 10:52:35 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-13 16:16:12 (GMT)
commit0991c6d465c0563e5a5e8a09a7a14485d294a3f7 (patch)
treed5a3904b768631e1f491af723473a05d64864730 /src
parent4d1cbe39ab8962498b3aee4d732d6c9357cdbbe7 (diff)
downloadQt-0991c6d465c0563e5a5e8a09a7a14485d294a3f7.zip
Qt-0991c6d465c0563e5a5e8a09a7a14485d294a3f7.tar.gz
Qt-0991c6d465c0563e5a5e8a09a7a14485d294a3f7.tar.bz2
Fix building of WebKit's JSC for earlier versions of gcc on Mac
Since building for Carbon typically uses older versions of gcc on older versions of Mac, then we need to revert e3c44790065894f4e7f98ab097fce22c5bcbbd0a partially in order to fix this. Since the original code was just a cleanup then this is safe to do so. Change-Id: Ic662841f53660b763af2bc71cb9b4684fe614063 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
index acf0e5a..0bbdcfb 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
@@ -63,10 +63,18 @@
#if OS(WINDOWS)
#include <windows.h>
+#elif OS(DARWIN)
+#include <libkern/OSAtomic.h>
#elif OS(ANDROID)
#include <cutils/atomic.h>
#elif OS(QNX)
#include <atomic.h>
+#elif COMPILER(GCC) && !OS(SYMBIAN)
+#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
+#include <ext/atomicity.h>
+#else
+#include <bits/atomicity.h>
+#endif
#endif
namespace WTF {
@@ -82,6 +90,12 @@ inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
#endif
+#elif OS(DARWIN)
+#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
+
+inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
+inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
+
#elif OS(ANDROID)
inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); }