diff options
| author | jvoisin | 2023-10-01 22:06:17 +0200 |
|---|---|---|
| committer | jvoisin | 2023-10-01 22:06:17 +0200 |
| commit | 32b21b7d85383df49030b18240c1409e73001066 (patch) | |
| tree | 461982e80c5dc2f1c99f11fe94efa2c8557a73fa /include/stdio.h | |
| parent | 6a801d8a749da3889ec57030cee09d1d60b4663e (diff) | |
Add vfprintf`
Diffstat (limited to 'include/stdio.h')
| -rw-r--r-- | include/stdio.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h index 3bbee38..491de27 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
| @@ -183,7 +183,23 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, | |||
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | #ifndef __clang__ /* FIXME */ | 185 | #ifndef __clang__ /* FIXME */ |
| 186 | #undef vfprintf | ||
| 186 | #undef vprintf | 187 | #undef vprintf |
| 188 | |||
| 189 | __access(read_only, 2) | ||
| 190 | __format(printf, 2, 0) | ||
| 191 | #if __has_builtin(__builtin_vfprintf) | ||
| 192 | __diagnose_as_builtin(__builtin_vfprintf, 2, 3) | ||
| 193 | #endif | ||
| 194 | _FORTIFY_FN(vfprintf) int vfprintf(FILE * __s, const char *__f, __builtin_va_list __v) | ||
| 195 | { | ||
| 196 | #if __has_builtin(__builtin___vfprintf_chk) && USE_NATIVE_CHK | ||
| 197 | return __builtin___vfprintf_chk(__s, _FORTIFY_SOURCE, __f, __v); | ||
| 198 | #else | ||
| 199 | return __orig_vfprintf(__s, __f, __v); | ||
| 200 | #endif | ||
| 201 | } | ||
| 202 | |||
| 187 | __access(read_only, 1) | 203 | __access(read_only, 1) |
| 188 | __format(printf, 1, 0) | 204 | __format(printf, 1, 0) |
| 189 | #if __has_builtin(__builtin_vprintf) | 205 | #if __has_builtin(__builtin_vprintf) |
