summaryrefslogtreecommitdiff
path: root/libc/stdio/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/printf.c')
-rw-r--r--libc/stdio/printf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c
index 3a7dda007..898d0b94e 100644
--- a/libc/stdio/printf.c
+++ b/libc/stdio/printf.c
@@ -279,6 +279,17 @@ int vsnprintf(char *sp, size_t size, __const char *fmt, va_list ap)
}
#endif
+#ifdef L_vdprintf
+#warning rewrite vdprintf ... fd may have an associated file!!! plus buffer?
+extern int vdprintf(int fd, const char *fmt, va_list ap)
+{
+ FILE f = {f.unbuf, f.unbuf, f.unbuf, f.unbuf, f.unbuf + sizeof(f.unbuf),
+ fd, _IONBF | __MODE_WRITE | __MODE_IOTRAN};
+
+ return vfnprintf(&f, -1, fmt, ap);
+}
+#endif
+
#ifdef L_vfnprintf
extern char *__ultostr(char *buf, unsigned long uval, int base, int uppercase);