From f1db79e6e5c383cf76f3bf0dd42115d19591a72b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 18:08:03 +0200 Subject: Adding upstream version 0.0~git20240411.9e8c542. Signed-off-by: Daniel Baumann --- libc-top-half/musl/include/setjmp.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libc-top-half/musl/include/setjmp.h') diff --git a/libc-top-half/musl/include/setjmp.h b/libc-top-half/musl/include/setjmp.h index f505f8e..b57999e 100644 --- a/libc-top-half/musl/include/setjmp.h +++ b/libc-top-half/musl/include/setjmp.h @@ -7,7 +7,12 @@ extern "C" { #include -#ifdef __wasilibc_unmodified_upstream /* WASI has no setjmp */ +#ifndef __wasilibc_unmodified_upstream +/* WASI has no setjmp */ +#if !defined(__wasm_exception_handling__) +#error Setjmp/longjmp support requires Exception handling support, which is [not yet standardized](https://github.com/WebAssembly/proposals?tab=readme-ov-file#phase-3---implementation-phase-cg--wg). To enable it, compile with `-mllvm -wasm-enable-sjlj` and use an engine that implements the Exception handling proposal. +#endif +#endif #include typedef struct __jmp_buf_tag { @@ -40,9 +45,6 @@ int setjmp (jmp_buf) __setjmp_attr; _Noreturn void longjmp (jmp_buf, int); #define setjmp setjmp -#else -#warning setjmp is not yet implemented for WASI -#endif #undef __setjmp_attr -- cgit v1.2.3