diff options
Diffstat (limited to 'include/fortify-headers.h')
| -rw-r--r-- | include/fortify-headers.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h index a9b7498..67c4792 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h | |||
| @@ -59,15 +59,20 @@ | |||
| 59 | #define __bos(ptr, type) __builtin_object_size (ptr, type) | 59 | #define __bos(ptr, type) __builtin_object_size (ptr, type) |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | /* This needs to be two different conditions: https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html */ | ||
| 63 | #if defined __has_attribute | 62 | #if defined __has_attribute |
| 63 | |||
| 64 | #if __has_attribute (access) | 64 | #if __has_attribute (access) |
| 65 | #define __access(...) __attribute__ ((access (__VA_ARGS__))) | 65 | #define __access(...) __attribute__ ((access (__VA_ARGS__))) |
| 66 | #else | 66 | #else |
| 67 | #define __access(...) | 67 | #define __access(...) |
| 68 | #endif | 68 | #endif |
| 69 | |||
| 70 | #if __has_attribute (format) | ||
| 71 | #define __format(...) __attribute__ ((format (__VA_ARGS__))) | ||
| 69 | #else | 72 | #else |
| 70 | #define __access(...) | 73 | #define __format(...) |
| 74 | #endif | ||
| 75 | |||
| 71 | #endif | 76 | #endif |
| 72 | 77 | ||
| 73 | #endif | 78 | #endif |
