Merge pull request #282 from Tilka/atomic_clang_fix
Atomic: support clang 3.4+
This commit is contained in:
commit
5a5e63bdd4
|
@ -45,7 +45,8 @@ inline void AtomicOr(volatile u32& target, u32 value) {
|
||||||
__sync_or_and_fetch(&target, value);
|
__sync_or_and_fetch(&target, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __clang__
|
// Support clang versions older than 3.4.
|
||||||
|
#if __clang__ && !__has_feature(cxx_atomic)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
_Atomic(T)* ToC11Atomic(volatile T* loc)
|
_Atomic(T)* ToC11Atomic(volatile T* loc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#ifndef __has_feature
|
||||||
|
#define __has_feature(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// SVN version number
|
// SVN version number
|
||||||
extern const char *scm_desc_str;
|
extern const char *scm_desc_str;
|
||||||
extern const char *scm_branch_str;
|
extern const char *scm_branch_str;
|
||||||
|
|
Loading…
Reference in New Issue