From 3e4a0099a179d7acee63d78c8fc4c3cc7b0bae42 Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Tue, 26 Aug 2014 15:58:15 -0700 Subject: [PATCH] Undefine _Atomic before redefining Stdatomic.h was potentially redefining _Atomic, in spite of a prior definition by . This could cause g++ builds that included with an available header to break. Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8 --- libc/include/stdatomic.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libc/include/stdatomic.h b/libc/include/stdatomic.h index adf60bbc3..99ab53603 100644 --- a/libc/include/stdatomic.h +++ b/libc/include/stdatomic.h @@ -39,6 +39,13 @@ #include +#undef _Atomic + /* Also defined by 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 themselves see */ + /* the old definition, as they should. */ + /* Client code sees the following definition. */ #define _Atomic(t) std::atomic using std::atomic_is_lock_free;