This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move the VC6 "broken-nan" define from win32.h to perl.h.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 23 Sep 2014 01:18:28 +0000 (21:18 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 23 Sep 2014 12:29:52 +0000 (08:29 -0400)
perl.h
win32/win32.h

diff --git a/perl.h b/perl.h
index 0b8e1db..7f29706 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1857,6 +1857,12 @@ typedef NVTYPE NV;
 #   include <ieeefp.h>
 #endif
 
+#ifdef USING_MSVC6
+/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false,
+ * and for example NaN < IV_MIN. */
+#define NAN_COMPARE_BROKEN 1
+#endif
+
 #ifdef USE_LONG_DOUBLE
 #   ifdef I_SUNMATH
 #       include <sunmath.h>
@@ -3029,13 +3035,6 @@ typedef pthread_key_t    perl_key;
 
 #if defined(WIN32)
 #  include "win32.h"
-#  ifdef NAN_COMPARE_BROKEN /* VC6 */
-/* We need to redefine Perl_isinf() because we most likely defined it
- * using the <DBL_MIN || >DBL_MAX way, which is broken if the NaN
- * compare is broken. */
-#    undef Perl_isinf
-#    define Perl_isinf(x) Perl_fp_class_inf(x)
-#  endif
 #endif
 
 #ifdef NETWARE
index 8587ac8..46adb15 100644 (file)
@@ -254,12 +254,6 @@ typedef unsigned short     mode_t;
 #define snprintf       _snprintf
 #define vsnprintf      _vsnprintf
 
-#ifdef USING_MSVC6
-/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false,
- * and for example NaN < IV_MIN. */
-#define NAN_COMPARE_BROKEN 1
-#endif
-
 /* on VC2003, msvcrt.lib is missing these symbols */
 #if _MSC_VER >= 1300 && _MSC_VER < 1400
 #  pragma intrinsic(_rotl64,_rotr64)