Bug 513063 - Followup to fix windows breakage, r=jorendorff.

This commit is contained in:
Graydon Hoare 2009-08-27 15:54:40 -07:00
parent 03bdb1b7bf
commit a4b6a75ae6
2 changed files with 14 additions and 4 deletions

View File

@ -41,9 +41,6 @@
/*
* JS number type and wrapper class.
*/
#if defined(XP_WIN) || defined(XP_OS2)
#include <float.h>
#endif
#ifdef XP_OS2
#define _PC_53 PC_53
#define _MCW_EM MCW_EM

View File

@ -40,8 +40,10 @@
#ifndef jsnum_h___
#define jsnum_h___
#include <float.h>
#include <math.h>
#if defined(XP_WIN) || defined(XP_OS2)
#include <float.h>
#endif
/*
* JS number (IEEE double) interface.
@ -97,6 +99,17 @@ JSDOUBLE_IS_FINITE(jsdouble d)
#endif
}
static inline int
JSDOUBLE_IS_INFINITE(jsdouble d)
{
#ifdef WIN32
int c = _fpclass(d);
return c == _FPCLASS_NINF || c == _FPCLASS_PINF;
#else
return isinf(d);
#endif
}
static inline int
JSDOUBLE_IS_NEGZERO(jsdouble d)
{