Add custom (faster) vfprintf implementation (disabled by default)
* defs.h: Declare strace_vfprintf either as a alias to vfprintf
or as a bona fide function. USE_CUSTOM_PRINTF define controls whether
we use strace_vfprintf. By default, we don't.
* strace.c (tprintf): Call strace_vfprintf instead of vfprintf.
* vsprintf.c: New file, implements strace_vfprintf.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/strace.c b/strace.c
index 34690fc..857136d 100644
--- a/strace.c
+++ b/strace.c
@@ -512,7 +512,7 @@
va_start(args, fmt);
if (current_tcp) {
- int n = vfprintf(current_tcp->outf, fmt, args);
+ int n = strace_vfprintf(current_tcp->outf, fmt, args);
if (n < 0) {
if (current_tcp->outf != stderr)
perror(outfname == NULL