From 2a766477ec816475821f4c92c496f21c4fcc93d6 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 2 Sep 2014 11:16:44 +0000 Subject: Clean up slightly. - Remove c++0x hack from that was needed when Clang did not fully implement C++11. We can now safely test against C++11 to check whether thread_local is available, like we do for all other C++11 keywords. - Don't use __clang__ to test for thread safety annotation presence. It turns out we have a proper attribute for this. --- sys/sys/cdefs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index a8d4baf..d00d7ad 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -298,8 +298,7 @@ #endif #if !__has_extension(c_thread_local) -/* XXX: Change this to test against C++11 when clang in base supports it. */ -#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ +#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_thread_local) #define _Thread_local thread_local #else @@ -751,7 +750,7 @@ * held. */ -#ifdef __clang__ +#if __has_extension(c_thread_safety_attributes) #define __lock_annotate(x) __attribute__((x)) #else #define __lock_annotate(x) -- cgit v1.1