tests: fix non-fatal Windows ARM64 diagnostics

This commit is contained in:
Benjamin Oldenburg 2026-03-16 16:48:36 +07:00
parent dab39b0fe9
commit c90aae5a9e
2 changed files with 9 additions and 2 deletions

View File

@ -1533,6 +1533,9 @@ static long __stdcall cpu_exception_handler(EXCEPTION_POINTERS *ex_info)
{
rt_frame f;
unsigned code;
#if defined(_WIN64) && defined(__aarch64__) && !defined(CONFIG_TCC_BACKTRACE_ONLY)
TCCState *s;
#endif
rt_getcontext(ex_info->ContextRecord, &f);
switch (code = ex_info->ExceptionRecord->ExceptionCode) {
@ -1555,7 +1558,6 @@ static long __stdcall cpu_exception_handler(EXCEPTION_POINTERS *ex_info)
break;
}
#if defined(_WIN64) && defined(__aarch64__) && !defined(CONFIG_TCC_BACKTRACE_ONLY)
TCCState *s;
rt_wait_sem();
s = rt_find_state(&f);
rt_post_sem();

View File

@ -339,7 +339,12 @@ int main(int argc, char **argv)
#include <tcclib.h>
#ifdef _WIN32
void __stdcall Sleep(unsigned int milliseconds);
# ifdef __i386__
# define LIBTCC_TEST_WINAPI __attribute__((__stdcall__))
# else
# define LIBTCC_TEST_WINAPI
# endif
void LIBTCC_TEST_WINAPI Sleep(unsigned int milliseconds);
#else
unsigned int sleep(unsigned int seconds);
#endif