From 952d02d8c96e0f1127963091a15db68c2e75568e Mon Sep 17 00:00:00 2001 From: mmokhi Date: Mon, 27 Jul 2020 15:18:58 +0200 Subject: [PATCH] Add support to build for PHP8.0 There are some major internal changes coming with PHP8.0 and causing some internal API changes and Macros being deprecated. This ensures these cases are being taken care of. More info: https://github.com/php/php-src/blob/php-8.0.0alpha3/UPGRADING.INTERNALS#L47 --- source/shared/core_sqlsrv.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/shared/core_sqlsrv.h b/source/shared/core_sqlsrv.h index e91b44c51..4362faa0e 100644 --- a/source/shared/core_sqlsrv.h +++ b/source/shared/core_sqlsrv.h @@ -96,6 +96,17 @@ extern "C" { #pragma warning( disable: 4005 4100 4127 4142 4244 4505 4530 ) #endif +/* Small change to let it build after a major internal change for php8.0 + * More info: + * https://github.com/php/php-src/blob/php-8.0.0alpha3/UPGRADING.INTERNALS#L47 + */ +#if PHP_MAJOR_VERSION >= 8 +# define TSRMLS_DC +# define TSRMLS_D +# define TSRMLS_CC +# define TSRMLS_C +#endif + #ifdef ZTS #include "TSRM.h" #endif