[Libreoffice-commits] core.git: include/o3tl

brainbreaker gautamprajapati06 at gmail.com
Wed Jun 21 08:12:58 UTC 2017


 include/o3tl/safeint.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2149d4a88e9dc88c30e7475f8ea317e5c7b78529
Author: brainbreaker <gautamprajapati06 at gmail.com>
Date:   Tue Jun 20 15:14:32 2017 +0530

    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 at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

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)
 {


More information about the Libreoffice-commits mailing list