From e4b3631ccee3bdd2b425eaf572f8ff737b503c17 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 7 Jun 2004 04:36:31 +0000 Subject: [PATCH] Add "_setjmp" to the list of names to try to work around the "setjmp" macro (needed for Win32). --- ChangeLog | 5 +++++ configure.in | 2 +- jit/jit-insn.c | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4288959..b972eb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +2004-06-07 Thong Nguyen + + * configure.in, jit/jit-insn.c: add "_setjmp" to the list of + names to try to work around the "setjmp" macro (needed for Win32). + 2004-06-07 Rhys Weatherley * tools/gen-apply.c: gen-apply fixes for Alpha platforms. diff --git a/configure.in b/configure.in index d5c50ec..497996d 100644 --- a/configure.in +++ b/configure.in @@ -419,7 +419,7 @@ AC_CHECK_FUNCS(isnanl isinfl finitel fmodl remainderl dreml ceill floorl) AC_CHECK_FUNCS(acosl asinl atanl atan2l cosl coshl expl logl log10l powl) AC_CHECK_FUNCS(sinl sinhl sqrtl tanl tanhl) AC_CHECK_FUNCS(dlopen cygwin_conv_to_win32_path mmap munmap mprotect) -AC_CHECK_FUNCS(sigsetjmp __sigsetjmp) +AC_CHECK_FUNCS(sigsetjmp __sigsetjmp _setjmp) AC_FUNC_ALLOCA AC_OUTPUT([ diff --git a/jit/jit-insn.c b/jit/jit-insn.c index 994b1a4..878177e 100644 --- a/jit/jit-insn.c +++ b/jit/jit-insn.c @@ -6482,8 +6482,16 @@ static int initialize_setjmp_block(jit_function_t func) return 0; } args[0] = jit_insn_address_of(func, func->builder->setjmp_value); + +#if defined(HAVE__SETJMP) + value = jit_insn_call_native + (func, "_setjmp", (void *)_setjmp, type, args, 1, JIT_CALL_NOTHROW); + +#else value = jit_insn_call_native (func, "setjmp", (void *)setjmp, type, args, 1, JIT_CALL_NOTHROW); +#endif + jit_type_free(type); if(!value) { -- 2.47.3