mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Building ext/intl fails with MSVC /std:c11 (#17179)
A previous fix to be able to build C++ extensions with MSVC[1], was
based on the assumption that `max_align_t` would be defined in stddef.h
on Windows. That was plain wrong; there is no such typedef (or macro).
Thus we revert that fix, and instead make an exception for Windows,
where we always use the fallback definition, which should work fine on
Windows.
[1] <ab449a7e46>
This commit is contained in:
committed by
GitHub
parent
c5ee870b85
commit
252dd1e9f0
@@ -789,13 +789,9 @@ extern "C++" {
|
|||||||
# define ZEND_STATIC_ASSERT(c, m)
|
# define ZEND_STATIC_ASSERT(c, m)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */
|
#if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) /* C11 */ \
|
||||||
|
|| (defined(__cplusplus) && __cplusplus >= 201103L) /* C++11 */) && !defined(ZEND_WIN32)
|
||||||
typedef max_align_t zend_max_align_t;
|
typedef max_align_t zend_max_align_t;
|
||||||
#elif (defined(__cplusplus) && __cplusplus >= 201103L) /* C++11 */
|
|
||||||
extern "C++" {
|
|
||||||
# include <cstddef>
|
|
||||||
}
|
|
||||||
typedef std::max_align_t zend_max_align_t;
|
|
||||||
#else
|
#else
|
||||||
typedef union {
|
typedef union {
|
||||||
char c;
|
char c;
|
||||||
|
|||||||
Reference in New Issue
Block a user