diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdio.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h index e93fe19..9415f83 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
| @@ -36,9 +36,10 @@ extern "C" { | |||
| 36 | #undef fread | 36 | #undef fread |
| 37 | #undef fwrite | 37 | #undef fwrite |
| 38 | #undef popen | 38 | #undef popen |
| 39 | #undef printf | ||
| 40 | #undef vprintf | ||
| 39 | #undef vsnprintf | 41 | #undef vsnprintf |
| 40 | #undef vsprintf | 42 | #undef vsprintf |
| 41 | #undef printf | ||
| 42 | 43 | ||
| 43 | __access(read_only, 2) | 44 | __access(read_only, 2) |
| 44 | #if __has_builtin(__builtin_fdopen) | 45 | #if __has_builtin(__builtin_fdopen) |
| @@ -183,6 +184,22 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, | |||
| 183 | #endif | 184 | #endif |
| 184 | } | 185 | } |
| 185 | 186 | ||
| 187 | #ifndef __clang__ /* FIXME */ | ||
| 188 | __access(read_only, 1) | ||
| 189 | __format(printf, 1, 0) | ||
| 190 | #if __has_builtin(__builtin_vprintf) | ||
| 191 | __diagnose_as_builtin(__builtin_vprintf, 1, 2) | ||
| 192 | #endif | ||
| 193 | _FORTIFY_FN(vprintf) int vprintf(const char *__f, __builtin_va_list __v) | ||
| 194 | { | ||
| 195 | #if __has_builtin(__builtin___vprintf_chk) && USE_NATIVE_CHK | ||
| 196 | return __builtin___vprintf_chk(_FORTIFY_SOURCE, __f, __v); | ||
| 197 | #else | ||
| 198 | return __orig_vprintf(__f, __v); | ||
| 199 | #endif | ||
| 200 | } | ||
| 201 | #endif | ||
| 202 | |||
| 186 | 203 | ||
| 187 | #if __has_builtin(__builtin_va_arg_pack) | 204 | #if __has_builtin(__builtin_va_arg_pack) |
| 188 | 205 | ||
