| ... | @@ -653,24 +653,27 @@ typedef __char32_t char32_t; | ... | @@ -653,24 +653,27 @@ typedef __char32_t char32_t; |
| 653 | # define _DECLARE_C99_LDBL_MATH 1 | 653 | # define _DECLARE_C99_LDBL_MATH 1 |
| 654 | # endif | 654 | # endif |
| 655 | | 655 | |
| | 656 | /* zig patch: compiler defines _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION in some cases */ |
| | 657 | # if !defined(_LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION) |
| 656 | // If we are getting operator new from the MSVC CRT, then allocation overloads | 658 | // If we are getting operator new from the MSVC CRT, then allocation overloads |
| 657 | // for align_val_t were added in 19.12, aka VS 2017 version 15.3. | 659 | // for align_val_t were added in 19.12, aka VS 2017 version 15.3. |
| 658 | # if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912 | 660 | # if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912 |
| 659 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 | 661 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 |
| 660 | # elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new) | 662 | # elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new) |
| 661 | // We're deferring to Microsoft's STL to provide aligned new et al. We don't | 663 | // We're deferring to Microsoft's STL to provide aligned new et al. We don't |
| 662 | // have it unless the language feature test macro is defined. | 664 | // have it unless the language feature test macro is defined. |
| 663 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 | 665 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 |
| 664 | # elif defined(__MVS__) | 666 | # elif defined(__MVS__) |
| 665 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 | 667 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0 |
| 666 | # else | 668 | # else |
| 667 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 1 | 669 | # define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 1 |
| 668 | # endif | 670 | # endif |
| 669 | | 671 | |
| 670 | # if !_LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION || (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606) | 672 | # if !_LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION || (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606) |
| 671 | # define _LIBCPP_HAS_ALIGNED_ALLOCATION 0 | 673 | # define _LIBCPP_HAS_ALIGNED_ALLOCATION 0 |
| 672 | # else | 674 | # else |
| 673 | # define _LIBCPP_HAS_ALIGNED_ALLOCATION 1 | 675 | # define _LIBCPP_HAS_ALIGNED_ALLOCATION 1 |
| | 676 | # endif |
| 674 | # endif | 677 | # endif |
| 675 | | 678 | |
| 676 | // It is not yet possible to use aligned_alloc() on all Apple platforms since | 679 | // It is not yet possible to use aligned_alloc() on all Apple platforms since |