diff --git a/libcxx/src/include/ryu/d2s_intrinsics.h b/libcxx/src/include/ryu/d2s_intrinsics.h --- a/libcxx/src/include/ryu/d2s_intrinsics.h +++ b/libcxx/src/include/ryu/d2s_intrinsics.h @@ -44,6 +44,8 @@ #include "__config" +#include "include/ryu/ryu.h" + _LIBCPP_BEGIN_NAMESPACE_STD #if defined(_M_X64) && defined(_MSC_VER) diff --git a/libcxx/src/include/ryu/ryu.h b/libcxx/src/include/ryu/ryu.h --- a/libcxx/src/include/ryu/ryu.h +++ b/libcxx/src/include/ryu/ryu.h @@ -56,9 +56,9 @@ #include "include/ryu/d2s.h" #include "include/ryu/d2fixed.h" -#if defined(_M_X64) && defined(_LIBCPP_COMPILER_MSVC) -#include // for _umul128() and __shiftright128() -#endif // defined(_M_X64) && defined(_LIBCPP_COMPILER_MSVC) +#if defined(_MSC_VER) +#include // for _umul128(), __shiftright128(), _BitScanForward{,64} +#endif // defined(_MSC_VER) #if defined(_WIN64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__aarch64__) #define _LIBCPP_64_BIT @@ -68,7 +68,7 @@ // https://github.com/ulfjack/ryu/tree/59661c3/ryu -#if !defined(_LIBCPP_COMPILER_MSVC) +#if !defined(_MSC_VER) _LIBCPP_HIDE_FROM_ABI inline unsigned char _BitScanForward64(unsigned long* __index, unsigned long long __mask) { if (__mask == 0) { return false; @@ -84,7 +84,7 @@ *__index = __builtin_ctz(__mask); return true; } -#endif // _LIBCPP_COMPILER_MSVC +#endif // !_MSC_VER template [[nodiscard]] to_chars_result _Floating_to_chars_ryu(