Index: libcxx/include/atomic =================================================================== --- libcxx/include/atomic +++ libcxx/include/atomic @@ -560,6 +560,63 @@ # define __cpp_lib_atomic_is_always_lock_free 201603L #endif +// stdatomic.h may implement these as a macros, be safe and undef. +#ifdef kill_dependency +#undef kill_dependency +#endif +#ifdef atomic_is_lock_free +#undef atomic_is_lock_free +#endif +#ifdef atomic_load +#undef atomic_load +#endif +#ifdef atomic_exchange +#undef atomic_exchange +#endif +#ifdef atomic_compare_exchange_weak +#undef atomic_compare_exchange_weak +#endif +#ifdef atomic_compare_exchange_strong +#undef atomic_compare_exchange_strong +#endif +#ifdef atomic_fetch_and +#undef atomic_fetch_and +#endif +#ifdef atomic_fetch_add +#undef atomic_fetch_add +#endif +#ifdef atomic_fetch_sub +#undef atomic_fetch_sub +#endif +#ifdef atomic_store +#undef atomic_store +#endif +#ifdef atomic_store_explicit +#undef atomic_store_explicit +#endif +#ifdef atomic_flag_test_and_set +#undef atomic_flag_test_and_set +#endif +#ifdef atomic_flag_test_and_set_explicit +#undef atomic_flag_test_and_set_explicit +#endif +#ifdef atomic_exchange_explicit +#undef atomic_exchange_explicit +#endif +#ifdef atomic_flag_clear +#undef atomic_flag_clear +#endif +#ifdef atomic_fetch_xor +#undef atomic_fetch_xor +#endif +#ifdef atomic_flag_clear_explicit +#undef atomic_flag_clear_explicit +#endif +#ifdef atomic_fetch_or +#undef atomic_fetch_or +#endif + + _LIBCPP_BEGIN_NAMESPACE_STD typedef enum memory_order