summaryrefslogtreecommitdiff
path: root/Source/WTF/wtf/MathExtras.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-10-18 18:14:17 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-21 23:56:18 +0200
commitd4a6abc1b18d65a2bd665cdda10cedd97a98c249 (patch)
tree1809712a95418c814a615d647f6f2b8211c912dc /Source/WTF/wtf/MathExtras.h
parent2761751ecaf61064c3742c639a37f110120e8292 (diff)
downloadqtwebkit-d4a6abc1b18d65a2bd665cdda10cedd97a98c249.tar.gz
Fix build for boot2qt eAndroid
Reverts the removal of Android support in WTF, and brings the support up to date. Merged change to MacroAssemblerARM.cpp from QtScript. Replaces use of statvfs with statfs in one place. Replaces shm-based shared memory with ashmem-based in WebKit2. Change-Id: I440b1fbd94bb4148f7ba764d77de65230d13ed90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WTF/wtf/MathExtras.h')
-rw-r--r--Source/WTF/wtf/MathExtras.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h
index ce72c4aed..f07bce6a3 100644
--- a/Source/WTF/wtf/MathExtras.h
+++ b/Source/WTF/wtf/MathExtras.h
@@ -151,17 +151,17 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
inline long long abs(long num) { return labs(num); }
#endif
-#if COMPILER(MSVC)
-// MSVC's math.h does not currently supply log2 or log2f.
+#if OS(ANDROID) || COMPILER(MSVC)
+// ANDROID and MSVC's math.h does not currently supply log2 or log2f.
inline double log2(double num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return log(num) / 0.693147180559945309417232121458176568;
}
inline float log2f(float num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return logf(num) / 0.693147180559945309417232121458176568f;
}
#endif