Skip to content

Commit 501cf7e

Browse files
committed
adding explicit macro def inside dragon4.c
1 parent 1d9514b commit 501cf7e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

quaddtype/numpy_quaddtype/src/dragon4.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Modifications are specific to support the SLEEF_QUAD
2525
#include "dtype.h"
2626
#include "scalar.h"
2727

28-
2928
#if !defined(HAVE_THREAD_LOCAL) && !defined(HAVE__THREAD_LOCAL) && \
3029
!defined(HAVE___THREAD) && !defined(HAVE___DECLSPEC_THREAD_) && \
3130
!defined(__cplusplus)
@@ -34,6 +33,20 @@ Modifications are specific to support the SLEEF_QUAD
3433
#warning "NPY_TLS Thread-local storage support detected."
3534
#endif
3635

36+
#ifdef __cplusplus
37+
#define NPY_TLS thread_local
38+
#elif defined(HAVE_THREAD_LOCAL)
39+
#define NPY_TLS thread_local
40+
#elif defined(HAVE__THREAD_LOCAL)
41+
#define NPY_TLS _Thread_local
42+
#elif defined(HAVE___THREAD)
43+
#define NPY_TLS __thread
44+
#elif defined(HAVE___DECLSPEC_THREAD_)
45+
#define NPY_TLS __declspec(thread)
46+
#else
47+
#define NPY_TLS
48+
#endif
49+
3750
#if 0
3851
#define DEBUG_ASSERT(stmnt) assert(stmnt)
3952
#else

0 commit comments

Comments
 (0)