mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Make improvements
- Get mprotect_test working on aarch64 - Get completion working on python.com repl again - Improve quality of printvideo.com and printimage.com - Fix bug in openpty() so examples/script.c works again
This commit is contained in:
parent
b94b29d79c
commit
61b9677c05
11 changed files with 107 additions and 134 deletions
|
@ -35,8 +35,8 @@
|
|||
*/
|
||||
int mprotect(void *addr, size_t size, int prot) {
|
||||
int64_t rc;
|
||||
if (SupportsWindows() && (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC |
|
||||
PROT_GROWSDOWN | PROT_GROWSUP))) {
|
||||
if (prot &
|
||||
~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_GROWSDOWN | PROT_GROWSUP)) {
|
||||
errno = EINVAL; // unix checks prot before checking size
|
||||
rc = -1;
|
||||
} else if (!size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue