diff options
Diffstat (limited to 'softfloat/softfloat.h')
-rw-r--r-- | softfloat/softfloat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/softfloat/softfloat.h b/softfloat/softfloat.h index eb78d74..72daccb 100644 --- a/softfloat/softfloat.h +++ b/softfloat/softfloat.h @@ -50,8 +50,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <stdint.h> #include "softfloat_types.h" -#ifndef THREAD_LOCAL -#define THREAD_LOCAL +#if __has_include(<threads.h>) +# include <threads.h> +# define THREAD_LOCAL thread_local +#else +# define THREAD_LOCAL _Thread_local #endif #ifdef __cplusplus |