Make improvements for Actually Portable Emacs

- Get SIGWINCH working again on the New Technology
- Correctly handle O_NOFOLLOW in open() on Windows
- Implement synthetic umask() functionality on Windows
- Do a better job managing file execute access on Windows
- Fill in `st_uid` and `st_gid` with username hash on Windows
- Munge UNICODE control pictures into control codes on Windows
- Do a better job ensuring Windows console settings are restored
- Introduce KPRINTF_LOG environment variable to log kprintf to a file
This commit is contained in:
Justine Tunney 2023-08-19 06:41:06 -07:00
parent 9c7b81ee0f
commit 965516e313
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
108 changed files with 1126 additions and 807 deletions

View file

@ -245,20 +245,20 @@ syscon compat MAP_32BIT 0x00000040 0x00000040 0 0x00008000 0x00080000 0
#
# group name GNU/Systemd GNU/Systemd (Aarch64) XNU's Not UNIX! MacOS (Arm64) FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon madv MADV_NORMAL 0 0 0 0 0 0 0 0 # consensus
syscon compat POSIX_FADV_NORMAL 0 0 0 0 0 0 0 0 # consensus
syscon compat POSIX_MADV_NORMAL 0 0 0 0 0 0 0 0 # consensus
syscon madv POSIX_FADV_NORMAL 0 0 0 0 0 0 0 0 # consensus
syscon madv POSIX_MADV_NORMAL 0 0 0 0 0 0 0 0 # consensus
syscon madv MADV_DONTNEED 4 4 4 4 4 4 4 127 # TODO(jart): weird nt decommit thing?
syscon compat POSIX_MADV_DONTNEED 4 4 4 4 4 4 4 127 # unix consensus
syscon compat POSIX_FADV_DONTNEED 4 4 127 127 4 4 4 127 # unix consensus
syscon madv POSIX_MADV_DONTNEED 4 4 4 4 4 4 4 127 # unix consensus
syscon madv POSIX_FADV_DONTNEED 4 4 127 127 4 4 4 127 # unix consensus
syscon madv MADV_RANDOM 1 1 1 1 1 1 1 1 # unix consensus
syscon compat POSIX_MADV_RANDOM 1 1 1 1 1 1 1 1 # unix consensus
syscon compat POSIX_FADV_RANDOM 1 1 127 127 1 1 1 1 # unix consensus
syscon madv POSIX_MADV_RANDOM 1 1 1 1 1 1 1 1 # unix consensus
syscon madv POSIX_FADV_RANDOM 1 1 127 127 1 1 1 1 # unix consensus
syscon madv MADV_SEQUENTIAL 2 2 2 2 2 2 2 2 # unix consensus
syscon compat POSIX_MADV_SEQUENTIAL 2 2 2 2 2 2 2 2 # unix consensus
syscon compat POSIX_FADV_SEQUENTIAL 2 2 127 127 2 2 2 2 # TODO(jart): double check xnu
syscon madv POSIX_MADV_SEQUENTIAL 2 2 2 2 2 2 2 2 # unix consensus
syscon madv POSIX_FADV_SEQUENTIAL 2 2 127 127 2 2 2 2 # TODO(jart): double check xnu
syscon madv MADV_WILLNEED 3 3 3 3 3 3 3 3 # unix consensus (faked on NT)
syscon compat POSIX_MADV_WILLNEED 3 3 3 3 3 3 3 3 # unix consensus
syscon compat POSIX_FADV_WILLNEED 3 3 127 127 3 3 3 3 # TODO(jart): double check xnu
syscon madv POSIX_MADV_WILLNEED 3 3 3 3 3 3 3 3 # unix consensus
syscon madv POSIX_FADV_WILLNEED 3 3 127 127 3 3 3 3 # TODO(jart): double check xnu
syscon madv MADV_MERGEABLE 12 12 127 127 127 127 127 127 # turns on (private anon range) page scanning and merging service (linux only)
syscon madv MADV_UNMERGEABLE 13 13 127 127 127 127 127 127 # turns off mergeable (linux only)
syscon madv MADV_FREE 8 8 5 5 5 6 6 8 # Linux 4.5+ (c. 2016) / NT Faked → VMOfferPriorityNormal (Win8+)

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon access,F_OK,0,0,0,0,0,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_DONTNEED,4,4,127,127,4,4,4,127
.syscon madv,POSIX_FADV_DONTNEED,4,4,127,127,4,4,4,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_NORMAL,0,0,0,0,0,0,0,0
.syscon madv,POSIX_FADV_NORMAL,0,0,0,0,0,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_RANDOM,1,1,127,127,1,1,1,1
.syscon madv,POSIX_FADV_RANDOM,1,1,127,127,1,1,1,1

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_SEQUENTIAL,2,2,127,127,2,2,2,2
.syscon madv,POSIX_FADV_SEQUENTIAL,2,2,127,127,2,2,2,2

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_FADV_WILLNEED,3,3,127,127,3,3,3,3
.syscon madv,POSIX_FADV_WILLNEED,3,3,127,127,3,3,3,3

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_DONTNEED,4,4,4,4,4,4,4,127
.syscon madv,POSIX_MADV_DONTNEED,4,4,4,4,4,4,4,127

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_NORMAL,0,0,0,0,0,0,0,0
.syscon madv,POSIX_MADV_NORMAL,0,0,0,0,0,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_RANDOM,1,1,1,1,1,1,1,1
.syscon madv,POSIX_MADV_RANDOM,1,1,1,1,1,1,1,1

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_SEQUENTIAL,2,2,2,2,2,2,2,2
.syscon madv,POSIX_MADV_SEQUENTIAL,2,2,2,2,2,2,2,2

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,POSIX_MADV_WILLNEED,3,3,3,3,3,3,3,3
.syscon madv,POSIX_MADV_WILLNEED,3,3,3,3,3,3,3,3