From 07104f170bf0d27420f7006dd1d0d5ae6c9d781f Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Sat, 6 Apr 2019 00:21:38 +0300 Subject: [PATCH] [e2k] fix build with lcc 1.23 lacking some builtins --- poppler/goo/GooCheckedOps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poppler/goo/GooCheckedOps.h b/poppler/goo/GooCheckedOps.h index 3da6b33..29747b6 100644 --- a/poppler/goo/GooCheckedOps.h +++ b/poppler/goo/GooCheckedOps.h @@ -29,7 +29,7 @@ inline bool checkedAssign(long long lz, int *z) { #endif inline bool checkedAdd(int x, int y, int *z) { -#if __GNUC__ >= 5 || __has_builtin(__builtin_sadd_overflow) +#if !(defined __LCC__ && __LCC__ <= 123) && __GNUC__ >= 5 || __has_builtin(__builtin_sadd_overflow) return __builtin_sadd_overflow(x, y, z); #else const auto lz = static_cast(x) + static_cast(y); @@ -38,7 +38,7 @@ inline bool checkedAdd(int x, int y, int *z) { } inline bool checkedMultiply(int x, int y, int *z) { -#if __GNUC__ >= 5 || __has_builtin(__builtin_smul_overflow) +#if !(defined __LCC__ && __LCC__ <= 123) && __GNUC__ >= 5 || __has_builtin(__builtin_smul_overflow) return __builtin_smul_overflow(x, y, z); #else const auto lz = static_cast(x) * static_cast(y); -- 2.10.4