aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2022-07-29 05:55:21 +0900
committerMITSUNARI Shigeo <[email protected]>2022-07-29 05:55:21 +0900
commit1b911598d500a9a1e796f5c5e042cbcc39306793 (patch)
tree6b8ba3f805f0121e0174676287c50de3c179b97b
parentd224701f4a19704211879bae0eb80070d22b6bb6 (diff)
downloadxbyak-1b911598d500a9a1e796f5c5e042cbcc39306793.tar.gz
xbyak-1b911598d500a9a1e796f5c5e042cbcc39306793.zip
mingw uses __thread instead of __declspec(thread)
-rw-r--r--xbyak/xbyak.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 288eb20..ec0f556 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -77,7 +77,11 @@
#endif
#include <windows.h>
#include <malloc.h>
- #define XBYAK_TLS __declspec(thread)
+ #ifdef _MSC_VER
+ #define XBYAK_TLS __declspec(thread)
+ #else
+ #define XBYAK_TLS __thread
+ #endif
#elif defined(__GNUC__)
#include <unistd.h>
#include <sys/mman.h>