mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Fix some additional Windows TTY issues
This commit is contained in:
parent
f26a280cda
commit
1694edf85c
12 changed files with 107 additions and 43 deletions
|
@ -115,7 +115,8 @@ static int ioctl_fionread(int fd, uint32_t *arg) {
|
|||
}
|
||||
} else if (GetConsoleMode(handle, &cm)) {
|
||||
int bytes = CountConsoleInputBytes(g_fds.p + fd);
|
||||
return MAX(0, bytes);
|
||||
*arg = MAX(0, bytes);
|
||||
return 0;
|
||||
} else {
|
||||
return eopnotsupp();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue