[PATCH] Define INFINITY when it's not defined

Mike Hommey mh+jemalloc at glandium.org
Tue May 27 21:14:46 PDT 2014


From: Mike Hommey <mh at glandium.org>

---
 test/unit/math.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/unit/math.c b/test/unit/math.c
index a1b288e..b1b2377 100644
--- a/test/unit/math.c
+++ b/test/unit/math.c
@@ -3,6 +3,12 @@
 #define	MAX_REL_ERR 1.0e-9
 #define	MAX_ABS_ERR 1.0e-9
 
+#include <float.h>
+
+#ifndef INFINITY
+#define INFINITY (DBL_MAX + DBL_MAX)
+#endif
+
 static bool
 double_eq_rel(double a, double b, double max_rel_err, double max_abs_err)
 {
-- 
2.0.0.rc2



More information about the jemalloc-discuss mailing list