summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-20 22:13:10 +0200
committerAnatol Belski <ab@php.net>2014-09-20 22:13:10 +0200
commit27207436367eb10ec087ad47bfaf1b442bcf62b9 (patch)
tree3f577f2e46761bda2949095b52b2b471b6e2292d
parentaa339d00d87b7476f4b2d8140ec58e9e94969a4b (diff)
downloadphp-git-27207436367eb10ec087ad47bfaf1b442bcf62b9.tar.gz
vars with __declspec(thread) cannot use __declspec(dllexport)
-rw-r--r--TSRM/TSRM.c4
-rw-r--r--TSRM/TSRM.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 32c28993f8..6b0bf445e9 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -63,8 +63,12 @@ static int tsrm_error_level;
static FILE *tsrm_error_file;
#ifdef USE___THREAD
+#ifdef TSRM_WIN32
+TSRM_TLS void *tsrm_ls_cache = 0;
+#else
TSRM_API TSRM_TLS void *tsrm_ls_cache = 0;
#endif
+#endif
#ifdef PASS_TSRMLS
# define CALL_TSRMG_CTOR(ctor, globale, storage) (ctor)((globale), (storage))
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index f77dcbf035..840c303d6c 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -109,7 +109,11 @@ extern "C" {
# define TSRM_TLS __thread
# endif
+#ifdef TSRM_WIN32
+extern TSRM_TLS void *tsrm_ls_cache;
+#else
TSRM_API extern TSRM_TLS void *tsrm_ls_cache;
+#endif
#define TSRMG(id, type, element) \
((type)((tsrm_uintptr_t)tsrm_ls_cache + id##_offset))->element