Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175375691
D60555.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60555.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D60555: ckdint.h: fix cross-build with older toolchains
Attached
Detach File
Event Timeline
Log In to Comment