Closed jorgenpt closed 3 years ago
Thank you!
The check for __wasm__
instead of HAVE_RAISE
was intentional. With your changes, compilation to WASI fails:
In file included from sodium/utils.c:13:
/opt/zig/lib/zig/libc/include/wasm-wasi-musl/signal.h:2:2:
#error "wasm lacks signal support; to enable minimal signal emulation
We need to check both :)
@jedisct1, ah! I assumed the header didn't exist, thank you for addressing that. Is the __wasm__
still needed before the raise
call? Does it actually provide an implementation for raise
? :)
It's actually optional, and requires an additional library to be linked in order to be emulated. But emulation is very limited.
Improve portability to aid in porting libsodium to modern game consoles:
raise
,SIGKILL
, etc_SC_PAGESIZE
also havesysconf
(I've filed a bug with the vendor about the lack of asysconf
, but it might not be forthcoming)PAGE_SIZE
is defined