1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-19 14:50:07 +03:00

Work around buggy ceil() function on AIX

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

Closes #79.
This commit is contained in:
Daniel Richard G 2019-08-01 15:04:16 +02:00 committed by Nick Wellnhofer
parent 6c91dd9495
commit b17e3d1c2b

View File

@ -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
}
/**