diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-09 13:52:08 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-09 13:52:08 +0000 |
commit | 60acdef20530daeaa65cbce8bb2a14c22bc0ed00 (patch) | |
tree | 6d1fff9381cd8f517706bf8de2e0a875f6688b35 /libc/stdio/vsnprintf.c | |
parent | 1b3c855bc3dff600ee36bbafc3b3ad2d471d8df4 (diff) |
Implement all needed hidden *printf and correct vasprintf, thx blindvt
Diffstat (limited to 'libc/stdio/vsnprintf.c')
-rw-r--r-- | libc/stdio/vsnprintf.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c index ffe33ada3..6fcc84f2b 100644 --- a/libc/stdio/vsnprintf.c +++ b/libc/stdio/vsnprintf.c @@ -14,7 +14,7 @@ #ifdef __STDIO_BUFFERS -int vsnprintf(char *__restrict buf, size_t size, +int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { FILE f; @@ -57,7 +57,7 @@ int 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; @@ -66,6 +66,7 @@ int vsnprintf(char *__restrict buf, size_t size, } return rv; } +strong_alias(__vsnprintf,vsnprintf) #elif defined(__USE_OLD_VFPRINTF__) @@ -75,7 +76,7 @@ typedef struct { unsigned char *bufpos; } __FILE_vsnprintf; -int vsnprintf(char *__restrict buf, size_t size, +int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { __FILE_vsnprintf f; @@ -113,7 +114,7 @@ int 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; @@ -122,6 +123,7 @@ int vsnprintf(char *__restrict buf, size_t size, } return rv; } +strong_alias(__vsnprintf,vsnprintf) #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) @@ -163,7 +165,7 @@ static ssize_t snpf_write(register void *cookie, const char *buf, #undef COOKIE -int vsnprintf(char *__restrict buf, size_t size, +int attribute_hidden __vsnprintf(char *__restrict buf, size_t size, const char * __restrict format, va_list arg) { FILE f; @@ -197,10 +199,11 @@ int 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) #else #warning Skipping vsnprintf since no buffering, no custom streams, and not old vfprintf! |