Commit b17e3d1c authored by Daniel Richard G.'s avatar Daniel Richard G. Committed by Nick Wellnhofer

Work around buggy ceil() function on AIX

AIX has a buggy ceil() function that does not handle negative-zero
correctly.

Closes #79.
parent 6c91dd94
......@@ -9584,7 +9584,12 @@ xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs) {
CAST_TO_NUMBER;
CHECK_TYPE(XPATH_NUMBER);
#ifdef _AIX
/* Work around buggy ceil() function on AIX */
ctxt->value->floatval = copysign(ceil(ctxt->value->floatval), ctxt->value->floatval);
#else
ctxt->value->floatval = ceil(ctxt->value->floatval);
#endif
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment