Fix GH-17107: Building ext/intl fails with GCC 8.5.0 #17179
Draft
+2
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A previous fix to be able to build C++ extensions with MSVC[1], was based on two assumptions:
max_align_t
would be defined in stddef.h on WindowsThe former was plain wrong; there is no such typedef (or macro); the latter was presumptuous, as can be seen in the bug tracker ticket.
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] ab449a7
I'm filing this as draft, since I don't think we can apply this to PHP-8.4 since it might constitute an ABI break (the obvious API break that cstddef is no longer included might not be that much of an issue).