Undefine _Atomic before redefining
Stdatomic.h was potentially redefining _Atomic, in spite of a prior definition by <atomic>. This could cause g++ builds that included <stdatomic.h> with an available <atomic> header to break. Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8
This commit is contained in:
parent
d2bd3c4717
commit
3e4a0099a1
@ -39,6 +39,13 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
#undef _Atomic
|
||||||
|
/* Also defined by <atomic> for gcc. But not used in macros. */
|
||||||
|
/* Also a clang intrinsic. */
|
||||||
|
/* Should not be used by client code before this file is */
|
||||||
|
/* included. The definitions in <atomic> themselves see */
|
||||||
|
/* the old definition, as they should. */
|
||||||
|
/* Client code sees the following definition. */
|
||||||
#define _Atomic(t) std::atomic<t>
|
#define _Atomic(t) std::atomic<t>
|
||||||
|
|
||||||
using std::atomic_is_lock_free;
|
using std::atomic_is_lock_free;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user