Files
semi-libc/src/stdio/vdprintf.c
T
Rich Felker a01f1fe66f remove wrap_write helper from vdprintf
this reverts commit 4ee039f354, which
added the helper as a hack to make vdprintf usable before relocation,
contingent on strong assumptions about the arch and tooling, back when
the dynamic linker did not have a real staged model for
self-relocation. since commit f3ddd17380
this has been unnecessary and the function was just wasting size and
execution time.
2020-02-21 23:44:20 -05:00

12 lines
233 B
C

#include "stdio_impl.h"
int vdprintf(int fd, const char *restrict fmt, va_list ap)
{
FILE f = {
.fd = fd, .lbf = EOF, .write = __stdio_write,
.buf = (void *)fmt, .buf_size = 0,
.lock = -1
};
return vfprintf(&f, fmt, ap);
}