Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1435)

Side by Side Diff: fusl/src/stdio/__stdout_write.c

Issue 1717003002: [fusl] Don't syscall(SYS_ioctl, ...) in stdio (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/stdio/__fdopen.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "stdio_impl.h" 1 #include "stdio_impl.h"
2 #include <sys/ioctl.h> 2 #include <unistd.h>
3 3
4 size_t __stdout_write(FILE* f, const unsigned char* buf, size_t len) { 4 size_t __stdout_write(FILE* f, const unsigned char* buf, size_t len) {
5 struct winsize wsz;
6 f->write = __stdio_write; 5 f->write = __stdio_write;
7 if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz)) 6 if (!(f->flags & F_SVB) && !isatty(f->fd))
8 f->lbf = -1; 7 f->lbf = -1;
9 return __stdio_write(f, buf, len); 8 return __stdio_write(f, buf, len);
10 } 9 }
OLDNEW
« no previous file with comments | « fusl/src/stdio/__fdopen.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698