Piotr Caban : msvcrt: Don't compile msvcr120 math functions in older versions.

Alexandre Julliard julliard at winehq.org
Mon May 10 15:44:05 CDT 2021


Module: wine
Branch: master
Commit: d5fb71553614bc5a442e3c328ab87fef7f902855
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d5fb71553614bc5a442e3c328ab87fef7f902855

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon May 10 20:11:28 2021 +0200

msvcrt: Don't compile msvcr120 math functions in older versions.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/math.c | 64 +++++++++++++++++++++++++++---------------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 1da6a0162da..95c83fcbcc9 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -4143,6 +4143,38 @@ void __cdecl __libm_sse2_sqrt_precise(void)
 }
 #endif  /* __i386__ */
 
+/*********************************************************************
+ *      _fdclass (MSVCR120.@)
+ *
+ * Copied from musl: src/math/__fpclassifyf.c
+ */
+short CDECL _fdclass(float x)
+{
+    union { float f; UINT32 i; } u = { x };
+    int e = u.i >> 23 & 0xff;
+
+    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
+    if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE;
+    return FP_NORMAL;
+}
+
+/*********************************************************************
+ *      _dclass (MSVCR120.@)
+ *
+ * Copied from musl: src/math/__fpclassify.c
+ */
+short CDECL _dclass(double x)
+{
+    union { double f; UINT64 i; } u = { x };
+    int e = u.i >> 52 & 0x7ff;
+
+    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
+    if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE;
+    return FP_NORMAL;
+}
+
+#if _MSVCR_VER>=120
+
 /*********************************************************************
  *      cbrt (MSVCR120.@)
  */
@@ -4287,38 +4319,6 @@ __int64 CDECL llrintf(float x)
     return unix_funcs->llrintf( x );
 }
 
-/*********************************************************************
- *      _fdclass (MSVCR120.@)
- *
- * Copied from musl: src/math/__fpclassifyf.c
- */
-short CDECL _fdclass(float x)
-{
-    union { float f; UINT32 i; } u = { x };
-    int e = u.i >> 23 & 0xff;
-
-    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
-    if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE;
-    return FP_NORMAL;
-}
-
-/*********************************************************************
- *      _dclass (MSVCR120.@)
- *
- * Copied from musl: src/math/__fpclassify.c
- */
-short CDECL _dclass(double x)
-{
-    union { double f; UINT64 i; } u = { x };
-    int e = u.i >> 52 & 0x7ff;
-
-    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
-    if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE;
-    return FP_NORMAL;
-}
-
-#if _MSVCR_VER>=120
-
 /*********************************************************************
  *      round (MSVCR120.@)
  *




More information about the wine-cvs mailing list