diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-09 22:22:28 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-09 22:22:28 +0000 |
commit | c921d8a2c5cc4e31aad8f9c16fe8d8a7f3d9a4f9 (patch) | |
tree | dc5eacaa7a73ade8785dec398adf12bbaacadc64 /libc/stdio/vdprintf.c | |
parent | 18e006e1d2b88d00bc2c3314ba1c315fde8b055b (diff) |
fix breakage in old_vfprintf case
Diffstat (limited to 'libc/stdio/vdprintf.c')
-rw-r--r-- | libc/stdio/vdprintf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c index 94ed6b8b8..6e28b14c0 100644 --- a/libc/stdio/vdprintf.c +++ b/libc/stdio/vdprintf.c @@ -11,6 +11,9 @@ #include "_stdio.h" #include <stdarg.h> +#ifdef __USE_OLD_VFPRINTF__ +libc_hidden_proto(vfprintf) +#endif libc_hidden_proto(fflush_unlocked) libc_hidden_proto(vdprintf) @@ -49,13 +52,17 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) /* _vfprintf_internal doesn't do any locking, locking init is here * only because of fflush_unlocked. TODO? */ -#ifdef __UCLIBC_HAS_THREADS__ +#if (defined(__STDIO_BUFFERS) || defined(__USE_OLD_VFPRINTF__)) && defined(__UCLIBC_HAS_THREADS__) f.__user_locking = 1; /* Set user locking. */ __stdio_init_mutex(&f.__lock); #endif f.__nextopen = NULL; +#ifdef __USE_OLD_VFPRINTF__ + rv = vfprintf(&f, format, arg); +#else rv = _vfprintf_internal(&f, format, arg); +#endif #ifdef __STDIO_BUFFERS /* If not buffering, then fflush is unnecessary. */ |