From e0a213d98f87d6007a75736c4f4266da53b87925 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 19 Sep 2019 20:06:28 +0200 Subject: Make MSVC happy again MSVC complains about unsupported preprocessor syntax, so we employ the same workaround as in zend_cpuinfo.h. --- TSRM/TSRM.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'TSRM') 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"))) -- cgit v1.2.1