diff options
Diffstat (limited to 'libc/stdio/vsnprintf.c')
-rw-r--r-- | libc/stdio/vsnprintf.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c index c926b2ad7..ab6154848 100644 --- a/libc/stdio/vsnprintf.c +++ b/libc/stdio/vsnprintf.c @@ -8,13 +8,17 @@ #include "_stdio.h" #include <stdarg.h> +libc_hidden_proto(vsnprintf) + +libc_hidden_proto(vfprintf) + #ifdef __UCLIBC_MJN3_ONLY__ #warning WISHLIST: Implement vsnprintf for non-buffered and no custom stream case. #endif /* __UCLIBC_MJN3_ONLY__ */ #ifdef __STDIO_BUFFERS -int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, +int vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { FILE f; @@ -61,7 +65,7 @@ int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, __STDIO_STREAM_DISABLE_GETC(&f); __STDIO_STREAM_ENABLE_PUTC(&f); - rv = __vfprintf(&f, format, arg); + rv = vfprintf(&f, format, arg); if (size) { if (f.__bufpos == f.__bufend) { --f.__bufpos; @@ -70,7 +74,7 @@ int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, } return rv; } -strong_alias(__vsnprintf,vsnprintf) +libc_hidden_def(vsnprintf) #elif defined(__USE_OLD_VFPRINTF__) @@ -80,7 +84,7 @@ typedef struct { unsigned char *bufpos; } __FILE_vsnprintf; -int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, +int vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { __FILE_vsnprintf f; @@ -122,7 +126,7 @@ int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, #endif f.f.__nextopen = NULL; - rv = __vfprintf((FILE *) &f, format, arg); + rv = vfprintf((FILE *) &f, format, arg); if (size) { if (f.bufpos == f.bufend) { --f.bufpos; @@ -131,7 +135,7 @@ int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, } return rv; } -strong_alias(__vsnprintf,vsnprintf) +libc_hidden_def(vsnprintf) #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) @@ -173,7 +177,7 @@ static ssize_t snpf_write(register void *cookie, const char *buf, #undef COOKIE -int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, +int vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { FILE f; @@ -211,11 +215,11 @@ int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, #endif f.__nextopen = NULL; - rv = __vfprintf(&f, format, arg); + rv = vfprintf(&f, format, arg); return rv; } -strong_alias(__vsnprintf,vsnprintf) +libc_hidden_def(vsnprintf) #else #warning Skipping vsnprintf since no buffering, no custom streams, and not old vfprintf! |