mirror of
https://github.com/fluencelabs/musl
synced 2025-05-21 03:31:29 +00:00
setting errno here is completely valid, but some programs, notably busybox printf, assume that errno will not be set during output and treat this as an error condition. in any case, skipping it slightly reduces code size and saves time.
11 lines
268 B
C
11 lines
268 B
C
#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);
|
|
}
|