Page MenuHomeFreeBSD

D60555.diff
No OneTemporary

D60555.diff

diff --git a/sys/sys/ckdint.h b/sys/sys/ckdint.h
--- a/sys/sys/ckdint.h
+++ b/sys/sys/ckdint.h
@@ -20,7 +20,8 @@
#define __ckd_result(result) (result)
#endif
-#if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_add_overflow)
+#if (defined(__GNUC_PREREQ__) && __GNUC_PREREQ__(5, 1)) || \
+ __has_builtin(__builtin_add_overflow)
#define ckd_add(result, a, b) \
__ckd_result(__builtin_add_overflow((a), (b), (result)))
#else
@@ -28,7 +29,8 @@
_Static_assert(0, "checked addition not supported")
#endif
-#if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_sub_overflow)
+#if (defined(__GNUC_PREREQ__) && __GNUC_PREREQ__(5, 1)) || \
+ __has_builtin(__builtin_sub_overflow)
#define ckd_sub(result, a, b) \
__ckd_result(__builtin_sub_overflow((a), (b), (result)))
#else
@@ -36,7 +38,8 @@
_Static_assert(0, "checked subtraction not supported")
#endif
-#if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_mul_overflow)
+#if (defined(__GNUC_PREREQ__) && __GNUC_PREREQ__(5, 1)) || \
+ __has_builtin(__builtin_mul_overflow)
#define ckd_mul(result, a, b) \
__ckd_result(__builtin_mul_overflow((a), (b), (result)))
#else

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 11, 9:45 AM (14 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40569476
Default Alt Text
D60555.diff (1 KB)

Event Timeline