[libcxx] r295330 - math: correct the MSVCRT condition

Andrey Khalyavin via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 16 12:03:48 PST 2017


What is _VC_CRT_NAJOR_VERSION? Is it misprint or a hack? Google gives zero
results.

-- Andrey Khalyavin

On Thu, Feb 16, 2017 at 6:47 PM, Saleem Abdulrasool via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: compnerd
> Date: Thu Feb 16 09:47:50 2017
> New Revision: 295330
>
> URL: http://llvm.org/viewvc/llvm-project?rev=295330&view=rev
> Log:
> math: correct the MSVCRT condition
>
> Fixes a number of tests in the testsuite on Windows.
>
> Modified:
>     libcxx/trunk/include/cmath
>     libcxx/trunk/include/math.h
>
> Modified: libcxx/trunk/include/cmath
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/
> cmath?rev=295330&r1=295329&r2=295330&view=diff
> ============================================================
> ==================
> --- libcxx/trunk/include/cmath (original)
> +++ libcxx/trunk/include/cmath Thu Feb 16 09:47:50 2017
> @@ -398,7 +398,7 @@ using ::cbrtf;
>  using ::copysign;
>  using ::copysignf;
>
> -#if !defined(_LIBCPP_MSVCRT) || ((_VC_CRT_NAJOR_VERSION-0) >= 14)
> +#if !(defined(_LIBCPP_MSVCRT) && ((_VC_CRT_NAJOR_VERSION-0) < 14))
>  using ::erf;
>  using ::erff;
>  using ::erfc;
> @@ -435,7 +435,7 @@ using ::lrint;
>  using ::lrintf;
>  using ::lround;
>  using ::lroundf;
> -#endif // _LIBCPP_MSVCRT
> +#endif // !(defined(_LIBCPP_MSVCRT) && ((_VC_CRT_NAJOR_VERSION-0) < 14))
>
>  using ::nan;
>  using ::nanf;
>
> Modified: libcxx/trunk/include/math.h
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/
> math.h?rev=295330&r1=295329&r2=295330&view=diff
> ============================================================
> ==================
> --- libcxx/trunk/include/math.h (original)
> +++ libcxx/trunk/include/math.h Thu Feb 16 09:47:50 2017
> @@ -1020,7 +1020,7 @@ copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NO
>      return ::copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
>  }
>
> -#if !defined(_LIBCPP_MSVCRT) || ((_VC_CRT_MAJOR_VERSION-0) >= 14)
> +#if !(defined(_LIBCPP_MSVCRT) && ((_VC_CRT_NAJOR_VERSION-0) < 14))
>
>  // erf
>
> @@ -1404,7 +1404,7 @@ inline _LIBCPP_INLINE_VISIBILITY
>  typename std::enable_if<std::is_integral<_A1>::value, double>::type
>  trunc(_A1 __lcpp_x) _NOEXCEPT {return ::trunc((double)__lcpp_x);}
>
> -#endif // !defined(_LIBCPP_MSVCRT) || ((_VC_CRT_MAJOR_VERSION-0) >= 14)
> +#endif // !(defined(_LIBCPP_MSVCRT) && ((_VC_CRT_NAJOR_VERSION-0) < 14))
>
>  } // extern "C++"
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170216/836a9127/attachment.html>


More information about the cfe-commits mailing list