mirror of
https://github.com/fluencelabs/musl
synced 2025-05-05 12:02:13 +00:00
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.
13 lines
312 B
C
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);
|
|
}
|