Piotr Caban : msvcrt: Use fpclassify constants from public header.

Alexandre Julliard julliard at winehq.org
Tue Dec 1 15:40:35 CST 2020


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Dec  1 13:52:23 2020 +0100

msvcrt: Use fpclassify constants from public header.

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

---

 dlls/msvcrt/math.c   | 12 ++++++------
 dlls/msvcrt/msvcrt.h |  7 -------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index b7a62d9cf2c..9e8739f138c 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -3586,9 +3586,9 @@ short CDECL MSVCR120__dclass(double x)
     union { double f; UINT64 i; } u = { x };
     int e = u.i >> 52 & 0x7ff;
 
-    if (!e) return u.i << 1 ? MSVCRT_FP_SUBNORMAL : MSVCRT_FP_ZERO;
-    if (e == 0x7ff) return (u.i << 12) ? MSVCRT_FP_NAN : MSVCRT_FP_INFINITE;
-    return MSVCRT_FP_NORMAL;
+    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
+    if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE;
+    return FP_NORMAL;
 }
 
 /*********************************************************************
@@ -3601,9 +3601,9 @@ short CDECL MSVCR120__fdclass(float x)
     union { float f; UINT32 i; } u = { x };
     int e = u.i >> 23 & 0xff;
 
-    if (!e) return u.i << 1 ? MSVCRT_FP_SUBNORMAL : MSVCRT_FP_ZERO;
-    if (e == 0xff) return u.i << 9 ? MSVCRT_FP_NAN : MSVCRT_FP_INFINITE;
-    return MSVCRT_FP_NORMAL;
+    if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
+    if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE;
+    return FP_NORMAL;
 }
 
 /*********************************************************************
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index f2c77537dba..bd6f429b747 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -626,13 +626,6 @@ struct MSVCRT__stat64 {
 #define MSVCRT__O_U16TEXT       0x20000
 #define MSVCRT__O_U8TEXT        0x40000
 
-/* fpclassify constants */
-#define MSVCRT_FP_INFINITE   1
-#define MSVCRT_FP_NAN        2
-#define MSVCRT_FP_NORMAL    -1
-#define MSVCRT_FP_SUBNORMAL -2
-#define MSVCRT_FP_ZERO       0
-
 #define MSVCRT__MCW_EM        0x0008001f
 #define MSVCRT__MCW_IC        0x00040000
 #define MSVCRT__MCW_RC        0x00000300




More information about the wine-cvs mailing list