wasm-micro-runtime/core/shared/platform/common/posix
Gavin Hayes d8ee771e28
Add Cosmopolitan Libc Platform (#2598)
This PR adds the Cosmopolitan Libc platform enabling compatibility with multiple
x86_64 operating systems with the same binary. The platform is similar to the
Linux platform, but for now only x86_64 with interpreter modes are supported.

The only major change to the core is `posix.c/convert_errno()` was rewritten to use
a switch statement. With Cosmopolitan errno values depend on the currently
running operating system, and so they are non-constant and cannot be used in array
designators. However, the `cosmocc` compiler allows non-constant case labels in
switch statements, enabling the new version.

And updated wamr-test-suites script to add `-j <platform>` option. The spec tests
can be ran via `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t classic-interp`
or `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t fast-interp`.
2023-10-04 21:55:37 +08:00
..
platform_api_posix.cmake re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
posix_blocking_op.c Implement async termination of blocking thread (#2516) 2023-09-20 18:11:52 +08:00
posix_malloc.c Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
posix_memmap.c Fix ‘MADV_HUGEPAGE’ undeclared compilation error (#1012) 2022-02-18 11:25:06 +08:00
posix_sleep.c Implement os_usleep for posix (#2517) 2023-09-01 12:10:54 +08:00
posix_socket.c Add Cosmopolitan Libc Platform (#2598) 2023-10-04 21:55:37 +08:00
posix_thread.c Ignore handling SIG_DFL/SIG_IGN for previous sig action (#2589) 2023-09-26 19:59:48 +08:00
posix_time.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00