mcst-linux-kernel/patches-2024.06.26/patch-2.7.6/0007-bug-103829-enable-supp...

26 lines
1.2 KiB
Diff

diff -ruN patch-2.7.6/lib/intprops.h my_patch-2.7.6/lib/intprops.h
--- patch-2.7.6/lib/intprops.h 2018-02-03 15:42:20.000000000 +0300
+++ my_patch-2.7.6/lib/intprops.h 2024-04-12 19:24:18.639445077 +0300
@@ -219,7 +219,8 @@
: (max) >> (b) < (a))
/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
-#if 5 <= __GNUC__ && !defined __ICC
+
+#if (5 <= __GNUC__ && !defined __ICC) && (!defined __LCC__ || __LCC__ > 123)
# define _GL_HAS_BUILTIN_OVERFLOW 1
#else
# define _GL_HAS_BUILTIN_OVERFLOW 0
diff -ruN patch-2.7.6/lib/xalloc-oversized.h my_patch-2.7.6/lib/xalloc-oversized.h
--- patch-2.7.6/lib/xalloc-oversized.h 2018-02-03 15:41:53.000000000 +0300
+++ my_patch-2.7.6/lib/xalloc-oversized.h 2024-04-12 19:24:36.443849711 +0300
@@ -44,7 +44,7 @@
#if 7 <= __GNUC__
# define xalloc_oversized(n, s) \
__builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
+#elif (5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__) && (!defined __LCC__ || __LCC__ > 123)
# define xalloc_oversized(n, s) \
(__builtin_constant_p (n) && __builtin_constant_p (s) \
? __xalloc_oversized (n, s) \