Files
zig/lib/libc/musl/src/stdio/__stdout_write.c
Andrew Kelley 49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00

12 lines
295 B
C

#include "stdio_impl.h"
#include <sys/ioctl.h>
size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
{
struct winsize wsz;
f->write = __stdio_write;
if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz))
f->lbf = -1;
return __stdio_write(f, buf, len);
}