diff options
| author | Sertonix | 2026-04-09 11:41:59 +0200 |
|---|---|---|
| committer | Julien Voisin | 2026-04-13 00:04:14 +0200 |
| commit | db9e4bbab55d5c6e6ec38038f279ec14abecd4f5 (patch) | |
| tree | d89f312d591b48f8ab0f4a77269143c035497e81 /include/stdio.h | |
| parent | 60c096eb0433f7573c768a2c8523abd3c11e0720 (diff) | |
Wrap __has_attribute and __has_builtin
Simplifies the code and improves compatibility
Diffstat (limited to '')
| -rw-r--r-- | include/stdio.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/stdio.h b/include/stdio.h index 2a19cd0..2d1ee33 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
| @@ -108,8 +108,7 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, | |||
| 108 | return __r; | 108 | return __r; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | #if defined(__has_builtin) | 111 | #if __fortify_has_builtin(__builtin_va_arg_pack) |
| 112 | #if __has_builtin(__builtin_va_arg_pack) | ||
| 113 | 112 | ||
| 114 | /* clang is missing __builtin_va_arg_pack, so we cannot use these impls | 113 | /* clang is missing __builtin_va_arg_pack, so we cannot use these impls |
| 115 | * outside of gcc; we then have a few options: | 114 | * outside of gcc; we then have a few options: |
| @@ -150,8 +149,7 @@ _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...) | |||
| 150 | return __r; | 149 | return __r; |
| 151 | } | 150 | } |
| 152 | 151 | ||
| 153 | #endif /* __has_builtin(__builtin_va_arg_pack) */ | 152 | #endif /* __fortify_has_builtin(__builtin_va_arg_pack) */ |
| 154 | #endif /* defined(__has_builtin) */ | ||
| 155 | 153 | ||
| 156 | #ifdef __cplusplus | 154 | #ifdef __cplusplus |
| 157 | } | 155 | } |
