summaryrefslogtreecommitdiffstats
path: root/include/o3tl/safeint.hxx
diff options
context:
space:
mode:
authorbrainbreaker <gautamprajapati06@gmail.com>2017-06-20 15:14:32 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-06-21 10:12:36 +0200
commit2149d4a88e9dc88c30e7475f8ea317e5c7b78529 (patch)
treefbd4d172889cfb8c61ec4cf586ce8c3c49627285 /include/o3tl/safeint.hxx
parentfix android build (diff)
downloadcore-2149d4a88e9dc88c30e7475f8ea317e5c7b78529.tar.gz
core-2149d4a88e9dc88c30e7475f8ea317e5c7b78529.zip
android:update safeint header to use the else implementation with clang
Clang toolchain does not defines the __builtin_mul_overflow for 32-bit ARM. So, fallback to else implementation of checked_multiply when building Android with Clang Change-Id: I6120606f521ce121541a5b7f1150229258012d55 Reviewed-on: https://gerrit.libreoffice.org/39005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include/o3tl/safeint.hxx')
-rw-r--r--include/o3tl/safeint.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx
index ce144d22d9ea..80a152b83290 100644
--- a/include/o3tl/safeint.hxx
+++ b/include/o3tl/safeint.hxx
@@ -29,7 +29,7 @@ template<typename T> inline bool checked_multiply(T a, T b, T& result)
return !msl::utilities::SafeMultiply(a, b, result);
}
-#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow))
+#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow) && !(defined ANDROID && defined __clang__))
template<typename T> inline bool checked_multiply(T a, T b, T& result)
{