mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Fix some more issues
- ARM Neon headers are now exported in libc/isystem/ - stat() and access() now do a better job reporting which files are executable which ones aren't. They do this by reading the first two bytes in a file to see if it's `MZ` or `#!`.
This commit is contained in:
parent
22cf6e11eb
commit
4f5d5a6813
17 changed files with 144 additions and 49 deletions
|
@ -36,11 +36,9 @@
|
|||
#define FIODGNAME 0x80106678 // freebsd
|
||||
|
||||
static textwindows errno_t sys_ttyname_nt(int fd, char *buf, size_t size) {
|
||||
uint32_t mode;
|
||||
if (GetConsoleMode(g_fds.p[fd].handle, &mode)) {
|
||||
if (strlcpy(buf,
|
||||
(mode & kNtEnableVirtualTerminalInput) ? "CONIN$" : "CONOUT$",
|
||||
size) < size) {
|
||||
uint32_t cmode;
|
||||
if (GetConsoleMode(g_fds.p[fd].handle, &cmode)) {
|
||||
if (strlcpy(buf, "/dev/tty", size) < size) {
|
||||
return 0;
|
||||
} else {
|
||||
return ERANGE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue