mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-13 06:29:11 +00:00
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:
parent
95124cacbe
commit
c6d3802d3a
32 changed files with 256 additions and 69 deletions
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/cxxabi.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
/**
|
||||
|
@ -29,5 +30,5 @@
|
|||
* @return 0 on success or nonzero if out of space
|
||||
*/
|
||||
int atexit(void f(void)) {
|
||||
return __cxa_atexit(f, 0, 0);
|
||||
return __cxa_atexit((void *)f, 0, 0);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ void __cxa_lock(void);
|
|||
void __cxa_unlock(void);
|
||||
void __cxa_thread_finalize(void);
|
||||
void __cxa_printexits(FILE *, void *);
|
||||
int __cxa_thread_atexit(void *, void *, void *);
|
||||
int __cxa_thread_atexit_impl(void *, void *, void *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/nexgen32e/stackframe.h"
|
||||
|
||||
#define N 100
|
||||
#define N 160
|
||||
|
||||
dontinstrument const char *(DescribeBacktrace)(char buf[N],
|
||||
struct StackFrame *fr) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
const char *DescribeBacktrace(char[100], struct StackFrame *);
|
||||
#define DescribeBacktrace(x) DescribeBacktrace(alloca(100), x)
|
||||
const char *DescribeBacktrace(char[160], struct StackFrame *);
|
||||
#define DescribeBacktrace(x) DescribeBacktrace(alloca(160), x)
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue