From f99af439805fe51b38aa1cf79f9c657f857510f4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 5 Apr 2023 23:48:50 +0900 Subject: [Bug#19161] Detect thread local storage specifier Checking by `__STDC_VERSION__` is unreliable because old gcc 4.8 supports `-std=gnu11` option but does not implement `_Thread_local`. Check the implementation directly instead. --- thread_pthread.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'thread_pthread.h') diff --git a/thread_pthread.h b/thread_pthread.h index 40d7a13aa0..bf97c7a0ee 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -90,15 +90,6 @@ struct rb_thread_sched { int wait_yield; }; -#ifndef RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED -# if __STDC_VERSION__ >= 201112 -# define RB_THREAD_LOCAL_SPECIFIER _Thread_local -# elif defined(__GNUC__) - /* note that ICC (linux) and Clang are covered by __GNUC__ */ -# define RB_THREAD_LOCAL_SPECIFIER __thread -# endif -#endif - RUBY_SYMBOL_EXPORT_BEGIN #ifdef RB_THREAD_LOCAL_SPECIFIER # ifdef __APPLE__ -- cgit v1.2.1