summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-09-19 20:06:28 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-09-20 12:51:03 +0200
commite0a213d98f87d6007a75736c4f4266da53b87925 (patch)
tree91b5f015386d7ea33878c350c1d0d10c98db7678 /TSRM
parent8326ef5519acb4dfcdcd3f059ee599d9e0faf174 (diff)
downloadphp-git-e0a213d98f87d6007a75736c4f4266da53b87925.tar.gz
Make MSVC happy again
MSVC complains about unsupported preprocessor syntax, so we employ the same workaround as in zend_cpuinfo.h.
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/TSRM.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index b25e3db149..75553edabc 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -143,7 +143,11 @@ TSRM_API const char *tsrm_api_name(void);
# define TSRM_TLS __thread
#endif
-#if !defined(__has_attribute) || !__has_attribute(tls_model)
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
+#if !__has_attribute(tls_model)
# define TSRM_TLS_MODEL_ATTR
#elif __PIC__
# define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec")))