mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28: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
|
@ -99,7 +99,7 @@ int openpty(int *mfd, int *sfd, char *name, //
|
|||
return efault();
|
||||
}
|
||||
BLOCK_CANCELLATIONS;
|
||||
rc = openpty(mfd, sfd, name, tio, wsz);
|
||||
rc = openpty_impl(mfd, sfd, name, tio, wsz);
|
||||
ALLOW_CANCELLATIONS;
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -32,7 +32,7 @@ struct lconv {
|
|||
|
||||
int wcwidth(wchar_t) pureconst;
|
||||
int wcswidth(const wchar_t *, size_t) strlenesque;
|
||||
int wcsnwidth(const wchar_t *, size_t, int) strlenesque;
|
||||
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;
|
||||
struct lconv *localeconv(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* Returns monospace display width of wide character string.
|
||||
*/
|
||||
int wcsnwidth(const wchar_t *pwcs, size_t n, int o) {
|
||||
int wcsnwidth(const wchar_t *pwcs, size_t n, size_t o) {
|
||||
int w, width = 0;
|
||||
for (; *pwcs && n-- > 0; pwcs++) {
|
||||
if ((w = wcwidth(*pwcs)) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue