summaryrefslogtreecommitdiff
path: root/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h
blob: b275a14ec77eba8330433af49515ff36afee12eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- mozilla-release.orig/xpcom/ds/nsMathUtils.h	2013-09-11 01:15:27.000000000 +0200
+++ mozilla-release/xpcom/ds/nsMathUtils.h	2013-10-23 16:28:38.000000000 +0200
@@ -98,12 +98,16 @@ inline NS_HIDDEN_(bool) NS_finite(double
 #ifdef WIN32
     // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
     return !!_finite(d);
-#elif defined(XP_DARWIN)
+#elif defined(XP_DARWIN) || defined(__UCLIBC__)
     // Darwin has deprecated |finite| and recommends |isfinite|. The former is
     // not present in the iOS SDK.
     return std::isfinite(d);
 #else
-    return finite(d);
+#ifdef _GLIBCXX_CMATH
+    return std::isfinite(d);
+#else
+    return isfinite(d);
+#endif
 #endif
 }