mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fixed bug #66009 Failed compilation of PHP extension with C++ std library using VS 2012
Visual Studio 2012 includes sanity checks for C++11 features, see
bb531344
(v=vs.110).aspx
To fix the 'inline' keyword redefinition for C++ in debug mode, the
new macros ZEND_WIN32_KEEP_INLINE is introduced, ZEND_WIN32_FORCE_INLINE is
automatically appended in release mode.
This commit is contained in:
parent
250ee4c17a
commit
19aafe43b2
2 changed files with 8 additions and 10 deletions
|
@ -62,10 +62,15 @@ typedef unsigned int uint;
|
|||
/* This will cause the compilation process to be MUCH longer, but will generate
|
||||
* a much quicker PHP binary
|
||||
*/
|
||||
#undef inline
|
||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||
/* _ALLOW_KEYWORD_MACROS is only relevant for C++ */
|
||||
# if (_MSC_VER >= 1700) && !defined(_ALLOW_KEYWORD_MACROS)
|
||||
# define _ALLOW_KEYWORD_MACROS
|
||||
# endif
|
||||
# undef inline
|
||||
# define inline __forceinline
|
||||
#else
|
||||
#elif !defined(ZEND_WIN32_KEEP_INLINE)
|
||||
# undef inline
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue