diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 13:54:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 13:54:38 +0000 |
commit | 8c1ab65c0f548d20b7f177bdb736daaf603340e1 (patch) | |
tree | df55b7e75bf43f2bf500845b105afe3ac3a5157e /libc-top-half/musl/arch/wasm32/bits | |
parent | Initial commit. (diff) | |
download | wasi-libc-upstream/0.0_git20221206.8b7148f.tar.xz wasi-libc-upstream/0.0_git20221206.8b7148f.zip |
Adding upstream version 0.0~git20221206.8b7148f.upstream/0.0_git20221206.8b7148f
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libc-top-half/musl/arch/wasm32/bits')
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/alltypes.h.in | 58 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/dirent.h | 1 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/fcntl.h | 1 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/float.h | 16 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/ioctl.h | 1 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/limits.h | 1 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/posix.h | 2 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/reg.h | 2 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/signal.h | 40 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/stat.h | 1 | ||||
-rw-r--r-- | libc-top-half/musl/arch/wasm32/bits/stdint.h | 20 |
11 files changed, 143 insertions, 0 deletions
diff --git a/libc-top-half/musl/arch/wasm32/bits/alltypes.h.in b/libc-top-half/musl/arch/wasm32/bits/alltypes.h.in new file mode 100644 index 0000000..5dcfc9a --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/alltypes.h.in @@ -0,0 +1,58 @@ +#define _Addr long +#define _Int64 long long +#define _Reg long long + +#define __BYTE_ORDER __BYTE_ORDER__ + +#define __LONG_MAX __LONG_MAX__ + +/* + * Rather than define everything ourselves here in the musl layer, for + * WASI, reference the definitions in the lower layers. + */ + +#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) +#define __need_wchar_t +#include <stddef.h> +#define __DEFINED_wchar_t +#endif + +#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) +#define __need_wint_t +#include <stddef.h> +#define __DEFINED_wint_t +#endif + +TYPEDEF float float_t; +TYPEDEF double double_t; + +#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) +#define __need_max_align_t +#include <stddef.h> +#define __DEFINED_max_align_t +#endif + +#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) +#include <__typedef_time_t.h> +#define __DEFINED_time_t +#endif + +#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) +#include <__typedef_suseconds_t.h> +#define __DEFINED_suseconds_t +#endif + +#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) +#include <__typedef_clockid_t.h> +#define __DEFINED_clockid_t +#endif + +#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) +#include <__typedef_sigset_t.h> +#define __DEFINED_sigset_t +#endif + +#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) +#include <__typedef_clock_t.h> +#define __DEFINED_clock_t +#endif diff --git a/libc-top-half/musl/arch/wasm32/bits/dirent.h b/libc-top-half/musl/arch/wasm32/bits/dirent.h new file mode 100644 index 0000000..55f2bc9 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/dirent.h @@ -0,0 +1 @@ +#include <__struct_dirent.h> diff --git a/libc-top-half/musl/arch/wasm32/bits/fcntl.h b/libc-top-half/musl/arch/wasm32/bits/fcntl.h new file mode 100644 index 0000000..a2f3341 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/fcntl.h @@ -0,0 +1 @@ +/* Use the WASI libc fcntl implementation bits. */ diff --git a/libc-top-half/musl/arch/wasm32/bits/float.h b/libc-top-half/musl/arch/wasm32/bits/float.h new file mode 100644 index 0000000..719c790 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/float.h @@ -0,0 +1,16 @@ +#define FLT_EVAL_METHOD 0 + +#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L +#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L +#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L +#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L + +#define LDBL_MANT_DIG 113 +#define LDBL_MIN_EXP (-16381) +#define LDBL_MAX_EXP 16384 + +#define LDBL_DIG 33 +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MAX_10_EXP 4932 + +#define DECIMAL_DIG 36 diff --git a/libc-top-half/musl/arch/wasm32/bits/ioctl.h b/libc-top-half/musl/arch/wasm32/bits/ioctl.h new file mode 100644 index 0000000..b4bf7c7 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/ioctl.h @@ -0,0 +1 @@ +/* Use the WASI libc ioctl implementation bits. */ diff --git a/libc-top-half/musl/arch/wasm32/bits/limits.h b/libc-top-half/musl/arch/wasm32/bits/limits.h new file mode 100644 index 0000000..801bc48 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/limits.h @@ -0,0 +1 @@ +#include <__macro_PAGESIZE.h> diff --git a/libc-top-half/musl/arch/wasm32/bits/posix.h b/libc-top-half/musl/arch/wasm32/bits/posix.h new file mode 100644 index 0000000..387a3e4 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/posix.h @@ -0,0 +1,2 @@ +#define _POSIX_V6_ILP32_OFFBIG (1) +#define _POSIX_V7_ILP32_OFFBIG (1) diff --git a/libc-top-half/musl/arch/wasm32/bits/reg.h b/libc-top-half/musl/arch/wasm32/bits/reg.h new file mode 100644 index 0000000..2633f39 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/reg.h @@ -0,0 +1,2 @@ +#undef __WORDSIZE +#define __WORDSIZE 64 diff --git a/libc-top-half/musl/arch/wasm32/bits/signal.h b/libc-top-half/musl/arch/wasm32/bits/signal.h new file mode 100644 index 0000000..77e8d8c --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/signal.h @@ -0,0 +1,40 @@ +#ifdef _WASI_EMULATED_SIGNAL + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT SIGABRT +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL 29 +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED SIGSYS + +#define _NSIG 65 + +#endif diff --git a/libc-top-half/musl/arch/wasm32/bits/stat.h b/libc-top-half/musl/arch/wasm32/bits/stat.h new file mode 100644 index 0000000..67a0e72 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/stat.h @@ -0,0 +1 @@ +#include <__struct_stat.h> diff --git a/libc-top-half/musl/arch/wasm32/bits/stdint.h b/libc-top-half/musl/arch/wasm32/bits/stdint.h new file mode 100644 index 0000000..6e7c770 --- /dev/null +++ b/libc-top-half/musl/arch/wasm32/bits/stdint.h @@ -0,0 +1,20 @@ +typedef int16_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef uint16_t uint_fast16_t; +typedef uint32_t uint_fast32_t; + +#define INT_FAST16_MIN INT16_MIN +#define INT_FAST32_MIN INT32_MIN + +#define INT_FAST16_MAX INT16_MAX +#define INT_FAST32_MAX INT32_MAX + +#define UINT_FAST16_MAX UINT16_MAX +#define UINT_FAST32_MAX UINT32_MAX + +#define INTPTR_MIN INT32_MIN +#define INTPTR_MAX INT32_MAX +#define UINTPTR_MAX UINT32_MAX +#define PTRDIFF_MIN INT32_MIN +#define PTRDIFF_MAX INT32_MAX +#define SIZE_MAX UINT32_MAX |