Add more fixes for new cosmocc toolchain

We now have an `#include <cxxabi.h>` header which defines all the APIs
Cosmopolitan's implemented so far. The `cosmocc` README.md file is now
greatly expanded with documentation.
This commit is contained in:
Justine Tunney 2023-11-11 22:32:12 -08:00
parent 95124cacbe
commit c6d3802d3a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
32 changed files with 256 additions and 69 deletions

View file

@ -62,7 +62,7 @@ struct Syslib {
/* v2 (2023-09-10) */
pthread_t (*pthread_self)(void);
void (*dispatch_release)(dispatch_semaphore_t);
int (*raise)(int);
long (*raise)(int);
int (*pthread_join)(pthread_t, void **);
void (*pthread_yield_np)(void);
int pthread_stack_min;
@ -441,6 +441,10 @@ static long sys_close(int fd) {
return sysret(close(fd));
}
static long sys_raise(int sig) {
return sysret(raise(sig));
}
static long sys_pipe(int pfds[2]) {
return sysret(pipe(pfds));
}
@ -888,7 +892,7 @@ int main(int argc, char **argv, char **envp) {
M->lib.dispatch_walltime = dispatch_walltime;
M->lib.pthread_self = pthread_self;
M->lib.dispatch_release = dispatch_release;
M->lib.raise = raise;
M->lib.raise = sys_raise;
M->lib.pthread_join = pthread_join;
M->lib.pthread_yield_np = pthread_yield_np;
M->lib.pthread_stack_min = PTHREAD_STACK_MIN;