From 36ac7bee0f6b0be35eafd74e0fc865edd2352197 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 9 Apr 2008 19:51:18 +0000 Subject: Factor out the core of vprintf() into separate function vprintf_internal, so that: * vprintf() does locking and __STDIO_STREAM_TRANS_TO_WRITE thing, then calls vprintf_internal * vsnprintf, vdprintf.c, vasprintf.c use vprintf_internal directly This makes sprintf faster (since it doesn't do any locking) and stops it from pulling in fseek in static compile. --- libc/stdio/vdprintf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libc/stdio/vdprintf.c') diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c index 0c29eb109..9e1b22eaf 100644 --- a/libc/stdio/vdprintf.c +++ b/libc/stdio/vdprintf.c @@ -11,7 +11,6 @@ #include "_stdio.h" #include -libc_hidden_proto(vfprintf) libc_hidden_proto(fflush_unlocked) libc_hidden_proto(vdprintf) @@ -54,7 +53,7 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) #endif f.__nextopen = NULL; - rv = vfprintf(&f, format, arg); + rv = _vfprintf_internal(&f, format, arg); #ifdef __STDIO_BUFFERS /* If not buffering, then fflush is unnecessary. */ @@ -67,5 +66,4 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) return rv; } -libc_hidden_def(vdprintf) #endif -- cgit v1.2.3