From d6267cd2302ff04e3cbef99974421f207a1ad42d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 6 Nov 2017 13:52:02 +0100 Subject: [PATCH] Don't touch inline if C++ is compiled Starting with C++11 marco keywords are forbidden by the standard. Things like inline namespaces would be broken by this part. As any of supported compilers is at least C++11 complaint, tricks with inline are simply disabled if C++ is compiled. Though, zend_always_inline is still usable, anything else about inlining for C++ is up to the compiler. --- Zend/zend_config.w32.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 2ba42cdc9d..ddebdeaed8 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -58,19 +58,14 @@ typedef unsigned int uint; #define zend_sprintf sprintf +#ifndef __cplusplus /* This will cause the compilation process to be MUCH longer, but will generate * a much quicker PHP binary */ #ifdef ZEND_WIN32_FORCE_INLINE -/* _ALLOW_KEYWORD_MACROS is only relevant for C++ */ -# ifndef _ALLOW_KEYWORD_MACROS -# define _ALLOW_KEYWORD_MACROS -# endif # undef inline # define inline __forceinline -#elif !defined(ZEND_WIN32_KEEP_INLINE) -# undef inline -# define inline +#endif #endif #ifdef LIBZEND_EXPORTS -- 2.50.1