Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH-17107: Building ext/intl fails with GCC 8.5.0 #17179

Draft
wants to merge 1 commit into
base: PHP-8.4
Choose a base branch
from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Dec 16, 2024

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 Windows
  • additionally including cstddef as extern C++ would not interfere with the already included stddef.h

The 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).

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 Windows
* additionally including cstddef as extern C++ would not interfere with
  the already included stddef.h

The 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] <php@ab449a7>
@cmb69 cmb69 linked an issue Dec 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building ext/intl fails with GCC 8.5.0
1 participant