From a018052d410126f94c2602b208b099839d333b05 Mon Sep 17 00:00:00 2001 From: q66 Date: Fri, 15 Dec 2023 23:48:58 +0100 Subject: Rename some macros to be more namespace-friendly --- include/fortify-headers.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include/fortify-headers.h') diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 70b7952..9831a33 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -71,38 +71,38 @@ * See: * - https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html */ -#define __bos(ptr, type) __builtin_dynamic_object_size (ptr, type) +#define __fh_bos(ptr, type) __builtin_dynamic_object_size (ptr, type) #else -#define __bos(ptr, type) __builtin_object_size (ptr, type) +#define __fh_bos(ptr, type) __builtin_object_size (ptr, type) #endif #if defined __has_attribute #if __has_attribute (access) -#define __access(...) __attribute__ ((access (__VA_ARGS__))) +#define __fh_access(...) __attribute__ ((access (__VA_ARGS__))) #else -#define __access(...) +#define __fh_access(...) #endif #if __has_attribute (format) -#define __format(...) __attribute__ ((format (__VA_ARGS__))) +#define __fh_format(...) __attribute__ ((format (__VA_ARGS__))) #else -#define __format(...) +#define __fh_format(...) #endif #if __has_attribute (malloc) #ifdef __clang__ -#define __malloc(...) __attribute__ ((malloc)) +#define __fh_malloc(...) __attribute__ ((malloc)) #else -#define __malloc(...) __attribute__ ((malloc, __VA_ARGS__)) +#define __fh_malloc(...) __attribute__ ((malloc, __VA_ARGS__)) #endif /* __clang__ */ #else -#define __malloc(...) +#define __fh_malloc(...) #endif -#if __has_attribute (alloc_size) && !defined(__alloc_size) -#define __alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) +#if __has_attribute (alloc_size) && !defined(__fh_alloc_size) +#define __fh_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) #else -#define __alloc_size(...) +#define __fh_alloc_size(...) #endif #if __has_attribute (diagnose_as_builtin) -- cgit v1.3