termux-packages/packages/m4/lib-xalloc-oversized.h.patch

30 lines
1.2 KiB
Diff

Fixed "undefined reference to __muloti4".
diff -u -r ../m4-1.4.18/lib/xalloc-oversized.h ./lib/xalloc-oversized.h
--- ../m4-1.4.18/lib/xalloc-oversized.h 2016-12-31 13:54:42.000000000 +0000
+++ ./lib/xalloc-oversized.h 2018-08-06 14:25:19.420628987 +0000
@@ -46,23 +46,6 @@
positive and N must be nonnegative. This is a macro, not a
function, so that it works correctly even when SIZE_MAX < N. */
-#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
-# define xalloc_oversized(n, s) \
- __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif ((5 <= __GNUC__ \
- || (__has_builtin (__builtin_mul_overflow) \
- && __has_builtin (__builtin_constant_p))) \
- && !__STRICT_ANSI__)
-# define xalloc_oversized(n, s) \
- (__builtin_constant_p (n) && __builtin_constant_p (s) \
- ? __xalloc_oversized (n, s) \
- : ({ __xalloc_count_type __xalloc_count; \
- __builtin_mul_overflow (n, s, &__xalloc_count); }))
-
-/* Other compilers use integer division; this may be slower but is
- more portable. */
-#else
# define xalloc_oversized(n, s) __xalloc_oversized (n, s)
-#endif
#endif /* !XALLOC_OVERSIZED_H_ */