Skip to content

Commit

Permalink
patch: fix isnan/isinf patch to apply cleanly to libxml 2.9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed May 14, 2021
1 parent 2fa58fb commit 82a253f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions patches/libxml2/0009-avoid-isnan-isinf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ diff --git a/xpath.c b/xpath.c
index 9f64ab9..5b6d999 100644
--- a/xpath.c
+++ b/xpath.c
@@ -509,11 +509,7 @@ xmlXPathInit(void) {
@@ -515,11 +515,7 @@ xmlXPathInit(void) {
*/
int
xmlXPathIsNaN(double val) {
Expand All @@ -63,16 +63,16 @@ index 9f64ab9..5b6d999 100644
}

/**
@@ -524,15 +520,11 @@ xmlXPathIsNaN(double val) {
@@ -530,15 +530,11 @@ xmlXPathIsNaN(double val) {
*/
int
xmlXPathIsInf(double val) {
-#ifdef isinf
- return isinf(val) ? (val > 0 ? 1 : -1) : 0;
-#else
if (val >= INFINITY)
if (val >= xmlXPathPINF)
return 1;
if (val <= -INFINITY)
if (val <= -xmlXPathPINF)
return -1;
return 0;
-#endif
Expand Down

0 comments on commit 82a253f

Please sign in to comment.