Alexandre Julliard : include/msvcrt: Use _fpclass() instead of _dclass().

Alexandre Julliard julliard at winehq.org
Tue Apr 23 17:39:53 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr 22 13:30:02 2019 +0200

include/msvcrt: Use _fpclass() instead of _dclass().

dclass() is only available in MSVCR120.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msvcrt/math.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h
index c22c053..c539ebe 100644
--- a/include/msvcrt/math.h
+++ b/include/msvcrt/math.h
@@ -184,10 +184,10 @@ static const union {
 #define FP_ZERO       0
 
 short __cdecl _dclass(double);
-#define isfinite(x) (_dclass((double)(x)) <= FP_ZERO)
-#define isinf(x)    (_dclass((double)(x)) == FP_INFINITE)
-#define isnan(x)    (_dclass((double)(x)) == FP_NAN)
-#define isnormal(x) (_dclass((double)(x)) == FP_NORMAL)
+#define isfinite(x) (_finite(x))
+#define isinf(x)    (!(_finite(x) || _isnan(x)))
+#define isnan(x)    (_isnan(x))
+#define isnormal(x) (!!(_fpclass((double)(x)) & (_FPCLASS_NN|_FPCLASS_PN)))
 
 #ifdef __cplusplus
 }




More information about the wine-cvs mailing list