From 59c839996a728ab2369b2a9302747fde92c82a1f Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 9 Sep 2019 11:15:14 +0000 Subject: [PATCH] Make snprintf(3) and vscanf(3) definitions available under appropriate POSIX visibility. Reported by: jbeich Reviewed by: jilles PR: 207287 MFC after: 1 week --- include/stdio.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 41ae893dd7db..97e8144372f6 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -294,14 +294,16 @@ int vprintf(const char * __restrict, __va_list); int vsprintf(char * __restrict, const char * __restrict, __va_list); -#if __ISO_C_VISIBLE >= 1999 +#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506 int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); +int vsnprintf(char * __restrict, size_t, const char * __restrict, + __va_list) __printflike(3, 0); +#endif +#if __ISO_C_VISIBLE >= 1999 int vfscanf(FILE * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); -int vsnprintf(char * __restrict, size_t, const char * __restrict, - __va_list) __printflike(3, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); #endif