diff options
author | John Coggeshall <john@php.net> | 2004-01-14 08:15:57 +0000 |
---|---|---|
committer | John Coggeshall <john@php.net> | 2004-01-14 08:15:57 +0000 |
commit | f3932751d8aeb60b84920948d7d66818b1bfcedd (patch) | |
tree | ee7fab1d49fd83ee4d838d9fa996e05fbaff26ce /ext/tidy/php_tidy.h | |
parent | 0878fa901fe1a5891adb29b4b457bb223eb97dca (diff) | |
download | php-git-f3932751d8aeb60b84920948d7d66818b1bfcedd.tar.gz |
Apparently MSVC is not C99 compatible making variable marco arguments
in the TIDY_THROW() marco broken in (at least) Win32. This provides a suitable
workaround for non-C99 compatible compilers.
Diffstat (limited to 'ext/tidy/php_tidy.h')
-rw-r--r-- | ext/tidy/php_tidy.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index e7adef7f2c..7bad74627e 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -92,7 +92,14 @@ extern zend_module_entry tidy_module_entry; } +/* This is necessary, as apparently some Win32 compilers aren't C99 + compliant. When that isn't the case we can't use variable arg preprocessor + macros and need to instead call a wrapper function */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define TIDY_THROW(...) zend_throw_exception_ex(tidy_ce_exception, 0 TSRMLS_CC, __VA_ARGS__) +#else +#define TIDY_THROW _php_tidy_throw_exception +#endif #define TIDY_NODE_METHOD(name) PHP_FUNCTION(tnm_ ##name) #define TIDY_NODE_ME(name, param) TIDY_METHOD_MAP(name, tnm_ ##name, param) |