blob: 03f830bcae36c6e5e7ad792e8fa4370330bccce1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From cdb9db4c1c593dbe22db4f389a62fce034f31f2d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 25 Nov 2011 08:30:51 +0000
Subject: [PATCH 2/4] Use C99 math isfinite
---
xpcom/ds/nsMathUtils.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
index 21ffbec..2e80476 100644
--- a/xpcom/ds/nsMathUtils.h
+++ b/xpcom/ds/nsMathUtils.h
@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(d);
#else
- return finite(d);
+#ifdef _GLIBCXX_CMATH
+ return std::isfinite(d);
+#else
+ return isfinite(d);
+#endif
#endif
}
--
1.7.7.4
|