From 69190ce5c053a9bf97983932bd702137895b18df Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Tue, 11 Jun 2019 15:13:27 +0200 Subject: This reverts 0e5d4ea55554872fe72e5d984b73fc21abc561fe to fix the build on MacOSX On Mac thread_local and __thread are not ABI compatible, in addition, thread_local comes with additional overhead, __thread seems to be the most suitable linkage to use regardless of c++/c --- TSRM/TSRM.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'TSRM') diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 3e3e7d656e..d2be318440 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -159,14 +159,10 @@ TSRM_API void *tsrm_get_ls_cache(void); TSRM_API uint8_t tsrm_is_main_thread(void); TSRM_API const char *tsrm_api_name(void); -#if defined(__cplusplus) && __cplusplus > 199711L -# define TSRM_TLS thread_local +#ifdef TSRM_WIN32 +# define TSRM_TLS __declspec(thread) #else -# ifdef TSRM_WIN32 -# define TSRM_TLS __declspec(thread) -# else -# define TSRM_TLS __thread -# endif +# define TSRM_TLS __thread #endif #define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1) -- cgit v1.2.1