зеркало из https://github.com/mozilla/pjs.git
r=sicking, a=mkaply Remove XP_OS2 #ifdefs from transformiix
This commit is contained in:
Родитель
5b022d9ac7
Коммит
891197df4d
|
@ -68,7 +68,7 @@ MultiplicativeExpr::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
|
|||
switch ( op ) {
|
||||
case DIVIDE:
|
||||
if (rightDbl == 0) {
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#if defined(XP_WIN)
|
||||
/* XXX MSVC miscompiles such that (NaN == 0) */
|
||||
if (Double::isNaN(rightDbl))
|
||||
result = Double::NaN;
|
||||
|
@ -89,7 +89,7 @@ MultiplicativeExpr::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
|
|||
result = Double::NaN;
|
||||
}
|
||||
else {
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#if defined(XP_WIN)
|
||||
/* Workaround MS fmod bug where 42 % (1/0) => NaN, not 42. */
|
||||
if (!Double::isInfinite(leftDbl) && Double::isInfinite(rightDbl))
|
||||
result = leftDbl;
|
||||
|
|
|
@ -108,7 +108,7 @@ RelationalExpr::compareResults(txIEvalContext* aContext, txAExprResult* aLeft,
|
|||
rtype == txAExprResult::NUMBER) {
|
||||
double lval = aLeft->numberValue();
|
||||
double rval = aRight->numberValue();
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#if defined(XP_WIN)
|
||||
if (Double::isNaN(lval) || Double::isNaN(rval))
|
||||
result = PR_FALSE;
|
||||
else
|
||||
|
@ -147,7 +147,7 @@ RelationalExpr::compareResults(txIEvalContext* aContext, txAExprResult* aLeft,
|
|||
|
||||
double leftDbl = aLeft->numberValue();
|
||||
double rightDbl = aRight->numberValue();
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#if defined(XP_WIN)
|
||||
if (Double::isNaN(leftDbl) || Double::isNaN(rightDbl))
|
||||
return PR_FALSE;
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче