mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +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
|
@ -101,7 +101,11 @@ textwindows int sys_fstat_nt(int64_t handle, struct stat *out_st) {
|
|||
if (!GetFileInformationByHandle(handle, &wst)) {
|
||||
return __winerr();
|
||||
}
|
||||
st.st_mode = 0555 & ~umask;
|
||||
st.st_mode = 0444 & ~umask;
|
||||
if ((wst.dwFileAttributes & kNtFileAttributeDirectory) ||
|
||||
IsWindowsExecutable(handle)) {
|
||||
st.st_mode |= 0111 & ~umask;
|
||||
}
|
||||
st.st_flags = wst.dwFileAttributes;
|
||||
if (!(wst.dwFileAttributes & kNtFileAttributeReadonly)) {
|
||||
st.st_mode |= 0222 & ~umask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue