[libcxx] r294899 - cmath: adjust math forwards for Windows

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 12 08:44:17 PST 2017


Author: compnerd
Date: Sun Feb 12 10:44:17 2017
New Revision: 294899

URL: http://llvm.org/viewvc/llvm-project?rev=294899&view=rev
Log:
cmath: adjust math forwards for Windows

The newer versions of ucrt have the math routines.  Use the CRT version
to determine if we should include the math routines.  Fixes two tests
for Windows.

Modified:
    libcxx/trunk/include/cmath

Modified: libcxx/trunk/include/cmath
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cmath?rev=294899&r1=294898&r2=294899&view=diff
==============================================================================
--- libcxx/trunk/include/cmath (original)
+++ libcxx/trunk/include/cmath Sun Feb 12 10:44:17 2017
@@ -495,7 +495,7 @@ using ::cbrtl;
 
 using ::copysignl;
 
-#ifndef _LIBCPP_MSVCRT
+#if !defined(_LIBCPP_MSVCRT) || (_VC_CRT_MAJOR_VERSION-0) >= 14
 using ::erfl;
 using ::erfcl;
 using ::exp2l;
@@ -526,7 +526,7 @@ using ::scalblnl;
 using ::scalbnl;
 using ::tgammal;
 using ::truncl;
-#endif // !_LIBCPP_MSVCRT
+#endif // !defined(_LIBCPP_MSVCRT) || (_VC_CRT_MAJOR_VERSION-0) >= 14
 
 #if _LIBCPP_STD_VER > 14
 inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float x,       float y,       float z ) { return sqrt(x*x + y*y + z*z); }




More information about the cfe-commits mailing list