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:
Justine Tunney 2023-06-06 09:12:30 -07:00
parent b94b29d79c
commit 61b9677c05
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
11 changed files with 107 additions and 134 deletions

View file

@ -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) {

View file

@ -70,7 +70,7 @@ int __cxa_atexit(void *, void *, void *) libcesque;
int atfork(void *, void *) libcesque;
int atexit(void (*)(void)) libcesque;
char *getenv(const char *) nosideeffect libcesque;
int putenv(char *) paramsnonnull();
int putenv(char *);
int setenv(const char *, const char *, int);
int unsetenv(const char *);
int clearenv(void);