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

aligned_alloc: remove old __MSVCRT_VERSION__ checks for mingw-w64 #21

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lazka
Copy link

@lazka lazka commented Dec 31, 2024

In upstream mingw-w64 the default value of __MSVCRT_VERSION__ was recently changed from 0x700 to 0x600, causing boost/align to fall back to a mingw-w64 provided _aligned_malloc for pre-winxp targets instead of using the default one. See this for details:
mingw-w64/mingw-w64@90d3f33

_aligned_malloc is available in msvcrt.dll since WinXP, according to https://github.com/mingw-w64/mingw-w64/blob/03d8a40f57649fbb773f1cdbe3a760f5e0943e76/mingw-w64-crt/lib-common/msvcrt.def.in#L1175-L1206, so assuming boost/align does not support things older than WinXP, just remove the checks and use one implementation for all of Windows instead.

_aligned_malloc is provided by mingw-w64 itself since 2009, so this change should
not affect compatibility with any of the currently used mingw-w64 versions.

In upstream mingw-w64 the default value of __MSVCRT_VERSION__ was recently
changed from 0x700 to 0x600, causing boost/align to fall back to a
mingw-w64 provided _aligned_malloc for pre-winxp targets instead of using
the default one. See this for details:
mingw-w64/mingw-w64@90d3f33

_aligned_malloc is available in msvcrt.dll since WinXP, according to
https://github.com/mingw-w64/mingw-w64/blob/03d8a40f57649fbb773f1cdbe3a760f5e0943e76/mingw-w64-crt/lib-common/msvcrt.def.in#L1175-L1206,
so assuming boost/align does not support things older than WinXP, just remove
the checks and use one implementation for all of Windows instead.

_aligned_malloc is provided by mingw-w64 itself since 2009, so this change should
not affect compatibility with any of the currently used mingw-w64 versions.
@lazka lazka force-pushed the mingw-remove-old-msvcrt-version-checks branch from a226f7a to 55aa1b5 Compare December 31, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant