musl/src/stdio/__stdout_write.c
Rich Felker 835f9f950e clean up stdio_impl.h
this header evolved to facilitate the extremely lazy practice of
omitting explicit includes of the necessary headers in individual
stdio source files; not only was this sloppy, but it also increased
build time.

now, stdio_impl.h is only including the headers it needs for its own
use; any further headers needed by source files are included directly
where needed.
2012-11-08 16:39:41 -05:00

13 lines
312 B
C

#include "stdio_impl.h"
#include <termios.h>
#include <sys/ioctl.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);
}