major stdio overhaul, using readv/writev, plus other changes
[musl] / src / stdio / __stdout_write.c
diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c
new file mode 100644 (file)
index 0000000..4683ffc
--- /dev/null
@@ -0,0 +1,10 @@
+#include "stdio_impl.h"
+
+size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
+{
+       struct termios tio;
+       f->write = __stdio_write;
+       if (!(f->flags & F_SVB) && syscall(SYS_ioctl, f->fd, TCGETS, &tio))
+               f->lbf = -1;
+       return __stdio_write(f, buf, len);
+}