| author | |
| committer | |
| log | 6376103b23617735044970f08c2a314c46b97c98 |
| tree | ea060581a37b1151fea0bf4057da3e2085b72b33 |
| parent | f1267e02c49f5d571420d687a6337a85ab76767d |
05d8b565ad1a1d6c0c1e93dc47f1d828043fcafc deduplicated wasi-libc headers
that are identical to upstream musl, but because some public headers
match the same `#include <>` patterns as private headers, this resulted
in unmodified upstream musl headers sometimes getting prioritized when
compiling wasi-libc, resulting in incorrect definitions. For example,
`UTIME_OMIT` is supposed to be -2 on WASI, but became 0x3ffffffe.
The restored headers were sourced from
<https://github.com/WebAssembly/wasi-libc/tree/c89896107d7b57aef69dcadede47409ee4f702ee>
which is the same revision as the most recent wasi-libc sync
07cc32b0041e5e12f72d682fd06a995fe904d556.6 files changed, 75 insertions(+), 0 deletions(-)
lib/libc/wasi/libc-top-half/musl/src/include/arpa/inet.h created+8| ... | ... | @@ -0,0 +1,8 @@ |
| 1 | #ifndef ARPA_INET_H | |
| 2 | #define ARPA_INET_H | |
| 3 | ||
| 4 | #include "../../../include/arpa/inet.h" | |
| 5 | ||
| 6 | hidden int __inet_aton(const char *, struct in_addr *); | |
| 7 | ||
| 8 | #endif |
lib/libc/wasi/libc-top-half/musl/src/include/stdlib.h created+19| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | #ifndef STDLIB_H | |
| 2 | #define STDLIB_H | |
| 3 | ||
| 4 | #include "../../include/stdlib.h" | |
| 5 | ||
| 6 | hidden int __putenv(char *, size_t, char *); | |
| 7 | hidden void __env_rm_add(char *, char *); | |
| 8 | hidden int __mkostemps(char *, int, int); | |
| 9 | hidden int __ptsname_r(int, char *, size_t); | |
| 10 | hidden char *__randname(char *); | |
| 11 | hidden void __qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); | |
| 12 | ||
| 13 | hidden void *__libc_malloc(size_t); | |
| 14 | hidden void *__libc_malloc_impl(size_t); | |
| 15 | hidden void *__libc_calloc(size_t, size_t); | |
| 16 | hidden void *__libc_realloc(void *, size_t); | |
| 17 | hidden void __libc_free(void *); | |
| 18 | ||
| 19 | #endif |
lib/libc/wasi/libc-top-half/musl/src/include/string.h created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | #ifndef STRING_H | |
| 2 | #define STRING_H | |
| 3 | ||
| 4 | #include "../../include/string.h" | |
| 5 | ||
| 6 | hidden void *__memrchr(const void *, int, size_t); | |
| 7 | hidden char *__stpcpy(char *, const char *); | |
| 8 | hidden char *__stpncpy(char *, const char *, size_t); | |
| 9 | hidden char *__strchrnul(const char *, int); | |
| 10 | ||
| 11 | #endif |
lib/libc/wasi/libc-top-half/musl/src/include/sys/mman.h created+20| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | #ifndef SYS_MMAN_H | |
| 2 | #define SYS_MMAN_H | |
| 3 | ||
| 4 | #include "../../../include/sys/mman.h" | |
| 5 | ||
| 6 | hidden void __vm_wait(void); | |
| 7 | hidden void __vm_lock(void); | |
| 8 | hidden void __vm_unlock(void); | |
| 9 | ||
| 10 | hidden void *__mmap(void *, size_t, int, int, int, off_t); | |
| 11 | hidden int __munmap(void *, size_t); | |
| 12 | hidden void *__mremap(void *, size_t, size_t, int, ...); | |
| 13 | hidden int __madvise(void *, size_t, int); | |
| 14 | hidden int __mprotect(void *, size_t, int); | |
| 15 | ||
| 16 | hidden const unsigned char *__map_file(const char *, size_t *); | |
| 17 | ||
| 18 | hidden char *__shm_mapname(const char *, char *); | |
| 19 | ||
| 20 | #endif |
lib/libc/wasi/libc-top-half/musl/src/include/sys/stat.h created+9| ... | ... | @@ -0,0 +1,9 @@ |
| 1 | #ifndef SYS_STAT_H | |
| 2 | #define SYS_STAT_H | |
| 3 | ||
| 4 | #include "../../../include/sys/stat.h" | |
| 5 | ||
| 6 | hidden int __fstat(int, struct stat *); | |
| 7 | hidden int __fstatat(int, const char *restrict, struct stat *restrict, int); | |
| 8 | ||
| 9 | #endif |
lib/libc/wasi/libc-top-half/musl/src/include/sys/time.h created+8| ... | ... | @@ -0,0 +1,8 @@ |
| 1 | #ifndef SYS_TIME_H | |
| 2 | #define SYS_TIME_H | |
| 3 | ||
| 4 | #include "../../../include/sys/time.h" | |
| 5 | ||
| 6 | hidden int __futimesat(int, const char *, const struct timeval [2]); | |
| 7 | ||
| 8 | #endif |