summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2023-12-15 16:08:12 +0100
committerjvoisin2023-12-15 21:41:08 +0100
commit57a3e9c1c7507b5ce56122429cc3649009a4ecc7 (patch)
treef4fb73a124fd3de49e5cef291077003d797dc2c9 /include/fortify-headers.h
parent8342bc50a16a2158fef729db6cbfef874734e4dc (diff)
Remove superfluous includes
This should fix #32
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index c7b15f9..bd53954 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -123,13 +123,17 @@
123 123
124#endif /* __has_attribute */ 124#endif /* __has_attribute */
125 125
126// Since we're not allow to include anything.
127// https://awesomekling.github.io/How-SerenityOS-declares-ssize_t/
128#define __fh_size_t __typeof__(sizeof(char))
129
126//TODO(jvoisin) Add a check for overflows 130//TODO(jvoisin) Add a check for overflows
127/* check if pointers are overlapping but not if dst == src, 131/* check if pointers are overlapping but not if dst == src,
128 * since gcc seems to like to generate code that relies on dst == src */ 132 * since gcc seems to like to generate code that relies on dst == src */
129#define __fh_overlap(a, b, l) \ 133#define __fh_overlap(a, b, l) \
130 ( \ 134 ( \
131 ((a) < (b) && (b) < (a) + (size_t)(l)) \ 135 ((a) < (b) && (b) < (a) + (__fh_size_t)(l)) \
132 || ((b) < (a) && (a) < (b) + (size_t)(l)) \ 136 || ((b) < (a) && (a) < (b) + (__fh_size_t)(l)) \
133 ) 137 )
134 138
135/* 139/*