Skip to content

Commit 55aa1b5

Browse files
committed
aligned_alloc: remove old __MSVCRT_VERSION__ checks for mingw-w64
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.
1 parent 5ad7df6 commit 55aa1b5

File tree

2 files changed

+1
-39
lines changed

2 files changed

+1
-39
lines changed

include/boost/align/aligned_alloc.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@ Distributed under the Boost Software License, Version 1.0.
2222
#include <boost/align/detail/aligned_alloc.hpp>
2323
#elif defined(BOOST_ALIGN_USE_NEW)
2424
#include <boost/align/detail/aligned_alloc_new.hpp>
25-
#elif defined(_MSC_VER) && !defined(UNDER_CE)
25+
#elif defined(_WIN32) && !defined(UNDER_CE)
2626
#include <boost/align/detail/aligned_alloc_msvc.hpp>
27-
#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
28-
#include <boost/align/detail/aligned_alloc_msvc.hpp>
29-
#elif defined(__MINGW32__)
30-
#include <boost/align/detail/aligned_alloc_mingw.hpp>
3127
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
3228
#include <boost/align/detail/aligned_alloc_posix.hpp>
3329
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060

include/boost/align/detail/aligned_alloc_mingw.hpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)