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:
parent
6c91dd9495
commit
b17e3d1c2b
5
xpath.c
5
xpath.c
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user