1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:37:45 +00:00

Ports: Add diffutils port

This commit is contained in:
Brian Callahan 2020-01-25 19:52:28 -05:00 committed by Andreas Kling
parent 8c1f2d7131
commit 77ed943275
3 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,17 @@
--- diffutils-3.5/lib/intprops.h.orig Sat Jan 25 19:35:59 2020
+++ diffutils-3.5/lib/intprops.h Sat Jan 25 19:36:23 2020
@@ -230,11 +230,11 @@
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
-# define _GL_ADD_OVERFLOW(a, b, min, max)
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
__builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
__builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
__builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
#else
# define _GL_ADD_OVERFLOW(a, b, min, max) \