msvcrt: The fpclass() constants are not defines.

Francois Gouget fgouget at free.fr
Sun Apr 24 18:09:46 CDT 2016


Solaris is the only platform that has fpclass() and it defines 
the constants in the fpclass_t enum.
So this reverts commit b0047713142de79eba454d1196b230d53781518f.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---

In fact, as far as I can tell, only Solaris (10u5 to 11) has fpclass(), 
and it defines the FP_SNAN & co constants in the fpclass_t enum.

Furthermore, none of Debian 5, 6, 7, 8 or FreeBSD 7.0 or 8.1, or has 
fpclass() and the FP_SNAN & co constants.

OS X 10.6.8 and 10.9.5 do define FP_SNAN and FP_QNAN, and only those, in 
/usr/include/architecture/i386/math.h and /usr/include/math.h 
respectively. But neither declares fpclass() so HAVE_FPCLASS is 
undefined anyway.

So despite commit b0047713 I see no reason to treat the FP_XXX constants 
as macros.

commit b0047713142de79eba454d1196b230d53781518f
Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 8 19:49:49 2004 +0000

    Portability fix.


 dlls/msvcrt/math.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index b9e0533..402e8b2 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -665,36 +665,16 @@ int CDECL MSVCRT__fpclass(double num)
 #if defined(HAVE_FPCLASS) || defined(fpclass)
   switch (fpclass( num ))
   {
-#ifdef FP_SNAN
   case FP_SNAN:  return MSVCRT__FPCLASS_SNAN;
-#endif
-#ifdef FP_QNAN
   case FP_QNAN:  return MSVCRT__FPCLASS_QNAN;
-#endif
-#ifdef FP_NINF
   case FP_NINF:  return MSVCRT__FPCLASS_NINF;
-#endif
-#ifdef FP_PINF
   case FP_PINF:  return MSVCRT__FPCLASS_PINF;
-#endif
-#ifdef FP_NDENORM
   case FP_NDENORM: return MSVCRT__FPCLASS_ND;
-#endif
-#ifdef FP_PDENORM
   case FP_PDENORM: return MSVCRT__FPCLASS_PD;
-#endif
-#ifdef FP_NZERO
   case FP_NZERO: return MSVCRT__FPCLASS_NZ;
-#endif
-#ifdef FP_PZERO
   case FP_PZERO: return MSVCRT__FPCLASS_PZ;
-#endif
-#ifdef FP_NNORM
   case FP_NNORM: return MSVCRT__FPCLASS_NN;
-#endif
-#ifdef FP_PNORM
   case FP_PNORM: return MSVCRT__FPCLASS_PN;
-#endif
   default: return MSVCRT__FPCLASS_PN;
   }
 #elif defined (fpclassify)
-- 
2.8.0.rc3



More information about the wine-patches mailing list