From bfcee2c74672a1fd14ab37670b25dac50ddcbe75 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 14 May 2020 15:39:00 +0200 Subject: Check compatibility with proper runtime DLL In practise, this likely does not matter, because usually these DLLs are installed side by side, but still we should check the proper DLL. --- main/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main/main.c') diff --git a/main/main.c b/main/main.c index 7d26ed1bc0..1cb50ce1dd 100644 --- a/main/main.c +++ b/main/main.c @@ -2174,12 +2174,18 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod #ifdef PHP_WIN32 # if PHP_LINKER_MAJOR == 14 /* Extend for other CRT if needed. */ +# if PHP_DEBUG +# define PHP_VCRUNTIME "vcruntime140d.dll" +# else +# define PHP_VCRUNTIME "vcruntime140.dll" +# endif char *img_err; - if (!php_win32_crt_compatible("vcruntime140.dll", &img_err)) { + if (!php_win32_crt_compatible(PHP_VCRUNTIME, &img_err)) { php_error(E_CORE_WARNING, img_err); efree(img_err); return FAILURE; } +# undef PHP_VCRUNTIME # endif /* start up winsock services */ -- cgit v1.2.1