diff options
| author | q66 | 2023-12-15 23:48:58 +0100 |
|---|---|---|
| committer | q66 | 2023-12-15 23:50:43 +0100 |
| commit | a018052d410126f94c2602b208b099839d333b05 (patch) | |
| tree | 6fb36635689a4568f384e1cc7c2ae9f4e617ad58 /include/fortify-headers.h | |
| parent | 95441d2647a149ffa6db4a81c0a19e96e3b56ba5 (diff) | |
Rename some macros to be more namespace-friendly
Diffstat (limited to 'include/fortify-headers.h')
| -rw-r--r-- | include/fortify-headers.h | 24 |
1 files changed, 12 insertions, 12 deletions
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 @@ | |||
| 71 | * See: | 71 | * See: |
| 72 | * - https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html | 72 | * - https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html |
| 73 | */ | 73 | */ |
| 74 | #define __bos(ptr, type) __builtin_dynamic_object_size (ptr, type) | 74 | #define __fh_bos(ptr, type) __builtin_dynamic_object_size (ptr, type) |
| 75 | #else | 75 | #else |
| 76 | #define __bos(ptr, type) __builtin_object_size (ptr, type) | 76 | #define __fh_bos(ptr, type) __builtin_object_size (ptr, type) |
| 77 | #endif | 77 | #endif |
| 78 | 78 | ||
| 79 | #if defined __has_attribute | 79 | #if defined __has_attribute |
| 80 | #if __has_attribute (access) | 80 | #if __has_attribute (access) |
| 81 | #define __access(...) __attribute__ ((access (__VA_ARGS__))) | 81 | #define __fh_access(...) __attribute__ ((access (__VA_ARGS__))) |
| 82 | #else | 82 | #else |
| 83 | #define __access(...) | 83 | #define __fh_access(...) |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | #if __has_attribute (format) | 86 | #if __has_attribute (format) |
| 87 | #define __format(...) __attribute__ ((format (__VA_ARGS__))) | 87 | #define __fh_format(...) __attribute__ ((format (__VA_ARGS__))) |
| 88 | #else | 88 | #else |
| 89 | #define __format(...) | 89 | #define __fh_format(...) |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
| 92 | #if __has_attribute (malloc) | 92 | #if __has_attribute (malloc) |
| 93 | #ifdef __clang__ | 93 | #ifdef __clang__ |
| 94 | #define __malloc(...) __attribute__ ((malloc)) | 94 | #define __fh_malloc(...) __attribute__ ((malloc)) |
| 95 | #else | 95 | #else |
| 96 | #define __malloc(...) __attribute__ ((malloc, __VA_ARGS__)) | 96 | #define __fh_malloc(...) __attribute__ ((malloc, __VA_ARGS__)) |
| 97 | #endif /* __clang__ */ | 97 | #endif /* __clang__ */ |
| 98 | #else | 98 | #else |
| 99 | #define __malloc(...) | 99 | #define __fh_malloc(...) |
| 100 | #endif | 100 | #endif |
| 101 | 101 | ||
| 102 | #if __has_attribute (alloc_size) && !defined(__alloc_size) | 102 | #if __has_attribute (alloc_size) && !defined(__fh_alloc_size) |
| 103 | #define __alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) | 103 | #define __fh_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) |
| 104 | #else | 104 | #else |
| 105 | #define __alloc_size(...) | 105 | #define __fh_alloc_size(...) |
| 106 | #endif | 106 | #endif |
| 107 | 107 | ||
| 108 | #if __has_attribute (diagnose_as_builtin) | 108 | #if __has_attribute (diagnose_as_builtin) |
