mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Attempt supporting setjmp on MSVC
This commit is contained in:
committed by
Christoffer Lerno
parent
eaaa5362a5
commit
de4bfe470e
@@ -64,9 +64,14 @@ extern fn void srand(uint seed);
|
||||
|
||||
define JmpBuf = CInt[$$JMP_BUF_SIZE];
|
||||
|
||||
extern fn CInt setjmp(JmpBuf* buffer);
|
||||
extern fn void longjmp(JmpBuf* buffer, CInt value);
|
||||
|
||||
$if (env::OS_TYPE == OsType.WIN32):
|
||||
// TODO win32 aarch64
|
||||
extern fn CInt _setjmp(void* frameptr, JmpBuf* buffer);
|
||||
macro CInt setjmp(JmpBuf* buffer) = _setjmp($$frameaddress(), buffer);
|
||||
$else:
|
||||
extern fn CInt setjmp(JmpBuf* buffer);
|
||||
$endif;
|
||||
// MB functions omitted
|
||||
|
||||
// string
|
||||
|
||||
Reference in New Issue
Block a user