Index: libcxx/include/thread =================================================================== --- libcxx/include/thread +++ libcxx/include/thread @@ -14,8 +14,6 @@ thread synopsis -#define __STDCPP_THREADS__ __cplusplus - namespace std { @@ -107,7 +105,9 @@ _LIBCPP_PUSH_MACROS #include <__undef_macros> -#define __STDCPP_THREADS__ __cplusplus +#ifndef __STDCPP_THREADS__ +#define __STDCPP_THREADS__ 1 +#endif #ifdef _LIBCPP_HAS_NO_THREADS #error is not supported on this single threaded system Index: libcxx/test/std/thread/macro.pass.cpp =================================================================== --- libcxx/test/std/thread/macro.pass.cpp +++ libcxx/test/std/thread/macro.pass.cpp @@ -10,7 +10,7 @@ // -// #define __STDCPP_THREADS__ __cplusplus +// #define __STDCPP_THREADS__ 1 #include @@ -20,6 +20,8 @@ { #ifndef __STDCPP_THREADS__ #error __STDCPP_THREADS__ is not defined +#elif __STDCPP_THREADS__ != 1 +#error __STDCPP_THREADS__ has the wrong value #endif return 0;