Commit f291b8b9bc

Jakub Konka <kubkon@jakubkonka.com>
2021-05-19 22:26:23
cc,wasi: remove unused headers and sources
1 parent 6d50020
Changed files (624)
lib
libc
wasi
expected
libc-bottom-half
libc-top-half
musl
arch
aarch64
arm
i386
m68k
microblaze
mips
mips64
mipsn32
or1k
powerpc
powerpc64
riscv64
s390x
sh
x32
x86_64
compat
crt
dist
ldso
tools
lib/libc/wasi/expected/wasm32-wasi/defined-symbols.txt
@@ -1,1200 +0,0 @@
-_CLOCK_MONOTONIC
-_CLOCK_PROCESS_CPUTIME_ID
-_CLOCK_REALTIME
-_CLOCK_THREAD_CPUTIME_ID
-_Exit
-_IO_feof_unlocked
-_IO_ferror_unlocked
-_IO_getc
-_IO_getc_unlocked
-_IO_putc
-_IO_putc_unlocked
-__EINVAL
-__ENOMEM
-__SIG_ERR
-__SIG_IGN
-__asctime_r
-__assert_fail
-__c_dot_utf8
-__c_dot_utf8_locale
-__c_locale
-__clock
-__clock_gettime
-__cos
-__cosdf
-__cosl
-__crypt_blowfish
-__crypt_des
-__crypt_md5
-__crypt_r
-__crypt_sha256
-__crypt_sha512
-__ctype_b_loc
-__ctype_get_mb_cur_max
-__ctype_tolower_loc
-__ctype_toupper_loc
-__cxa_atexit
-__cxa_finalize
-__des_setkey
-__do_des
-__duplocale
-__env_rm_add
-__env_rm_add
-__env_rm_add
-__env_rm_add
-__exp2f_data
-__exp_data
-__expo2
-__expo2f
-__fbufsize
-__fclose_ca
-__fdopen
-__fesetround
-__fgetwc_unlocked
-__flbf
-__floatscan
-__fmodeflags
-__fopen_rb_ca
-__fpending
-__fpurge
-__fputwc_unlocked
-__freadable
-__freadahead
-__freading
-__freadptr
-__freadptrinc
-__freelocale
-__fseeko
-__fseeko_unlocked
-__fseterr
-__fsetlocking
-__fsmu8
-__ftello
-__ftello_unlocked
-__funcs_on_exit
-__funcs_on_exit
-__funcs_on_quick_exit
-__funcs_on_quick_exit
-__fwritable
-__fwritex
-__fwriting
-__get_locale
-__getdelim
-__getentropy
-__getopt_msg
-__gmtime_r
-__hwcap
-__inet_aton
-__intscan
-__invtrigl_R
-__isalnum_l
-__isalpha_l
-__isatty
-__isblank_l
-__iscntrl_l
-__isdigit_l
-__isgraph_l
-__islower_l
-__isoc99_fscanf
-__isoc99_fwscanf
-__isoc99_scanf
-__isoc99_sscanf
-__isoc99_swscanf
-__isoc99_vfscanf
-__isoc99_vfwscanf
-__isoc99_vscanf
-__isoc99_vsscanf
-__isoc99_vswscanf
-__isoc99_vwscanf
-__isoc99_wscanf
-__isprint_l
-__ispunct_l
-__isspace_l
-__isupper_l
-__iswalnum_l
-__iswalpha_l
-__iswblank_l
-__iswcntrl_l
-__iswctype_l
-__iswdigit_l
-__iswgraph_l
-__iswlower_l
-__iswprint_l
-__iswpunct_l
-__iswspace_l
-__iswupper_l
-__iswxdigit_l
-__isxdigit_l
-__lctrans
-__lctrans_cur
-__lctrans_impl
-__lctrans_impl
-__ldexp_cexp
-__ldexp_cexpf
-__lgamma_r
-__lgammaf_r
-__lgammal_r
-__libc
-__libc_calloc
-__libc_free
-__libc_malloc
-__loc_is_allocated
-__localtime_r
-__log2_data
-__log2f_data
-__log_data
-__logf_data
-__lseek
-__main_argc_argv
-__main_void
-__math_divzero
-__math_divzerof
-__math_invalid
-__math_invalidf
-__math_invalidl
-__math_oflow
-__math_oflowf
-__math_uflow
-__math_uflowf
-__math_xflow
-__math_xflowf
-__memrchr
-__mo_lookup
-__month_to_secs
-__newlocale
-__nl_langinfo
-__nl_langinfo_l
-__ofl_add
-__ofl_lock
-__ofl_unlock
-__optpos
-__optreset
-__original_main
-__overflow
-__p1evll
-__pio2_hi
-__pio2_lo
-__pleval
-__polevll
-__posix_getopt
-__pow_log_data
-__powf_log2_data
-__progname
-__progname_full
-__putenv
-__rand48_step
-__reallocarray
-__rem_pio2
-__rem_pio2_large
-__rem_pio2f
-__rem_pio2l
-__rsqrt_tab
-__secs_to_tm
-__secs_to_zone
-__seed48
-__shgetc
-__shlim
-__signgam
-__sin
-__sindf
-__sinl
-__small_printf
-__stderr_FILE
-__stderr_used
-__stderr_used
-__stderr_used
-__stdin_FILE
-__stdin_used
-__stdin_used
-__stdio_close
-__stdio_exit
-__stdio_exit
-__stdio_exit_needed
-__stdio_read
-__stdio_seek
-__stdio_write
-__stdout_FILE
-__stdout_used
-__stdout_used
-__stdout_used
-__stdout_write
-__stpcpy
-__stpncpy
-__strcasecmp_l
-__strchrnul
-__strcoll_l
-__strerror_l
-__strftime_fmt_1
-__strftime_l
-__strncasecmp_l
-__strtoimax_internal
-__strtol_internal
-__strtoll_internal
-__strtoul_internal
-__strtoull_internal
-__strtoumax_internal
-__strxfrm_l
-__sysinfo
-__sysv_signal
-__tan
-__tandf
-__tanl
-__tm_to_secs
-__tm_to_tzname
-__tolower_l
-__toread
-__toread_needs_stdio_exit
-__toupper_l
-__towctrans_l
-__towlower_l
-__towrite
-__towrite_needs_stdio_exit
-__towupper_l
-__tre_mem_alloc_impl
-__tre_mem_destroy
-__tre_mem_new_impl
-__tsearch_balance
-__uflow
-__unlist_locked_file
-__uselocale
-__utc
-__wasi_args_get
-__wasi_args_sizes_get
-__wasi_clock_res_get
-__wasi_clock_time_get
-__wasi_environ_get
-__wasi_environ_sizes_get
-__wasi_fd_advise
-__wasi_fd_allocate
-__wasi_fd_close
-__wasi_fd_datasync
-__wasi_fd_fdstat_get
-__wasi_fd_fdstat_set_flags
-__wasi_fd_fdstat_set_rights
-__wasi_fd_filestat_get
-__wasi_fd_filestat_set_size
-__wasi_fd_filestat_set_times
-__wasi_fd_pread
-__wasi_fd_prestat_dir_name
-__wasi_fd_prestat_get
-__wasi_fd_pwrite
-__wasi_fd_read
-__wasi_fd_readdir
-__wasi_fd_renumber
-__wasi_fd_seek
-__wasi_fd_sync
-__wasi_fd_tell
-__wasi_fd_write
-__wasi_path_create_directory
-__wasi_path_filestat_get
-__wasi_path_filestat_set_times
-__wasi_path_link
-__wasi_path_open
-__wasi_path_readlink
-__wasi_path_remove_directory
-__wasi_path_rename
-__wasi_path_symlink
-__wasi_path_unlink_file
-__wasi_poll_oneoff
-__wasi_proc_exit
-__wasi_proc_raise
-__wasi_random_get
-__wasi_sched_yield
-__wasi_sock_recv
-__wasi_sock_send
-__wasi_sock_shutdown
-__wasilibc_access
-__wasilibc_cwd
-__wasilibc_ensure_environ
-__wasilibc_environ
-__wasilibc_environ
-__wasilibc_fd_renumber
-__wasilibc_find_abspath
-__wasilibc_find_relpath
-__wasilibc_find_relpath_alloc
-__wasilibc_initialize_environ
-__wasilibc_link
-__wasilibc_link_newat
-__wasilibc_link_oldat
-__wasilibc_nocwd___wasilibc_rmdirat
-__wasilibc_nocwd___wasilibc_unlinkat
-__wasilibc_nocwd_faccessat
-__wasilibc_nocwd_fstatat
-__wasilibc_nocwd_linkat
-__wasilibc_nocwd_mkdirat_nomode
-__wasilibc_nocwd_openat_nomode
-__wasilibc_nocwd_opendirat
-__wasilibc_nocwd_readlinkat
-__wasilibc_nocwd_renameat
-__wasilibc_nocwd_scandirat
-__wasilibc_nocwd_symlinkat
-__wasilibc_nocwd_utimensat
-__wasilibc_open_nomode
-__wasilibc_register_preopened_fd
-__wasilibc_rename_newat
-__wasilibc_rename_oldat
-__wasilibc_rmdirat
-__wasilibc_stat
-__wasilibc_tell
-__wasilibc_unlinkat
-__wasilibc_utimens
-__wasm_call_dtors
-__wcscoll_l
-__wcsftime_l
-__wcsxfrm_l
-__wctrans_l
-__wctype_l
-__xpg_basename
-__xpg_strerror_r
-__year_to_secs
-_environ
-_exit
-_flushlbf
-_initialize
-_start
-_start
-a64l
-abort
-abs
-access
-acos
-acosf
-acosh
-acoshf
-acoshl
-acosl
-aligned_alloc
-alphasort
-alphasort64
-arc4random
-arc4random_buf
-arc4random_uniform
-asctime
-asctime_r
-asin
-asinf
-asinh
-asinhf
-asinhl
-asinl
-asprintf
-at_quick_exit
-atan
-atan2
-atan2f
-atan2l
-atanf
-atanh
-atanhf
-atanhl
-atanl
-atexit
-atof
-atoi
-atol
-atoll
-basename
-bcmp
-bcopy
-bsd_signal
-bsearch
-btowc
-bzero
-c16rtomb
-c32rtomb
-cabs
-cabsf
-cabsl
-cacos
-cacosf
-cacosh
-cacoshf
-cacoshl
-cacosl
-calloc
-carg
-cargf
-cargl
-casin
-casinf
-casinh
-casinhf
-casinhl
-casinl
-catan
-catanf
-catanh
-catanhf
-catanhl
-catanl
-catclose
-catgets
-catopen
-cbrt
-cbrtf
-cbrtl
-ccos
-ccosf
-ccosh
-ccoshf
-ccoshl
-ccosl
-ceil
-ceilf
-ceill
-cexp
-cexpf
-cexpl
-chdir
-cimag
-cimagf
-cimagl
-clearenv
-clearerr
-clearerr_unlocked
-clock
-clock_getres
-clock_gettime
-clock_nanosleep
-clog
-clogf
-clogl
-close
-closedir
-confstr
-conj
-conjf
-conjl
-copysign
-copysignf
-copysignl
-cos
-cosf
-cosh
-coshf
-coshl
-cosl
-cpow
-cpowf
-cpowl
-cproj
-cprojf
-cprojl
-creal
-crealf
-creall
-creat
-creat64
-crypt
-crypt_r
-csin
-csinf
-csinh
-csinhf
-csinhl
-csinl
-csqrt
-csqrtf
-csqrtl
-ctan
-ctanf
-ctanh
-ctanhf
-ctanhl
-ctanl
-ctime
-ctime_r
-difftime
-dirfd
-dirname
-div
-dprintf
-drand48
-drem
-dremf
-duplocale
-ecvt
-encrypt
-environ
-erand48
-erf
-erfc
-erfcf
-erfcl
-erff
-erfl
-errno
-exit
-exp
-exp10
-exp10f
-exp10l
-exp2
-exp2f
-exp2l
-expf
-expl
-explicit_bzero
-expm1
-expm1f
-expm1l
-fabs
-fabsf
-fabsl
-faccessat
-fclose
-fcntl
-fcvt
-fdatasync
-fdclosedir
-fdim
-fdimf
-fdiml
-fdopen
-fdopendir
-feclearexcept
-fegetenv
-fegetexceptflag
-fegetround
-feholdexcept
-feof
-feof_unlocked
-feraiseexcept
-ferror
-ferror_unlocked
-fesetenv
-fesetexceptflag
-fesetround
-fetestexcept
-feupdateenv
-fflush
-fflush_unlocked
-ffs
-ffsl
-ffsll
-fgetc
-fgetc_unlocked
-fgetln
-fgetpos
-fgetpos64
-fgets
-fgets_unlocked
-fgetwc
-fgetwc_unlocked
-fgetws
-fgetws_unlocked
-fileno
-fileno_unlocked
-finite
-finitef
-floor
-floorf
-floorl
-fma
-fmaf
-fmal
-fmax
-fmaxf
-fmaxl
-fmemopen
-fmin
-fminf
-fminl
-fmod
-fmodf
-fmodl
-fmtmsg
-fnmatch
-fopen
-fopen64
-fopencookie
-fpathconf
-fprintf
-fpurge
-fputc
-fputc_unlocked
-fputs
-fputs_unlocked
-fputwc
-fputwc_unlocked
-fputws
-fputws_unlocked
-fread
-fread_unlocked
-free
-freelocale
-freopen
-freopen64
-frexp
-frexpf
-frexpl
-fscanf
-fseek
-fseeko
-fseeko64
-fsetpos
-fsetpos64
-fstat
-fstatat
-fsync
-ftell
-ftello
-ftello64
-ftime
-ftruncate
-futimens
-fwide
-fwprintf
-fwrite
-fwrite_unlocked
-fwscanf
-gcvt
-get_avphys_pages
-get_nprocs
-get_nprocs_conf
-get_phys_pages
-getc
-getc_unlocked
-getchar
-getchar_unlocked
-getcwd
-getdate
-getdate_err
-getdelim
-getdomainname
-getentropy
-getenv
-gethostid
-getline
-getopt
-getopt_long
-getopt_long_only
-getpid
-getrusage
-getsockopt
-getsubopt
-gettimeofday
-getw
-getwc
-getwc_unlocked
-getwchar
-getwchar_unlocked
-glob
-glob64
-globfree
-globfree64
-gmtime
-gmtime_r
-hcreate
-hcreate_r
-hdestroy
-hdestroy_r
-hsearch
-hsearch_r
-htonl
-htons
-hypot
-hypotf
-hypotl
-iconv
-iconv_close
-iconv_open
-ilogb
-ilogbf
-ilogbl
-imaxabs
-imaxdiv
-in6addr_any
-in6addr_loopback
-index
-inet_aton
-inet_ntop
-inet_pton
-initstate
-insque
-ioctl
-iprintf
-isalnum
-isalnum_l
-isalpha
-isalpha_l
-isascii
-isatty
-isblank
-isblank_l
-iscntrl
-iscntrl_l
-isdigit
-isdigit_l
-isgraph
-isgraph_l
-islower
-islower_l
-isprint
-isprint_l
-ispunct
-ispunct_l
-isspace
-isspace_l
-isupper
-isupper_l
-iswalnum
-iswalnum_l
-iswalpha
-iswalpha_l
-iswblank
-iswblank_l
-iswcntrl
-iswcntrl_l
-iswctype
-iswctype_l
-iswdigit
-iswdigit_l
-iswgraph
-iswgraph_l
-iswlower
-iswlower_l
-iswprint
-iswprint_l
-iswpunct
-iswpunct_l
-iswspace
-iswspace_l
-iswupper
-iswupper_l
-iswxdigit
-iswxdigit_l
-isxdigit
-isxdigit_l
-j0
-j0f
-j1
-j1f
-jn
-jnf
-jrand48
-l64a
-labs
-lcong48
-ldexp
-ldexpf
-ldexpl
-ldiv
-lfind
-lgamma
-lgamma_r
-lgammaf
-lgammaf_r
-lgammal
-lgammal_r
-link
-linkat
-llabs
-lldiv
-llrint
-llrintf
-llrintl
-llround
-llroundf
-llroundl
-localeconv
-localtime
-localtime_r
-log
-log10
-log10f
-log10l
-log1p
-log1pf
-log1pl
-log2
-log2f
-log2l
-logb
-logbf
-logbl
-logf
-logl
-lrand48
-lrint
-lrintf
-lrintl
-lround
-lroundf
-lroundl
-lsearch
-lseek
-lstat
-malloc
-malloc_usable_size
-mblen
-mbrlen
-mbrtoc16
-mbrtoc32
-mbrtowc
-mbsinit
-mbsnrtowcs
-mbsrtowcs
-mbstowcs
-mbtowc
-memccpy
-memchr
-memcmp
-memcpy
-memmem
-memmove
-mempcpy
-memrchr
-memset
-mkdir
-mkdirat
-mktime
-mmap
-modf
-modff
-modfl
-mrand48
-munmap
-nan
-nanf
-nanl
-nanosleep
-nearbyint
-nearbyintf
-nearbyintl
-newlocale
-nextafter
-nextafterf
-nextafterl
-nexttoward
-nexttowardf
-nexttowardl
-nftw
-nftw64
-nl_langinfo
-nl_langinfo_l
-nrand48
-ntohl
-ntohs
-open
-open_memstream
-open_wmemstream
-openat
-opendir
-opendirat
-optarg
-opterr
-optind
-optopt
-optreset
-pathconf
-perror
-poll
-posix_close
-posix_fadvise
-posix_fallocate
-posix_memalign
-pow
-pow10
-pow10f
-pow10l
-powf
-powl
-pread
-preadv
-printf
-program_invocation_name
-program_invocation_short_name
-pselect
-psignal
-putc
-putc_unlocked
-putchar
-putchar_unlocked
-putenv
-puts
-putw
-putwc
-putwc_unlocked
-putwchar
-putwchar_unlocked
-pwrite
-pwritev
-qsort
-quick_exit
-raise
-rand
-rand_r
-random
-read
-readdir
-readlink
-readlinkat
-readv
-realloc
-reallocarray
-recv
-regcomp
-regerror
-regexec
-regfree
-remainder
-remainderf
-remainderl
-remove
-remque
-remquo
-remquof
-remquol
-rename
-renameat
-rewind
-rewinddir
-rindex
-rint
-rintf
-rintl
-rmdir
-round
-roundf
-roundl
-sbrk
-scalb
-scalbf
-scalbln
-scalblnf
-scalblnl
-scalbn
-scalbnf
-scalbnl
-scandir
-scandirat
-scanf
-sched_yield
-seed48
-seekdir
-select
-send
-setbuf
-setbuffer
-setenv
-setkey
-setlinebuf
-setlocale
-setstate
-setvbuf
-shutdown
-signal
-signgam
-significand
-significandf
-sin
-sincos
-sincosf
-sincosl
-sinf
-sinh
-sinhf
-sinhl
-sinl
-sleep
-snprintf
-sprintf
-sqrt
-sqrtf
-sqrtl
-srand
-srand48
-srandom
-sscanf
-stat
-stderr
-stdin
-stdout
-stpcpy
-stpncpy
-strcasecmp
-strcasecmp_l
-strcasestr
-strcat
-strchr
-strchrnul
-strcmp
-strcoll
-strcoll_l
-strcpy
-strcspn
-strdup
-strerror
-strerror_l
-strerror_r
-strfmon
-strfmon_l
-strftime
-strftime_l
-strlcat
-strlcpy
-strlen
-strncasecmp
-strncasecmp_l
-strncat
-strncmp
-strncpy
-strndup
-strnlen
-strpbrk
-strptime
-strrchr
-strsep
-strsignal
-strspn
-strstr
-strtod
-strtod_l
-strtof
-strtof_l
-strtoimax
-strtok
-strtok_r
-strtol
-strtold
-strtold_l
-strtoll
-strtoul
-strtoull
-strtoumax
-strverscmp
-strxfrm
-strxfrm_l
-swab
-swprintf
-swscanf
-symlink
-symlinkat
-sysconf
-tan
-tanf
-tanh
-tanhf
-tanhl
-tanl
-tdelete
-tdestroy
-telldir
-tfind
-tgamma
-tgammaf
-tgammal
-time
-timegm
-times
-timespec_get
-toascii
-tolower
-tolower_l
-toupper
-toupper_l
-towctrans
-towctrans_l
-towlower
-towlower_l
-towupper
-towupper_l
-trunc
-truncate
-truncf
-truncl
-tsearch
-twalk
-uname
-ungetc
-ungetwc
-unlink
-unlinkat
-unsetenv
-uselocale
-usleep
-utime
-utimensat
-vasprintf
-vdprintf
-versionsort
-versionsort64
-vfprintf
-vfscanf
-vfwprintf
-vfwscanf
-vprintf
-vscanf
-vsnprintf
-vsprintf
-vsscanf
-vswprintf
-vswscanf
-vwprintf
-vwscanf
-wcpcpy
-wcpncpy
-wcrtomb
-wcscasecmp
-wcscasecmp_l
-wcscat
-wcschr
-wcscmp
-wcscoll
-wcscoll_l
-wcscpy
-wcscspn
-wcsdup
-wcsftime
-wcsftime_l
-wcslen
-wcsncasecmp
-wcsncasecmp_l
-wcsncat
-wcsncmp
-wcsncpy
-wcsnlen
-wcsnrtombs
-wcspbrk
-wcsrchr
-wcsrtombs
-wcsspn
-wcsstr
-wcstod
-wcstof
-wcstoimax
-wcstok
-wcstol
-wcstold
-wcstoll
-wcstombs
-wcstoul
-wcstoull
-wcstoumax
-wcswcs
-wcswidth
-wcsxfrm
-wcsxfrm_l
-wctob
-wctomb
-wctrans
-wctrans_l
-wctype
-wctype_l
-wcwidth
-wmemchr
-wmemcmp
-wmemcpy
-wmemmove
-wmemset
-wprintf
-write
-writev
-wscanf
-y0
-y0f
-y1
-y1f
-yn
-ynf
lib/libc/wasi/expected/wasm32-wasi/include-all.c
@@ -1,170 +0,0 @@
-#include <__errno.h>
-#include <__errno_values.h>
-#include <__fd_set.h>
-#include <__function___isatty.h>
-#include <__functions_malloc.h>
-#include <__functions_memcpy.h>
-#include <__header_dirent.h>
-#include <__header_fcntl.h>
-#include <__header_inttypes.h>
-#include <__header_netinet_in.h>
-#include <__header_poll.h>
-#include <__header_stdlib.h>
-#include <__header_string.h>
-#include <__header_sys_ioctl.h>
-#include <__header_sys_resource.h>
-#include <__header_sys_socket.h>
-#include <__header_sys_stat.h>
-#include <__header_time.h>
-#include <__header_unistd.h>
-#include <__macro_FD_SETSIZE.h>
-#include <__macro_PAGESIZE.h>
-#include <__mode_t.h>
-#include <__seek.h>
-#include <__struct_dirent.h>
-#include <__struct_in6_addr.h>
-#include <__struct_in_addr.h>
-#include <__struct_iovec.h>
-#include <__struct_msghdr.h>
-#include <__struct_pollfd.h>
-#include <__struct_rusage.h>
-#include <__struct_sockaddr.h>
-#include <__struct_sockaddr_in.h>
-#include <__struct_sockaddr_in6.h>
-#include <__struct_sockaddr_storage.h>
-#include <__struct_sockaddr_un.h>
-#include <__struct_stat.h>
-#include <__struct_timespec.h>
-#include <__struct_timeval.h>
-#include <__struct_tm.h>
-#include <__struct_tms.h>
-#include <__typedef_DIR.h>
-#include <__typedef_blkcnt_t.h>
-#include <__typedef_blksize_t.h>
-#include <__typedef_clock_t.h>
-#include <__typedef_clockid_t.h>
-#include <__typedef_dev_t.h>
-#include <__typedef_fd_set.h>
-#include <__typedef_gid_t.h>
-#include <__typedef_in_addr_t.h>
-#include <__typedef_in_port_t.h>
-#include <__typedef_ino_t.h>
-#include <__typedef_mode_t.h>
-#include <__typedef_nfds_t.h>
-#include <__typedef_nlink_t.h>
-#include <__typedef_off_t.h>
-#include <__typedef_sa_family_t.h>
-#include <__typedef_sigset_t.h>
-#include <__typedef_socklen_t.h>
-#include <__typedef_ssize_t.h>
-#include <__typedef_suseconds_t.h>
-#include <__typedef_time_t.h>
-#include <__typedef_uid_t.h>
-#include <alloca.h>
-#include <ar.h>
-#include <arpa/ftp.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <arpa/nameser_compat.h>
-#include <arpa/telnet.h>
-#include <arpa/tftp.h>
-#include <assert.h>
-#include <byteswap.h>
-#include <complex.h>
-#include <cpio.h>
-#include <crypt.h>
-#include <ctype.h>
-#include <dirent.h>
-#include <endian.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <features.h>
-#include <fenv.h>
-#include <float.h>
-#include <fmtmsg.h>
-#include <fnmatch.h>
-#include <ftw.h>
-#include <getopt.h>
-#include <glob.h>
-#include <iconv.h>
-#include <ifaddrs.h>
-#include <inttypes.h>
-#include <iso646.h>
-#include <langinfo.h>
-#include <libgen.h>
-#include <limits.h>
-#include <locale.h>
-#include <malloc.h>
-#include <math.h>
-#include <memory.h>
-#include <monetary.h>
-#include <mqueue.h>
-#include <netinet/icmp6.h>
-#include <netinet/igmp.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netpacket/packet.h>
-#include <nl_types.h>
-#include <poll.h>
-#include <regex.h>
-#include <sched.h>
-#include <search.h>
-#include <semaphore.h>
-#include <stdalign.h>
-#include <stdbool.h>
-#include <stdc-predef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <stdlib.h>
-#include <stdnoreturn.h>
-#include <string.h>
-#include <strings.h>
-#include <stropts.h>
-#include <sys/dir.h>
-#include <sys/errno.h>
-#include <sys/eventfd.h>
-#include <sys/fcntl.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/param.h>
-#include <sys/poll.h>
-#include <sys/random.h>
-#include <sys/reg.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/stropts.h>
-#include <sys/syscall.h>
-#include <sys/sysinfo.h>
-#include <sys/time.h>
-#include <sys/timeb.h>
-#include <sys/timex.h>
-#include <sys/ttydefaults.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/utsname.h>
-#include <syscall.h>
-#include <sysexits.h>
-#include <tar.h>
-#include <tgmath.h>
-#include <threads.h>
-#include <time.h>
-#include <uchar.h>
-#include <unistd.h>
-#include <utime.h>
-#include <values.h>
-#include <wasi/api.h>
-#include <wasi/libc-environ.h>
-#include <wasi/libc-find-relpath.h>
-#include <wasi/libc-nocwd.h>
-#include <wasi/libc.h>
-#include <wchar.h>
-#include <wctype.h>
lib/libc/wasi/expected/wasm32-wasi/predefined-macros.txt
@@ -1,3384 +0,0 @@
-#define ABDAY_1 0x20000
-#define ABDAY_2 0x20001
-#define ABDAY_3 0x20002
-#define ABDAY_4 0x20003
-#define ABDAY_5 0x20004
-#define ABDAY_6 0x20005
-#define ABDAY_7 0x20006
-#define ABMON_1 0x2000E
-#define ABMON_10 0x20017
-#define ABMON_11 0x20018
-#define ABMON_12 0x20019
-#define ABMON_2 0x2000F
-#define ABMON_3 0x20010
-#define ABMON_4 0x20011
-#define ABMON_5 0x20012
-#define ABMON_6 0x20013
-#define ABMON_7 0x20014
-#define ABMON_8 0x20015
-#define ABMON_9 0x20016
-#define ABORT 238
-#define ACK 04
-#define ADD ns_uop_add
-#define ADJ_ESTERROR 0x0008
-#define ADJ_FREQUENCY 0x0002
-#define ADJ_MAXERROR 0x0004
-#define ADJ_MICRO 0x1000
-#define ADJ_NANO 0x2000
-#define ADJ_OFFSET 0x0001
-#define ADJ_OFFSET_SINGLESHOT 0x8001
-#define ADJ_OFFSET_SS_READ 0xa001
-#define ADJ_SETOFFSET 0x0100
-#define ADJ_STATUS 0x0010
-#define ADJ_TAI 0x0080
-#define ADJ_TICK 0x4000
-#define ADJ_TIMECONST 0x0020
-#define AF_INET 1
-#define AF_INET6 2
-#define AF_UNIX 3
-#define AF_UNSPEC 0
-#define ALT_DIGITS 0x2002F
-#define AM_STR 0x20026
-#define ANYMARK 0x01
-#define AO 245
-#define AREGTYPE '\0'
-#define ARFMAG "`\n"
-#define ARG_MAX 131072
-#define ARMAG "!<arch>\n"
-#define AT_EACCESS (0x0)
-#define AT_FDCWD (-2)
-#define AT_REMOVEDIR (0x4)
-#define AT_SYMLINK_FOLLOW (0x2)
-#define AT_SYMLINK_NOFOLLOW (0x1)
-#define AUTHTYPE_CNT 5
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_NAME(x) authtype_names[x]
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_TEST 99
-#define AUTH_HOW_MASK 2
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_WHO_CLIENT 0
-#define AUTH_WHO_MASK 1
-#define AUTH_WHO_SERVER 1
-#define AYT 246
-#define BIG_ENDIAN __BIG_ENDIAN
-#define BITSPERBYTE CHAR_BIT
-#define BLKTYPE '4'
-#define BLK_BYTECOUNT 2
-#define BLK_EOF 0x40
-#define BLK_EOR 0x80
-#define BLK_ERRORS 0x20
-#define BLK_RESTART 0x10
-#define BREAK 243
-#define BUFSIZ 1024
-#define BYTE_ORDER __BYTE_ORDER
-#define CANBSIZ 255
-#define CBRK CEOL
-#define CDISCARD CTRL('o')
-#define CDSUSP CTRL('y')
-#define CEOF CTRL('d')
-#define CEOL '\0'
-#define CEOT CEOF
-#define CERASE 0177
-#define CFLUSH CDISCARD
-#define CHARBITS (sizeof(char) * 8)
-#define CHARCLASS_NAME_MAX 14
-#define CHAR_BIT 8
-#define CHAR_MAX 127
-#define CHAR_MIN (-128)
-#define CHRTYPE '3'
-#define CINTR CTRL('c')
-#define CKILL CTRL('u')
-#define CLNEXT CTRL('v')
-#define CLOCKS_PER_SEC ((clock_t)1000000000)
-#define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC)
-#define CLOCK_PROCESS_CPUTIME_ID (&_CLOCK_PROCESS_CPUTIME_ID)
-#define CLOCK_REALTIME (&_CLOCK_REALTIME)
-#define CLOCK_THREAD_CPUTIME_ID (&_CLOCK_THREAD_CPUTIME_ID)
-#define CMIN 1
-#define CMPLX(x,y) __CMPLX(x, y, double)
-#define CMPLXF(x,y) __CMPLX(x, y, float)
-#define CMPLXL(x,y) __CMPLX(x, y, long double)
-#define CODESET 14
-#define COLL_WEIGHTS_MAX 2
-#define COMPLETE 2
-#define CONTINUE 3
-#define CONTTYPE '7'
-#define CQUIT 034
-#define CREPRINT CTRL('r')
-#define CRNCYSTR 0x4000F
-#define CRPRNT CREPRINT
-#define CSTART CTRL('q')
-#define CSTATUS '\0'
-#define CSTOP CTRL('s')
-#define CSUSP CTRL('z')
-#define CTIME 0
-#define CTRL(x) ((x)&037)
-#define CWERASE CTRL('w')
-#define C_ANY ns_c_any
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-#define C_IN ns_c_in
-#define C_IRGRP 000040
-#define C_IROTH 000004
-#define C_IRUSR 000400
-#define C_ISBLK 060000
-#define C_ISCHR 020000
-#define C_ISCTG 0110000
-#define C_ISDIR 040000
-#define C_ISFIFO 010000
-#define C_ISGID 002000
-#define C_ISLNK 0120000
-#define C_ISREG 0100000
-#define C_ISSOCK 0140000
-#define C_ISUID 004000
-#define C_ISVTX 001000
-#define C_IWGRP 000020
-#define C_IWOTH 000002
-#define C_IWUSR 000200
-#define C_IXGRP 000010
-#define C_IXOTH 000001
-#define C_IXUSR 000100
-#define C_NONE ns_c_none
-#define DATA 03
-#define DAY_1 0x20007
-#define DAY_2 0x20008
-#define DAY_3 0x20009
-#define DAY_4 0x2000A
-#define DAY_5 0x2000B
-#define DAY_6 0x2000C
-#define DAY_7 0x2000D
-#define DBL_DECIMAL_DIG 17
-#define DBL_DIG 15
-#define DBL_EPSILON 2.22044604925031308085e-16
-#define DBL_HAS_SUBNORM 1
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.79769313486231570815e+308
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define DBL_MIN 2.22507385850720138309e-308
-#define DBL_MIN_10_EXP (-307)
-#define DBL_MIN_EXP (-1021)
-#define DBL_TRUE_MIN 4.94065645841246544177e-324
-#define DECIMAL_DIG 36
-#define DELAYTIMER_MAX 0x7fffffff
-#define DELETE ns_uop_delete
-#define DEV_BSIZE 512
-#define DIRTYPE '5'
-#define DM 242
-#define DMAXEXP DBL_MAX_EXP
-#define DMINEXP DBL_MIN_EXP
-#define DO 253
-#define DONT 254
-#define DOUBLEBITS (sizeof(double) * 8)
-#define DT_BLK __WASI_FILETYPE_BLOCK_DEVICE
-#define DT_CHR __WASI_FILETYPE_CHARACTER_DEVICE
-#define DT_DIR __WASI_FILETYPE_DIRECTORY
-#define DT_FIFO __WASI_FILETYPE_SOCKET_STREAM
-#define DT_LNK __WASI_FILETYPE_SYMBOLIC_LINK
-#define DT_REG __WASI_FILETYPE_REGULAR_FILE
-#define DT_UNKNOWN __WASI_FILETYPE_UNKNOWN
-#define D_FMT 0x20029
-#define D_T_FMT 0x20028
-#define E2BIG __WASI_ERRNO_2BIG
-#define EACCES __WASI_ERRNO_ACCES
-#define EACCESS 2
-#define EADDRINUSE __WASI_ERRNO_ADDRINUSE
-#define EADDRNOTAVAIL __WASI_ERRNO_ADDRNOTAVAIL
-#define EAFNOSUPPORT __WASI_ERRNO_AFNOSUPPORT
-#define EAGAIN __WASI_ERRNO_AGAIN
-#define EALREADY __WASI_ERRNO_ALREADY
-#define EBADF __WASI_ERRNO_BADF
-#define EBADID 5
-#define EBADMSG __WASI_ERRNO_BADMSG
-#define EBADOP 4
-#define EBUSY __WASI_ERRNO_BUSY
-#define EC 247
-#define ECANCELED __WASI_ERRNO_CANCELED
-#define ECHILD __WASI_ERRNO_CHILD
-#define ECONNABORTED __WASI_ERRNO_CONNABORTED
-#define ECONNREFUSED __WASI_ERRNO_CONNREFUSED
-#define ECONNRESET __WASI_ERRNO_CONNRESET
-#define EDEADLK __WASI_ERRNO_DEADLK
-#define EDESTADDRREQ __WASI_ERRNO_DESTADDRREQ
-#define EDOM __WASI_ERRNO_DOM
-#define EDQUOT __WASI_ERRNO_DQUOT
-#define EEXIST __WASI_ERRNO_EXIST
-#define EEXISTS 6
-#define EFAULT __WASI_ERRNO_FAULT
-#define EFBIG __WASI_ERRNO_FBIG
-#define EFD_CLOEXEC O_CLOEXEC
-#define EFD_NONBLOCK O_NONBLOCK
-#define EFD_SEMAPHORE 1
-#define EHOSTUNREACH __WASI_ERRNO_HOSTUNREACH
-#define EIDRM __WASI_ERRNO_IDRM
-#define EILSEQ __WASI_ERRNO_ILSEQ
-#define EINPROGRESS __WASI_ERRNO_INPROGRESS
-#define EINTR __WASI_ERRNO_INTR
-#define EINVAL __WASI_ERRNO_INVAL
-#define EIO __WASI_ERRNO_IO
-#define EISCONN __WASI_ERRNO_ISCONN
-#define EISDIR __WASI_ERRNO_ISDIR
-#define EL 248
-#define ELOOP __WASI_ERRNO_LOOP
-#define EMFILE __WASI_ERRNO_MFILE
-#define EMLINK __WASI_ERRNO_MLINK
-#define EMSGSIZE __WASI_ERRNO_MSGSIZE
-#define EMULTIHOP __WASI_ERRNO_MULTIHOP
-#define ENAMETOOLONG __WASI_ERRNO_NAMETOOLONG
-#define ENCRYPT_CNT 9
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_END 4
-#define ENCRYPT_IS 0
-#define ENCRYPT_NAME(x) encrypt_names[x]
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_REPLY 2
-#define ENCRYPT_REQEND 6
-#define ENCRYPT_REQSTART 5
-#define ENCRYPT_START 3
-#define ENCRYPT_SUPPORT 1
-#define ENCTYPE_ANY 0
-#define ENCTYPE_CNT 3
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_NAME(x) enctype_names[x]
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENETDOWN __WASI_ERRNO_NETDOWN
-#define ENETRESET __WASI_ERRNO_NETRESET
-#define ENETUNREACH __WASI_ERRNO_NETUNREACH
-#define ENFILE __WASI_ERRNO_NFILE
-#define ENOBUFS __WASI_ERRNO_NOBUFS
-#define ENODEV __WASI_ERRNO_NODEV
-#define ENOENT __WASI_ERRNO_NOENT
-#define ENOEXEC __WASI_ERRNO_NOEXEC
-#define ENOLCK __WASI_ERRNO_NOLCK
-#define ENOLINK __WASI_ERRNO_NOLINK
-#define ENOMEM __WASI_ERRNO_NOMEM
-#define ENOMSG __WASI_ERRNO_NOMSG
-#define ENOPROTOOPT __WASI_ERRNO_NOPROTOOPT
-#define ENOSPACE 3
-#define ENOSPC __WASI_ERRNO_NOSPC
-#define ENOSYS __WASI_ERRNO_NOSYS
-#define ENOTCAPABLE __WASI_ERRNO_NOTCAPABLE
-#define ENOTCONN __WASI_ERRNO_NOTCONN
-#define ENOTDIR __WASI_ERRNO_NOTDIR
-#define ENOTEMPTY __WASI_ERRNO_NOTEMPTY
-#define ENOTFOUND 1
-#define ENOTRECOVERABLE __WASI_ERRNO_NOTRECOVERABLE
-#define ENOTSOCK __WASI_ERRNO_NOTSOCK
-#define ENOTSUP __WASI_ERRNO_NOTSUP
-#define ENOTTY __WASI_ERRNO_NOTTY
-#define ENOUSER 7
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-#define ENXIO __WASI_ERRNO_NXIO
-#define EOF (-1)
-#define EOPNOTSUPP ENOTSUP
-#define EOR 239
-#define EOVERFLOW __WASI_ERRNO_OVERFLOW
-#define EOWNERDEAD __WASI_ERRNO_OWNERDEAD
-#define EPERM __WASI_ERRNO_PERM
-#define EPIPE __WASI_ERRNO_PIPE
-#define EPROTO __WASI_ERRNO_PROTO
-#define EPROTONOSUPPORT __WASI_ERRNO_PROTONOSUPPORT
-#define EPROTOTYPE __WASI_ERRNO_PROTOTYPE
-#define ERA 0x2002C
-#define ERANGE __WASI_ERRNO_RANGE
-#define ERA_D_FMT 0x2002E
-#define ERA_D_T_FMT 0x20030
-#define ERA_T_FMT 0x20031
-#define EROFS __WASI_ERRNO_ROFS
-#define ERROR 05
-#define ESPIPE __WASI_ERRNO_SPIPE
-#define ESRCH __WASI_ERRNO_SRCH
-#define ESTALE __WASI_ERRNO_STALE
-#define ETIMEDOUT __WASI_ERRNO_TIMEDOUT
-#define ETXTBSY __WASI_ERRNO_TXTBSY
-#define EUNDEF 0
-#define EWOULDBLOCK EAGAIN
-#define EXDEV __WASI_ERRNO_XDEV
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-#define EX_CANTCREAT 73
-#define EX_CONFIG 78
-#define EX_DATAERR 65
-#define EX_IOERR 74
-#define EX_NOHOST 68
-#define EX_NOINPUT 66
-#define EX_NOPERM 77
-#define EX_NOUSER 67
-#define EX_OK 0
-#define EX_OSERR 71
-#define EX_OSFILE 72
-#define EX_PROTOCOL 76
-#define EX_SOFTWARE 70
-#define EX_TEMPFAIL 75
-#define EX_UNAVAILABLE 69
-#define EX_USAGE 64
-#define EX__BASE 64
-#define EX__MAX 78
-#define FD_CLOEXEC (1)
-#define FD_CLR(fd,set) (FD_CLR((fd), (set)))
-#define FD_COPY(from,to) (FD_COPY((from), (to)))
-#define FD_ISSET(fd,set) (FD_ISSET((fd), (set)))
-#define FD_SET(fd,set) (FD_SET((fd), (set)))
-#define FD_SETSIZE 1024
-#define FD_ZERO(set) (FD_ZERO((set)))
-#define FE_ALL_EXCEPT 0
-#define FE_DFL_ENV ((const fenv_t *) -1)
-#define FE_TONEAREST 0
-#define FIFOTYPE '6'
-#define FILENAME_MAX 4096
-#define FILESIZEBITS 64
-#define FIONBIO 2
-#define FIONREAD 1
-#define FLOATBITS (sizeof(float) * 8)
-#define FLT_DECIMAL_DIG 9
-#define FLT_DIG 6
-#define FLT_EPSILON 1.1920928955078125e-07F
-#define FLT_EVAL_METHOD 0
-#define FLT_HAS_SUBNORM 1
-#define FLT_MANT_DIG 24
-#define FLT_MAX 3.40282346638528859812e+38F
-#define FLT_MAX_10_EXP 38
-#define FLT_MAX_EXP 128
-#define FLT_MIN 1.17549435082228750797e-38F
-#define FLT_MIN_10_EXP (-37)
-#define FLT_MIN_EXP (-125)
-#define FLT_RADIX 2
-#define FLT_ROUNDS (__builtin_flt_rounds())
-#define FLT_TRUE_MIN 1.40129846432481707092e-45F
-#define FLUSHBAND 0x04
-#define FLUSHR 0x01
-#define FLUSHRW 0x03
-#define FLUSHW 0x02
-#define FMAXEXP FLT_MAX_EXP
-#define FMINEXP FLT_MIN_EXP
-#define FMNAMESZ 8
-#define FNM_CASEFOLD 0x10
-#define FNM_FILE_NAME FNM_PATHNAME
-#define FNM_LEADING_DIR 0x8
-#define FNM_NOESCAPE 0x2
-#define FNM_NOMATCH 1
-#define FNM_NOSYS (-1)
-#define FNM_PATHNAME 0x1
-#define FNM_PERIOD 0x4
-#define FOPEN_MAX 1000
-#define FORMERR ns_r_formerr
-#define FORM_C 3
-#define FORM_N 1
-#define FORM_T 2
-#define FP_ILOGB0 FP_ILOGBNAN
-#define FP_ILOGBNAN (-1-0x7fffffff)
-#define FP_INFINITE 1
-#define FP_NAN 0
-#define FP_NORMAL 4
-#define FP_SUBNORMAL 3
-#define FP_ZERO 2
-#define FSETLOCKING_BYCALLER 2
-#define FSETLOCKING_INTERNAL 1
-#define FSETLOCKING_QUERY 0
-#define FTW_CHDIR 4
-#define FTW_D 2
-#define FTW_DEPTH 8
-#define FTW_DNR 3
-#define FTW_DP 6
-#define FTW_F 1
-#define FTW_MOUNT 2
-#define FTW_NS 4
-#define FTW_PHYS 1
-#define FTW_SL 5
-#define FTW_SLN 7
-#define F_GETFD (1)
-#define F_GETFL (3)
-#define F_LOCK 1
-#define F_OK (0)
-#define F_SETFD (2)
-#define F_SETFL (4)
-#define F_TEST 3
-#define F_TLOCK 2
-#define F_ULOCK 0
-#define GA 249
-#define GETLONG NS_GET32
-#define GETSHORT NS_GET16
-#define GLOB_ABORTED 2
-#define GLOB_APPEND 0x20
-#define GLOB_DOOFFS 0x08
-#define GLOB_ERR 0x01
-#define GLOB_MARK 0x02
-#define GLOB_NOCHECK 0x10
-#define GLOB_NOESCAPE 0x40
-#define GLOB_NOMATCH 3
-#define GLOB_NOSORT 0x04
-#define GLOB_NOSPACE 1
-#define GLOB_NOSYS 4
-#define GLOB_PERIOD 0x80
-#define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct sockaddr_storage) + (numsrc) * sizeof(struct sockaddr_storage))
-#define HFIXEDSZ NS_HFIXEDSZ
-#define HIBITL MINLONG
-#define HIBITS MINSHORT
-#define HOST_NAME_MAX 255
-#define HUGE 3.40282346638528859812e+38F
-#define HUGE_VAL ((double)INFINITY)
-#define HUGE_VALF INFINITY
-#define HUGE_VALL ((long double)INFINITY)
-#define I _Complex_I
-#define IAC 255
-#define ICMP6_DST_UNREACH 1
-#define ICMP6_DST_UNREACH_ADDR 3
-#define ICMP6_DST_UNREACH_ADMIN 1
-#define ICMP6_DST_UNREACH_BEYONDSCOPE 2
-#define ICMP6_DST_UNREACH_NOPORT 4
-#define ICMP6_DST_UNREACH_NOROUTE 0
-#define ICMP6_ECHO_REPLY 129
-#define ICMP6_ECHO_REQUEST 128
-#define ICMP6_FILTER 1
-#define ICMP6_FILTER_BLOCK 1
-#define ICMP6_FILTER_BLOCKOTHERS 3
-#define ICMP6_FILTER_PASS 2
-#define ICMP6_FILTER_PASSONLY 4
-#define ICMP6_FILTER_SETBLOCK(type,filterp) ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))
-#define ICMP6_FILTER_SETBLOCKALL(filterp) memset (filterp, 0xFF, sizeof (struct icmp6_filter));
-#define ICMP6_FILTER_SETPASS(type,filterp) ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
-#define ICMP6_FILTER_SETPASSALL(filterp) memset (filterp, 0, sizeof (struct icmp6_filter));
-#define ICMP6_FILTER_WILLBLOCK(type,filterp) ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
-#define ICMP6_FILTER_WILLPASS(type,filterp) ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
-#define ICMP6_INFOMSG_MASK 0x80
-#define ICMP6_PACKET_TOO_BIG 2
-#define ICMP6_PARAMPROB_HEADER 0
-#define ICMP6_PARAMPROB_NEXTHEADER 1
-#define ICMP6_PARAMPROB_OPTION 2
-#define ICMP6_PARAM_PROB 4
-#define ICMP6_ROUTER_RENUMBERING 138
-#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
-#define ICMP6_RR_FLAGS_PREVDONE 0x08
-#define ICMP6_RR_FLAGS_REQRESULT 0x40
-#define ICMP6_RR_FLAGS_SPECSITE 0x10
-#define ICMP6_RR_FLAGS_TEST 0x80
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10
-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
-#define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
-#define ICMP6_TIME_EXCEEDED 3
-#define ICMP6_TIME_EXCEED_REASSEMBLY 1
-#define ICMP6_TIME_EXCEED_TRANSIT 0
-#define ICMP_ADDRESS 17
-#define ICMP_ADDRESSREPLY 18
-#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
-#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8)
-#define ICMP_DEST_UNREACH 3
-#define ICMP_ECHO 8
-#define ICMP_ECHOREPLY 0
-#define ICMP_EXC_FRAGTIME 1
-#define ICMP_EXC_TTL 0
-#define ICMP_FRAG_NEEDED 4
-#define ICMP_HOST_ANO 10
-#define ICMP_HOST_ISOLATED 8
-#define ICMP_HOST_UNKNOWN 7
-#define ICMP_HOST_UNREACH 1
-#define ICMP_HOST_UNR_TOS 12
-#define ICMP_INFOTYPE(type) ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-#define ICMP_INFO_REPLY 16
-#define ICMP_INFO_REQUEST 15
-#define ICMP_IREQ 15
-#define ICMP_IREQREPLY 16
-#define ICMP_MASKLEN 12
-#define ICMP_MASKREPLY 18
-#define ICMP_MASKREQ 17
-#define ICMP_MAXTYPE 18
-#define ICMP_MINLEN 8
-#define ICMP_NET_ANO 9
-#define ICMP_NET_UNKNOWN 6
-#define ICMP_NET_UNREACH 0
-#define ICMP_NET_UNR_TOS 11
-#define ICMP_PARAMETERPROB 12
-#define ICMP_PARAMPROB 12
-#define ICMP_PARAMPROB_OPTABSENT 1
-#define ICMP_PKT_FILTERED 13
-#define ICMP_PORT_UNREACH 3
-#define ICMP_PREC_CUTOFF 15
-#define ICMP_PREC_VIOLATION 14
-#define ICMP_PROT_UNREACH 2
-#define ICMP_REDIRECT 5
-#define ICMP_REDIRECT_HOST 1
-#define ICMP_REDIRECT_NET 0
-#define ICMP_REDIRECT_TOSHOST 3
-#define ICMP_REDIRECT_TOSNET 2
-#define ICMP_REDIR_HOST 1
-#define ICMP_REDIR_HOSTTOS 3
-#define ICMP_REDIR_NET 0
-#define ICMP_REDIR_NETTOS 2
-#define ICMP_ROUTERADVERT 9
-#define ICMP_ROUTERSOLICIT 10
-#define ICMP_SOURCEQUENCH 4
-#define ICMP_SOURCE_QUENCH 4
-#define ICMP_SR_FAILED 5
-#define ICMP_TIMESTAMP 13
-#define ICMP_TIMESTAMPREPLY 14
-#define ICMP_TIME_EXCEEDED 11
-#define ICMP_TIMXCEED 11
-#define ICMP_TIMXCEED_INTRANS 0
-#define ICMP_TIMXCEED_REASS 1
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time))
-#define ICMP_TSTAMP 13
-#define ICMP_TSTAMPREPLY 14
-#define ICMP_UNREACH 3
-#define ICMP_UNREACH_FILTER_PROHIB 13
-#define ICMP_UNREACH_HOST 1
-#define ICMP_UNREACH_HOST_PRECEDENCE 14
-#define ICMP_UNREACH_HOST_PROHIB 10
-#define ICMP_UNREACH_HOST_UNKNOWN 7
-#define ICMP_UNREACH_ISOLATED 8
-#define ICMP_UNREACH_NEEDFRAG 4
-#define ICMP_UNREACH_NET 0
-#define ICMP_UNREACH_NET_PROHIB 9
-#define ICMP_UNREACH_NET_UNKNOWN 6
-#define ICMP_UNREACH_PORT 3
-#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
-#define ICMP_UNREACH_PROTOCOL 2
-#define ICMP_UNREACH_SRCFAIL 5
-#define ICMP_UNREACH_TOSHOST 12
-#define ICMP_UNREACH_TOSNET 11
-#define IGMP_AWAKENING_MEMBER 5
-#define IGMP_DELAYING_MEMBER 1
-#define IGMP_DVMRP 0x13
-#define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP
-#define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY
-#define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
-#define IGMP_IDLE_MEMBER 2
-#define IGMP_LAZY_MEMBER 3
-#define IGMP_MAX_HOST_REPORT_DELAY 10
-#define IGMP_MEMBERSHIP_QUERY 0x11
-#define IGMP_MINLEN 8
-#define IGMP_MTRACE 0x1f
-#define IGMP_MTRACE_RESP 0x1e
-#define IGMP_PIM 0x14
-#define IGMP_SLEEPING_MEMBER 4
-#define IGMP_TIMER_SCALE 10
-#define IGMP_TRACE 0x15
-#define IGMP_V1_MEMBERSHIP_REPORT 0x12
-#define IGMP_V2_LEAVE_GROUP 0x17
-#define IGMP_V2_MEMBERSHIP_REPORT 0x16
-#define IGMP_v1_ROUTER 1
-#define IGMP_v2_ROUTER 2
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define IN6ADDR_ANY_INIT { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
-#define IN6ADDR_LOOPBACK_INIT { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } }
-#define IN6_ARE_ADDR_EQUAL(a,b) __ARE_4_EQUAL((const uint32_t *)(a), (const uint32_t *)(b))
-#define IN6_IS_ADDR_LINKLOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0x80)
-#define IN6_IS_ADDR_LOOPBACK(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[12] == 0 && ((uint8_t *) (a))[13] == 0 && ((uint8_t *) (a))[14] == 0 && ((uint8_t *) (a))[15] == 1 )
-#define IN6_IS_ADDR_MC_GLOBAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0xe))
-#define IN6_IS_ADDR_MC_LINKLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x2))
-#define IN6_IS_ADDR_MC_NODELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x1))
-#define IN6_IS_ADDR_MC_ORGLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x8))
-#define IN6_IS_ADDR_MC_SITELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x5))
-#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
-#define IN6_IS_ADDR_SITELOCAL(a) ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0xc0)
-#define IN6_IS_ADDR_UNSPECIFIED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint32_t *) (a))[3] == 0)
-#define IN6_IS_ADDR_V4COMPAT(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
-#define IN6_IS_ADDR_V4MAPPED(a) (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && ((uint8_t *) (a))[8] == 0 && ((uint8_t *) (a))[9] == 0 && ((uint8_t *) (a))[10] == 0xff && ((uint8_t *) (a))[11] == 0xff)
-#define INADDRSZ NS_INADDRSZ
-#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001)
-#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002)
-#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a)
-#define INADDR_ANY ((in_addr_t) 0x00000000)
-#define INADDR_BROADCAST ((in_addr_t) 0xffffffff)
-#define INADDR_LOOPBACK ((in_addr_t) 0x7f000001)
-#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff)
-#define INADDR_NONE ((in_addr_t) 0xffffffff)
-#define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000)
-#define INDIR_MASK NS_CMPRSFLGS
-#define INET6_ADDRSTRLEN 46
-#define INET_ADDRSTRLEN 16
-#define INFINITY 1e5000f
-#define INT16SZ NS_INT16SZ
-#define INT16_C(c) c
-#define INT16_MAX (0x7fff)
-#define INT16_MIN (-1-0x7fff)
-#define INT32SZ NS_INT32SZ
-#define INT32_C(c) c
-#define INT32_MAX (0x7fffffff)
-#define INT32_MIN (-1-0x7fffffff)
-#define INT64_C(c) c ## LL
-#define INT64_MAX (0x7fffffffffffffff)
-#define INT64_MIN (-1-0x7fffffffffffffff)
-#define INT8SZ NS_INT8SZ
-#define INT8_C(c) c
-#define INT8_MAX (0x7f)
-#define INT8_MIN (-1-0x7f)
-#define INTBITS (sizeof(int) * 8)
-#define INTMAX_C(c) c ## LL
-#define INTMAX_MAX INT64_MAX
-#define INTMAX_MIN INT64_MIN
-#define INTPTR_MAX INT32_MAX
-#define INTPTR_MIN INT32_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST8_MIN INT8_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_MAX 0x7fffffff
-#define INT_MIN (-1-0x7fffffff)
-#define IN_BADCLASS(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
-#define IN_CLASSA(a) ((((in_addr_t)(a)) & 0x80000000) == 0)
-#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
-#define IN_CLASSA_MAX 128
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSB(a) ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
-#define IN_CLASSB_MAX 65536
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSC(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSD(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
-#define IN_EXPERIMENTAL(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
-#define IN_LOOPBACKNET 127
-#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IOV_MAX 1024
-#define IP 244
-#define IP6F_MORE_FRAG 0x0100
-#define IP6F_OFF_MASK 0xf8ff
-#define IP6F_RESERVED_MASK 0x0600
-#define IP6OPT_JUMBO 0xc2
-#define IP6OPT_JUMBO_LEN 6
-#define IP6OPT_NSAP_ADDR 0xc3
-#define IP6OPT_PAD1 0
-#define IP6OPT_PADN 1
-#define IP6OPT_ROUTER_ALERT 0x05
-#define IP6OPT_TUNNEL_LIMIT 0x04
-#define IP6OPT_TYPE(o) ((o) & 0xc0)
-#define IP6OPT_TYPE_DISCARD 0x40
-#define IP6OPT_TYPE_FORCEICMP 0x80
-#define IP6OPT_TYPE_ICMP 0xc0
-#define IP6OPT_TYPE_MUTABLE 0x20
-#define IP6OPT_TYPE_SKIP 0x00
-#define IP6_ALERT_AN 0x0200
-#define IP6_ALERT_MLD 0x0000
-#define IP6_ALERT_RSVP 0x0100
-#define IPDEFTTL 64
-#define IPFRAGTTL 60
-#define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK)
-#define IPOPT_CLASS_MASK 0x60
-#define IPOPT_CONTROL 0x00
-#define IPOPT_COPIED(o) ((o) & IPOPT_COPY)
-#define IPOPT_COPY 0x80
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_END IPOPT_EOL
-#define IPOPT_EOL 0
-#define IPOPT_LSRR 131
-#define IPOPT_MEASUREMENT IPOPT_DEBMEAS
-#define IPOPT_MINOFF 4
-#define IPOPT_NOOP IPOPT_NOP
-#define IPOPT_NOP 1
-#define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK)
-#define IPOPT_NUMBER_MASK 0x1f
-#define IPOPT_OFFSET 2
-#define IPOPT_OLEN 1
-#define IPOPT_OPTVAL 0
-#define IPOPT_RA 148
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_RESERVED2 0x60
-#define IPOPT_RR 7
-#define IPOPT_SATID 136
-#define IPOPT_SEC IPOPT_SECURITY
-#define IPOPT_SECURITY 130
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SID IPOPT_SATID
-#define IPOPT_SSRR 137
-#define IPOPT_TIMESTAMP IPOPT_TS
-#define IPOPT_TS 68
-#define IPOPT_TS_PRESPEC 3
-#define IPOPT_TS_TSANDADDR 1
-#define IPOPT_TS_TSONLY 0
-#define IPPORT_RESERVED 1024
-#define IPPROTO_ICMP 1
-#define IPPROTO_IP 0
-#define IPPROTO_IPV6 41
-#define IPPROTO_RAW 255
-#define IPPROTO_TCP 6
-#define IPPROTO_UDP 17
-#define IPTOS_CLASS(x) ((x) & IPTOS_CLASS_MASK)
-#define IPTOS_CLASS_CS0 0x00
-#define IPTOS_CLASS_CS1 0x20
-#define IPTOS_CLASS_CS2 0x40
-#define IPTOS_CLASS_CS3 0x60
-#define IPTOS_CLASS_CS4 0x80
-#define IPTOS_CLASS_CS5 0xa0
-#define IPTOS_CLASS_CS6 0xc0
-#define IPTOS_CLASS_CS7 0xe0
-#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
-#define IPTOS_CLASS_MASK 0xe0
-#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
-#define IPTOS_DSCP_AF11 0x28
-#define IPTOS_DSCP_AF12 0x30
-#define IPTOS_DSCP_AF13 0x38
-#define IPTOS_DSCP_AF21 0x48
-#define IPTOS_DSCP_AF22 0x50
-#define IPTOS_DSCP_AF23 0x58
-#define IPTOS_DSCP_AF31 0x68
-#define IPTOS_DSCP_AF32 0x70
-#define IPTOS_DSCP_AF33 0x78
-#define IPTOS_DSCP_AF41 0x88
-#define IPTOS_DSCP_AF42 0x90
-#define IPTOS_DSCP_AF43 0x98
-#define IPTOS_DSCP_EF 0xb8
-#define IPTOS_DSCP_MASK 0xfc
-#define IPTOS_ECN(x) ((x) & IPTOS_ECN_MASK)
-#define IPTOS_ECN_CE 0x03
-#define IPTOS_ECN_ECT0 0x02
-#define IPTOS_ECN_ECT1 0x01
-#define IPTOS_ECN_MASK 0x03
-#define IPTOS_ECN_NOT_ECT 0x00
-#define IPTOS_LOWCOST 0x02
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_MINCOST IPTOS_LOWCOST
-#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_MASK 0xe0
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-#define IPTOS_RELIABILITY 0x04
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
-#define IPTOS_TOS_MASK 0x1E
-#define IPTTLDEC 1
-#define IPV6_2292DSTOPTS 4
-#define IPV6_2292HOPLIMIT 8
-#define IPV6_2292HOPOPTS 3
-#define IPV6_2292PKTINFO 2
-#define IPV6_2292PKTOPTIONS 6
-#define IPV6_2292RTHDR 5
-#define IPV6_ADDRFORM 1
-#define IPV6_ADDR_PREFERENCES 72
-#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
-#define IPV6_AUTHHDR 10
-#define IPV6_AUTOFLOWLABEL 70
-#define IPV6_CHECKSUM 7
-#define IPV6_DONTFRAG 62
-#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
-#define IPV6_DSTOPTS 59
-#define IPV6_FREEBIND 78
-#define IPV6_HDRINCL 36
-#define IPV6_HOPLIMIT 52
-#define IPV6_HOPOPTS 54
-#define IPV6_IPSEC_POLICY 34
-#define IPV6_JOIN_ANYCAST 27
-#define IPV6_JOIN_GROUP 20
-#define IPV6_LEAVE_ANYCAST 28
-#define IPV6_LEAVE_GROUP 21
-#define IPV6_MINHOPCOUNT 73
-#define IPV6_MTU 24
-#define IPV6_MTU_DISCOVER 23
-#define IPV6_MULTICAST_ALL 29
-#define IPV6_MULTICAST_HOPS 18
-#define IPV6_MULTICAST_IF 17
-#define IPV6_MULTICAST_LOOP 19
-#define IPV6_NEXTHOP 9
-#define IPV6_ORIGDSTADDR 74
-#define IPV6_PATHMTU 61
-#define IPV6_PKTINFO 50
-#define IPV6_PMTUDISC_DO 2
-#define IPV6_PMTUDISC_DONT 0
-#define IPV6_PMTUDISC_INTERFACE 4
-#define IPV6_PMTUDISC_OMIT 5
-#define IPV6_PMTUDISC_PROBE 3
-#define IPV6_PMTUDISC_WANT 1
-#define IPV6_PREFER_SRC_CGA 0x0008
-#define IPV6_PREFER_SRC_COA 0x0004
-#define IPV6_PREFER_SRC_HOME 0x0400
-#define IPV6_PREFER_SRC_NONCGA 0x0800
-#define IPV6_PREFER_SRC_PUBLIC 0x0002
-#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
-#define IPV6_PREFER_SRC_TMP 0x0001
-#define IPV6_RECVDSTOPTS 58
-#define IPV6_RECVERR 25
-#define IPV6_RECVFRAGSIZE 77
-#define IPV6_RECVHOPLIMIT 51
-#define IPV6_RECVHOPOPTS 53
-#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
-#define IPV6_RECVPATHMTU 60
-#define IPV6_RECVPKTINFO 49
-#define IPV6_RECVRTHDR 56
-#define IPV6_RECVTCLASS 66
-#define IPV6_ROUTER_ALERT 22
-#define IPV6_ROUTER_ALERT_ISOLATE 30
-#define IPV6_RTHDR 57
-#define IPV6_RTHDRDSTOPTS 55
-#define IPV6_RTHDR_LOOSE 0
-#define IPV6_RTHDR_STRICT 1
-#define IPV6_RTHDR_TYPE_0 0
-#define IPV6_RXDSTOPTS IPV6_DSTOPTS
-#define IPV6_RXHOPOPTS IPV6_HOPOPTS
-#define IPV6_TCLASS 67
-#define IPV6_TRANSPARENT 75
-#define IPV6_UNICAST_HOPS 16
-#define IPV6_UNICAST_IF 76
-#define IPV6_V6ONLY 26
-#define IPV6_XFRM_POLICY 35
-#define IPVERSION 4
-#define IP_ADD_MEMBERSHIP 35
-#define IP_ADD_SOURCE_MEMBERSHIP 39
-#define IP_BIND_ADDRESS_NO_PORT 24
-#define IP_BLOCK_SOURCE 38
-#define IP_CHECKSUM 23
-#define IP_DEFAULT_MULTICAST_LOOP 1
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DF 0x4000
-#define IP_DROP_MEMBERSHIP 36
-#define IP_DROP_SOURCE_MEMBERSHIP 40
-#define IP_FREEBIND 15
-#define IP_HDRINCL 3
-#define IP_IPSEC_POLICY 16
-#define IP_MAXPACKET 65535
-#define IP_MAX_MEMBERSHIPS 20
-#define IP_MF 0x2000
-#define IP_MINTTL 21
-#define IP_MSFILTER 41
-#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(struct in_addr) + (numsrc) * sizeof(struct in_addr))
-#define IP_MSS 576
-#define IP_MTU 14
-#define IP_MTU_DISCOVER 10
-#define IP_MULTICAST_ALL 49
-#define IP_MULTICAST_IF 32
-#define IP_MULTICAST_LOOP 34
-#define IP_MULTICAST_TTL 33
-#define IP_NODEFRAG 22
-#define IP_OFFMASK 0x1fff
-#define IP_OPTIONS 4
-#define IP_ORIGDSTADDR 20
-#define IP_PASSSEC 18
-#define IP_PKTINFO 8
-#define IP_PKTOPTIONS 9
-#define IP_PMTUDISC 10
-#define IP_PMTUDISC_DO 2
-#define IP_PMTUDISC_DONT 0
-#define IP_PMTUDISC_INTERFACE 4
-#define IP_PMTUDISC_OMIT 5
-#define IP_PMTUDISC_PROBE 3
-#define IP_PMTUDISC_WANT 1
-#define IP_RECVERR 11
-#define IP_RECVERR_RFC4884 26
-#define IP_RECVFRAGSIZE 25
-#define IP_RECVOPTS 6
-#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
-#define IP_RECVRETOPTS IP_RETOPTS
-#define IP_RECVTOS 13
-#define IP_RECVTTL 12
-#define IP_RETOPTS 7
-#define IP_RF 0x8000
-#define IP_ROUTER_ALERT 5
-#define IP_TOS 1
-#define IP_TRANSPARENT 19
-#define IP_TTL 2
-#define IP_UNBLOCK_SOURCE 37
-#define IP_UNICAST_IF 50
-#define IP_XFRM_POLICY 17
-#define IQUERY ns_o_iquery
-#define I_ATMARK (__SID |31)
-#define I_CANPUT (__SID |34)
-#define I_CKBAND (__SID |29)
-#define I_FDINSERT (__SID |16)
-#define I_FIND (__SID |11)
-#define I_FLUSH (__SID | 5)
-#define I_FLUSHBAND (__SID |28)
-#define I_GETBAND (__SID |30)
-#define I_GETCLTIME (__SID |33)
-#define I_GETSIG (__SID |10)
-#define I_GRDOPT (__SID | 7)
-#define I_GWROPT (__SID |20)
-#define I_LINK (__SID |12)
-#define I_LIST (__SID |21)
-#define I_LOOK (__SID | 4)
-#define I_NREAD (__SID | 1)
-#define I_PEEK (__SID |15)
-#define I_PLINK (__SID |22)
-#define I_POP (__SID | 3)
-#define I_PUNLINK (__SID |23)
-#define I_PUSH (__SID | 2)
-#define I_RECVFD (__SID |14)
-#define I_SENDFD (__SID |17)
-#define I_SETCLTIME (__SID |32)
-#define I_SETSIG (__SID | 9)
-#define I_SRDOPT (__SID | 6)
-#define I_STR (__SID | 8)
-#define I_SWROPT (__SID |19)
-#define I_UNLINK (__SID |13)
-#define LASTMARK 0x02
-#define LC_ALL 6
-#define LC_ALL_MASK 0x7fffffff
-#define LC_COLLATE 3
-#define LC_COLLATE_MASK (1<<LC_COLLATE)
-#define LC_CTYPE 0
-#define LC_CTYPE_MASK (1<<LC_CTYPE)
-#define LC_GLOBAL_LOCALE ((locale_t)-1)
-#define LC_MESSAGES 5
-#define LC_MESSAGES_MASK (1<<LC_MESSAGES)
-#define LC_MONETARY 4
-#define LC_MONETARY_MASK (1<<LC_MONETARY)
-#define LC_NUMERIC 1
-#define LC_NUMERIC_MASK (1<<LC_NUMERIC)
-#define LC_TIME 2
-#define LC_TIME_MASK (1<<LC_TIME)
-#define LDBL_DECIMAL_DIG DECIMAL_DIG
-#define LDBL_DIG 33
-#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
-#define LDBL_HAS_SUBNORM 1
-#define LDBL_MANT_DIG 113
-#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
-#define LDBL_MAX_10_EXP 4932
-#define LDBL_MAX_EXP 16384
-#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
-#define LFLOW_OFF 0
-#define LFLOW_ON 1
-#define LFLOW_RESTART_ANY 2
-#define LFLOW_RESTART_XON 3
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#define LLONG_MAX 0x7fffffffffffffffLL
-#define LLONG_MIN (-LLONG_MAX-1)
-#define LM_FORWARDMASK 2
-#define LM_MODE 1
-#define LM_SLC 3
-#define LNKTYPE '1'
-#define LOCK_EX 2
-#define LOCK_NB 4
-#define LOCK_SH 1
-#define LOCK_UN 8
-#define LONGBITS (sizeof(long) * 8)
-#define LONG_BIT 32
-#define LONG_MAX __LONG_MAX
-#define LONG_MIN (-LONG_MAX-1)
-#define L_INCR 1
-#define L_SET 0
-#define L_XTND 2
-#define L_ctermid 20
-#define L_cuserid 20
-#define MAGIC "070707"
-#define MATH_ERREXCEPT 2
-#define MATH_ERRNO 1
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXDNAME NS_MAXDNAME
-#define MAXDOUBLE DBL_MAX
-#define MAXFLOAT FLT_MAX
-#define MAXHOSTNAMELEN 64
-#define MAXINT INT_MAX
-#define MAXLABEL NS_MAXLABEL
-#define MAXLONG LONG_MAX
-#define MAXNAMLEN 255
-#define MAXPATHLEN 4096
-#define MAXSHORT SHRT_MAX
-#define MAXSYMLINKS 20
-#define MAXTC 6
-#define MAXTTL 255
-#define MAX_IPOPTLEN 40
-#define MB_CUR_MAX (__ctype_get_mb_cur_max())
-#define MB_LEN_MAX 4
-#define MCAST_BLOCK_SOURCE 43
-#define MCAST_EXCLUDE 0
-#define MCAST_INCLUDE 1
-#define MCAST_JOIN_GROUP 42
-#define MCAST_JOIN_SOURCE_GROUP 46
-#define MCAST_LEAVE_GROUP 45
-#define MCAST_LEAVE_SOURCE_GROUP 47
-#define MCAST_MSFILTER 48
-#define MCAST_UNBLOCK_SOURCE 44
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MINDOUBLE DBL_MIN
-#define MINFLOAT FLT_MIN
-#define MININT INT_MIN
-#define MINLONG LONG_MIN
-#define MINSHORT SHRT_MIN
-#define MLD_LISTENER_QUERY 130
-#define MLD_LISTENER_REDUCTION 132
-#define MLD_LISTENER_REPORT 131
-#define MM_APPL 8
-#define MM_CONSOLE 512
-#define MM_ERROR 2
-#define MM_FIRM 4
-#define MM_HALT 1
-#define MM_HARD 1
-#define MM_INFO 4
-#define MM_NOCON 4
-#define MM_NOMSG 1
-#define MM_NOSEV 0
-#define MM_NOTOK (-1)
-#define MM_NRECOV 128
-#define MM_NULLACT ((char*)0)
-#define MM_NULLLBL ((char*)0)
-#define MM_NULLMC 0L
-#define MM_NULLSEV 0
-#define MM_NULLTAG ((char*)0)
-#define MM_NULLTXT ((char*)0)
-#define MM_OK 0
-#define MM_OPSYS 32
-#define MM_PRINT 256
-#define MM_RECOVER 64
-#define MM_SOFT 2
-#define MM_UTIL 16
-#define MM_WARNING 3
-#define MODE_ACK 0x04
-#define MODE_B 2
-#define MODE_C 3
-#define MODE_ECHO 0x0200
-#define MODE_EDIT 0x01
-#define MODE_FLOW 0x0100
-#define MODE_FORCE 0x1000
-#define MODE_INBIN 0x0400
-#define MODE_LIT_ECHO 0x10
-#define MODE_MASK 0x1f
-#define MODE_OUTBIN 0x0800
-#define MODE_S 1
-#define MODE_SOFT_TAB 0x08
-#define MODE_TRAPSIG 0x02
-#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
-#define MOD_CLKB ADJ_TICK
-#define MOD_ESTERROR ADJ_ESTERROR
-#define MOD_FREQUENCY ADJ_FREQUENCY
-#define MOD_MAXERROR ADJ_MAXERROR
-#define MOD_MICRO ADJ_MICRO
-#define MOD_NANO ADJ_NANO
-#define MOD_OFFSET ADJ_OFFSET
-#define MOD_STATUS ADJ_STATUS
-#define MOD_TAI ADJ_TAI
-#define MOD_TIMECONST ADJ_TIMECONST
-#define MON_1 0x2001A
-#define MON_10 0x20023
-#define MON_11 0x20024
-#define MON_12 0x20025
-#define MON_2 0x2001B
-#define MON_3 0x2001C
-#define MON_4 0x2001D
-#define MON_5 0x2001E
-#define MON_6 0x2001F
-#define MON_7 0x20020
-#define MON_8 0x20021
-#define MON_9 0x20022
-#define MORECTL 1
-#define MOREDATA 2
-#define MSG_ANY 0x02
-#define MSG_BAND 0x04
-#define MSG_HIPRI 0x01
-#define MSG_PEEK __WASI_RIFLAGS_RECV_PEEK
-#define MSG_TRUNC __WASI_RIFLAGS_RECV_DATA_TRUNCATED
-#define MSG_WAITALL __WASI_RIFLAGS_RECV_WAITALL
-#define MUXID_ALL (-1)
-#define M_1_PI 0.31830988618379067154
-#define M_2_PI 0.63661977236758134308
-#define M_2_SQRTPI 1.12837916709551257390
-#define M_E 2.7182818284590452354
-#define M_LN10 2.30258509299404568402
-#define M_LN2 0.69314718055994530942
-#define M_LOG10E 0.43429448190325182765
-#define M_LOG2E 1.4426950408889634074
-#define M_PI 3.14159265358979323846
-#define M_PI_2 1.57079632679489661923
-#define M_PI_4 0.78539816339744830962
-#define M_SQRT1_2 0.70710678118654752440
-#define M_SQRT2 1.41421356237309504880
-#define NAMESERVER_PORT NS_DEFAULTPORT
-#define NAME_MAX 255
-#define NAN (0.0f/0.0f)
-#define NBBY 8
-#define NCARGS 131072
-#define NDEBUG 1
-#define ND_NA_FLAG_OVERRIDE 0x00000020
-#define ND_NA_FLAG_ROUTER 0x00000080
-#define ND_NA_FLAG_SOLICITED 0x00000040
-#define ND_NEIGHBOR_ADVERT 136
-#define ND_NEIGHBOR_SOLICIT 135
-#define ND_OPT_HOME_AGENT_INFO 8
-#define ND_OPT_MTU 5
-#define ND_OPT_PI_FLAG_AUTO 0x40
-#define ND_OPT_PI_FLAG_ONLINK 0x80
-#define ND_OPT_PI_FLAG_RADDR 0x20
-#define ND_OPT_PREFIX_INFORMATION 3
-#define ND_OPT_REDIRECTED_HEADER 4
-#define ND_OPT_RTR_ADV_INTERVAL 7
-#define ND_OPT_SOURCE_LINKADDR 1
-#define ND_OPT_TARGET_LINKADDR 2
-#define ND_RA_FLAG_HOME_AGENT 0x20
-#define ND_RA_FLAG_MANAGED 0x80
-#define ND_RA_FLAG_OTHER 0x40
-#define ND_REDIRECT 137
-#define ND_ROUTER_ADVERT 134
-#define ND_ROUTER_SOLICIT 133
-#define NEW_ENV_VALUE 1
-#define NEW_ENV_VAR 0
-#define NGROUPS 32
-#define NGROUPS_MAX 32
-#define NL_ARGMAX 9
-#define NL_CAT_LOCALE 1
-#define NL_LANGMAX 32
-#define NL_LOCALE_NAME(cat) _NL_LOCALE_NAME(cat)
-#define NL_MSGMAX 32767
-#define NL_NMAX 16
-#define NL_SETD 1
-#define NL_SETMAX 255
-#define NL_TEXTMAX 2048
-#define NOERROR ns_r_noerror
-#define NOEXPR 0x50001
-#define NOFILE 256
-#define NOGROUP (-1)
-#define NOP 241
-#define NOSTR 0x50003
-#define NOTAUTH ns_r_notauth
-#define NOTIMP ns_r_notimpl
-#define NOTZONE ns_r_notzone
-#define NR_ICMP_TYPES 18
-#define NR_ICMP_UNREACH 15
-#define NSLC 18
-#define NS_ALG_DH 2
-#define NS_ALG_DSA 3
-#define NS_ALG_DSS NS_ALG_DSA
-#define NS_ALG_EXPIRE_ONLY 253
-#define NS_ALG_MD5RSA 1
-#define NS_ALG_PRIVATE_OID 254
-#define NS_CMPRSFLGS 0xc0
-#define NS_DEFAULTPORT 53
-#define NS_DSA_MAX_BYTES 405
-#define NS_DSA_MIN_SIZE 213
-#define NS_DSA_SIG_SIZE 41
-#define NS_GET16(s,cp) (void)((s) = ns_get16(((cp)+=2)-2))
-#define NS_GET32(l,cp) (void)((l) = ns_get32(((cp)+=4)-4))
-#define NS_HFIXEDSZ 12
-#define NS_IN6ADDRSZ 16
-#define NS_INADDRSZ 4
-#define NS_INT16SZ 2
-#define NS_INT32SZ 4
-#define NS_INT8SZ 1
-#define NS_KEY_EXTENDED_FLAGS 0x1000
-#define NS_KEY_NAME_ENTITY 0x0200
-#define NS_KEY_NAME_RESERVED 0x0300
-#define NS_KEY_NAME_TYPE 0x0300
-#define NS_KEY_NAME_USER 0x0000
-#define NS_KEY_NAME_ZONE 0x0100
-#define NS_KEY_NO_AUTH 0x8000
-#define NS_KEY_NO_CONF 0x4000
-#define NS_KEY_PROT_ANY 255
-#define NS_KEY_PROT_DNSSEC 3
-#define NS_KEY_PROT_EMAIL 2
-#define NS_KEY_PROT_IPSEC 4
-#define NS_KEY_PROT_TLS 1
-#define NS_KEY_RESERVED10 0x0020
-#define NS_KEY_RESERVED11 0x0010
-#define NS_KEY_RESERVED2 0x2000
-#define NS_KEY_RESERVED4 0x0800
-#define NS_KEY_RESERVED5 0x0400
-#define NS_KEY_RESERVED8 0x0080
-#define NS_KEY_RESERVED9 0x0040
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | NS_KEY_RESERVED4 | NS_KEY_RESERVED5 | NS_KEY_RESERVED8 | NS_KEY_RESERVED9 | NS_KEY_RESERVED10 | NS_KEY_RESERVED11 )
-#define NS_KEY_RESERVED_BITMASK2 0xFFFF
-#define NS_KEY_SIGNATORYMASK 0x000F
-#define NS_KEY_TYPEMASK 0xC000
-#define NS_KEY_TYPE_AUTH_CONF 0x0000
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000
-#define NS_KEY_TYPE_CONF_ONLY 0x8000
-#define NS_KEY_TYPE_NO_KEY 0xC000
-#define NS_MAXCDNAME 255
-#define NS_MAXDNAME 1025
-#define NS_MAXLABEL 63
-#define NS_MAXMSG 65535
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-#define NS_MD5RSA_MAX_BITS 4096
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
-#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
-#define NS_MD5RSA_MIN_BITS 512
-#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_SET(n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_MAX 127
-#define NS_OPT_DNSSEC_OK 0x8000U
-#define NS_OPT_NSID 3
-#define NS_PACKETSZ 512
-#define NS_PUT16(s,cp) ns_put16((s), ((cp)+=2)-2)
-#define NS_PUT32(l,cp) ns_put32((l), ((cp)+=4)-4)
-#define NS_QFIXEDSZ 4
-#define NS_RRFIXEDSZ 10
-#define NS_SIG_ALG 2
-#define NS_SIG_EXPIR 8
-#define NS_SIG_FOOT 16
-#define NS_SIG_LABELS 3
-#define NS_SIG_OTTL 4
-#define NS_SIG_SIGNED 12
-#define NS_SIG_SIGNER 18
-#define NS_SIG_TYPE 0
-#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
-#define NS_TSIG_ERROR_FORMERR -12
-#define NS_TSIG_ERROR_NO_SPACE -11
-#define NS_TSIG_ERROR_NO_TSIG -10
-#define NS_TSIG_FUDGE 300
-#define NS_TSIG_TCP_COUNT 100
-#define NS_UPDATE_OP ns_o_update
-#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
-#define NULL ((void*)0)
-#define NXDOMAIN ns_r_nxdomain
-#define NXRRSET ns_r_nxrrset
-#define NZERO 20
-#define OLD_ENV_VALUE 0
-#define OLD_ENV_VAR 1
-#define ONCE_FLAG_INIT 0
-#define O_ACCMODE (O_EXEC | O_RDWR | O_SEARCH)
-#define O_APPEND __WASI_FDFLAGS_APPEND
-#define O_CLOEXEC (0)
-#define O_CREAT (__WASI_OFLAGS_CREAT << 12)
-#define O_DIRECTORY (__WASI_OFLAGS_DIRECTORY << 12)
-#define O_DSYNC __WASI_FDFLAGS_DSYNC
-#define O_EXCL (__WASI_OFLAGS_EXCL << 12)
-#define O_EXEC (0x02000000)
-#define O_NOCTTY (0)
-#define O_NOFOLLOW (0x01000000)
-#define O_NONBLOCK __WASI_FDFLAGS_NONBLOCK
-#define O_RDONLY (0x04000000)
-#define O_RDWR (O_RDONLY | O_WRONLY)
-#define O_RSYNC __WASI_FDFLAGS_RSYNC
-#define O_SEARCH (0x08000000)
-#define O_SYNC __WASI_FDFLAGS_SYNC
-#define O_TRUNC (__WASI_OFLAGS_TRUNC << 12)
-#define O_TTY_INIT (0)
-#define O_WRONLY (0x10000000)
-#define PACKETSZ NS_PACKETSZ
-#define PACKET_ADD_MEMBERSHIP 1
-#define PACKET_AUXDATA 8
-#define PACKET_BROADCAST 1
-#define PACKET_COPY_THRESH 7
-#define PACKET_DROP_MEMBERSHIP 2
-#define PACKET_FANOUT 18
-#define PACKET_FANOUT_DATA 22
-#define PACKET_FASTROUTE 6
-#define PACKET_HDRLEN 11
-#define PACKET_HOST 0
-#define PACKET_IGNORE_OUTGOING 23
-#define PACKET_LOOPBACK 5
-#define PACKET_LOSS 14
-#define PACKET_MR_ALLMULTI 2
-#define PACKET_MR_MULTICAST 0
-#define PACKET_MR_PROMISC 1
-#define PACKET_MR_UNICAST 3
-#define PACKET_MULTICAST 2
-#define PACKET_ORIGDEV 9
-#define PACKET_OTHERHOST 3
-#define PACKET_OUTGOING 4
-#define PACKET_QDISC_BYPASS 20
-#define PACKET_RECV_OUTPUT 3
-#define PACKET_RESERVE 12
-#define PACKET_ROLLOVER_STATS 21
-#define PACKET_RX_RING 5
-#define PACKET_STATISTICS 6
-#define PACKET_TIMESTAMP 17
-#define PACKET_TX_HAS_OFF 19
-#define PACKET_TX_RING 13
-#define PACKET_TX_TIMESTAMP 16
-#define PACKET_VERSION 10
-#define PACKET_VNET_HDR 15
-#define PAGESIZE (0x10000)
-#define PAGE_SIZE PAGESIZE
-#define PATH_MAX 4096
-#define PDP_ENDIAN __PDP_ENDIAN
-#define PM_STR 0x20027
-#define POLLERR 0x1000
-#define POLLHUP 0x2000
-#define POLLIN POLLRDNORM
-#define POLLNVAL 0x4000
-#define POLLOUT POLLWRNORM
-#define POLLRDNORM 0x1
-#define POLLWRNORM 0x2
-#define POSIX_CLOSE_RESTART 0
-#define POSIX_FADV_DONTNEED __WASI_ADVICE_DONTNEED
-#define POSIX_FADV_NOREUSE __WASI_ADVICE_NOREUSE
-#define POSIX_FADV_NORMAL __WASI_ADVICE_NORMAL
-#define POSIX_FADV_RANDOM __WASI_ADVICE_RANDOM
-#define POSIX_FADV_SEQUENTIAL __WASI_ADVICE_SEQUENTIAL
-#define POSIX_FADV_WILLNEED __WASI_ADVICE_WILLNEED
-#define PRELIM 1
-#define PRIX16 __UINT16_FMTX__
-#define PRIX32 __UINT32_FMTX__
-#define PRIX64 __UINT64_FMTX__
-#define PRIX8 __UINT8_FMTX__
-#define PRIXFAST16 __UINT_FAST16_FMTX__
-#define PRIXFAST32 __UINT_FAST32_FMTX__
-#define PRIXFAST64 __UINT_FAST64_FMTX__
-#define PRIXFAST8 __UINT_FAST8_FMTX__
-#define PRIXLEAST16 __UINT_LEAST16_FMTX__
-#define PRIXLEAST32 __UINT_LEAST32_FMTX__
-#define PRIXLEAST64 __UINT_LEAST64_FMTX__
-#define PRIXLEAST8 __UINT_LEAST8_FMTX__
-#define PRIXMAX __UINTMAX_FMTX__
-#define PRIXPTR __UINTPTR_FMTX__
-#define PRId16 __INT16_FMTd__
-#define PRId32 __INT32_FMTd__
-#define PRId64 __INT64_FMTd__
-#define PRId8 __INT8_FMTd__
-#define PRIdFAST16 __INT_FAST16_FMTd__
-#define PRIdFAST32 __INT_FAST32_FMTd__
-#define PRIdFAST64 __INT_FAST64_FMTd__
-#define PRIdFAST8 __INT_FAST8_FMTd__
-#define PRIdLEAST16 __INT_LEAST16_FMTd__
-#define PRIdLEAST32 __INT_LEAST32_FMTd__
-#define PRIdLEAST64 __INT_LEAST64_FMTd__
-#define PRIdLEAST8 __INT_LEAST8_FMTd__
-#define PRIdMAX __INTMAX_FMTd__
-#define PRIdPTR __INTPTR_FMTd__
-#define PRIi16 __INT16_FMTi__
-#define PRIi32 __INT32_FMTi__
-#define PRIi64 __INT64_FMTi__
-#define PRIi8 __INT8_FMTi__
-#define PRIiFAST16 __INT_FAST16_FMTi__
-#define PRIiFAST32 __INT_FAST32_FMTi__
-#define PRIiFAST64 __INT_FAST64_FMTi__
-#define PRIiFAST8 __INT_FAST8_FMTi__
-#define PRIiLEAST16 __INT_LEAST16_FMTi__
-#define PRIiLEAST32 __INT_LEAST32_FMTi__
-#define PRIiLEAST64 __INT_LEAST64_FMTi__
-#define PRIiLEAST8 __INT_LEAST8_FMTi__
-#define PRIiMAX __INTMAX_FMTi__
-#define PRIiPTR __INTPTR_FMTi__
-#define PRIo16 __UINT16_FMTo__
-#define PRIo32 __UINT32_FMTo__
-#define PRIo64 __UINT64_FMTo__
-#define PRIo8 __UINT8_FMTo__
-#define PRIoFAST16 __UINT_FAST16_FMTo__
-#define PRIoFAST32 __UINT_FAST32_FMTo__
-#define PRIoFAST64 __UINT_FAST64_FMTo__
-#define PRIoFAST8 __UINT_FAST8_FMTo__
-#define PRIoLEAST16 __UINT_LEAST16_FMTo__
-#define PRIoLEAST32 __UINT_LEAST32_FMTo__
-#define PRIoLEAST64 __UINT_LEAST64_FMTo__
-#define PRIoLEAST8 __UINT_LEAST8_FMTo__
-#define PRIoMAX __UINTMAX_FMTo__
-#define PRIoPTR __UINTPTR_FMTo__
-#define PRIu16 __UINT16_FMTu__
-#define PRIu32 __UINT32_FMTu__
-#define PRIu64 __UINT64_FMTu__
-#define PRIu8 __UINT8_FMTu__
-#define PRIuFAST16 __UINT_FAST16_FMTu__
-#define PRIuFAST32 __UINT_FAST32_FMTu__
-#define PRIuFAST64 __UINT_FAST64_FMTu__
-#define PRIuFAST8 __UINT_FAST8_FMTu__
-#define PRIuLEAST16 __UINT_LEAST16_FMTu__
-#define PRIuLEAST32 __UINT_LEAST32_FMTu__
-#define PRIuLEAST64 __UINT_LEAST64_FMTu__
-#define PRIuLEAST8 __UINT_LEAST8_FMTu__
-#define PRIuMAX __UINTMAX_FMTu__
-#define PRIuPTR __UINTPTR_FMTu__
-#define PRIx16 __UINT16_FMTx__
-#define PRIx32 __UINT32_FMTx__
-#define PRIx64 __UINT64_FMTx__
-#define PRIx8 __UINT8_FMTx__
-#define PRIxFAST16 __UINT_FAST16_FMTx__
-#define PRIxFAST32 __UINT_FAST32_FMTx__
-#define PRIxFAST64 __UINT_FAST64_FMTx__
-#define PRIxFAST8 __UINT_FAST8_FMTx__
-#define PRIxLEAST16 __UINT_LEAST16_FMTx__
-#define PRIxLEAST32 __UINT_LEAST32_FMTx__
-#define PRIxLEAST64 __UINT_LEAST64_FMTx__
-#define PRIxLEAST8 __UINT_LEAST8_FMTx__
-#define PRIxMAX __UINTMAX_FMTx__
-#define PRIxPTR __UINTPTR_FMTx__
-#define PTRBITS (sizeof(char *) * 8)
-#define PTRDIFF_MAX INT32_MAX
-#define PTRDIFF_MIN INT32_MIN
-#define PUTLONG NS_PUT32
-#define PUTSHORT NS_PUT16
-#define QFIXEDSZ NS_QFIXEDSZ
-#define QUERY ns_o_query
-#define RADIXCHAR 0x10000
-#define RAND_MAX (0x7fffffff)
-#define REC_EOF '\002'
-#define REC_EOR '\001'
-#define REC_ESC '\377'
-#define REFUSED ns_r_refused
-#define REGTYPE '0'
-#define REG_BADBR 10
-#define REG_BADPAT 2
-#define REG_BADRPT 13
-#define REG_EBRACE 9
-#define REG_EBRACK 7
-#define REG_ECOLLATE 3
-#define REG_ECTYPE 4
-#define REG_EESCAPE 5
-#define REG_ENOSYS -1
-#define REG_EPAREN 8
-#define REG_ERANGE 11
-#define REG_ESPACE 12
-#define REG_ESUBREG 6
-#define REG_EXTENDED 1
-#define REG_ICASE 2
-#define REG_NEWLINE 4
-#define REG_NOMATCH 1
-#define REG_NOSUB 8
-#define REG_NOTBOL 1
-#define REG_NOTEOL 2
-#define REG_OK 0
-#define RE_DUP_MAX 255
-#define RMSGD 0x0001
-#define RMSGN 0x0002
-#define RNORM 0x0000
-#define RPM_PCO_ADD 1
-#define RPM_PCO_CHANGE 2
-#define RPM_PCO_SETGLOBAL 3
-#define RPROTDAT 0x0004
-#define RPROTDIS 0x0008
-#define RPROTMASK 0x001C
-#define RPROTNORM 0x0010
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define RRQ 01
-#define RS_HIPRI 0x01
-#define RUSAGE_CHILDREN 2
-#define RUSAGE_SELF 1
-#define R_OK (4)
-#define SARMAG 8
-#define SB 250
-#define SCHAR_MAX 127
-#define SCHAR_MIN (-128)
-#define SCNd16 __INT16_FMTd__
-#define SCNd32 __INT32_FMTd__
-#define SCNd64 __INT64_FMTd__
-#define SCNd8 __INT8_FMTd__
-#define SCNdFAST16 __INT_FAST16_FMTd__
-#define SCNdFAST32 __INT_FAST32_FMTd__
-#define SCNdFAST64 __INT_FAST64_FMTd__
-#define SCNdFAST8 __INT_FAST8_FMTd__
-#define SCNdLEAST16 __INT_LEAST16_FMTd__
-#define SCNdLEAST32 __INT_LEAST32_FMTd__
-#define SCNdLEAST64 __INT_LEAST64_FMTd__
-#define SCNdLEAST8 __INT_LEAST8_FMTd__
-#define SCNdMAX __INTMAX_FMTd__
-#define SCNdPTR __INTPTR_FMTd__
-#define SCNi16 __INT16_FMTi__
-#define SCNi32 __INT32_FMTi__
-#define SCNi64 __INT64_FMTi__
-#define SCNi8 __INT8_FMTi__
-#define SCNiFAST16 __INT_FAST16_FMTi__
-#define SCNiFAST32 __INT_FAST32_FMTi__
-#define SCNiFAST64 __INT_FAST64_FMTi__
-#define SCNiFAST8 __INT_FAST8_FMTi__
-#define SCNiLEAST16 __INT_LEAST16_FMTi__
-#define SCNiLEAST32 __INT_LEAST32_FMTi__
-#define SCNiLEAST64 __INT_LEAST64_FMTi__
-#define SCNiLEAST8 __INT_LEAST8_FMTi__
-#define SCNiMAX __INTMAX_FMTi__
-#define SCNiPTR __INTPTR_FMTi__
-#define SCNo16 __UINT16_FMTo__
-#define SCNo32 __UINT32_FMTo__
-#define SCNo64 __UINT64_FMTo__
-#define SCNo8 __UINT8_FMTo__
-#define SCNoFAST16 __UINT_FAST16_FMTo__
-#define SCNoFAST32 __UINT_FAST32_FMTo__
-#define SCNoFAST64 __UINT_FAST64_FMTo__
-#define SCNoFAST8 __UINT_FAST8_FMTo__
-#define SCNoLEAST16 __UINT_LEAST16_FMTo__
-#define SCNoLEAST32 __UINT_LEAST32_FMTo__
-#define SCNoLEAST64 __UINT_LEAST64_FMTo__
-#define SCNoLEAST8 __UINT_LEAST8_FMTo__
-#define SCNoMAX __UINTMAX_FMTo__
-#define SCNoPTR __UINTPTR_FMTo__
-#define SCNu16 __UINT16_FMTu__
-#define SCNu32 __UINT32_FMTu__
-#define SCNu64 __UINT64_FMTu__
-#define SCNu8 __UINT8_FMTu__
-#define SCNuFAST16 __UINT_FAST16_FMTu__
-#define SCNuFAST32 __UINT_FAST32_FMTu__
-#define SCNuFAST64 __UINT_FAST64_FMTu__
-#define SCNuFAST8 __UINT_FAST8_FMTu__
-#define SCNuLEAST16 __UINT_LEAST16_FMTu__
-#define SCNuLEAST32 __UINT_LEAST32_FMTu__
-#define SCNuLEAST64 __UINT_LEAST64_FMTu__
-#define SCNuLEAST8 __UINT_LEAST8_FMTu__
-#define SCNuMAX __UINTMAX_FMTu__
-#define SCNuPTR __UINTPTR_FMTu__
-#define SCNx16 __UINT16_FMTx__
-#define SCNx32 __UINT32_FMTx__
-#define SCNx64 __UINT64_FMTx__
-#define SCNx8 __UINT8_FMTx__
-#define SCNxFAST16 __UINT_FAST16_FMTx__
-#define SCNxFAST32 __UINT_FAST32_FMTx__
-#define SCNxFAST64 __UINT_FAST64_FMTx__
-#define SCNxFAST8 __UINT_FAST8_FMTx__
-#define SCNxLEAST16 __UINT_LEAST16_FMTx__
-#define SCNxLEAST32 __UINT_LEAST32_FMTx__
-#define SCNxLEAST64 __UINT_LEAST64_FMTx__
-#define SCNxLEAST8 __UINT_LEAST8_FMTx__
-#define SCNxMAX __UINTMAX_FMTx__
-#define SCNxPTR __UINTPTR_FMTx__
-#define SE 240
-#define SEEK_CUR __WASI_WHENCE_CUR
-#define SEEK_END __WASI_WHENCE_END
-#define SEEK_SET __WASI_WHENCE_SET
-#define SEGSIZE 512
-#define SEM_FAILED ((sem_t *)0)
-#define SERVFAIL ns_r_servfail
-#define SHORTBITS (sizeof(short) * 8)
-#define SHRT_MAX 0x7fff
-#define SHRT_MIN (-1-0x7fff)
-#define SHUT_RD __WASI_SDFLAGS_RD
-#define SHUT_RDWR (SHUT_RD | SHUT_WR)
-#define SHUT_WR __WASI_SDFLAGS_WR
-#define SIG_ATOMIC_MAX INT32_MAX
-#define SIG_ATOMIC_MIN INT32_MIN
-#define SIZE_MAX UINT32_MAX
-#define SI_LOAD_SHIFT 16
-#define SLC_ABORT 7
-#define SLC_ACK 0x80
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_BRK 2
-#define SLC_CANTCHANGE 1
-#define SLC_DEFAULT 3
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EOF 8
-#define SLC_EOR 6
-#define SLC_EW 12
-#define SLC_FLAGS 1
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-#define SLC_FUNC 0
-#define SLC_IP 3
-#define SLC_LEVELBITS 0x03
-#define SLC_LNEXT 14
-#define SLC_NAME(x) slc_names[x]
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
-#define SLC_NAMES SLC_NAMELIST
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NOSUPPORT 0
-#define SLC_RP 13
-#define SLC_SUSP 9
-#define SLC_SYNCH 1
-#define SLC_VALUE 2
-#define SLC_VARIABLE 2
-#define SLC_XOFF 16
-#define SLC_XON 15
-#define SNDPIPE 0x002
-#define SNDZERO 0x001
-#define SOCK_CLOEXEC (0x00002000)
-#define SOCK_DGRAM __WASI_FILETYPE_SOCKET_DGRAM
-#define SOCK_NONBLOCK (0x00004000)
-#define SOCK_STREAM __WASI_FILETYPE_SOCKET_STREAM
-#define SOL_SOCKET 0x7fffffff
-#define SOL_TCP 6
-#define SOL_UDP 17
-#define SO_TYPE 3
-#define SSIZE_MAX LONG_MAX
-#define STATUS ns_o_status
-#define STA_CLK 0x8000
-#define STA_CLOCKERR 0x1000
-#define STA_DEL 0x0020
-#define STA_FLL 0x0008
-#define STA_FREQHOLD 0x0080
-#define STA_INS 0x0010
-#define STA_MODE 0x4000
-#define STA_NANO 0x2000
-#define STA_PLL 0x0001
-#define STA_PPSERROR 0x0800
-#define STA_PPSFREQ 0x0002
-#define STA_PPSJITTER 0x0200
-#define STA_PPSSIGNAL 0x0100
-#define STA_PPSTIME 0x0004
-#define STA_PPSWANDER 0x0400
-#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
-#define STA_UNSYNC 0x0040
-#define STDERR_FILENO 2
-#define STDIN_FILENO 0
-#define STDOUT_FILENO 1
-#define STRU_F 1
-#define STRU_P 3
-#define STRU_R 2
-#define SUN_LEN(s) (2+strlen((s)->sun_path))
-#define SUSP 237
-#define SYMLOOP_MAX 40
-#define SYMTYPE '2'
-#define SYNCH 242
-#define S_ADDT ns_s_ar
-#define S_BANDURG 0x0200
-#define S_ERROR 0x0010
-#define S_HANGUP 0x0020
-#define S_HIPRI 0x0002
-#define S_IEXEC S_IXUSR
-#define S_IFBLK (0x6000)
-#define S_IFCHR (0x2000)
-#define S_IFDIR (0x4000)
-#define S_IFIFO (0xc000)
-#define S_IFLNK (0xa000)
-#define S_IFMT (S_IFBLK | S_IFCHR | S_IFDIR | S_IFIFO | S_IFLNK | S_IFREG | S_IFSOCK)
-#define S_IFREG (0x8000)
-#define S_IFSOCK (0xc000)
-#define S_INPUT 0x0001
-#define S_IREAD S_IRUSR
-#define S_IRGRP (0x20)
-#define S_IROTH (0x4)
-#define S_IRUSR (0x100)
-#define S_IRWXG (S_IXGRP | S_IWGRP | S_IRGRP)
-#define S_IRWXO (S_IXOTH | S_IWOTH | S_IROTH)
-#define S_IRWXU (S_IXUSR | S_IWUSR | S_IRUSR)
-#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK)
-#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR)
-#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
-#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO)
-#define S_ISGID (0x400)
-#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK)
-#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
-#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK)
-#define S_ISUID (0x800)
-#define S_ISVTX (0x200)
-#define S_IWGRP (0x10)
-#define S_IWOTH (0x2)
-#define S_IWRITE S_IWUSR
-#define S_IWUSR (0x80)
-#define S_IXGRP (0x8)
-#define S_IXOTH (0x1)
-#define S_IXUSR (0x40)
-#define S_MSG 0x0008
-#define S_OUTPUT 0x0004
-#define S_PREREQ ns_s_pr
-#define S_RDBAND 0x0080
-#define S_RDNORM 0x0040
-#define S_UPDATE ns_s_ud
-#define S_WRBAND 0x0100
-#define S_WRNORM S_OUTPUT
-#define S_ZONE ns_s_zn
-#define TCPI_OPT_ECN 8
-#define TCPI_OPT_SACK 2
-#define TCPI_OPT_TIMESTAMPS 1
-#define TCPI_OPT_WSCALE 4
-#define TCPOLEN_MAXSEG 4
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_EOL 0
-#define TCPOPT_MAXSEG 2
-#define TCPOPT_NOP 1
-#define TCPOPT_SACK 5
-#define TCPOPT_SACK_PERMITTED 4
-#define TCPOPT_TIMESTAMP 8
-#define TCPOPT_WINDOW 3
-#define TCP_CA_CWR 2
-#define TCP_CA_Disorder 1
-#define TCP_CA_Loss 4
-#define TCP_CA_Open 0
-#define TCP_CA_Recovery 3
-#define TCP_CC_INFO 26
-#define TCP_CLOSE 7
-#define TCP_CLOSE_WAIT 8
-#define TCP_CLOSING 11
-#define TCP_CM_INQ TCP_INQ
-#define TCP_CONGESTION 13
-#define TCP_CORK 3
-#define TCP_DEFER_ACCEPT 9
-#define TCP_ENCAP_ESPINTCP 7
-#define TCP_ESTABLISHED 1
-#define TCP_FASTOPEN 23
-#define TCP_FASTOPEN_CONNECT 30
-#define TCP_FASTOPEN_KEY 33
-#define TCP_FASTOPEN_NO_COOKIE 34
-#define TCP_FIN_WAIT1 4
-#define TCP_FIN_WAIT2 5
-#define TCP_INFO 11
-#define TCP_INQ 36
-#define TCP_KEEPCNT 6
-#define TCP_KEEPIDLE 4
-#define TCP_KEEPINTVL 5
-#define TCP_LAST_ACK 9
-#define TCP_LINGER2 8
-#define TCP_LISTEN 10
-#define TCP_MAXSEG 2
-#define TCP_MD5SIG 14
-#define TCP_MD5SIG_EXT 32
-#define TCP_MD5SIG_FLAG_IFINDEX 0x2
-#define TCP_MD5SIG_FLAG_PREFIX 0x1
-#define TCP_MD5SIG_MAXKEYLEN 80
-#define TCP_NODELAY 1
-#define TCP_NOTSENT_LOWAT 25
-#define TCP_QUEUE_SEQ 21
-#define TCP_QUICKACK 12
-#define TCP_REPAIR 19
-#define TCP_REPAIR_OFF 0
-#define TCP_REPAIR_OFF_NO_WP -1
-#define TCP_REPAIR_ON 1
-#define TCP_REPAIR_OPTIONS 22
-#define TCP_REPAIR_QUEUE 20
-#define TCP_REPAIR_WINDOW 29
-#define TCP_SAVED_SYN 28
-#define TCP_SAVE_SYN 27
-#define TCP_SYNCNT 7
-#define TCP_SYN_RECV 3
-#define TCP_SYN_SENT 2
-#define TCP_THIN_DUPACK 17
-#define TCP_THIN_LINEAR_TIMEOUTS 16
-#define TCP_TIMESTAMP 24
-#define TCP_TIME_WAIT 6
-#define TCP_TX_DELAY 37
-#define TCP_ULP 31
-#define TCP_USER_TIMEOUT 18
-#define TCP_WINDOW_CLAMP 10
-#define TCP_ZEROCOPY_RECEIVE 35
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && (unsigned int)(x) >= TELCMD_FIRST)
-#define TELOPT_3270REGIME 29
-#define TELOPT_AUTHENTICATION 37
-#define TELOPT_BINARY 0
-#define TELOPT_BM 19
-#define TELOPT_DET 20
-#define TELOPT_ECHO 1
-#define TELOPT_ENCRYPT 38
-#define TELOPT_EOR 25
-#define TELOPT_EXOPL 255
-#define TELOPT_LFLOW 33
-#define TELOPT_LINEMODE 34
-#define TELOPT_LOGOUT 18
-#define TELOPT_NAMS 4
-#define TELOPT_NAOCRD 10
-#define TELOPT_NAOFFD 13
-#define TELOPT_NAOHTD 12
-#define TELOPT_NAOHTS 11
-#define TELOPT_NAOL 8
-#define TELOPT_NAOLFD 16
-#define TELOPT_NAOP 9
-#define TELOPT_NAOVTD 15
-#define TELOPT_NAOVTS 14
-#define TELOPT_NAWS 31
-#define TELOPT_NEW_ENVIRON 39
-#define TELOPT_OLD_ENVIRON 36
-#define TELOPT_OUTMRK 27
-#define TELOPT_RCP 2
-#define TELOPT_RCTE 7
-#define TELOPT_SGA 3
-#define TELOPT_SNDLOC 23
-#define TELOPT_STATUS 5
-#define TELOPT_SUPDUP 21
-#define TELOPT_SUPDUPOUTPUT 22
-#define TELOPT_TM 6
-#define TELOPT_TSPEED 32
-#define TELOPT_TTYLOC 28
-#define TELOPT_TTYPE 24
-#define TELOPT_TUID 26
-#define TELOPT_X3PAD 30
-#define TELOPT_XASCII 17
-#define TELOPT_XDISPLOC 35
-#define TELQUAL_INFO 2
-#define TELQUAL_IS 0
-#define TELQUAL_NAME 3
-#define TELQUAL_REPLY 2
-#define TELQUAL_SEND 1
-#define TGEXEC 00010
-#define TGREAD 00040
-#define TGWRITE 00020
-#define THOUSEP 0x10001
-#define TH_ACK 0x10
-#define TH_FIN 0x01
-#define TH_PUSH 0x08
-#define TH_RST 0x04
-#define TH_SYN 0x02
-#define TH_URG 0x20
-#define TIMER_ABSTIME __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
-#define TIMESPEC_TO_TIMEVAL(tv,ts) ( (tv)->tv_sec = (ts)->tv_sec, (tv)->tv_usec = (ts)->tv_nsec / 1000, (void)0 )
-#define TIMEVAL_TO_TIMESPEC(tv,ts) ( (ts)->tv_sec = (tv)->tv_sec, (ts)->tv_nsec = (tv)->tv_usec * 1000, (void)0 )
-#define TIME_BAD TIME_ERROR
-#define TIME_DEL 2
-#define TIME_ERROR 5
-#define TIME_INS 1
-#define TIME_OK 0
-#define TIME_OOP 3
-#define TIME_UTC 1
-#define TIME_WAIT 4
-#define TMAGIC "ustar"
-#define TMAGLEN 6
-#define TOEXEC 00001
-#define TOREAD 00004
-#define TOWRITE 00002
-#define TRANSIENT 4
-#define TSGID 02000
-#define TSS_DTOR_ITERATIONS 4
-#define TSUID 04000
-#define TSVTX 01000
-#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
-#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
-#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
-#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
-#define TTYDEF_SPEED (B9600)
-#define TTY_NAME_MAX 32
-#define TUEXEC 00100
-#define TUREAD 00400
-#define TUWRITE 00200
-#define TVERSION "00"
-#define TVERSLEN 2
-#define TYPE_A 1
-#define TYPE_E 2
-#define TYPE_I 3
-#define TYPE_L 4
-#define TZNAME_MAX 6
-#define T_A ns_t_a
-#define T_A6 ns_t_a6
-#define T_AAAA ns_t_aaaa
-#define T_AFSDB ns_t_afsdb
-#define T_ANY ns_t_any
-#define T_ATMA ns_t_atma
-#define T_AXFR ns_t_axfr
-#define T_CNAME ns_t_cname
-#define T_DNAME ns_t_dname
-#define T_EID ns_t_eid
-#define T_FMT 0x2002A
-#define T_FMT_AMPM 0x2002B
-#define T_GPOS ns_t_gpos
-#define T_HINFO ns_t_hinfo
-#define T_ISDN ns_t_isdn
-#define T_IXFR ns_t_ixfr
-#define T_KEY ns_t_key
-#define T_LOC ns_t_loc
-#define T_MAILA ns_t_maila
-#define T_MAILB ns_t_mailb
-#define T_MB ns_t_mb
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_MG ns_t_mg
-#define T_MINFO ns_t_minfo
-#define T_MR ns_t_mr
-#define T_MX ns_t_mx
-#define T_NAPTR ns_t_naptr
-#define T_NIMLOC ns_t_nimloc
-#define T_NS ns_t_ns
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_NULL ns_t_null
-#define T_NXT ns_t_nxt
-#define T_PTR ns_t_ptr
-#define T_PX ns_t_px
-#define T_RP ns_t_rp
-#define T_RT ns_t_rt
-#define T_SIG ns_t_sig
-#define T_SOA ns_t_soa
-#define T_SRV ns_t_srv
-#define T_TSIG ns_t_tsig
-#define T_TXT ns_t_txt
-#define T_WKS ns_t_wks
-#define T_X25 ns_t_x25
-#define UCHAR_MAX 255
-#define UDP_CORK 1
-#define UDP_ENCAP 100
-#define UDP_ENCAP_ESPINUDP 2
-#define UDP_ENCAP_ESPINUDP_NON_IKE 1
-#define UDP_ENCAP_GTP0 4
-#define UDP_ENCAP_GTP1U 5
-#define UDP_ENCAP_L2TPINUDP 3
-#define UDP_ENCAP_RXRPC 6
-#define UDP_GRO 104
-#define UDP_NO_CHECK6_RX 102
-#define UDP_NO_CHECK6_TX 101
-#define UDP_SEGMENT 103
-#define UINT16_C(c) c
-#define UINT16_MAX (0xffff)
-#define UINT32_C(c) c ## U
-#define UINT32_MAX (0xffffffffu)
-#define UINT64_C(c) c ## ULL
-#define UINT64_MAX (0xffffffffffffffffu)
-#define UINT8_C(c) c
-#define UINT8_MAX (0xff)
-#define UINTMAX_C(c) c ## ULL
-#define UINTMAX_MAX UINT64_MAX
-#define UINTPTR_MAX UINT32_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_MAX 0xffffffffU
-#define UIO_MAXIOV 1024
-#define ULLONG_MAX (2ULL*LLONG_MAX+1)
-#define ULONG_MAX (2UL*LONG_MAX+1)
-#define USHRT_MAX 0xffff
-#define UTIME_NOW (-1)
-#define UTIME_OMIT (-2)
-#define WCHAR_MAX (0x7fffffff+L'\0')
-#define WCHAR_MIN (-1-0x7fffffff+L'\0')
-#define WEOF 0xffffffffU
-#define WILL 251
-#define WINT_MAX UINT32_MAX
-#define WINT_MIN 0U
-#define WONT 252
-#define WORD_BIT 32
-#define WRQ 02
-#define W_OK (2)
-#define X_OK (1)
-#define YESEXPR 0x50000
-#define YESSTR 0x50002
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define _ALLOCA_H 
-#define _ALL_SOURCE 1
-#define _ARPA_FTP_H 
-#define _ARPA_INET_H 
-#define _ARPA_NAMESER_H 
-#define _ARPA_TELNET_H 
-#define _ARPA_TFTP_H 
-#define _AR_H 
-#define _BYTESWAP_H 
-#define _COMPLEX_H 
-#define _CPIO_H 
-#define _CRYPT_H 
-#define _CS_GNU_LIBC_VERSION 2
-#define _CS_GNU_LIBPTHREAD_VERSION 3
-#define _CS_PATH 0
-#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS 4
-#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 1116
-#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 1117
-#define _CS_POSIX_V6_ILP32_OFF32_LIBS 1118
-#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 1119
-#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 1120
-#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 1121
-#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 1122
-#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 1123
-#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 1124
-#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 1125
-#define _CS_POSIX_V6_LP64_OFF64_LIBS 1126
-#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS 1127
-#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 1128
-#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 1129
-#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 1130
-#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 1131
-#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1
-#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1132
-#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 1133
-#define _CS_POSIX_V7_ILP32_OFF32_LIBS 1134
-#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS 1135
-#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 1136
-#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 1137
-#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 1138
-#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS 1139
-#define _CS_POSIX_V7_LP64_OFF64_CFLAGS 1140
-#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 1141
-#define _CS_POSIX_V7_LP64_OFF64_LIBS 1142
-#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS 1143
-#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 1144
-#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
-#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
-#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
-#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 5
-#define _CS_V6_ENV 1148
-#define _CS_V7_ENV 1149
-#define _CTYPE_H 
-#define _Complex_I (0.0f+1.0fi)
-#define _DIRENT_H 
-#define _DIRENT_HAVE_D_TYPE 
-#define _ENDIAN_H 
-#define _ERRNO_H 
-#define _ERR_H 
-#define _FCNTL_H 
-#define _FEATURES_H 
-#define _FENV_H 
-#define _FLOAT_H 
-#define _FMTMSG_H 
-#define _FNMATCH_H 
-#define _FTW_H 
-#define _GETOPT_H 
-#define _GLOB_H 
-#define _GNU_SOURCE 1
-#define _ICONV_H 
-#define _IFADDRS_H 
-#define _ILP32 1
-#define _INTTYPES_H 
-#define _IOFBF 0
-#define _IOLBF 1
-#define _IONBF 2
-#define _ISO646_H 
-#define _LANGINFO_H 
-#define _LIBGEN_H 
-#define _LIMITS_H 
-#define _LOCALE_H 
-#define _MALLOC_H 
-#define _MATH_H 
-#define _MONETARY_H 
-#define _MQUEUE_H 
-#define _NETINET_ICMP6_H 
-#define _NETINET_IGMP_H 
-#define _NETINET_IN_H 
-#define _NETINET_IN_SYSTM_H 
-#define _NETINET_IP6_H 
-#define _NETINET_IP_H 
-#define _NETINET_IP_ICMP_H 
-#define _NETINET_TCP_H 
-#define _NETINET_UDP_H 
-#define _NETPACKET_PACKET_H 
-#define _NL_LOCALE_NAME(cat) (((cat)<<16) | 0xffff)
-#define _NL_TYPES_H 
-#define _PC_2_SYMLINKS 20
-#define _PC_ALLOC_SIZE_MIN 18
-#define _PC_ASYNC_IO 10
-#define _PC_CHOWN_RESTRICTED 6
-#define _PC_FILESIZEBITS 13
-#define _PC_LINK_MAX 0
-#define _PC_MAX_CANON 1
-#define _PC_MAX_INPUT 2
-#define _PC_NAME_MAX 3
-#define _PC_NO_TRUNC 7
-#define _PC_PATH_MAX 4
-#define _PC_PIPE_BUF 5
-#define _PC_PRIO_IO 11
-#define _PC_REC_INCR_XFER_SIZE 14
-#define _PC_REC_MAX_XFER_SIZE 15
-#define _PC_REC_MIN_XFER_SIZE 16
-#define _PC_REC_XFER_ALIGN 17
-#define _PC_SOCK_MAXBUF 12
-#define _PC_SYMLINK_MAX 19
-#define _PC_SYNC_IO 9
-#define _PC_VDISABLE 8
-#define _POLL_H 
-#define _POSIX2_BC_BASE_MAX 99
-#define _POSIX2_BC_DIM_MAX 2048
-#define _POSIX2_BC_SCALE_MAX 99
-#define _POSIX2_BC_STRING_MAX 1000
-#define _POSIX2_CHARCLASS_NAME_MAX 14
-#define _POSIX2_COLL_WEIGHTS_MAX 2
-#define _POSIX2_C_BIND _POSIX_VERSION
-#define _POSIX2_EXPR_NEST_MAX 32
-#define _POSIX2_LINE_MAX 2048
-#define _POSIX2_RE_DUP_MAX 255
-#define _POSIX2_VERSION _POSIX_VERSION
-#define _POSIX_ADVISORY_INFO _POSIX_VERSION
-#define _POSIX_AIO_LISTIO_MAX 2
-#define _POSIX_AIO_MAX 1
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_BARRIERS _POSIX_VERSION
-#define _POSIX_CHILD_MAX 25
-#define _POSIX_CHOWN_RESTRICTED 1
-#define _POSIX_CLOCKRES_MIN 20000000
-#define _POSIX_CLOCK_SELECTION _POSIX_VERSION
-#define _POSIX_CPUTIME _POSIX_VERSION
-#define _POSIX_DELAYTIMER_MAX 32
-#define _POSIX_FSYNC _POSIX_VERSION
-#define _POSIX_HOST_NAME_MAX 255
-#define _POSIX_IPV6 _POSIX_VERSION
-#define _POSIX_LINK_MAX 8
-#define _POSIX_LOGIN_NAME_MAX 9
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_MONOTONIC_CLOCK _POSIX_VERSION
-#define _POSIX_MQ_OPEN_MAX 8
-#define _POSIX_MQ_PRIO_MAX 32
-#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 8
-#define _POSIX_NO_TRUNC 1
-#define _POSIX_OPEN_MAX 20
-#define _POSIX_PATH_MAX 256
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
-#define _POSIX_REALTIME_SIGNALS _POSIX_VERSION
-#define _POSIX_REGEXP 1
-#define _POSIX_RE_DUP_MAX 255
-#define _POSIX_RTSIG_MAX 8
-#define _POSIX_SEM_NSEMS_MAX 256
-#define _POSIX_SEM_VALUE_MAX 32767
-#define _POSIX_SIGQUEUE_MAX 32
-#define _POSIX_SPIN_LOCKS _POSIX_VERSION
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_SS_REPL_MAX 4
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_SYMLINK_MAX 255
-#define _POSIX_SYMLOOP_MAX 8
-#define _POSIX_THREADS _POSIX_VERSION
-#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
-#define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
-#define _POSIX_THREAD_CPUTIME _POSIX_VERSION
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-#define _POSIX_THREAD_KEYS_MAX 128
-#define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION
-#define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
-#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
-#define _POSIX_THREAD_THREADS_MAX 64
-#define _POSIX_TIMEOUTS _POSIX_VERSION
-#define _POSIX_TIMERS _POSIX_VERSION
-#define _POSIX_TIMER_MAX 32
-#define _POSIX_TRACE_EVENT_NAME_MAX 30
-#define _POSIX_TRACE_NAME_MAX 8
-#define _POSIX_TRACE_SYS_MAX 8
-#define _POSIX_TRACE_USER_EVENT_MAX 32
-#define _POSIX_TTY_NAME_MAX 9
-#define _POSIX_TZNAME_MAX 6
-#define _POSIX_V6_ILP32_OFFBIG (1)
-#define _POSIX_V7_ILP32_OFFBIG (1)
-#define _POSIX_VDISABLE 0
-#define _POSIX_VERSION 200809L
-#define _PTRDIFF_T 
-#define _REGEX_H 
-#define _SCHED_H 
-#define _SC_2_CHAR_TERM 95
-#define _SC_2_C_BIND 47
-#define _SC_2_C_DEV 48
-#define _SC_2_FORT_DEV 49
-#define _SC_2_FORT_RUN 50
-#define _SC_2_LOCALEDEF 52
-#define _SC_2_PBS 168
-#define _SC_2_PBS_ACCOUNTING 169
-#define _SC_2_PBS_CHECKPOINT 175
-#define _SC_2_PBS_LOCATE 170
-#define _SC_2_PBS_MESSAGE 171
-#define _SC_2_PBS_TRACK 172
-#define _SC_2_SW_DEV 51
-#define _SC_2_UPE 97
-#define _SC_2_VERSION 46
-#define _SC_ADVISORY_INFO 132
-#define _SC_AIO_LISTIO_MAX 23
-#define _SC_AIO_MAX 24
-#define _SC_AIO_PRIO_DELTA_MAX 25
-#define _SC_ARG_MAX 0
-#define _SC_ASYNCHRONOUS_IO 12
-#define _SC_ATEXIT_MAX 87
-#define _SC_AVPHYS_PAGES 86
-#define _SC_BARRIERS 133
-#define _SC_BC_BASE_MAX 36
-#define _SC_BC_DIM_MAX 37
-#define _SC_BC_SCALE_MAX 38
-#define _SC_BC_STRING_MAX 39
-#define _SC_CHILD_MAX 1
-#define _SC_CLK_TCK 2
-#define _SC_CLOCK_SELECTION 137
-#define _SC_COLL_WEIGHTS_MAX 40
-#define _SC_CPUTIME 138
-#define _SC_DELAYTIMER_MAX 26
-#define _SC_EXPR_NEST_MAX 42
-#define _SC_FSYNC 15
-#define _SC_GETGR_R_SIZE_MAX 69
-#define _SC_GETPW_R_SIZE_MAX 70
-#define _SC_HOST_NAME_MAX 180
-#define _SC_IOV_MAX 60
-#define _SC_IPV6 235
-#define _SC_JOB_CONTROL 7
-#define _SC_LINE_MAX 43
-#define _SC_LOGIN_NAME_MAX 71
-#define _SC_MAPPED_FILES 16
-#define _SC_MEMLOCK 17
-#define _SC_MEMLOCK_RANGE 18
-#define _SC_MEMORY_PROTECTION 19
-#define _SC_MESSAGE_PASSING 20
-#define _SC_MONOTONIC_CLOCK 149
-#define _SC_MQ_OPEN_MAX 27
-#define _SC_MQ_PRIO_MAX 28
-#define _SC_NGROUPS_MAX 3
-#define _SC_NPROCESSORS_CONF 83
-#define _SC_NPROCESSORS_ONLN 84
-#define _SC_NZERO 109
-#define _SC_OPEN_MAX 4
-#define _SC_PAGESIZE 30
-#define _SC_PAGE_SIZE 30
-#define _SC_PASS_MAX 88
-#define _SC_PHYS_PAGES 85
-#define _SC_PRIORITIZED_IO 13
-#define _SC_PRIORITY_SCHEDULING 10
-#define _SC_RAW_SOCKETS 236
-#define _SC_READER_WRITER_LOCKS 153
-#define _SC_REALTIME_SIGNALS 9
-#define _SC_REGEXP 155
-#define _SC_RE_DUP_MAX 44
-#define _SC_RTSIG_MAX 31
-#define _SC_SAVED_IDS 8
-#define _SC_SEMAPHORES 21
-#define _SC_SEM_NSEMS_MAX 32
-#define _SC_SEM_VALUE_MAX 33
-#define _SC_SHARED_MEMORY_OBJECTS 22
-#define _SC_SHELL 157
-#define _SC_SIGQUEUE_MAX 34
-#define _SC_SPAWN 159
-#define _SC_SPIN_LOCKS 154
-#define _SC_SPORADIC_SERVER 160
-#define _SC_SS_REPL_MAX 241
-#define _SC_STREAMS 174
-#define _SC_STREAM_MAX 5
-#define _SC_SYMLOOP_MAX 173
-#define _SC_SYNCHRONIZED_IO 14
-#define _SC_THREADS 67
-#define _SC_THREAD_ATTR_STACKADDR 77
-#define _SC_THREAD_ATTR_STACKSIZE 78
-#define _SC_THREAD_CPUTIME 139
-#define _SC_THREAD_DESTRUCTOR_ITERATIONS 73
-#define _SC_THREAD_KEYS_MAX 74
-#define _SC_THREAD_PRIORITY_SCHEDULING 79
-#define _SC_THREAD_PRIO_INHERIT 80
-#define _SC_THREAD_PRIO_PROTECT 81
-#define _SC_THREAD_PROCESS_SHARED 82
-#define _SC_THREAD_ROBUST_PRIO_INHERIT 247
-#define _SC_THREAD_ROBUST_PRIO_PROTECT 248
-#define _SC_THREAD_SAFE_FUNCTIONS 68
-#define _SC_THREAD_SPORADIC_SERVER 161
-#define _SC_THREAD_STACK_MIN 75
-#define _SC_THREAD_THREADS_MAX 76
-#define _SC_TIMEOUTS 164
-#define _SC_TIMERS 11
-#define _SC_TIMER_MAX 35
-#define _SC_TRACE 181
-#define _SC_TRACE_EVENT_FILTER 182
-#define _SC_TRACE_EVENT_NAME_MAX 242
-#define _SC_TRACE_INHERIT 183
-#define _SC_TRACE_LOG 184
-#define _SC_TRACE_NAME_MAX 243
-#define _SC_TRACE_SYS_MAX 244
-#define _SC_TRACE_USER_EVENT_MAX 245
-#define _SC_TTY_NAME_MAX 72
-#define _SC_TYPED_MEMORY_OBJECTS 165
-#define _SC_TZNAME_MAX 6
-#define _SC_UIO_MAXIOV 60
-#define _SC_V6_ILP32_OFF32 176
-#define _SC_V6_ILP32_OFFBIG 177
-#define _SC_V6_LP64_OFF64 178
-#define _SC_V6_LPBIG_OFFBIG 179
-#define _SC_V7_ILP32_OFF32 237
-#define _SC_V7_ILP32_OFFBIG 238
-#define _SC_V7_LP64_OFF64 239
-#define _SC_V7_LPBIG_OFFBIG 240
-#define _SC_VERSION 29
-#define _SC_XBS5_ILP32_OFF32 125
-#define _SC_XBS5_ILP32_OFFBIG 126
-#define _SC_XBS5_LP64_OFF64 127
-#define _SC_XBS5_LPBIG_OFFBIG 128
-#define _SC_XOPEN_CRYPT 92
-#define _SC_XOPEN_ENH_I18N 93
-#define _SC_XOPEN_LEGACY 129
-#define _SC_XOPEN_REALTIME 130
-#define _SC_XOPEN_REALTIME_THREADS 131
-#define _SC_XOPEN_SHM 94
-#define _SC_XOPEN_STREAMS 246
-#define _SC_XOPEN_UNIX 91
-#define _SC_XOPEN_VERSION 89
-#define _SC_XOPEN_XCU_VERSION 90
-#define _SC_XOPEN_XPG2 98
-#define _SC_XOPEN_XPG3 99
-#define _SC_XOPEN_XPG4 100
-#define _SEARCH_H 
-#define _SEMAPHORE_H 
-#define _SIZE_T 
-#define _STDALIGN_H 
-#define _STDBOOL_H 
-#define _STDC_PREDEF_H 
-#define _STDINT_H 
-#define _STDIO_EXT_H 
-#define _STDIO_H 
-#define _STDLIB_H 
-#define _STDNORETURN_H 
-#define _STRINGS_H 
-#define _STRING_H 
-#define _STROPTS_H 
-#define _SYSEXITS_H 
-#define _SYS_EVENTFD_H 
-#define _SYS_FILE_H 
-#define _SYS_IOCTL_H 
-#define _SYS_PARAM_H 
-#define _SYS_RANDOM_H 
-#define _SYS_REG_H 
-#define _SYS_SELECT_H 
-#define _SYS_SOCKET_H 
-#define _SYS_STAT_H 
-#define _SYS_SYSCALL_H 
-#define _SYS_SYSINFO_H 
-#define _SYS_TIMEB_H 
-#define _SYS_TIMEX_H 
-#define _SYS_TIME_H 
-#define _SYS_TTYDEFAULTS_H 
-#define _SYS_TYPES_H 
-#define _SYS_UIO_H 
-#define _SYS_UN_H 
-#define _SYS_UTSNAME_H 
-#define _TAR_H 
-#define _TGMATH_H 
-#define _THREADS_H 
-#define _TIME_H 
-#define _UCHAR_H 
-#define _UNISTD_H 
-#define _UTIME_H 
-#define _VALUES_H 
-#define _VA_LIST 
-#define _WCHAR_H 
-#define _WCHAR_T 
-#define _WCTYPE_H 
-#define _WINT_T 
-#define _XOPEN_ENH_I18N 1
-#define _XOPEN_IOV_MAX 16
-#define _XOPEN_NAME_MAX 255
-#define _XOPEN_PATH_MAX 1024
-#define _XOPEN_UNIX 1
-#define _XOPEN_VERSION 700
-#define __ARE_4_EQUAL(a,b) (!( (0[a]-0[b]) | (1[a]-1[b]) | (2[a]-2[b]) | (3[a]-3[b]) ))
-#define __ATOMIC_ACQUIRE 2
-#define __ATOMIC_ACQ_REL 4
-#define __ATOMIC_CONSUME 1
-#define __ATOMIC_RELAXED 0
-#define __ATOMIC_RELEASE 3
-#define __ATOMIC_SEQ_CST 5
-#define __BIGGEST_ALIGNMENT__ 16
-#define __BIG_ENDIAN 4321
-#define __BIND 19950621
-#define __BYTE_ORDER __BYTE_ORDER__
-#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
-#define __CHAR16_TYPE__ unsigned short
-#define __CHAR32_TYPE__ unsigned int
-#define __CHAR_BIT__ 8
-#define __compiler_ATOMIC_BOOL_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR16_T_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR32_T_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR_LOCK_FREE 2
-#define __compiler_ATOMIC_INT_LOCK_FREE 2
-#define __compiler_ATOMIC_LLONG_LOCK_FREE 2
-#define __compiler_ATOMIC_LONG_LOCK_FREE 2
-#define __compiler_ATOMIC_POINTER_LOCK_FREE 2
-#define __compiler_ATOMIC_SHORT_LOCK_FREE 2
-#define __compiler_ATOMIC_WCHAR_T_LOCK_FREE 2
-#define __CLANG_MAX_ALIGN_T_DEFINED 
-#define __CMPLX(x,y,t) (__builtin_complex((t)(x), (t)(y)))
-#define __CONSTANT_CFSTRINGS__ 1
-#define __DBLCX(x) (__IS_CX(x) && sizeof(x) == sizeof(double complex))
-#define __DBL_DECIMAL_DIG__ 17
-#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
-#define __DBL_DIG__ 15
-#define __DBL_EPSILON__ 2.2204460492503131e-16
-#define __DBL_HAS_DENORM__ 1
-#define __DBL_HAS_INFINITY__ 1
-#define __DBL_HAS_QUIET_NAN__ 1
-#define __DBL_MANT_DIG__ 53
-#define __DBL_MAX_10_EXP__ 308
-#define __DBL_MAX_EXP__ 1024
-#define __DBL_MAX__ 1.7976931348623157e+308
-#define __DBL_MIN_10_EXP__ (-307)
-#define __DBL_MIN_EXP__ (-1021)
-#define __DBL_MIN__ 2.2250738585072014e-308
-#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
-#define __DEFINED_FILE 
-#define __DEFINED___isoc_va_list 
-#define __DEFINED_blkcnt_t 
-#define __DEFINED_blksize_t 
-#define __DEFINED_clock_t 
-#define __DEFINED_clockid_t 
-#define __DEFINED_cnd_t 
-#define __DEFINED_dev_t 
-#define __DEFINED_double_t 
-#define __DEFINED_float_t 
-#define __DEFINED_fsblkcnt_t 
-#define __DEFINED_fsfilcnt_t 
-#define __DEFINED_gid_t 
-#define __DEFINED_id_t 
-#define __DEFINED_ino_t 
-#define __DEFINED_int16_t 
-#define __DEFINED_int32_t 
-#define __DEFINED_int64_t 
-#define __DEFINED_int8_t 
-#define __DEFINED_intmax_t 
-#define __DEFINED_intptr_t 
-#define __DEFINED_key_t 
-#define __DEFINED_locale_t 
-#define __DEFINED_mbstate_t 
-#define __DEFINED_mode_t 
-#define __DEFINED_mtx_t 
-#define __DEFINED_nlink_t 
-#define __DEFINED_off_t 
-#define __DEFINED_pid_t 
-#define __DEFINED_pthread_attr_t 
-#define __DEFINED_pthread_barrier_t 
-#define __DEFINED_pthread_barrierattr_t 
-#define __DEFINED_pthread_cond_t 
-#define __DEFINED_pthread_condattr_t 
-#define __DEFINED_pthread_key_t 
-#define __DEFINED_pthread_mutex_t 
-#define __DEFINED_pthread_mutexattr_t 
-#define __DEFINED_pthread_once_t 
-#define __DEFINED_pthread_rwlock_t 
-#define __DEFINED_pthread_rwlockattr_t 
-#define __DEFINED_pthread_spinlock_t 
-#define __DEFINED_pthread_t 
-#define __DEFINED_register_t 
-#define __DEFINED_regoff_t 
-#define __DEFINED_sa_family_t 
-#define __DEFINED_sigset_t 
-#define __DEFINED_size_t 
-#define __DEFINED_socklen_t 
-#define __DEFINED_ssize_t 
-#define __DEFINED_suseconds_t 
-#define __DEFINED_time_t 
-#define __DEFINED_timer_t 
-#define __DEFINED_u_int64_t 
-#define __DEFINED_uid_t 
-#define __DEFINED_uint16_t 
-#define __DEFINED_uint32_t 
-#define __DEFINED_uint64_t 
-#define __DEFINED_uint8_t 
-#define __DEFINED_uintmax_t 
-#define __DEFINED_uintptr_t 
-#define __DEFINED_useconds_t 
-#define __DEFINED_va_list 
-#define __DEFINED_wchar_t 
-#define __DEFINED_wctype_t 
-#define __DEFINED_wint_t 
-#define __FINITE_MATH_ONLY__ 0
-#define __FLT(x) (__IS_REAL(x) && sizeof(x) == sizeof(float))
-#define __FLTCX(x) (__IS_CX(x) && sizeof(x) == sizeof(float complex))
-#define __FLT_DECIMAL_DIG__ 9
-#define __FLT_DENORM_MIN__ 1.40129846e-45F
-#define __FLT_DIG__ 6
-#define __FLT_EPSILON__ 1.19209290e-7F
-#define __FLT_EVAL_METHOD__ 0
-#define __FLT_HAS_DENORM__ 1
-#define __FLT_HAS_INFINITY__ 1
-#define __FLT_HAS_QUIET_NAN__ 1
-#define __FLT_MANT_DIG__ 24
-#define __FLT_MAX_10_EXP__ 38
-#define __FLT_MAX_EXP__ 128
-#define __FLT_MAX__ 3.40282347e+38F
-#define __FLT_MIN_10_EXP__ (-37)
-#define __FLT_MIN_EXP__ (-125)
-#define __FLT_MIN__ 1.17549435e-38F
-#define __FLT_RADIX__ 2
-#define __compiler_ATOMIC_BOOL_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR16_T_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR32_T_LOCK_FREE 2
-#define __compiler_ATOMIC_CHAR_LOCK_FREE 2
-#define __compiler_ATOMIC_INT_LOCK_FREE 2
-#define __compiler_ATOMIC_LLONG_LOCK_FREE 2
-#define __compiler_ATOMIC_LONG_LOCK_FREE 2
-#define __compiler_ATOMIC_POINTER_LOCK_FREE 2
-#define __compiler_ATOMIC_SHORT_LOCK_FREE 2
-#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
-#define __compiler_ATOMIC_WCHAR_T_LOCK_FREE 2
-#define __GNUC_STDC_INLINE__ 1
-#define __GNUC_VA_LIST 1
-#define __GXX_ABI_VERSION 1002
-#define __ILP32__ 1
-#define __INT16_C_SUFFIX__ 
-#define __INT16_FMTd__ "hd"
-#define __INT16_FMTi__ "hi"
-#define __INT16_MAX__ 32767
-#define __INT16_TYPE__ short
-#define __INT32_C_SUFFIX__ 
-#define __INT32_FMTd__ "d"
-#define __INT32_FMTi__ "i"
-#define __INT32_MAX__ 2147483647
-#define __INT32_TYPE__ int
-#define __INT64_C_SUFFIX__ LL
-#define __INT64_FMTd__ "lld"
-#define __INT64_FMTi__ "lli"
-#define __INT64_MAX__ 9223372036854775807LL
-#define __INT64_TYPE__ long long int
-#define __INT8_C_SUFFIX__ 
-#define __INT8_FMTd__ "hhd"
-#define __INT8_FMTi__ "hhi"
-#define __INT8_MAX__ 127
-#define __INT8_TYPE__ signed char
-#define __INTMAX_C_SUFFIX__ LL
-#define __INTMAX_FMTd__ "lld"
-#define __INTMAX_FMTi__ "lli"
-#define __INTMAX_MAX__ 9223372036854775807LL
-#define __INTMAX_TYPE__ long long int
-#define __INTMAX_WIDTH__ 64
-#define __INTPTR_FMTd__ "ld"
-#define __INTPTR_FMTi__ "li"
-#define __INTPTR_MAX__ 2147483647L
-#define __INTPTR_TYPE__ long int
-#define __INTPTR_WIDTH__ 32
-#define __INT_FAST16_FMTd__ "hd"
-#define __INT_FAST16_FMTi__ "hi"
-#define __INT_FAST16_MAX__ 32767
-#define __INT_FAST16_TYPE__ short
-#define __INT_FAST32_FMTd__ "d"
-#define __INT_FAST32_FMTi__ "i"
-#define __INT_FAST32_MAX__ 2147483647
-#define __INT_FAST32_TYPE__ int
-#define __INT_FAST64_FMTd__ "lld"
-#define __INT_FAST64_FMTi__ "lli"
-#define __INT_FAST64_MAX__ 9223372036854775807LL
-#define __INT_FAST64_TYPE__ long long int
-#define __INT_FAST8_FMTd__ "hhd"
-#define __INT_FAST8_FMTi__ "hhi"
-#define __INT_FAST8_MAX__ 127
-#define __INT_FAST8_TYPE__ signed char
-#define __INT_LEAST16_FMTd__ "hd"
-#define __INT_LEAST16_FMTi__ "hi"
-#define __INT_LEAST16_MAX__ 32767
-#define __INT_LEAST16_TYPE__ short
-#define __INT_LEAST32_FMTd__ "d"
-#define __INT_LEAST32_FMTi__ "i"
-#define __INT_LEAST32_MAX__ 2147483647
-#define __INT_LEAST32_TYPE__ int
-#define __INT_LEAST64_FMTd__ "lld"
-#define __INT_LEAST64_FMTi__ "lli"
-#define __INT_LEAST64_MAX__ 9223372036854775807LL
-#define __INT_LEAST64_TYPE__ long long int
-#define __INT_LEAST8_FMTd__ "hhd"
-#define __INT_LEAST8_FMTi__ "hhi"
-#define __INT_LEAST8_MAX__ 127
-#define __INT_LEAST8_TYPE__ signed char
-#define __INT_MAX__ 2147483647
-#define __IS_CX(x) (__IS_FP(x) && sizeof(x) == sizeof((x)+I))
-#define __IS_FP(x) (sizeof((x)+1ULL) == sizeof((x)+1.0f))
-#define __IS_REAL(x) (__IS_FP(x) && 2*sizeof(x) == sizeof((x)+I))
-#define __LDBL(x) (__IS_REAL(x) && sizeof(x) == sizeof(long double) && sizeof(long double) != sizeof(double))
-#define __LDBLCX(x) (__IS_CX(x) && sizeof(x) == sizeof(long double complex) && sizeof(long double) != sizeof(double))
-#define __LDBL_DECIMAL_DIG__ 36
-#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
-#define __LDBL_DIG__ 33
-#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
-#define __LDBL_HAS_DENORM__ 1
-#define __LDBL_HAS_INFINITY__ 1
-#define __LDBL_HAS_QUIET_NAN__ 1
-#define __LDBL_MANT_DIG__ 113
-#define __LDBL_MAX_10_EXP__ 4932
-#define __LDBL_MAX_EXP__ 16384
-#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
-#define __LDBL_MIN_10_EXP__ (-4931)
-#define __LDBL_MIN_EXP__ (-16381)
-#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
-#define __LITTLE_ENDIAN 1234
-#define __LITTLE_ENDIAN__ 1
-#define __LONG_LONG_MAX__ 9223372036854775807LL
-#define __LONG_MAX __LONG_MAX__
-#define __LONG_MAX__ 2147483647L
-#define __NAMESER 19991006
-#define __NEED_FILE 
-#define __NEED___isoc_va_list 
-#define __NEED_blkcnt_t 
-#define __NEED_blksize_t 
-#define __NEED_clock_t 
-#define __NEED_clockid_t 
-#define __NEED_cnd_t 
-#define __NEED_dev_t 
-#define __NEED_double_t 
-#define __NEED_float_t 
-#define __NEED_fsblkcnt_t 
-#define __NEED_fsfilcnt_t 
-#define __NEED_gid_t 
-#define __NEED_id_t 
-#define __NEED_ino_t 
-#define __NEED_int16_t 
-#define __NEED_int32_t 
-#define __NEED_int64_t 
-#define __NEED_int8_t 
-#define __NEED_intmax_t 
-#define __NEED_intptr_t 
-#define __NEED_key_t 
-#define __NEED_locale_t 
-#define __NEED_mbstate_t 
-#define __NEED_mode_t 
-#define __NEED_mtx_t 
-#define __NEED_nlink_t 
-#define __NEED_off_t 
-#define __NEED_pid_t 
-#define __NEED_pthread_attr_t 
-#define __NEED_pthread_barrier_t 
-#define __NEED_pthread_barrierattr_t 
-#define __NEED_pthread_cond_t 
-#define __NEED_pthread_condattr_t 
-#define __NEED_pthread_key_t 
-#define __NEED_pthread_mutex_t 
-#define __NEED_pthread_mutexattr_t 
-#define __NEED_pthread_once_t 
-#define __NEED_pthread_rwlock_t 
-#define __NEED_pthread_rwlockattr_t 
-#define __NEED_pthread_spinlock_t 
-#define __NEED_pthread_t 
-#define __NEED_register_t 
-#define __NEED_regoff_t 
-#define __NEED_sa_family_t 
-#define __NEED_sigset_t 
-#define __NEED_size_t 
-#define __NEED_socklen_t 
-#define __NEED_ssize_t 
-#define __NEED_struct_iovec 
-#define __NEED_struct_timespec 
-#define __NEED_struct_timeval 
-#define __NEED_suseconds_t 
-#define __NEED_time_t 
-#define __NEED_timer_t 
-#define __NEED_u_int64_t 
-#define __NEED_uid_t 
-#define __NEED_uint16_t 
-#define __NEED_uint32_t 
-#define __NEED_uint64_t 
-#define __NEED_uint8_t 
-#define __NEED_uintmax_t 
-#define __NEED_uintptr_t 
-#define __NEED_useconds_t 
-#define __NEED_va_list 
-#define __NEED_wchar_t 
-#define __NEED_wctype_t 
-#define __NEED_wint_t 
-#define __OBJC_BOOL_IS_BOOL 0
-#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3
-#define __OPENCL_MEMORY_SCOPE_DEVICE 2
-#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4
-#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1
-#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0
-#define __OPTIMIZE__ 1
-#define __ORDER_BIG_ENDIAN__ 4321
-#define __ORDER_LITTLE_ENDIAN__ 1234
-#define __ORDER_PDP_ENDIAN__ 3412
-#define __PDP_ENDIAN 3412
-#define __POINTER_WIDTH__ 32
-#define __PRAGMA_REDEFINE_EXTNAME 1
-#define __PTRDIFF_FMTd__ "ld"
-#define __PTRDIFF_FMTi__ "li"
-#define __PTRDIFF_MAX__ 2147483647L
-#define __PTRDIFF_TYPE__ long int
-#define __PTRDIFF_WIDTH__ 32
-#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
-#define __RETCAST(x) 
-#define __RETCAST_2(x,y) 
-#define __RETCAST_3(x,y,z) 
-#define __RETCAST_CX(x) 
-#define __RETCAST_REAL(x) 
-#define __SCHAR_MAX__ 127
-#define __SHRT_MAX__ 32767
-#define __SID ('S' << 8)
-#define __SIG_ATOMIC_MAX__ 2147483647L
-#define __SIG_ATOMIC_WIDTH__ 32
-#define __SIZEOF_DOUBLE__ 8
-#define __SIZEOF_FLOAT__ 4
-#define __SIZEOF_INT128__ 16
-#define __SIZEOF_INT__ 4
-#define __SIZEOF_LONG_DOUBLE__ 16
-#define __SIZEOF_LONG_LONG__ 8
-#define __SIZEOF_LONG__ 4
-#define __SIZEOF_POINTER__ 4
-#define __SIZEOF_PTRDIFF_T__ 4
-#define __SIZEOF_SHORT__ 2
-#define __SIZEOF_SIZE_T__ 4
-#define __SIZEOF_WCHAR_T__ 4
-#define __SIZEOF_WINT_T__ 4
-#define __SIZE_FMTX__ "lX"
-#define __SIZE_FMTo__ "lo"
-#define __SIZE_FMTu__ "lu"
-#define __SIZE_FMTx__ "lx"
-#define __SIZE_MAX__ 4294967295UL
-#define __SIZE_TYPE__ long unsigned int
-#define __SIZE_WIDTH__ 32
-#define __STDARG_H 
-#define __STDC_HOSTED__ 1
-#define __STDC_IEC_559__ 1
-#define __STDC_ISO_10646__ 201206L
-#define __STDC_UTF_16__ 1
-#define __STDC_UTF_32__ 1
-#define __STDC_VERSION__ 201710L
-#define __STDC__ 1
-#define __STDDEF_H 
-#define __UAPI_DEF_IN6_ADDR 0
-#define __UAPI_DEF_IN6_ADDR_ALT 0
-#define __UAPI_DEF_IN6_PKTINFO 0
-#define __UAPI_DEF_IN_ADDR 0
-#define __UAPI_DEF_IN_CLASS 0
-#define __UAPI_DEF_IN_IPPROTO 0
-#define __UAPI_DEF_IN_PKTINFO 0
-#define __UAPI_DEF_IP6_MTUINFO 0
-#define __UAPI_DEF_IPHDR 0
-#define __UAPI_DEF_IPPROTO_V6 0
-#define __UAPI_DEF_IPV6_MREQ 0
-#define __UAPI_DEF_IPV6_OPTIONS 0
-#define __UAPI_DEF_IP_MREQ 0
-#define __UAPI_DEF_SOCKADDR_IN 0
-#define __UAPI_DEF_SOCKADDR_IN6 0
-#define __UINT16_C_SUFFIX__ 
-#define __UINT16_FMTX__ "hX"
-#define __UINT16_FMTo__ "ho"
-#define __UINT16_FMTu__ "hu"
-#define __UINT16_FMTx__ "hx"
-#define __UINT16_MAX__ 65535
-#define __UINT16_TYPE__ unsigned short
-#define __UINT32_C_SUFFIX__ U
-#define __UINT32_FMTX__ "X"
-#define __UINT32_FMTo__ "o"
-#define __UINT32_FMTu__ "u"
-#define __UINT32_FMTx__ "x"
-#define __UINT32_MAX__ 4294967295U
-#define __UINT32_TYPE__ unsigned int
-#define __UINT64_C_SUFFIX__ ULL
-#define __UINT64_FMTX__ "llX"
-#define __UINT64_FMTo__ "llo"
-#define __UINT64_FMTu__ "llu"
-#define __UINT64_FMTx__ "llx"
-#define __UINT64_MAX__ 18446744073709551615ULL
-#define __UINT64_TYPE__ long long unsigned int
-#define __UINT8_C_SUFFIX__ 
-#define __UINT8_FMTX__ "hhX"
-#define __UINT8_FMTo__ "hho"
-#define __UINT8_FMTu__ "hhu"
-#define __UINT8_FMTx__ "hhx"
-#define __UINT8_MAX__ 255
-#define __UINT8_TYPE__ unsigned char
-#define __UINTMAX_C_SUFFIX__ ULL
-#define __UINTMAX_FMTX__ "llX"
-#define __UINTMAX_FMTo__ "llo"
-#define __UINTMAX_FMTu__ "llu"
-#define __UINTMAX_FMTx__ "llx"
-#define __UINTMAX_MAX__ 18446744073709551615ULL
-#define __UINTMAX_TYPE__ long long unsigned int
-#define __UINTMAX_WIDTH__ 64
-#define __UINTPTR_FMTX__ "lX"
-#define __UINTPTR_FMTo__ "lo"
-#define __UINTPTR_FMTu__ "lu"
-#define __UINTPTR_FMTx__ "lx"
-#define __UINTPTR_MAX__ 4294967295UL
-#define __UINTPTR_TYPE__ long unsigned int
-#define __UINTPTR_WIDTH__ 32
-#define __UINT_FAST16_FMTX__ "hX"
-#define __UINT_FAST16_FMTo__ "ho"
-#define __UINT_FAST16_FMTu__ "hu"
-#define __UINT_FAST16_FMTx__ "hx"
-#define __UINT_FAST16_MAX__ 65535
-#define __UINT_FAST16_TYPE__ unsigned short
-#define __UINT_FAST32_FMTX__ "X"
-#define __UINT_FAST32_FMTo__ "o"
-#define __UINT_FAST32_FMTu__ "u"
-#define __UINT_FAST32_FMTx__ "x"
-#define __UINT_FAST32_MAX__ 4294967295U
-#define __UINT_FAST32_TYPE__ unsigned int
-#define __UINT_FAST64_FMTX__ "llX"
-#define __UINT_FAST64_FMTo__ "llo"
-#define __UINT_FAST64_FMTu__ "llu"
-#define __UINT_FAST64_FMTx__ "llx"
-#define __UINT_FAST64_MAX__ 18446744073709551615ULL
-#define __UINT_FAST64_TYPE__ long long unsigned int
-#define __UINT_FAST8_FMTX__ "hhX"
-#define __UINT_FAST8_FMTo__ "hho"
-#define __UINT_FAST8_FMTu__ "hhu"
-#define __UINT_FAST8_FMTx__ "hhx"
-#define __UINT_FAST8_MAX__ 255
-#define __UINT_FAST8_TYPE__ unsigned char
-#define __UINT_LEAST16_FMTX__ "hX"
-#define __UINT_LEAST16_FMTo__ "ho"
-#define __UINT_LEAST16_FMTu__ "hu"
-#define __UINT_LEAST16_FMTx__ "hx"
-#define __UINT_LEAST16_MAX__ 65535
-#define __UINT_LEAST16_TYPE__ unsigned short
-#define __UINT_LEAST32_FMTX__ "X"
-#define __UINT_LEAST32_FMTo__ "o"
-#define __UINT_LEAST32_FMTu__ "u"
-#define __UINT_LEAST32_FMTx__ "x"
-#define __UINT_LEAST32_MAX__ 4294967295U
-#define __UINT_LEAST32_TYPE__ unsigned int
-#define __UINT_LEAST64_FMTX__ "llX"
-#define __UINT_LEAST64_FMTo__ "llo"
-#define __UINT_LEAST64_FMTu__ "llu"
-#define __UINT_LEAST64_FMTx__ "llx"
-#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
-#define __UINT_LEAST64_TYPE__ long long unsigned int
-#define __UINT_LEAST8_FMTX__ "hhX"
-#define __UINT_LEAST8_FMTo__ "hho"
-#define __UINT_LEAST8_FMTu__ "hhu"
-#define __UINT_LEAST8_FMTx__ "hhx"
-#define __UINT_LEAST8_MAX__ 255
-#define __UINT_LEAST8_TYPE__ unsigned char
-#define __USER_LABEL_PREFIX__ 
-#define __USE_TIME_BITS64 1
-#define __WASI_ADVICE_DONTNEED (UINT8_C(4))
-#define __WASI_ADVICE_NOREUSE (UINT8_C(5))
-#define __WASI_ADVICE_NORMAL (UINT8_C(0))
-#define __WASI_ADVICE_RANDOM (UINT8_C(2))
-#define __WASI_ADVICE_SEQUENTIAL (UINT8_C(1))
-#define __WASI_ADVICE_WILLNEED (UINT8_C(3))
-#define __WASI_CLOCKID_MONOTONIC (UINT32_C(1))
-#define __WASI_CLOCKID_PROCESS_CPUTIME_ID (UINT32_C(2))
-#define __WASI_CLOCKID_REALTIME (UINT32_C(0))
-#define __WASI_CLOCKID_THREAD_CPUTIME_ID (UINT32_C(3))
-#define __WASI_DIRCOOKIE_START (UINT64_C(0))
-#define __WASI_ERRNO_2BIG (UINT16_C(1))
-#define __WASI_ERRNO_ACCES (UINT16_C(2))
-#define __WASI_ERRNO_ADDRINUSE (UINT16_C(3))
-#define __WASI_ERRNO_ADDRNOTAVAIL (UINT16_C(4))
-#define __WASI_ERRNO_AFNOSUPPORT (UINT16_C(5))
-#define __WASI_ERRNO_AGAIN (UINT16_C(6))
-#define __WASI_ERRNO_ALREADY (UINT16_C(7))
-#define __WASI_ERRNO_BADF (UINT16_C(8))
-#define __WASI_ERRNO_BADMSG (UINT16_C(9))
-#define __WASI_ERRNO_BUSY (UINT16_C(10))
-#define __WASI_ERRNO_CANCELED (UINT16_C(11))
-#define __WASI_ERRNO_CHILD (UINT16_C(12))
-#define __WASI_ERRNO_CONNABORTED (UINT16_C(13))
-#define __WASI_ERRNO_CONNREFUSED (UINT16_C(14))
-#define __WASI_ERRNO_CONNRESET (UINT16_C(15))
-#define __WASI_ERRNO_DEADLK (UINT16_C(16))
-#define __WASI_ERRNO_DESTADDRREQ (UINT16_C(17))
-#define __WASI_ERRNO_DOM (UINT16_C(18))
-#define __WASI_ERRNO_DQUOT (UINT16_C(19))
-#define __WASI_ERRNO_EXIST (UINT16_C(20))
-#define __WASI_ERRNO_FAULT (UINT16_C(21))
-#define __WASI_ERRNO_FBIG (UINT16_C(22))
-#define __WASI_ERRNO_HOSTUNREACH (UINT16_C(23))
-#define __WASI_ERRNO_IDRM (UINT16_C(24))
-#define __WASI_ERRNO_ILSEQ (UINT16_C(25))
-#define __WASI_ERRNO_INPROGRESS (UINT16_C(26))
-#define __WASI_ERRNO_INTR (UINT16_C(27))
-#define __WASI_ERRNO_INVAL (UINT16_C(28))
-#define __WASI_ERRNO_IO (UINT16_C(29))
-#define __WASI_ERRNO_ISCONN (UINT16_C(30))
-#define __WASI_ERRNO_ISDIR (UINT16_C(31))
-#define __WASI_ERRNO_LOOP (UINT16_C(32))
-#define __WASI_ERRNO_MFILE (UINT16_C(33))
-#define __WASI_ERRNO_MLINK (UINT16_C(34))
-#define __WASI_ERRNO_MSGSIZE (UINT16_C(35))
-#define __WASI_ERRNO_MULTIHOP (UINT16_C(36))
-#define __WASI_ERRNO_NAMETOOLONG (UINT16_C(37))
-#define __WASI_ERRNO_NETDOWN (UINT16_C(38))
-#define __WASI_ERRNO_NETRESET (UINT16_C(39))
-#define __WASI_ERRNO_NETUNREACH (UINT16_C(40))
-#define __WASI_ERRNO_NFILE (UINT16_C(41))
-#define __WASI_ERRNO_NOBUFS (UINT16_C(42))
-#define __WASI_ERRNO_NODEV (UINT16_C(43))
-#define __WASI_ERRNO_NOENT (UINT16_C(44))
-#define __WASI_ERRNO_NOEXEC (UINT16_C(45))
-#define __WASI_ERRNO_NOLCK (UINT16_C(46))
-#define __WASI_ERRNO_NOLINK (UINT16_C(47))
-#define __WASI_ERRNO_NOMEM (UINT16_C(48))
-#define __WASI_ERRNO_NOMSG (UINT16_C(49))
-#define __WASI_ERRNO_NOPROTOOPT (UINT16_C(50))
-#define __WASI_ERRNO_NOSPC (UINT16_C(51))
-#define __WASI_ERRNO_NOSYS (UINT16_C(52))
-#define __WASI_ERRNO_NOTCAPABLE (UINT16_C(76))
-#define __WASI_ERRNO_NOTCONN (UINT16_C(53))
-#define __WASI_ERRNO_NOTDIR (UINT16_C(54))
-#define __WASI_ERRNO_NOTEMPTY (UINT16_C(55))
-#define __WASI_ERRNO_NOTRECOVERABLE (UINT16_C(56))
-#define __WASI_ERRNO_NOTSOCK (UINT16_C(57))
-#define __WASI_ERRNO_NOTSUP (UINT16_C(58))
-#define __WASI_ERRNO_NOTTY (UINT16_C(59))
-#define __WASI_ERRNO_NXIO (UINT16_C(60))
-#define __WASI_ERRNO_OVERFLOW (UINT16_C(61))
-#define __WASI_ERRNO_OWNERDEAD (UINT16_C(62))
-#define __WASI_ERRNO_PERM (UINT16_C(63))
-#define __WASI_ERRNO_PIPE (UINT16_C(64))
-#define __WASI_ERRNO_PROTO (UINT16_C(65))
-#define __WASI_ERRNO_PROTONOSUPPORT (UINT16_C(66))
-#define __WASI_ERRNO_PROTOTYPE (UINT16_C(67))
-#define __WASI_ERRNO_RANGE (UINT16_C(68))
-#define __WASI_ERRNO_ROFS (UINT16_C(69))
-#define __WASI_ERRNO_SPIPE (UINT16_C(70))
-#define __WASI_ERRNO_SRCH (UINT16_C(71))
-#define __WASI_ERRNO_STALE (UINT16_C(72))
-#define __WASI_ERRNO_SUCCESS (UINT16_C(0))
-#define __WASI_ERRNO_TIMEDOUT (UINT16_C(73))
-#define __WASI_ERRNO_TXTBSY (UINT16_C(74))
-#define __WASI_ERRNO_XDEV (UINT16_C(75))
-#define __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP ((__wasi_eventrwflags_t)(1 << 0))
-#define __WASI_EVENTTYPE_CLOCK (UINT8_C(0))
-#define __WASI_EVENTTYPE_FD_READ (UINT8_C(1))
-#define __WASI_EVENTTYPE_FD_WRITE (UINT8_C(2))
-#define __WASI_FDFLAGS_APPEND ((__wasi_fdflags_t)(1 << 0))
-#define __WASI_FDFLAGS_DSYNC ((__wasi_fdflags_t)(1 << 1))
-#define __WASI_FDFLAGS_NONBLOCK ((__wasi_fdflags_t)(1 << 2))
-#define __WASI_FDFLAGS_RSYNC ((__wasi_fdflags_t)(1 << 3))
-#define __WASI_FDFLAGS_SYNC ((__wasi_fdflags_t)(1 << 4))
-#define __WASI_FILETYPE_BLOCK_DEVICE (UINT8_C(1))
-#define __WASI_FILETYPE_CHARACTER_DEVICE (UINT8_C(2))
-#define __WASI_FILETYPE_DIRECTORY (UINT8_C(3))
-#define __WASI_FILETYPE_REGULAR_FILE (UINT8_C(4))
-#define __WASI_FILETYPE_SOCKET_DGRAM (UINT8_C(5))
-#define __WASI_FILETYPE_SOCKET_STREAM (UINT8_C(6))
-#define __WASI_FILETYPE_SYMBOLIC_LINK (UINT8_C(7))
-#define __WASI_FILETYPE_UNKNOWN (UINT8_C(0))
-#define __WASI_FSTFLAGS_ATIM ((__wasi_fstflags_t)(1 << 0))
-#define __WASI_FSTFLAGS_ATIM_NOW ((__wasi_fstflags_t)(1 << 1))
-#define __WASI_FSTFLAGS_MTIM ((__wasi_fstflags_t)(1 << 2))
-#define __WASI_FSTFLAGS_MTIM_NOW ((__wasi_fstflags_t)(1 << 3))
-#define __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW ((__wasi_lookupflags_t)(1 << 0))
-#define __WASI_OFLAGS_CREAT ((__wasi_oflags_t)(1 << 0))
-#define __WASI_OFLAGS_DIRECTORY ((__wasi_oflags_t)(1 << 1))
-#define __WASI_OFLAGS_EXCL ((__wasi_oflags_t)(1 << 2))
-#define __WASI_OFLAGS_TRUNC ((__wasi_oflags_t)(1 << 3))
-#define __WASI_PREOPENTYPE_DIR (UINT8_C(0))
-#define __WASI_RIFLAGS_RECV_PEEK ((__wasi_riflags_t)(1 << 0))
-#define __WASI_RIFLAGS_RECV_WAITALL ((__wasi_riflags_t)(1 << 1))
-#define __WASI_RIGHTS_FD_ADVISE ((__wasi_rights_t)(1 << 7))
-#define __WASI_RIGHTS_FD_ALLOCATE ((__wasi_rights_t)(1 << 8))
-#define __WASI_RIGHTS_FD_DATASYNC ((__wasi_rights_t)(1 << 0))
-#define __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS ((__wasi_rights_t)(1 << 3))
-#define __WASI_RIGHTS_FD_FILESTAT_GET ((__wasi_rights_t)(1 << 21))
-#define __WASI_RIGHTS_FD_FILESTAT_SET_SIZE ((__wasi_rights_t)(1 << 22))
-#define __WASI_RIGHTS_FD_FILESTAT_SET_TIMES ((__wasi_rights_t)(1 << 23))
-#define __WASI_RIGHTS_FD_READ ((__wasi_rights_t)(1 << 1))
-#define __WASI_RIGHTS_FD_READDIR ((__wasi_rights_t)(1 << 14))
-#define __WASI_RIGHTS_FD_SEEK ((__wasi_rights_t)(1 << 2))
-#define __WASI_RIGHTS_FD_SYNC ((__wasi_rights_t)(1 << 4))
-#define __WASI_RIGHTS_FD_TELL ((__wasi_rights_t)(1 << 5))
-#define __WASI_RIGHTS_FD_WRITE ((__wasi_rights_t)(1 << 6))
-#define __WASI_RIGHTS_PATH_CREATE_DIRECTORY ((__wasi_rights_t)(1 << 9))
-#define __WASI_RIGHTS_PATH_CREATE_FILE ((__wasi_rights_t)(1 << 10))
-#define __WASI_RIGHTS_PATH_FILESTAT_GET ((__wasi_rights_t)(1 << 18))
-#define __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE ((__wasi_rights_t)(1 << 19))
-#define __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES ((__wasi_rights_t)(1 << 20))
-#define __WASI_RIGHTS_PATH_LINK_SOURCE ((__wasi_rights_t)(1 << 11))
-#define __WASI_RIGHTS_PATH_LINK_TARGET ((__wasi_rights_t)(1 << 12))
-#define __WASI_RIGHTS_PATH_OPEN ((__wasi_rights_t)(1 << 13))
-#define __WASI_RIGHTS_PATH_READLINK ((__wasi_rights_t)(1 << 15))
-#define __WASI_RIGHTS_PATH_REMOVE_DIRECTORY ((__wasi_rights_t)(1 << 25))
-#define __WASI_RIGHTS_PATH_RENAME_SOURCE ((__wasi_rights_t)(1 << 16))
-#define __WASI_RIGHTS_PATH_RENAME_TARGET ((__wasi_rights_t)(1 << 17))
-#define __WASI_RIGHTS_PATH_SYMLINK ((__wasi_rights_t)(1 << 24))
-#define __WASI_RIGHTS_PATH_UNLINK_FILE ((__wasi_rights_t)(1 << 26))
-#define __WASI_RIGHTS_POLL_FD_READWRITE ((__wasi_rights_t)(1 << 27))
-#define __WASI_RIGHTS_SOCK_SHUTDOWN ((__wasi_rights_t)(1 << 28))
-#define __WASI_ROFLAGS_RECV_DATA_TRUNCATED ((__wasi_roflags_t)(1 << 0))
-#define __WASI_SDFLAGS_RD ((__wasi_sdflags_t)(1 << 0))
-#define __WASI_SDFLAGS_WR ((__wasi_sdflags_t)(1 << 1))
-#define __WASI_SIGNAL_ABRT (UINT8_C(6))
-#define __WASI_SIGNAL_ALRM (UINT8_C(14))
-#define __WASI_SIGNAL_BUS (UINT8_C(7))
-#define __WASI_SIGNAL_CHLD (UINT8_C(16))
-#define __WASI_SIGNAL_CONT (UINT8_C(17))
-#define __WASI_SIGNAL_FPE (UINT8_C(8))
-#define __WASI_SIGNAL_HUP (UINT8_C(1))
-#define __WASI_SIGNAL_ILL (UINT8_C(4))
-#define __WASI_SIGNAL_INT (UINT8_C(2))
-#define __WASI_SIGNAL_KILL (UINT8_C(9))
-#define __WASI_SIGNAL_NONE (UINT8_C(0))
-#define __WASI_SIGNAL_PIPE (UINT8_C(13))
-#define __WASI_SIGNAL_POLL (UINT8_C(28))
-#define __WASI_SIGNAL_PROF (UINT8_C(26))
-#define __WASI_SIGNAL_PWR (UINT8_C(29))
-#define __WASI_SIGNAL_QUIT (UINT8_C(3))
-#define __WASI_SIGNAL_SEGV (UINT8_C(11))
-#define __WASI_SIGNAL_STOP (UINT8_C(18))
-#define __WASI_SIGNAL_SYS (UINT8_C(30))
-#define __WASI_SIGNAL_TERM (UINT8_C(15))
-#define __WASI_SIGNAL_TRAP (UINT8_C(5))
-#define __WASI_SIGNAL_TSTP (UINT8_C(19))
-#define __WASI_SIGNAL_TTIN (UINT8_C(20))
-#define __WASI_SIGNAL_TTOU (UINT8_C(21))
-#define __WASI_SIGNAL_URG (UINT8_C(22))
-#define __WASI_SIGNAL_USR1 (UINT8_C(10))
-#define __WASI_SIGNAL_USR2 (UINT8_C(12))
-#define __WASI_SIGNAL_VTALRM (UINT8_C(25))
-#define __WASI_SIGNAL_WINCH (UINT8_C(27))
-#define __WASI_SIGNAL_XCPU (UINT8_C(23))
-#define __WASI_SIGNAL_XFSZ (UINT8_C(24))
-#define __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME ((__wasi_subclockflags_t)(1 << 0))
-#define __WASI_WHENCE_CUR (UINT8_C(1))
-#define __WASI_WHENCE_END (UINT8_C(2))
-#define __WASI_WHENCE_SET (UINT8_C(0))
-#define __WCHAR_MAX__ 2147483647
-#define __WCHAR_TYPE__ int
-#define __WCHAR_WIDTH__ 32
-#define __WINT_MAX__ 2147483647
-#define __WINT_TYPE__ int
-#define __WINT_WIDTH__ 32
-#define __WORDSIZE 64
-#define __alignas_is_defined 1
-#define __alignof_is_defined 1
-#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
-#define __bool_true_false_are_defined 1
-#define __inline inline
-#define __restrict restrict
-#define __tg_complex(fun,x) (__RETCAST_CX(x)( __FLTCX((x)+I) && __IS_FP(x) ? fun ## f (x) : __LDBLCX((x)+I) ? fun ## l (x) : fun(x) ))
-#define __tg_complex_retreal(fun,x) (__RETCAST_REAL(x)( __FLTCX((x)+I) && __IS_FP(x) ? fun ## f (x) : __LDBLCX((x)+I) ? fun ## l (x) : fun(x) ))
-#define __tg_real(fun,x) (__RETCAST(x)__tg_real_nocast(fun, x))
-#define __tg_real_2(fun,x,y) (__RETCAST_2(x, y)( __FLT(x) && __FLT(y) ? fun ## f (x, y) : __LDBL((x)+(y)) ? fun ## l (x, y) : fun(x, y) ))
-#define __tg_real_2_1(fun,x,y) (__RETCAST(x)( __FLT(x) ? fun ## f (x, y) : __LDBL(x) ? fun ## l (x, y) : fun(x, y) ))
-#define __tg_real_complex(fun,x) (__RETCAST(x)( __FLTCX(x) ? c ## fun ## f (x) : __DBLCX(x) ? c ## fun (x) : __LDBLCX(x) ? c ## fun ## l (x) : __FLT(x) ? fun ## f (x) : __LDBL(x) ? fun ## l (x) : fun(x) ))
-#define __tg_real_complex_fabs(x) (__RETCAST_REAL(x)( __FLTCX(x) ? cabsf(x) : __DBLCX(x) ? cabs(x) : __LDBLCX(x) ? cabsl(x) : __FLT(x) ? fabsf(x) : __LDBL(x) ? fabsl(x) : fabs(x) ))
-#define __tg_real_complex_pow(x,y) (__RETCAST_2(x, y)( __FLTCX((x)+(y)) && __IS_FP(x) && __IS_FP(y) ? cpowf(x, y) : __FLTCX((x)+(y)) ? cpow(x, y) : __DBLCX((x)+(y)) ? cpow(x, y) : __LDBLCX((x)+(y)) ? cpowl(x, y) : __FLT(x) && __FLT(y) ? powf(x, y) : __LDBL((x)+(y)) ? powl(x, y) : pow(x, y) ))
-#define __tg_real_fma(x,y,z) (__RETCAST_3(x, y, z)( __FLT(x) && __FLT(y) && __FLT(z) ? fmaf(x, y, z) : __LDBL((x)+(y)+(z)) ? fmal(x, y, z) : fma(x, y, z) ))
-#define __tg_real_nocast(fun,x) ( __FLT(x) ? fun ## f (x) : __LDBL(x) ? fun ## l (x) : fun(x) )
-#define __tg_real_remquo(x,y,z) (__RETCAST_2(x, y)( __FLT(x) && __FLT(y) ? remquof(x, y, z) : __LDBL((x)+(y)) ? remquol(x, y, z) : remquo(x, y, z) ))
-#define __tm_gmtoff tm_gmtoff
-#define __tm_zone tm_zone
-#define __va_copy(d,s) __builtin_va_copy(d,s)
-#define __wasi__ 1
-#define __wasi_api_h 
-#define __wasi_libc_environ_h 
-#define __wasi_libc_find_relpath_h 
-#define __wasi_libc_h 
-#define __wasi_libc_nocwd_h 
-#define __wasilibc___errno_h 
-#define __wasilibc___errno_values_h 
-#define __wasilibc___fd_set_h 
-#define __wasilibc___function___isatty_h 
-#define __wasilibc___functions_malloc_h 
-#define __wasilibc___functions_memcpy_h 
-#define __wasilibc___header_dirent_h 
-#define __wasilibc___header_fcntl_h 
-#define __wasilibc___header_netinet_in_h 
-#define __wasilibc___header_poll_h 
-#define __wasilibc___header_stdlib_h 
-#define __wasilibc___header_string_h 
-#define __wasilibc___header_sys_ioctl_h 
-#define __wasilibc___header_sys_resource_h 
-#define __wasilibc___header_sys_socket_h 
-#define __wasilibc___header_sys_stat_h 
-#define __wasilibc___header_time_h 
-#define __wasilibc___header_unistd_h 
-#define __wasilibc___include_inttypes_h 
-#define __wasilibc___macro_FD_SETSIZE_h 
-#define __wasilibc___macro_PAGESIZE_h 
-#define __wasilibc___mode_t_h 
-#define __wasilibc___seek_h 
-#define __wasilibc___struct_dirent_h 
-#define __wasilibc___struct_in6_addr_h 
-#define __wasilibc___struct_in_addr_h 
-#define __wasilibc___struct_iovec_h 
-#define __wasilibc___struct_msghdr_h 
-#define __wasilibc___struct_pollfd_h 
-#define __wasilibc___struct_rusage_h 
-#define __wasilibc___struct_sockaddr_h 
-#define __wasilibc___struct_sockaddr_in6_h 
-#define __wasilibc___struct_sockaddr_in_h 
-#define __wasilibc___struct_sockaddr_storage_h 
-#define __wasilibc___struct_sockaddr_un_h 
-#define __wasilibc___struct_stat_h 
-#define __wasilibc___struct_timespec_h 
-#define __wasilibc___struct_timeval_h 
-#define __wasilibc___struct_tm_h 
-#define __wasilibc___struct_tms_h 
-#define __wasilibc___typedef_DIR_h 
-#define __wasilibc___typedef_blkcnt_t_h 
-#define __wasilibc___typedef_blksize_t_h 
-#define __wasilibc___typedef_clock_t_h 
-#define __wasilibc___typedef_clockid_t_h 
-#define __wasilibc___typedef_dev_t_h 
-#define __wasilibc___typedef_fd_set_h 
-#define __wasilibc___typedef_gid_t_h 
-#define __wasilibc___typedef_in_addr_t_h 
-#define __wasilibc___typedef_in_port_t_h 
-#define __wasilibc___typedef_ino_t_h 
-#define __wasilibc___typedef_mode_t_h 
-#define __wasilibc___typedef_nfds_t_h 
-#define __wasilibc___typedef_nlink_t_h 
-#define __wasilibc___typedef_off_t_h 
-#define __wasilibc___typedef_sa_family_t_h 
-#define __wasilibc___typedef_sigset_t_h 
-#define __wasilibc___typedef_socklen_t_h 
-#define __wasilibc___typedef_ssize_t_h 
-#define __wasilibc___typedef_suseconds_t_h 
-#define __wasilibc___typedef_time_t_h 
-#define __wasilibc___typedef_uid_t_h 
-#define __wasm 1
-#define __wasm32 1
-#define __wasm32__ 1
-#define __wasm__ 1
-#define _tolower(a) ((a)|0x20)
-#define _toupper(a) ((a)&0x5f)
-#define acos(x) __tg_real_complex(acos, (x))
-#define acosh(x) __tg_real_complex(acosh, (x))
-#define alignas _Alignas
-#define alignof _Alignof
-#define alloca __builtin_alloca
-#define alphasort64 alphasort
-#define and &&
-#define and_eq &=
-#define asin(x) __tg_real_complex(asin, (x))
-#define asinh(x) __tg_real_complex(asinh, (x))
-#define assert(x) (void)0
-#define atan(x) __tg_real_complex(atan, (x))
-#define atan2(x,y) __tg_real_2(atan2, (x), (y))
-#define atanh(x) __tg_real_complex(atanh, (x))
-#define be16toh(x) __bswap16(x)
-#define be32toh(x) __bswap32(x)
-#define be64toh(x) __bswap64(x)
-#define betoh16(x) __bswap16(x)
-#define betoh32(x) __bswap32(x)
-#define betoh64(x) __bswap64(x)
-#define bitand &
-#define bitor |
-#define blkcnt64_t blkcnt_t
-#define bool _Bool
-#define bswap_16(x) __bswap_16(x)
-#define bswap_32(x) __bswap_32(x)
-#define bswap_64(x) __bswap_64(x)
-#define carg(x) __tg_complex_retreal(carg, (x))
-#define cbrt(x) __tg_real(cbrt, (x))
-#define ceil(x) __tg_real(ceil, (x))
-#define cimag(x) __tg_complex_retreal(cimag, (x))
-#define cimagf(x) (__builtin_cimagf(x))
-#define cimagl(x) (__builtin_cimagl(x))
-#define clrbit(x,i) __bitop(x,i,&=~)
-#define compl ~
-#define complex _Complex
-#define conj(x) __tg_complex(conj, (x))
-#define copysign(x,y) __tg_real_2(copysign, (x), (y))
-#define cos(x) __tg_real_complex(cos, (x))
-#define cosh(x) __tg_real_complex(cosh, (x))
-#define cproj(x) __tg_complex(cproj, (x))
-#define creal(x) __tg_complex_retreal(creal, (x))
-#define crealf(x) (__builtin_crealf(x))
-#define creall(x) (__builtin_creall(x))
-#define creat64 creat
-#define d_fileno d_ino
-#define direct dirent
-#define dirent64 dirent
-#define erf(x) __tg_real(erf, (x))
-#define erfc(x) __tg_real(erfc, (x))
-#define errno errno
-#define exp(x) __tg_real_complex(exp, (x))
-#define exp2(x) __tg_real(exp2, (x))
-#define expm1(x) __tg_real(expm1, (x))
-#define fabs(x) __tg_real_complex_fabs(x)
-#define false 0
-#define fdim(x,y) __tg_real_2(fdim, (x), (y))
-#define fgetpos64 fgetpos
-#define floor(x) __tg_real(floor, (x))
-#define fma(x,y,z) __tg_real_fma((x), (y), (z))
-#define fmax(x,y) __tg_real_2(fmax, (x), (y))
-#define fmin(x,y) __tg_real_2(fmin, (x), (y))
-#define fmod(x,y) __tg_real_2(fmod, (x), (y))
-#define fopen64 fopen
-#define fpclassify(x) (__builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x))
-#define fpos64_t fpos_t
-#define freopen64 freopen
-#define frexp(x,y) __tg_real_2_1(frexp, (x), (y))
-#define fsblkcnt64_t fsblkcnt_t
-#define fseeko64 fseeko
-#define fsetpos64 fsetpos
-#define fsfilcnt64_t fsfilcnt_t
-#define fstat64 fstat
-#define fstatat64 fstatat
-#define ftello64 ftello
-#define ftruncate64 ftruncate
-#define getdents64 getdents
-#define glob64 glob
-#define glob64_t glob_t
-#define globfree64 globfree
-#define howmany(n,d) (((n)+((d)-1))/(d))
-#define htobe16(x) __bswap16(x)
-#define htobe32(x) __bswap32(x)
-#define htobe64(x) __bswap64(x)
-#define htole16(x) (uint16_t)(x)
-#define htole32(x) (uint32_t)(x)
-#define htole64(x) (uint64_t)(x)
-#define hypot(x,y) __tg_real_2(hypot, (x), (y))
-#define icmp6_data16 icmp6_dataun.icmp6_un_data16
-#define icmp6_data32 icmp6_dataun.icmp6_un_data32
-#define icmp6_data8 icmp6_dataun.icmp6_un_data8
-#define icmp6_id icmp6_data16[0]
-#define icmp6_maxdelay icmp6_data16[0]
-#define icmp6_mtu icmp6_data32[0]
-#define icmp6_pptr icmp6_data32[0]
-#define icmp6_seq icmp6_data16[1]
-#define icmp_data icmp_dun.id_data
-#define icmp_gwaddr icmp_hun.ih_gwaddr
-#define icmp_id icmp_hun.ih_idseq.icd_id
-#define icmp_ip icmp_dun.id_ip.idi_ip
-#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
-#define icmp_mask icmp_dun.id_mask
-#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
-#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
-#define icmp_otime icmp_dun.id_ts.its_otime
-#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
-#define icmp_pptr icmp_hun.ih_pptr
-#define icmp_radv icmp_dun.id_radv
-#define icmp_rtime icmp_dun.id_ts.its_rtime
-#define icmp_seq icmp_hun.ih_idseq.icd_seq
-#define icmp_ttime icmp_dun.id_ts.its_ttime
-#define icmp_void icmp_hun.ih_void
-#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
-#define ifa_broadaddr ifa_ifu.ifu_broadaddr
-#define ifa_dstaddr ifa_ifu.ifu_dstaddr
-#define ilogb(x) __tg_real_nocast(ilogb, (x))
-#define ino64_t ino_t
-#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_vfc ip6_ctlun.ip6_un2_vfc
-#define isalpha(a) (0 ? isalpha(a) : (((unsigned)(a)|32)-'a') < 26)
-#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128)
-#define isclr(x,i) !isset(x,i)
-#define isdigit(a) (0 ? isdigit(a) : ((unsigned)(a)-'0') < 10)
-#define isfinite(x) (__builtin_isfinite(x))
-#define isgraph(a) (0 ? isgraph(a) : ((unsigned)(a)-0x21) < 0x5e)
-#define isgreater(x,y) (__builtin_isgreater(x, y))
-#define isgreaterequal(x,y) (__builtin_isgreaterequal(x, y))
-#define isinf(x) (__builtin_isinf(x))
-#define isless(x,y) (__builtin_isless(x, y))
-#define islessequal(x,y) (__builtin_islessequal(x, y))
-#define islessgreater(x,y) (__builtin_islessgreater(x, y))
-#define islower(a) (0 ? islower(a) : ((unsigned)(a)-'a') < 26)
-#define isnan(x) (__builtin_isnan(x))
-#define isnormal(x) (__builtin_isnormal(x))
-#define isprint(a) (0 ? isprint(a) : ((unsigned)(a)-0x20) < 0x5f)
-#define isset(x,i) __bitop(x,i,&)
-#define isspace(a) __isspace(a)
-#define isunordered(x,y) (__builtin_isunordered(x, y))
-#define isupper(a) (0 ? isupper(a) : ((unsigned)(a)-'A') < 26)
-#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
-#define ldexp(x,y) __tg_real_2_1(ldexp, (x), (y))
-#define le16toh(x) (uint16_t)(x)
-#define le32toh(x) (uint32_t)(x)
-#define le64toh(x) (uint64_t)(x)
-#define letoh16(x) (uint16_t)(x)
-#define letoh32(x) (uint32_t)(x)
-#define letoh64(x) (uint64_t)(x)
-#define lgamma(x) __tg_real(lgamma, (x))
-#define llrint(x) __tg_real_nocast(llrint, (x))
-#define llround(x) __tg_real_nocast(llround, (x))
-#define loff_t off_t
-#define log(x) __tg_real_complex(log, (x))
-#define log10(x) __tg_real(log10, (x))
-#define log1p(x) __tg_real(log1p, (x))
-#define log2(x) __tg_real(log2, (x))
-#define logb(x) __tg_real(logb, (x))
-#define lrint(x) __tg_real_nocast(lrint, (x))
-#define lround(x) __tg_real_nocast(lround, (x))
-#define lseek(fd,offset,whence) ({ off_t __f = (fd); off_t __o = (offset); off_t __w = (whence); __builtin_constant_p((offset)) && __builtin_constant_p((whence)) && __o == 0 && __w == SEEK_CUR ? __wasilibc_tell(__f) : lseek(__f, __o, __w); })
-#define lseek64 lseek
-#define lstat64 lstat
-#define math_errhandling 2
-#define mld_cksum mld_icmp6_hdr.icmp6_cksum
-#define mld_code mld_icmp6_hdr.icmp6_code
-#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
-#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
-#define mld_type mld_icmp6_hdr.icmp6_type
-#define nd_na_cksum nd_na_hdr.icmp6_cksum
-#define nd_na_code nd_na_hdr.icmp6_code
-#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-#define nd_na_type nd_na_hdr.icmp6_type
-#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
-#define nd_ns_code nd_ns_hdr.icmp6_code
-#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
-#define nd_ns_type nd_ns_hdr.icmp6_type
-#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
-#define nd_ra_code nd_ra_hdr.icmp6_code
-#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
-#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
-#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
-#define nd_ra_type nd_ra_hdr.icmp6_type
-#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
-#define nd_rd_code nd_rd_hdr.icmp6_code
-#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
-#define nd_rd_type nd_rd_hdr.icmp6_type
-#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
-#define nd_rs_code nd_rs_hdr.icmp6_code
-#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
-#define nd_rs_type nd_rs_hdr.icmp6_type
-#define nearbyint(x) __tg_real(nearbyint, (x))
-#define nextafter(x,y) __tg_real_2(nextafter, (x), (y))
-#define nexttoward(x,y) __tg_real_2(nexttoward, (x), (y))
-#define nftw64 nftw
-#define no_argument 0
-#define noreturn _Noreturn
-#define not !
-#define not_eq !=
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_count(handle,section) ((handle)._counts[section] + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_getflag(handle,flag) (((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
-#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
-#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || (t) == ns_t_mailb || (t) == ns_t_maila)
-#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
-#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
-#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || (t) == ns_t_zxfr)
-#define off64_t off_t
-#define offsetof(t,d) __builtin_offsetof(t, d)
-#define open64 open
-#define openat64 openat
-#define optional_argument 2
-#define or ||
-#define or_eq |=
-#define posix_fadvise64 posix_fadvise
-#define posix_fallocate64 posix_fallocate
-#define pow(x,y) __tg_real_complex_pow((x), (y))
-#define powerof2(n) !(((n)-1) & (n))
-#define pread64 pread
-#define preadv64 preadv
-#define pwrite64 pwrite
-#define pwritev64 pwritev
-#define readdir64 readdir
-#define remainder(x,y) __tg_real_2(remainder, (x), (y))
-#define remquo(x,y,z) __tg_real_remquo((x), (y), (z))
-#define required_argument 1
-#define rint(x) __tg_real(rint, (x))
-#define round(x) __tg_real(round, (x))
-#define roundup(n,d) (howmany(n,d)*(d))
-#define rr_cksum rr_hdr.icmp6_cksum
-#define rr_code rr_hdr.icmp6_code
-#define rr_seqnum rr_hdr.icmp6_data32[0]
-#define rr_type rr_hdr.icmp6_type
-#define scalbln(x,y) __tg_real_2_1(scalbln, (x), (y))
-#define scalbn(x,y) __tg_real_2_1(scalbn, (x), (y))
-#define scandir64 scandir
-#define setbit(x,i) __bitop(x,i,|=)
-#define signbit(x) (__builtin_signbit(x))
-#define sin(x) __tg_real_complex(sin, (x))
-#define sinh(x) __tg_real_complex(sinh, (x))
-#define sqrt(x) __tg_real_complex(sqrt, (x))
-#define st_atime st_atim.tv_sec
-#define st_ctime st_ctim.tv_sec
-#define st_mtime st_mtim.tv_sec
-#define stat64 stat
-#define static_assert _Static_assert
-#define stderr (stderr)
-#define stdin (stdin)
-#define stdout (stdout)
-#define strdupa(x) strcpy(alloca(strlen(x)+1),x)
-#define tan(x) __tg_real_complex(tan, (x))
-#define tanh(x) __tg_real_complex(tanh, (x))
-#define telcmds ((char [][6]){ "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0 })
-#define tgamma(x) __tg_real(tgamma, (x))
-#define th_block th_u.tu_block
-#define th_code th_u.tu_code
-#define th_msg th_data
-#define th_stuff th_u.tu_stuff
-#define thrd_equal(A,B) ((A) == (B))
-#define thread_local _Thread_local
-#define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, ((a)->tv_usec = (s)->tv_usec + (t)->tv_usec) >= 1000000 && ((a)->tv_usec -= 1000000, (a)->tv_sec++) )
-#define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0)
-#define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec)
-#define timerisset(t) ((t)->tv_sec || (t)->tv_usec)
-#define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, ((a)->tv_usec = (s)->tv_usec - (t)->tv_usec) < 0 && ((a)->tv_usec += 1000000, (a)->tv_sec--) )
-#define true 1
-#define trunc(x) __tg_real(trunc, (x))
-#define uh_dport dest
-#define uh_sport source
-#define uh_sum check
-#define uh_ulen len
-#define va_arg(ap,type) __builtin_va_arg(ap, type)
-#define va_copy(dest,src) __builtin_va_copy(dest, src)
-#define va_end(ap) __builtin_va_end(ap)
-#define va_start(ap,param) __builtin_va_start(ap, param)
-#define versionsort64 versionsort
-#define xEOF 236
-#define xor ^
-#define xor_eq ^=
lib/libc/wasi/expected/wasm32-wasi/undefined-symbols.txt
@@ -1,68 +0,0 @@
-__addtf3
-__divtf3
-__eqtf2
-__extenddftf2
-__extendsftf2
-__fixtfdi
-__fixtfsi
-__fixunstfsi
-__floatsitf
-__floatunsitf
-__getf2
-__gttf2
-__heap_base
-__imported_wasi_snapshot_preview1_args_get
-__imported_wasi_snapshot_preview1_args_sizes_get
-__imported_wasi_snapshot_preview1_clock_res_get
-__imported_wasi_snapshot_preview1_clock_time_get
-__imported_wasi_snapshot_preview1_environ_get
-__imported_wasi_snapshot_preview1_environ_sizes_get
-__imported_wasi_snapshot_preview1_fd_advise
-__imported_wasi_snapshot_preview1_fd_allocate
-__imported_wasi_snapshot_preview1_fd_close
-__imported_wasi_snapshot_preview1_fd_datasync
-__imported_wasi_snapshot_preview1_fd_fdstat_get
-__imported_wasi_snapshot_preview1_fd_fdstat_set_flags
-__imported_wasi_snapshot_preview1_fd_fdstat_set_rights
-__imported_wasi_snapshot_preview1_fd_filestat_get
-__imported_wasi_snapshot_preview1_fd_filestat_set_size
-__imported_wasi_snapshot_preview1_fd_filestat_set_times
-__imported_wasi_snapshot_preview1_fd_pread
-__imported_wasi_snapshot_preview1_fd_prestat_dir_name
-__imported_wasi_snapshot_preview1_fd_prestat_get
-__imported_wasi_snapshot_preview1_fd_pwrite
-__imported_wasi_snapshot_preview1_fd_read
-__imported_wasi_snapshot_preview1_fd_readdir
-__imported_wasi_snapshot_preview1_fd_renumber
-__imported_wasi_snapshot_preview1_fd_seek
-__imported_wasi_snapshot_preview1_fd_sync
-__imported_wasi_snapshot_preview1_fd_tell
-__imported_wasi_snapshot_preview1_fd_write
-__imported_wasi_snapshot_preview1_path_create_directory
-__imported_wasi_snapshot_preview1_path_filestat_get
-__imported_wasi_snapshot_preview1_path_filestat_set_times
-__imported_wasi_snapshot_preview1_path_link
-__imported_wasi_snapshot_preview1_path_open
-__imported_wasi_snapshot_preview1_path_readlink
-__imported_wasi_snapshot_preview1_path_remove_directory
-__imported_wasi_snapshot_preview1_path_rename
-__imported_wasi_snapshot_preview1_path_symlink
-__imported_wasi_snapshot_preview1_path_unlink_file
-__imported_wasi_snapshot_preview1_poll_oneoff
-__imported_wasi_snapshot_preview1_proc_exit
-__imported_wasi_snapshot_preview1_proc_raise
-__imported_wasi_snapshot_preview1_random_get
-__imported_wasi_snapshot_preview1_sched_yield
-__imported_wasi_snapshot_preview1_sock_recv
-__imported_wasi_snapshot_preview1_sock_send
-__imported_wasi_snapshot_preview1_sock_shutdown
-__letf2
-__lttf2
-__netf2
-__stack_pointer
-__subtf3
-__trunctfdf2
-__trunctfsf2
-__unordtf2
-__wasm_call_ctors
-main
lib/libc/wasi/libc-bottom-half/headers/public/netinet/in.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_netinet_in_h
-#define __wasilibc_netinet_in_h
-
-#include <__header_netinet_in.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/ioctl.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_sys_ioctl_h
-#define __wasilibc_sys_ioctl_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc ioctl implementations.
- */
-#include <__header_sys_ioctl.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/resource.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_sys_resource_h
-#define __wasilibc_sys_resource_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc resource implementations.
- */
-#include <__header_sys_resource.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/select.h
@@ -1,18 +0,0 @@
-#ifndef __wasilibc_sys_select_h
-#define __wasilibc_sys_select_h
-
-#include <__fd_set.h>
-#include <__struct_timespec.h>
-#include <__struct_timeval.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/socket.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_sys_socket_h
-#define __wasilibc_sys_socket_h
-
-#include <__header_sys_socket.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/stat.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_sys_stat_h
-#define __wasilibc_sys_stat_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc stat implementations.
- */
-#include <__header_sys_stat.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/time.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_sys_time_h
-#define __wasilibc_sys_time_h
-
-#include <__struct_timeval.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/times.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_sys_times_h
-#define __wasilibc_sys_times_h
-
-#include <__struct_tms.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/types.h
@@ -1,16 +0,0 @@
-#ifndef __wasilibc_sys_types_h
-#define __wasilibc_sys_types_h
-
-#define __need_size_t
-#include <stddef.h>
-
-#include <__typedef_clock_t.h>
-#include <__typedef_time_t.h>
-#include <__typedef_blksize_t.h>
-#include <__typedef_off_t.h>
-#include <__typedef_ssize_t.h>
-#include <__typedef_suseconds_t.h>
-#include <__typedef_nlink_t.h>
-#include <__typedef_clockid_t.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/uio.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_sys_uio_h
-#define __wasilibc_sys_uio_h
-
-#include <__struct_iovec.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/sys/un.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc_sys_un_h
-#define __wasilibc_sys_un_h
-
-#include <__struct_sockaddr_un.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wasi/api.h
@@ -1,2280 +0,0 @@
-/**
- * THIS FILE IS AUTO-GENERATED from the following files:
- *   wasi_snapshot_preview1.witx
- *
- * To regenerate this file execute:
- *
- *     cargo run --manifest-path tools/wasi-headers/Cargo.toml generate-libc
- *
- * Modifications to this file will cause CI to fail, the code generator tool
- * must be modified to change this file.
- *
- * @file
- * This file describes the [WASI] interface, consisting of functions, types,
- * and defined values (macros).
- *
- * The interface described here is greatly inspired by [CloudABI]'s clean,
- * thoughtfully-designed, capability-oriented, POSIX-style API.
- *
- * [CloudABI]: https://github.com/NuxiNL/cloudlibc
- * [WASI]: https://github.com/WebAssembly/WASI/
- */
-
-#ifndef __wasi_api_h
-#define __wasi_api_h
-
-#ifndef __wasi__
-#error <wasi/api.h> is only supported on WASI platforms.
-#endif
-
-#ifndef __wasm32__
-#error <wasi/api.h> only supports wasm32; doesn't yet support wasm64
-#endif
-
-#include <stddef.h>
-#include <stdint.h>
-
-_Static_assert(_Alignof(int8_t) == 1, "non-wasi data layout");
-_Static_assert(_Alignof(uint8_t) == 1, "non-wasi data layout");
-_Static_assert(_Alignof(int16_t) == 2, "non-wasi data layout");
-_Static_assert(_Alignof(uint16_t) == 2, "non-wasi data layout");
-_Static_assert(_Alignof(int32_t) == 4, "non-wasi data layout");
-_Static_assert(_Alignof(uint32_t) == 4, "non-wasi data layout");
-_Static_assert(_Alignof(int64_t) == 8, "non-wasi data layout");
-_Static_assert(_Alignof(uint64_t) == 8, "non-wasi data layout");
-_Static_assert(_Alignof(void*) == 4, "non-wasi data layout");
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// TODO: Encoding this in witx.
-#define __WASI_DIRCOOKIE_START (UINT64_C(0))
-typedef __SIZE_TYPE__ __wasi_size_t;
-
-_Static_assert(sizeof(__wasi_size_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_size_t) == 4, "witx calculated align");
-
-/**
- * Non-negative file size or length of a region within a file.
- */
-typedef uint64_t __wasi_filesize_t;
-
-_Static_assert(sizeof(__wasi_filesize_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_filesize_t) == 8, "witx calculated align");
-
-/**
- * Timestamp in nanoseconds.
- */
-typedef uint64_t __wasi_timestamp_t;
-
-_Static_assert(sizeof(__wasi_timestamp_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_timestamp_t) == 8, "witx calculated align");
-
-/**
- * Identifiers for clocks.
- */
-typedef uint32_t __wasi_clockid_t;
-
-/**
- * The clock measuring real time. Time value zero corresponds with
- * 1970-01-01T00:00:00Z.
- */
-#define __WASI_CLOCKID_REALTIME (UINT32_C(0))
-
-/**
- * The store-wide monotonic clock, which is defined as a clock measuring
- * real time, whose value cannot be adjusted and which cannot have negative
- * clock jumps. The epoch of this clock is undefined. The absolute time
- * value of this clock therefore has no meaning.
- */
-#define __WASI_CLOCKID_MONOTONIC (UINT32_C(1))
-
-/**
- * The CPU-time clock associated with the current process.
- */
-#define __WASI_CLOCKID_PROCESS_CPUTIME_ID (UINT32_C(2))
-
-/**
- * The CPU-time clock associated with the current thread.
- */
-#define __WASI_CLOCKID_THREAD_CPUTIME_ID (UINT32_C(3))
-
-_Static_assert(sizeof(__wasi_clockid_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_clockid_t) == 4, "witx calculated align");
-
-/**
- * Error codes returned by functions.
- * Not all of these error codes are returned by the functions provided by this
- * API; some are used in higher-level library layers, and others are provided
- * merely for alignment with POSIX.
- */
-typedef uint16_t __wasi_errno_t;
-
-/**
- * No error occurred. System call completed successfully.
- */
-#define __WASI_ERRNO_SUCCESS (UINT16_C(0))
-
-/**
- * Argument list too long.
- */
-#define __WASI_ERRNO_2BIG (UINT16_C(1))
-
-/**
- * Permission denied.
- */
-#define __WASI_ERRNO_ACCES (UINT16_C(2))
-
-/**
- * Address in use.
- */
-#define __WASI_ERRNO_ADDRINUSE (UINT16_C(3))
-
-/**
- * Address not available.
- */
-#define __WASI_ERRNO_ADDRNOTAVAIL (UINT16_C(4))
-
-/**
- * Address family not supported.
- */
-#define __WASI_ERRNO_AFNOSUPPORT (UINT16_C(5))
-
-/**
- * Resource unavailable, or operation would block.
- */
-#define __WASI_ERRNO_AGAIN (UINT16_C(6))
-
-/**
- * Connection already in progress.
- */
-#define __WASI_ERRNO_ALREADY (UINT16_C(7))
-
-/**
- * Bad file descriptor.
- */
-#define __WASI_ERRNO_BADF (UINT16_C(8))
-
-/**
- * Bad message.
- */
-#define __WASI_ERRNO_BADMSG (UINT16_C(9))
-
-/**
- * Device or resource busy.
- */
-#define __WASI_ERRNO_BUSY (UINT16_C(10))
-
-/**
- * Operation canceled.
- */
-#define __WASI_ERRNO_CANCELED (UINT16_C(11))
-
-/**
- * No child processes.
- */
-#define __WASI_ERRNO_CHILD (UINT16_C(12))
-
-/**
- * Connection aborted.
- */
-#define __WASI_ERRNO_CONNABORTED (UINT16_C(13))
-
-/**
- * Connection refused.
- */
-#define __WASI_ERRNO_CONNREFUSED (UINT16_C(14))
-
-/**
- * Connection reset.
- */
-#define __WASI_ERRNO_CONNRESET (UINT16_C(15))
-
-/**
- * Resource deadlock would occur.
- */
-#define __WASI_ERRNO_DEADLK (UINT16_C(16))
-
-/**
- * Destination address required.
- */
-#define __WASI_ERRNO_DESTADDRREQ (UINT16_C(17))
-
-/**
- * Mathematics argument out of domain of function.
- */
-#define __WASI_ERRNO_DOM (UINT16_C(18))
-
-/**
- * Reserved.
- */
-#define __WASI_ERRNO_DQUOT (UINT16_C(19))
-
-/**
- * File exists.
- */
-#define __WASI_ERRNO_EXIST (UINT16_C(20))
-
-/**
- * Bad address.
- */
-#define __WASI_ERRNO_FAULT (UINT16_C(21))
-
-/**
- * File too large.
- */
-#define __WASI_ERRNO_FBIG (UINT16_C(22))
-
-/**
- * Host is unreachable.
- */
-#define __WASI_ERRNO_HOSTUNREACH (UINT16_C(23))
-
-/**
- * Identifier removed.
- */
-#define __WASI_ERRNO_IDRM (UINT16_C(24))
-
-/**
- * Illegal byte sequence.
- */
-#define __WASI_ERRNO_ILSEQ (UINT16_C(25))
-
-/**
- * Operation in progress.
- */
-#define __WASI_ERRNO_INPROGRESS (UINT16_C(26))
-
-/**
- * Interrupted function.
- */
-#define __WASI_ERRNO_INTR (UINT16_C(27))
-
-/**
- * Invalid argument.
- */
-#define __WASI_ERRNO_INVAL (UINT16_C(28))
-
-/**
- * I/O error.
- */
-#define __WASI_ERRNO_IO (UINT16_C(29))
-
-/**
- * Socket is connected.
- */
-#define __WASI_ERRNO_ISCONN (UINT16_C(30))
-
-/**
- * Is a directory.
- */
-#define __WASI_ERRNO_ISDIR (UINT16_C(31))
-
-/**
- * Too many levels of symbolic links.
- */
-#define __WASI_ERRNO_LOOP (UINT16_C(32))
-
-/**
- * File descriptor value too large.
- */
-#define __WASI_ERRNO_MFILE (UINT16_C(33))
-
-/**
- * Too many links.
- */
-#define __WASI_ERRNO_MLINK (UINT16_C(34))
-
-/**
- * Message too large.
- */
-#define __WASI_ERRNO_MSGSIZE (UINT16_C(35))
-
-/**
- * Reserved.
- */
-#define __WASI_ERRNO_MULTIHOP (UINT16_C(36))
-
-/**
- * Filename too long.
- */
-#define __WASI_ERRNO_NAMETOOLONG (UINT16_C(37))
-
-/**
- * Network is down.
- */
-#define __WASI_ERRNO_NETDOWN (UINT16_C(38))
-
-/**
- * Connection aborted by network.
- */
-#define __WASI_ERRNO_NETRESET (UINT16_C(39))
-
-/**
- * Network unreachable.
- */
-#define __WASI_ERRNO_NETUNREACH (UINT16_C(40))
-
-/**
- * Too many files open in system.
- */
-#define __WASI_ERRNO_NFILE (UINT16_C(41))
-
-/**
- * No buffer space available.
- */
-#define __WASI_ERRNO_NOBUFS (UINT16_C(42))
-
-/**
- * No such device.
- */
-#define __WASI_ERRNO_NODEV (UINT16_C(43))
-
-/**
- * No such file or directory.
- */
-#define __WASI_ERRNO_NOENT (UINT16_C(44))
-
-/**
- * Executable file format error.
- */
-#define __WASI_ERRNO_NOEXEC (UINT16_C(45))
-
-/**
- * No locks available.
- */
-#define __WASI_ERRNO_NOLCK (UINT16_C(46))
-
-/**
- * Reserved.
- */
-#define __WASI_ERRNO_NOLINK (UINT16_C(47))
-
-/**
- * Not enough space.
- */
-#define __WASI_ERRNO_NOMEM (UINT16_C(48))
-
-/**
- * No message of the desired type.
- */
-#define __WASI_ERRNO_NOMSG (UINT16_C(49))
-
-/**
- * Protocol not available.
- */
-#define __WASI_ERRNO_NOPROTOOPT (UINT16_C(50))
-
-/**
- * No space left on device.
- */
-#define __WASI_ERRNO_NOSPC (UINT16_C(51))
-
-/**
- * Function not supported.
- */
-#define __WASI_ERRNO_NOSYS (UINT16_C(52))
-
-/**
- * The socket is not connected.
- */
-#define __WASI_ERRNO_NOTCONN (UINT16_C(53))
-
-/**
- * Not a directory or a symbolic link to a directory.
- */
-#define __WASI_ERRNO_NOTDIR (UINT16_C(54))
-
-/**
- * Directory not empty.
- */
-#define __WASI_ERRNO_NOTEMPTY (UINT16_C(55))
-
-/**
- * State not recoverable.
- */
-#define __WASI_ERRNO_NOTRECOVERABLE (UINT16_C(56))
-
-/**
- * Not a socket.
- */
-#define __WASI_ERRNO_NOTSOCK (UINT16_C(57))
-
-/**
- * Not supported, or operation not supported on socket.
- */
-#define __WASI_ERRNO_NOTSUP (UINT16_C(58))
-
-/**
- * Inappropriate I/O control operation.
- */
-#define __WASI_ERRNO_NOTTY (UINT16_C(59))
-
-/**
- * No such device or address.
- */
-#define __WASI_ERRNO_NXIO (UINT16_C(60))
-
-/**
- * Value too large to be stored in data type.
- */
-#define __WASI_ERRNO_OVERFLOW (UINT16_C(61))
-
-/**
- * Previous owner died.
- */
-#define __WASI_ERRNO_OWNERDEAD (UINT16_C(62))
-
-/**
- * Operation not permitted.
- */
-#define __WASI_ERRNO_PERM (UINT16_C(63))
-
-/**
- * Broken pipe.
- */
-#define __WASI_ERRNO_PIPE (UINT16_C(64))
-
-/**
- * Protocol error.
- */
-#define __WASI_ERRNO_PROTO (UINT16_C(65))
-
-/**
- * Protocol not supported.
- */
-#define __WASI_ERRNO_PROTONOSUPPORT (UINT16_C(66))
-
-/**
- * Protocol wrong type for socket.
- */
-#define __WASI_ERRNO_PROTOTYPE (UINT16_C(67))
-
-/**
- * Result too large.
- */
-#define __WASI_ERRNO_RANGE (UINT16_C(68))
-
-/**
- * Read-only file system.
- */
-#define __WASI_ERRNO_ROFS (UINT16_C(69))
-
-/**
- * Invalid seek.
- */
-#define __WASI_ERRNO_SPIPE (UINT16_C(70))
-
-/**
- * No such process.
- */
-#define __WASI_ERRNO_SRCH (UINT16_C(71))
-
-/**
- * Reserved.
- */
-#define __WASI_ERRNO_STALE (UINT16_C(72))
-
-/**
- * Connection timed out.
- */
-#define __WASI_ERRNO_TIMEDOUT (UINT16_C(73))
-
-/**
- * Text file busy.
- */
-#define __WASI_ERRNO_TXTBSY (UINT16_C(74))
-
-/**
- * Cross-device link.
- */
-#define __WASI_ERRNO_XDEV (UINT16_C(75))
-
-/**
- * Extension: Capabilities insufficient.
- */
-#define __WASI_ERRNO_NOTCAPABLE (UINT16_C(76))
-
-_Static_assert(sizeof(__wasi_errno_t) == 2, "witx calculated size");
-_Static_assert(_Alignof(__wasi_errno_t) == 2, "witx calculated align");
-
-/**
- * File descriptor rights, determining which actions may be performed.
- */
-typedef uint64_t __wasi_rights_t;
-
-/**
- * The right to invoke `fd_datasync`.
- * If `path_open` is set, includes the right to invoke
- * `path_open` with `fdflags::dsync`.
- */
-#define __WASI_RIGHTS_FD_DATASYNC ((__wasi_rights_t)(1 << 0))
-
-/**
- * The right to invoke `fd_read` and `sock_recv`.
- * If `rights::fd_seek` is set, includes the right to invoke `fd_pread`.
- */
-#define __WASI_RIGHTS_FD_READ ((__wasi_rights_t)(1 << 1))
-
-/**
- * The right to invoke `fd_seek`. This flag implies `rights::fd_tell`.
- */
-#define __WASI_RIGHTS_FD_SEEK ((__wasi_rights_t)(1 << 2))
-
-/**
- * The right to invoke `fd_fdstat_set_flags`.
- */
-#define __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS ((__wasi_rights_t)(1 << 3))
-
-/**
- * The right to invoke `fd_sync`.
- * If `path_open` is set, includes the right to invoke
- * `path_open` with `fdflags::rsync` and `fdflags::dsync`.
- */
-#define __WASI_RIGHTS_FD_SYNC ((__wasi_rights_t)(1 << 4))
-
-/**
- * The right to invoke `fd_seek` in such a way that the file offset
- * remains unaltered (i.e., `whence::cur` with offset zero), or to
- * invoke `fd_tell`.
- */
-#define __WASI_RIGHTS_FD_TELL ((__wasi_rights_t)(1 << 5))
-
-/**
- * The right to invoke `fd_write` and `sock_send`.
- * If `rights::fd_seek` is set, includes the right to invoke `fd_pwrite`.
- */
-#define __WASI_RIGHTS_FD_WRITE ((__wasi_rights_t)(1 << 6))
-
-/**
- * The right to invoke `fd_advise`.
- */
-#define __WASI_RIGHTS_FD_ADVISE ((__wasi_rights_t)(1 << 7))
-
-/**
- * The right to invoke `fd_allocate`.
- */
-#define __WASI_RIGHTS_FD_ALLOCATE ((__wasi_rights_t)(1 << 8))
-
-/**
- * The right to invoke `path_create_directory`.
- */
-#define __WASI_RIGHTS_PATH_CREATE_DIRECTORY ((__wasi_rights_t)(1 << 9))
-
-/**
- * If `path_open` is set, the right to invoke `path_open` with `oflags::creat`.
- */
-#define __WASI_RIGHTS_PATH_CREATE_FILE ((__wasi_rights_t)(1 << 10))
-
-/**
- * The right to invoke `path_link` with the file descriptor as the
- * source directory.
- */
-#define __WASI_RIGHTS_PATH_LINK_SOURCE ((__wasi_rights_t)(1 << 11))
-
-/**
- * The right to invoke `path_link` with the file descriptor as the
- * target directory.
- */
-#define __WASI_RIGHTS_PATH_LINK_TARGET ((__wasi_rights_t)(1 << 12))
-
-/**
- * The right to invoke `path_open`.
- */
-#define __WASI_RIGHTS_PATH_OPEN ((__wasi_rights_t)(1 << 13))
-
-/**
- * The right to invoke `fd_readdir`.
- */
-#define __WASI_RIGHTS_FD_READDIR ((__wasi_rights_t)(1 << 14))
-
-/**
- * The right to invoke `path_readlink`.
- */
-#define __WASI_RIGHTS_PATH_READLINK ((__wasi_rights_t)(1 << 15))
-
-/**
- * The right to invoke `path_rename` with the file descriptor as the source directory.
- */
-#define __WASI_RIGHTS_PATH_RENAME_SOURCE ((__wasi_rights_t)(1 << 16))
-
-/**
- * The right to invoke `path_rename` with the file descriptor as the target directory.
- */
-#define __WASI_RIGHTS_PATH_RENAME_TARGET ((__wasi_rights_t)(1 << 17))
-
-/**
- * The right to invoke `path_filestat_get`.
- */
-#define __WASI_RIGHTS_PATH_FILESTAT_GET ((__wasi_rights_t)(1 << 18))
-
-/**
- * The right to change a file's size (there is no `path_filestat_set_size`).
- * If `path_open` is set, includes the right to invoke `path_open` with `oflags::trunc`.
- */
-#define __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE ((__wasi_rights_t)(1 << 19))
-
-/**
- * The right to invoke `path_filestat_set_times`.
- */
-#define __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES ((__wasi_rights_t)(1 << 20))
-
-/**
- * The right to invoke `fd_filestat_get`.
- */
-#define __WASI_RIGHTS_FD_FILESTAT_GET ((__wasi_rights_t)(1 << 21))
-
-/**
- * The right to invoke `fd_filestat_set_size`.
- */
-#define __WASI_RIGHTS_FD_FILESTAT_SET_SIZE ((__wasi_rights_t)(1 << 22))
-
-/**
- * The right to invoke `fd_filestat_set_times`.
- */
-#define __WASI_RIGHTS_FD_FILESTAT_SET_TIMES ((__wasi_rights_t)(1 << 23))
-
-/**
- * The right to invoke `path_symlink`.
- */
-#define __WASI_RIGHTS_PATH_SYMLINK ((__wasi_rights_t)(1 << 24))
-
-/**
- * The right to invoke `path_remove_directory`.
- */
-#define __WASI_RIGHTS_PATH_REMOVE_DIRECTORY ((__wasi_rights_t)(1 << 25))
-
-/**
- * The right to invoke `path_unlink_file`.
- */
-#define __WASI_RIGHTS_PATH_UNLINK_FILE ((__wasi_rights_t)(1 << 26))
-
-/**
- * If `rights::fd_read` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype::fd_read`.
- * If `rights::fd_write` is set, includes the right to invoke `poll_oneoff` to subscribe to `eventtype::fd_write`.
- */
-#define __WASI_RIGHTS_POLL_FD_READWRITE ((__wasi_rights_t)(1 << 27))
-
-/**
- * The right to invoke `sock_shutdown`.
- */
-#define __WASI_RIGHTS_SOCK_SHUTDOWN ((__wasi_rights_t)(1 << 28))
-
-/**
- * A file descriptor handle.
- */
-typedef int __wasi_fd_t;
-
-_Static_assert(sizeof(__wasi_fd_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_fd_t) == 4, "witx calculated align");
-
-/**
- * A region of memory for scatter/gather reads.
- */
-typedef struct __wasi_iovec_t {
-    /**
-     * The address of the buffer to be filled.
-     */
-    uint8_t * buf;
-
-    /**
-     * The length of the buffer to be filled.
-     */
-    __wasi_size_t buf_len;
-
-} __wasi_iovec_t;
-
-_Static_assert(sizeof(__wasi_iovec_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_iovec_t) == 4, "witx calculated align");
-_Static_assert(offsetof(__wasi_iovec_t, buf) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_iovec_t, buf_len) == 4, "witx calculated offset");
-
-/**
- * A region of memory for scatter/gather writes.
- */
-typedef struct __wasi_ciovec_t {
-    /**
-     * The address of the buffer to be written.
-     */
-    const uint8_t * buf;
-
-    /**
-     * The length of the buffer to be written.
-     */
-    __wasi_size_t buf_len;
-
-} __wasi_ciovec_t;
-
-_Static_assert(sizeof(__wasi_ciovec_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_ciovec_t) == 4, "witx calculated align");
-_Static_assert(offsetof(__wasi_ciovec_t, buf) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_ciovec_t, buf_len) == 4, "witx calculated offset");
-
-/**
- * Relative offset within a file.
- */
-typedef int64_t __wasi_filedelta_t;
-
-_Static_assert(sizeof(__wasi_filedelta_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_filedelta_t) == 8, "witx calculated align");
-
-/**
- * The position relative to which to set the offset of the file descriptor.
- */
-typedef uint8_t __wasi_whence_t;
-
-/**
- * Seek relative to start-of-file.
- */
-#define __WASI_WHENCE_SET (UINT8_C(0))
-
-/**
- * Seek relative to current position.
- */
-#define __WASI_WHENCE_CUR (UINT8_C(1))
-
-/**
- * Seek relative to end-of-file.
- */
-#define __WASI_WHENCE_END (UINT8_C(2))
-
-_Static_assert(sizeof(__wasi_whence_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_whence_t) == 1, "witx calculated align");
-
-/**
- * A reference to the offset of a directory entry.
- * 
- * The value 0 signifies the start of the directory.
- */
-typedef uint64_t __wasi_dircookie_t;
-
-_Static_assert(sizeof(__wasi_dircookie_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_dircookie_t) == 8, "witx calculated align");
-
-/**
- * The type for the `dirent::d_namlen` field of `dirent` struct.
- */
-typedef uint32_t __wasi_dirnamlen_t;
-
-_Static_assert(sizeof(__wasi_dirnamlen_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_dirnamlen_t) == 4, "witx calculated align");
-
-/**
- * File serial number that is unique within its file system.
- */
-typedef uint64_t __wasi_inode_t;
-
-_Static_assert(sizeof(__wasi_inode_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_inode_t) == 8, "witx calculated align");
-
-/**
- * The type of a file descriptor or file.
- */
-typedef uint8_t __wasi_filetype_t;
-
-/**
- * The type of the file descriptor or file is unknown or is different from any of the other types specified.
- */
-#define __WASI_FILETYPE_UNKNOWN (UINT8_C(0))
-
-/**
- * The file descriptor or file refers to a block device inode.
- */
-#define __WASI_FILETYPE_BLOCK_DEVICE (UINT8_C(1))
-
-/**
- * The file descriptor or file refers to a character device inode.
- */
-#define __WASI_FILETYPE_CHARACTER_DEVICE (UINT8_C(2))
-
-/**
- * The file descriptor or file refers to a directory inode.
- */
-#define __WASI_FILETYPE_DIRECTORY (UINT8_C(3))
-
-/**
- * The file descriptor or file refers to a regular file inode.
- */
-#define __WASI_FILETYPE_REGULAR_FILE (UINT8_C(4))
-
-/**
- * The file descriptor or file refers to a datagram socket.
- */
-#define __WASI_FILETYPE_SOCKET_DGRAM (UINT8_C(5))
-
-/**
- * The file descriptor or file refers to a byte-stream socket.
- */
-#define __WASI_FILETYPE_SOCKET_STREAM (UINT8_C(6))
-
-/**
- * The file refers to a symbolic link inode.
- */
-#define __WASI_FILETYPE_SYMBOLIC_LINK (UINT8_C(7))
-
-_Static_assert(sizeof(__wasi_filetype_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_filetype_t) == 1, "witx calculated align");
-
-/**
- * A directory entry.
- */
-typedef struct __wasi_dirent_t {
-    /**
-     * The offset of the next directory entry stored in this directory.
-     */
-    __wasi_dircookie_t d_next;
-
-    /**
-     * The serial number of the file referred to by this directory entry.
-     */
-    __wasi_inode_t d_ino;
-
-    /**
-     * The length of the name of the directory entry.
-     */
-    __wasi_dirnamlen_t d_namlen;
-
-    /**
-     * The type of the file referred to by this directory entry.
-     */
-    __wasi_filetype_t d_type;
-
-} __wasi_dirent_t;
-
-_Static_assert(sizeof(__wasi_dirent_t) == 24, "witx calculated size");
-_Static_assert(_Alignof(__wasi_dirent_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_dirent_t, d_next) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_dirent_t, d_ino) == 8, "witx calculated offset");
-_Static_assert(offsetof(__wasi_dirent_t, d_namlen) == 16, "witx calculated offset");
-_Static_assert(offsetof(__wasi_dirent_t, d_type) == 20, "witx calculated offset");
-
-/**
- * File or memory access pattern advisory information.
- */
-typedef uint8_t __wasi_advice_t;
-
-/**
- * The application has no advice to give on its behavior with respect to the specified data.
- */
-#define __WASI_ADVICE_NORMAL (UINT8_C(0))
-
-/**
- * The application expects to access the specified data sequentially from lower offsets to higher offsets.
- */
-#define __WASI_ADVICE_SEQUENTIAL (UINT8_C(1))
-
-/**
- * The application expects to access the specified data in a random order.
- */
-#define __WASI_ADVICE_RANDOM (UINT8_C(2))
-
-/**
- * The application expects to access the specified data in the near future.
- */
-#define __WASI_ADVICE_WILLNEED (UINT8_C(3))
-
-/**
- * The application expects that it will not access the specified data in the near future.
- */
-#define __WASI_ADVICE_DONTNEED (UINT8_C(4))
-
-/**
- * The application expects to access the specified data once and then not reuse it thereafter.
- */
-#define __WASI_ADVICE_NOREUSE (UINT8_C(5))
-
-_Static_assert(sizeof(__wasi_advice_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_advice_t) == 1, "witx calculated align");
-
-/**
- * File descriptor flags.
- */
-typedef uint16_t __wasi_fdflags_t;
-
-/**
- * Append mode: Data written to the file is always appended to the file's end.
- */
-#define __WASI_FDFLAGS_APPEND ((__wasi_fdflags_t)(1 << 0))
-
-/**
- * Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.
- */
-#define __WASI_FDFLAGS_DSYNC ((__wasi_fdflags_t)(1 << 1))
-
-/**
- * Non-blocking mode.
- */
-#define __WASI_FDFLAGS_NONBLOCK ((__wasi_fdflags_t)(1 << 2))
-
-/**
- * Synchronized read I/O operations.
- */
-#define __WASI_FDFLAGS_RSYNC ((__wasi_fdflags_t)(1 << 3))
-
-/**
- * Write according to synchronized I/O file integrity completion. In
- * addition to synchronizing the data stored in the file, the implementation
- * may also synchronously update the file's metadata.
- */
-#define __WASI_FDFLAGS_SYNC ((__wasi_fdflags_t)(1 << 4))
-
-/**
- * File descriptor attributes.
- */
-typedef struct __wasi_fdstat_t {
-    /**
-     * File type.
-     */
-    __wasi_filetype_t fs_filetype;
-
-    /**
-     * File descriptor flags.
-     */
-    __wasi_fdflags_t fs_flags;
-
-    /**
-     * Rights that apply to this file descriptor.
-     */
-    __wasi_rights_t fs_rights_base;
-
-    /**
-     * Maximum set of rights that may be installed on new file descriptors that
-     * are created through this file descriptor, e.g., through `path_open`.
-     */
-    __wasi_rights_t fs_rights_inheriting;
-
-} __wasi_fdstat_t;
-
-_Static_assert(sizeof(__wasi_fdstat_t) == 24, "witx calculated size");
-_Static_assert(_Alignof(__wasi_fdstat_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_fdstat_t, fs_filetype) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_fdstat_t, fs_flags) == 2, "witx calculated offset");
-_Static_assert(offsetof(__wasi_fdstat_t, fs_rights_base) == 8, "witx calculated offset");
-_Static_assert(offsetof(__wasi_fdstat_t, fs_rights_inheriting) == 16, "witx calculated offset");
-
-/**
- * Identifier for a device containing a file system. Can be used in combination
- * with `inode` to uniquely identify a file or directory in the filesystem.
- */
-typedef uint64_t __wasi_device_t;
-
-_Static_assert(sizeof(__wasi_device_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_device_t) == 8, "witx calculated align");
-
-/**
- * Which file time attributes to adjust.
- */
-typedef uint16_t __wasi_fstflags_t;
-
-/**
- * Adjust the last data access timestamp to the value stored in `filestat::atim`.
- */
-#define __WASI_FSTFLAGS_ATIM ((__wasi_fstflags_t)(1 << 0))
-
-/**
- * Adjust the last data access timestamp to the time of clock `clockid::realtime`.
- */
-#define __WASI_FSTFLAGS_ATIM_NOW ((__wasi_fstflags_t)(1 << 1))
-
-/**
- * Adjust the last data modification timestamp to the value stored in `filestat::mtim`.
- */
-#define __WASI_FSTFLAGS_MTIM ((__wasi_fstflags_t)(1 << 2))
-
-/**
- * Adjust the last data modification timestamp to the time of clock `clockid::realtime`.
- */
-#define __WASI_FSTFLAGS_MTIM_NOW ((__wasi_fstflags_t)(1 << 3))
-
-/**
- * Flags determining the method of how paths are resolved.
- */
-typedef uint32_t __wasi_lookupflags_t;
-
-/**
- * As long as the resolved path corresponds to a symbolic link, it is expanded.
- */
-#define __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW ((__wasi_lookupflags_t)(1 << 0))
-
-/**
- * Open flags used by `path_open`.
- */
-typedef uint16_t __wasi_oflags_t;
-
-/**
- * Create file if it does not exist.
- */
-#define __WASI_OFLAGS_CREAT ((__wasi_oflags_t)(1 << 0))
-
-/**
- * Fail if not a directory.
- */
-#define __WASI_OFLAGS_DIRECTORY ((__wasi_oflags_t)(1 << 1))
-
-/**
- * Fail if file already exists.
- */
-#define __WASI_OFLAGS_EXCL ((__wasi_oflags_t)(1 << 2))
-
-/**
- * Truncate file to size 0.
- */
-#define __WASI_OFLAGS_TRUNC ((__wasi_oflags_t)(1 << 3))
-
-/**
- * Number of hard links to an inode.
- */
-typedef uint64_t __wasi_linkcount_t;
-
-_Static_assert(sizeof(__wasi_linkcount_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_linkcount_t) == 8, "witx calculated align");
-
-/**
- * File attributes.
- */
-typedef struct __wasi_filestat_t {
-    /**
-     * Device ID of device containing the file.
-     */
-    __wasi_device_t dev;
-
-    /**
-     * File serial number.
-     */
-    __wasi_inode_t ino;
-
-    /**
-     * File type.
-     */
-    __wasi_filetype_t filetype;
-
-    /**
-     * Number of hard links to the file.
-     */
-    __wasi_linkcount_t nlink;
-
-    /**
-     * For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link.
-     */
-    __wasi_filesize_t size;
-
-    /**
-     * Last data access timestamp.
-     */
-    __wasi_timestamp_t atim;
-
-    /**
-     * Last data modification timestamp.
-     */
-    __wasi_timestamp_t mtim;
-
-    /**
-     * Last file status change timestamp.
-     */
-    __wasi_timestamp_t ctim;
-
-} __wasi_filestat_t;
-
-_Static_assert(sizeof(__wasi_filestat_t) == 64, "witx calculated size");
-_Static_assert(_Alignof(__wasi_filestat_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_filestat_t, dev) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, ino) == 8, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, filetype) == 16, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, nlink) == 24, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, size) == 32, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, atim) == 40, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, mtim) == 48, "witx calculated offset");
-_Static_assert(offsetof(__wasi_filestat_t, ctim) == 56, "witx calculated offset");
-
-/**
- * User-provided value that may be attached to objects that is retained when
- * extracted from the implementation.
- */
-typedef uint64_t __wasi_userdata_t;
-
-_Static_assert(sizeof(__wasi_userdata_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_userdata_t) == 8, "witx calculated align");
-
-/**
- * Type of a subscription to an event or its occurrence.
- */
-typedef uint8_t __wasi_eventtype_t;
-
-/**
- * The time value of clock `subscription_clock::id` has
- * reached timestamp `subscription_clock::timeout`.
- */
-#define __WASI_EVENTTYPE_CLOCK (UINT8_C(0))
-
-/**
- * File descriptor `subscription_fd_readwrite::file_descriptor` has data
- * available for reading. This event always triggers for regular files.
- */
-#define __WASI_EVENTTYPE_FD_READ (UINT8_C(1))
-
-/**
- * File descriptor `subscription_fd_readwrite::file_descriptor` has capacity
- * available for writing. This event always triggers for regular files.
- */
-#define __WASI_EVENTTYPE_FD_WRITE (UINT8_C(2))
-
-_Static_assert(sizeof(__wasi_eventtype_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_eventtype_t) == 1, "witx calculated align");
-
-/**
- * The state of the file descriptor subscribed to with
- * `eventtype::fd_read` or `eventtype::fd_write`.
- */
-typedef uint16_t __wasi_eventrwflags_t;
-
-/**
- * The peer of this socket has closed or disconnected.
- */
-#define __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP ((__wasi_eventrwflags_t)(1 << 0))
-
-/**
- * The contents of an `event` when type is `eventtype::fd_read` or
- * `eventtype::fd_write`.
- */
-typedef struct __wasi_event_fd_readwrite_t {
-    /**
-     * The number of bytes available for reading or writing.
-     */
-    __wasi_filesize_t nbytes;
-
-    /**
-     * The state of the file descriptor.
-     */
-    __wasi_eventrwflags_t flags;
-
-} __wasi_event_fd_readwrite_t;
-
-_Static_assert(sizeof(__wasi_event_fd_readwrite_t) == 16, "witx calculated size");
-_Static_assert(_Alignof(__wasi_event_fd_readwrite_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_event_fd_readwrite_t, nbytes) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_event_fd_readwrite_t, flags) == 8, "witx calculated offset");
-
-/**
- * An event that occurred.
- */
-typedef struct __wasi_event_t {
-    /**
-     * User-provided value that got attached to `subscription::userdata`.
-     */
-    __wasi_userdata_t userdata;
-
-    /**
-     * If non-zero, an error that occurred while processing the subscription request.
-     */
-    __wasi_errno_t error;
-
-    /**
-     * The type of event that occured
-     */
-    __wasi_eventtype_t type;
-
-    /**
-     * The contents of the event, if it is an `eventtype::fd_read` or
-     * `eventtype::fd_write`. `eventtype::clock` events ignore this field.
-     */
-    __wasi_event_fd_readwrite_t fd_readwrite;
-
-} __wasi_event_t;
-
-_Static_assert(sizeof(__wasi_event_t) == 32, "witx calculated size");
-_Static_assert(_Alignof(__wasi_event_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_event_t, userdata) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_event_t, error) == 8, "witx calculated offset");
-_Static_assert(offsetof(__wasi_event_t, type) == 10, "witx calculated offset");
-_Static_assert(offsetof(__wasi_event_t, fd_readwrite) == 16, "witx calculated offset");
-
-/**
- * Flags determining how to interpret the timestamp provided in
- * `subscription_clock::timeout`.
- */
-typedef uint16_t __wasi_subclockflags_t;
-
-/**
- * If set, treat the timestamp provided in
- * `subscription_clock::timeout` as an absolute timestamp of clock
- * `subscription_clock::id`. If clear, treat the timestamp
- * provided in `subscription_clock::timeout` relative to the
- * current time value of clock `subscription_clock::id`.
- */
-#define __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME ((__wasi_subclockflags_t)(1 << 0))
-
-/**
- * The contents of a `subscription` when type is `eventtype::clock`.
- */
-typedef struct __wasi_subscription_clock_t {
-    /**
-     * The clock against which to compare the timestamp.
-     */
-    __wasi_clockid_t id;
-
-    /**
-     * The absolute or relative timestamp.
-     */
-    __wasi_timestamp_t timeout;
-
-    /**
-     * The amount of time that the implementation may wait additionally
-     * to coalesce with other events.
-     */
-    __wasi_timestamp_t precision;
-
-    /**
-     * Flags specifying whether the timeout is absolute or relative
-     */
-    __wasi_subclockflags_t flags;
-
-} __wasi_subscription_clock_t;
-
-_Static_assert(sizeof(__wasi_subscription_clock_t) == 32, "witx calculated size");
-_Static_assert(_Alignof(__wasi_subscription_clock_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_subscription_clock_t, id) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_subscription_clock_t, timeout) == 8, "witx calculated offset");
-_Static_assert(offsetof(__wasi_subscription_clock_t, precision) == 16, "witx calculated offset");
-_Static_assert(offsetof(__wasi_subscription_clock_t, flags) == 24, "witx calculated offset");
-
-/**
- * The contents of a `subscription` when type is type is
- * `eventtype::fd_read` or `eventtype::fd_write`.
- */
-typedef struct __wasi_subscription_fd_readwrite_t {
-    /**
-     * The file descriptor on which to wait for it to become ready for reading or writing.
-     */
-    __wasi_fd_t file_descriptor;
-
-} __wasi_subscription_fd_readwrite_t;
-
-_Static_assert(sizeof(__wasi_subscription_fd_readwrite_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_subscription_fd_readwrite_t) == 4, "witx calculated align");
-_Static_assert(offsetof(__wasi_subscription_fd_readwrite_t, file_descriptor) == 0, "witx calculated offset");
-
-/**
- * The contents of a `subscription`.
- */
-typedef union __wasi_subscription_u_u_t {
-    __wasi_subscription_clock_t clock;
-    __wasi_subscription_fd_readwrite_t fd_read;
-    __wasi_subscription_fd_readwrite_t fd_write;
-} __wasi_subscription_u_u_t;
-typedef struct __wasi_subscription_u_t {
-    uint8_t tag;
-    __wasi_subscription_u_u_t u;
-} __wasi_subscription_u_t;
-
-_Static_assert(sizeof(__wasi_subscription_u_t) == 40, "witx calculated size");
-_Static_assert(_Alignof(__wasi_subscription_u_t) == 8, "witx calculated align");
-
-/**
- * Subscription to an event.
- */
-typedef struct __wasi_subscription_t {
-    /**
-     * User-provided value that is attached to the subscription in the
-     * implementation and returned through `event::userdata`.
-     */
-    __wasi_userdata_t userdata;
-
-    /**
-     * The type of the event to which to subscribe, and its contents
-     */
-    __wasi_subscription_u_t u;
-
-} __wasi_subscription_t;
-
-_Static_assert(sizeof(__wasi_subscription_t) == 48, "witx calculated size");
-_Static_assert(_Alignof(__wasi_subscription_t) == 8, "witx calculated align");
-_Static_assert(offsetof(__wasi_subscription_t, userdata) == 0, "witx calculated offset");
-_Static_assert(offsetof(__wasi_subscription_t, u) == 8, "witx calculated offset");
-
-/**
- * Exit code generated by a process when exiting.
- */
-typedef uint32_t __wasi_exitcode_t;
-
-_Static_assert(sizeof(__wasi_exitcode_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_exitcode_t) == 4, "witx calculated align");
-
-/**
- * Signal condition.
- */
-typedef uint8_t __wasi_signal_t;
-
-/**
- * No signal. Note that POSIX has special semantics for `kill(pid, 0)`,
- * so this value is reserved.
- */
-#define __WASI_SIGNAL_NONE (UINT8_C(0))
-
-/**
- * Hangup.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_HUP (UINT8_C(1))
-
-/**
- * Terminate interrupt signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_INT (UINT8_C(2))
-
-/**
- * Terminal quit signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_QUIT (UINT8_C(3))
-
-/**
- * Illegal instruction.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ILL (UINT8_C(4))
-
-/**
- * Trace/breakpoint trap.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_TRAP (UINT8_C(5))
-
-/**
- * Process abort signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ABRT (UINT8_C(6))
-
-/**
- * Access to an undefined portion of a memory object.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_BUS (UINT8_C(7))
-
-/**
- * Erroneous arithmetic operation.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_FPE (UINT8_C(8))
-
-/**
- * Kill.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_KILL (UINT8_C(9))
-
-/**
- * User-defined signal 1.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_USR1 (UINT8_C(10))
-
-/**
- * Invalid memory reference.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_SEGV (UINT8_C(11))
-
-/**
- * User-defined signal 2.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_USR2 (UINT8_C(12))
-
-/**
- * Write on a pipe with no one to read it.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_PIPE (UINT8_C(13))
-
-/**
- * Alarm clock.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ALRM (UINT8_C(14))
-
-/**
- * Termination signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_TERM (UINT8_C(15))
-
-/**
- * Child process terminated, stopped, or continued.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_CHLD (UINT8_C(16))
-
-/**
- * Continue executing, if stopped.
- * Action: Continues executing, if stopped.
- */
-#define __WASI_SIGNAL_CONT (UINT8_C(17))
-
-/**
- * Stop executing.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_STOP (UINT8_C(18))
-
-/**
- * Terminal stop signal.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TSTP (UINT8_C(19))
-
-/**
- * Background process attempting read.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TTIN (UINT8_C(20))
-
-/**
- * Background process attempting write.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TTOU (UINT8_C(21))
-
-/**
- * High bandwidth data is available at a socket.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_URG (UINT8_C(22))
-
-/**
- * CPU time limit exceeded.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_XCPU (UINT8_C(23))
-
-/**
- * File size limit exceeded.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_XFSZ (UINT8_C(24))
-
-/**
- * Virtual timer expired.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_VTALRM (UINT8_C(25))
-
-/**
- * Profiling timer expired.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_PROF (UINT8_C(26))
-
-/**
- * Window changed.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_WINCH (UINT8_C(27))
-
-/**
- * I/O possible.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_POLL (UINT8_C(28))
-
-/**
- * Power failure.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_PWR (UINT8_C(29))
-
-/**
- * Bad system call.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_SYS (UINT8_C(30))
-
-_Static_assert(sizeof(__wasi_signal_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_signal_t) == 1, "witx calculated align");
-
-/**
- * Flags provided to `sock_recv`.
- */
-typedef uint16_t __wasi_riflags_t;
-
-/**
- * Returns the message without removing it from the socket's receive queue.
- */
-#define __WASI_RIFLAGS_RECV_PEEK ((__wasi_riflags_t)(1 << 0))
-
-/**
- * On byte-stream sockets, block until the full amount of data can be returned.
- */
-#define __WASI_RIFLAGS_RECV_WAITALL ((__wasi_riflags_t)(1 << 1))
-
-/**
- * Flags returned by `sock_recv`.
- */
-typedef uint16_t __wasi_roflags_t;
-
-/**
- * Returned by `sock_recv`: Message data has been truncated.
- */
-#define __WASI_ROFLAGS_RECV_DATA_TRUNCATED ((__wasi_roflags_t)(1 << 0))
-
-/**
- * Flags provided to `sock_send`. As there are currently no flags
- * defined, it must be set to zero.
- */
-typedef uint16_t __wasi_siflags_t;
-
-_Static_assert(sizeof(__wasi_siflags_t) == 2, "witx calculated size");
-_Static_assert(_Alignof(__wasi_siflags_t) == 2, "witx calculated align");
-
-/**
- * Which channels on a socket to shut down.
- */
-typedef uint8_t __wasi_sdflags_t;
-
-/**
- * Disables further receive operations.
- */
-#define __WASI_SDFLAGS_RD ((__wasi_sdflags_t)(1 << 0))
-
-/**
- * Disables further send operations.
- */
-#define __WASI_SDFLAGS_WR ((__wasi_sdflags_t)(1 << 1))
-
-/**
- * Identifiers for preopened capabilities.
- */
-typedef uint8_t __wasi_preopentype_t;
-
-/**
- * A pre-opened directory.
- */
-#define __WASI_PREOPENTYPE_DIR (UINT8_C(0))
-
-_Static_assert(sizeof(__wasi_preopentype_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_preopentype_t) == 1, "witx calculated align");
-
-/**
- * The contents of a $prestat when type is `preopentype::dir`.
- */
-typedef struct __wasi_prestat_dir_t {
-    /**
-     * The length of the directory name for use with `fd_prestat_dir_name`.
-     */
-    __wasi_size_t pr_name_len;
-
-} __wasi_prestat_dir_t;
-
-_Static_assert(sizeof(__wasi_prestat_dir_t) == 4, "witx calculated size");
-_Static_assert(_Alignof(__wasi_prestat_dir_t) == 4, "witx calculated align");
-_Static_assert(offsetof(__wasi_prestat_dir_t, pr_name_len) == 0, "witx calculated offset");
-
-/**
- * Information about a pre-opened capability.
- */
-typedef union __wasi_prestat_u_t {
-    __wasi_prestat_dir_t dir;
-} __wasi_prestat_u_t;
-typedef struct __wasi_prestat_t {
-    uint8_t tag;
-    __wasi_prestat_u_t u;
-} __wasi_prestat_t;
-
-_Static_assert(sizeof(__wasi_prestat_t) == 8, "witx calculated size");
-_Static_assert(_Alignof(__wasi_prestat_t) == 4, "witx calculated align");
-
-/**
- * @defgroup wasi_snapshot_preview1
- * @{
- */
-
-/**
- * Read command-line argument data.
- * The size of the array should match that returned by `args_sizes_get`
- */
-__wasi_errno_t __wasi_args_get(
-    uint8_t * * argv,
-    uint8_t * argv_buf
-) __attribute__((__warn_unused_result__));
-/**
- * Return command-line argument data sizes.
- * @return
- * Returns the number of arguments and the size of the argument string
- * data, or an error.
- */
-__wasi_errno_t __wasi_args_sizes_get(
-    __wasi_size_t *retptr0,
-    __wasi_size_t *retptr1
-) __attribute__((__warn_unused_result__));
-/**
- * Read environment variable data.
- * The sizes of the buffers should match that returned by `environ_sizes_get`.
- */
-__wasi_errno_t __wasi_environ_get(
-    uint8_t * * environ,
-    uint8_t * environ_buf
-) __attribute__((__warn_unused_result__));
-/**
- * Return environment variable data sizes.
- * @return
- * Returns the number of environment variable arguments and the size of the
- * environment variable data.
- */
-__wasi_errno_t __wasi_environ_sizes_get(
-    __wasi_size_t *retptr0,
-    __wasi_size_t *retptr1
-) __attribute__((__warn_unused_result__));
-/**
- * Return the resolution of a clock.
- * Implementations are required to provide a non-zero value for supported clocks. For unsupported clocks,
- * return `errno::inval`.
- * Note: This is similar to `clock_getres` in POSIX.
- * @return
- * The resolution of the clock, or an error if one happened.
- */
-__wasi_errno_t __wasi_clock_res_get(
-    /**
-     * The clock for which to return the resolution.
-     */
-    __wasi_clockid_t id,
-    __wasi_timestamp_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Return the time value of a clock.
- * Note: This is similar to `clock_gettime` in POSIX.
- * @return
- * The time value of the clock.
- */
-__wasi_errno_t __wasi_clock_time_get(
-    /**
-     * The clock for which to return the time.
-     */
-    __wasi_clockid_t id,
-    /**
-     * The maximum lag (exclusive) that the returned time value may have, compared to its actual value.
-     */
-    __wasi_timestamp_t precision,
-    __wasi_timestamp_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Provide file advisory information on a file descriptor.
- * Note: This is similar to `posix_fadvise` in POSIX.
- */
-__wasi_errno_t __wasi_fd_advise(
-    __wasi_fd_t fd,
-    /**
-     * The offset within the file to which the advisory applies.
-     */
-    __wasi_filesize_t offset,
-    /**
-     * The length of the region to which the advisory applies.
-     */
-    __wasi_filesize_t len,
-    /**
-     * The advice.
-     */
-    __wasi_advice_t advice
-) __attribute__((__warn_unused_result__));
-/**
- * Force the allocation of space in a file.
- * Note: This is similar to `posix_fallocate` in POSIX.
- */
-__wasi_errno_t __wasi_fd_allocate(
-    __wasi_fd_t fd,
-    /**
-     * The offset at which to start the allocation.
-     */
-    __wasi_filesize_t offset,
-    /**
-     * The length of the area that is allocated.
-     */
-    __wasi_filesize_t len
-) __attribute__((__warn_unused_result__));
-/**
- * Close a file descriptor.
- * Note: This is similar to `close` in POSIX.
- */
-__wasi_errno_t __wasi_fd_close(
-    __wasi_fd_t fd
-) __attribute__((__warn_unused_result__));
-/**
- * Synchronize the data of a file to disk.
- * Note: This is similar to `fdatasync` in POSIX.
- */
-__wasi_errno_t __wasi_fd_datasync(
-    __wasi_fd_t fd
-) __attribute__((__warn_unused_result__));
-/**
- * Get the attributes of a file descriptor.
- * Note: This returns similar flags to `fsync(fd, F_GETFL)` in POSIX, as well as additional fields.
- * @return
- * The buffer where the file descriptor's attributes are stored.
- */
-__wasi_errno_t __wasi_fd_fdstat_get(
-    __wasi_fd_t fd,
-    __wasi_fdstat_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Adjust the flags associated with a file descriptor.
- * Note: This is similar to `fcntl(fd, F_SETFL, flags)` in POSIX.
- */
-__wasi_errno_t __wasi_fd_fdstat_set_flags(
-    __wasi_fd_t fd,
-    /**
-     * The desired values of the file descriptor flags.
-     */
-    __wasi_fdflags_t flags
-) __attribute__((__warn_unused_result__));
-/**
- * Adjust the rights associated with a file descriptor.
- * This can only be used to remove rights, and returns `errno::notcapable` if called in a way that would attempt to add rights
- */
-__wasi_errno_t __wasi_fd_fdstat_set_rights(
-    __wasi_fd_t fd,
-    /**
-     * The desired rights of the file descriptor.
-     */
-    __wasi_rights_t fs_rights_base,
-    __wasi_rights_t fs_rights_inheriting
-) __attribute__((__warn_unused_result__));
-/**
- * Return the attributes of an open file.
- * @return
- * The buffer where the file's attributes are stored.
- */
-__wasi_errno_t __wasi_fd_filestat_get(
-    __wasi_fd_t fd,
-    __wasi_filestat_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Adjust the size of an open file. If this increases the file's size, the extra bytes are filled with zeros.
- * Note: This is similar to `ftruncate` in POSIX.
- */
-__wasi_errno_t __wasi_fd_filestat_set_size(
-    __wasi_fd_t fd,
-    /**
-     * The desired file size.
-     */
-    __wasi_filesize_t size
-) __attribute__((__warn_unused_result__));
-/**
- * Adjust the timestamps of an open file or directory.
- * Note: This is similar to `futimens` in POSIX.
- */
-__wasi_errno_t __wasi_fd_filestat_set_times(
-    __wasi_fd_t fd,
-    /**
-     * The desired values of the data access timestamp.
-     */
-    __wasi_timestamp_t atim,
-    /**
-     * The desired values of the data modification timestamp.
-     */
-    __wasi_timestamp_t mtim,
-    /**
-     * A bitmask indicating which timestamps to adjust.
-     */
-    __wasi_fstflags_t fst_flags
-) __attribute__((__warn_unused_result__));
-/**
- * Read from a file descriptor, without using and updating the file descriptor's offset.
- * Note: This is similar to `preadv` in POSIX.
- * @return
- * The number of bytes read.
- */
-__wasi_errno_t __wasi_fd_pread(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors in which to store data.
-     */
-    const __wasi_iovec_t *iovs,
-    /**
-     * The length of the array pointed to by `iovs`.
-     */
-    size_t iovs_len,
-    /**
-     * The offset within the file at which to read.
-     */
-    __wasi_filesize_t offset,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Return a description of the given preopened file descriptor.
- * @return
- * The buffer where the description is stored.
- */
-__wasi_errno_t __wasi_fd_prestat_get(
-    __wasi_fd_t fd,
-    __wasi_prestat_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Return a description of the given preopened file descriptor.
- */
-__wasi_errno_t __wasi_fd_prestat_dir_name(
-    __wasi_fd_t fd,
-    /**
-     * A buffer into which to write the preopened directory name.
-     */
-    uint8_t * path,
-    __wasi_size_t path_len
-) __attribute__((__warn_unused_result__));
-/**
- * Write to a file descriptor, without using and updating the file descriptor's offset.
- * Note: This is similar to `pwritev` in POSIX.
- * @return
- * The number of bytes written.
- */
-__wasi_errno_t __wasi_fd_pwrite(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors from which to retrieve data.
-     */
-    const __wasi_ciovec_t *iovs,
-    /**
-     * The length of the array pointed to by `iovs`.
-     */
-    size_t iovs_len,
-    /**
-     * The offset within the file at which to write.
-     */
-    __wasi_filesize_t offset,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Read from a file descriptor.
- * Note: This is similar to `readv` in POSIX.
- * @return
- * The number of bytes read.
- */
-__wasi_errno_t __wasi_fd_read(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors to which to store data.
-     */
-    const __wasi_iovec_t *iovs,
-    /**
-     * The length of the array pointed to by `iovs`.
-     */
-    size_t iovs_len,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Read directory entries from a directory.
- * When successful, the contents of the output buffer consist of a sequence of
- * directory entries. Each directory entry consists of a `dirent` object,
- * followed by `dirent::d_namlen` bytes holding the name of the directory
- * entry.
- * This function fills the output buffer as much as possible, potentially
- * truncating the last directory entry. This allows the caller to grow its
- * read buffer size in case it's too small to fit a single large directory
- * entry, or skip the oversized directory entry.
- * @return
- * The number of bytes stored in the read buffer. If less than the size of the read buffer, the end of the directory has been reached.
- */
-__wasi_errno_t __wasi_fd_readdir(
-    __wasi_fd_t fd,
-    /**
-     * The buffer where directory entries are stored
-     */
-    uint8_t * buf,
-    __wasi_size_t buf_len,
-    /**
-     * The location within the directory to start reading
-     */
-    __wasi_dircookie_t cookie,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Atomically replace a file descriptor by renumbering another file descriptor.
- * Due to the strong focus on thread safety, this environment does not provide
- * a mechanism to duplicate or renumber a file descriptor to an arbitrary
- * number, like `dup2()`. This would be prone to race conditions, as an actual
- * file descriptor with the same number could be allocated by a different
- * thread at the same time.
- * This function provides a way to atomically renumber file descriptors, which
- * would disappear if `dup2()` were to be removed entirely.
- */
-__wasi_errno_t __wasi_fd_renumber(
-    __wasi_fd_t fd,
-    /**
-     * The file descriptor to overwrite.
-     */
-    __wasi_fd_t to
-) __attribute__((__warn_unused_result__));
-/**
- * Move the offset of a file descriptor.
- * Note: This is similar to `lseek` in POSIX.
- * @return
- * The new offset of the file descriptor, relative to the start of the file.
- */
-__wasi_errno_t __wasi_fd_seek(
-    __wasi_fd_t fd,
-    /**
-     * The number of bytes to move.
-     */
-    __wasi_filedelta_t offset,
-    /**
-     * The base from which the offset is relative.
-     */
-    __wasi_whence_t whence,
-    __wasi_filesize_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Synchronize the data and metadata of a file to disk.
- * Note: This is similar to `fsync` in POSIX.
- */
-__wasi_errno_t __wasi_fd_sync(
-    __wasi_fd_t fd
-) __attribute__((__warn_unused_result__));
-/**
- * Return the current offset of a file descriptor.
- * Note: This is similar to `lseek(fd, 0, SEEK_CUR)` in POSIX.
- * @return
- * The current offset of the file descriptor, relative to the start of the file.
- */
-__wasi_errno_t __wasi_fd_tell(
-    __wasi_fd_t fd,
-    __wasi_filesize_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Write to a file descriptor.
- * Note: This is similar to `writev` in POSIX.
- */
-__wasi_errno_t __wasi_fd_write(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors from which to retrieve data.
-     */
-    const __wasi_ciovec_t *iovs,
-    /**
-     * The length of the array pointed to by `iovs`.
-     */
-    size_t iovs_len,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Create a directory.
- * Note: This is similar to `mkdirat` in POSIX.
- */
-__wasi_errno_t __wasi_path_create_directory(
-    __wasi_fd_t fd,
-    /**
-     * The path at which to create the directory.
-     */
-    const char *path
-) __attribute__((__warn_unused_result__));
-/**
- * Return the attributes of a file or directory.
- * Note: This is similar to `stat` in POSIX.
- * @return
- * The buffer where the file's attributes are stored.
- */
-__wasi_errno_t __wasi_path_filestat_get(
-    __wasi_fd_t fd,
-    /**
-     * Flags determining the method of how the path is resolved.
-     */
-    __wasi_lookupflags_t flags,
-    /**
-     * The path of the file or directory to inspect.
-     */
-    const char *path,
-    __wasi_filestat_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Adjust the timestamps of a file or directory.
- * Note: This is similar to `utimensat` in POSIX.
- */
-__wasi_errno_t __wasi_path_filestat_set_times(
-    __wasi_fd_t fd,
-    /**
-     * Flags determining the method of how the path is resolved.
-     */
-    __wasi_lookupflags_t flags,
-    /**
-     * The path of the file or directory to operate on.
-     */
-    const char *path,
-    /**
-     * The desired values of the data access timestamp.
-     */
-    __wasi_timestamp_t atim,
-    /**
-     * The desired values of the data modification timestamp.
-     */
-    __wasi_timestamp_t mtim,
-    /**
-     * A bitmask indicating which timestamps to adjust.
-     */
-    __wasi_fstflags_t fst_flags
-) __attribute__((__warn_unused_result__));
-/**
- * Create a hard link.
- * Note: This is similar to `linkat` in POSIX.
- */
-__wasi_errno_t __wasi_path_link(
-    __wasi_fd_t old_fd,
-    /**
-     * Flags determining the method of how the path is resolved.
-     */
-    __wasi_lookupflags_t old_flags,
-    /**
-     * The source path from which to link.
-     */
-    const char *old_path,
-    /**
-     * The working directory at which the resolution of the new path starts.
-     */
-    __wasi_fd_t new_fd,
-    /**
-     * The destination path at which to create the hard link.
-     */
-    const char *new_path
-) __attribute__((__warn_unused_result__));
-/**
- * Open a file or directory.
- * The returned file descriptor is not guaranteed to be the lowest-numbered
- * file descriptor not currently open; it is randomized to prevent
- * applications from depending on making assumptions about indexes, since this
- * is error-prone in multi-threaded contexts. The returned file descriptor is
- * guaranteed to be less than 2**31.
- * Note: This is similar to `openat` in POSIX.
- * @return
- * The file descriptor of the file that has been opened.
- */
-__wasi_errno_t __wasi_path_open(
-    __wasi_fd_t fd,
-    /**
-     * Flags determining the method of how the path is resolved.
-     */
-    __wasi_lookupflags_t dirflags,
-    /**
-     * The relative path of the file or directory to open, relative to the
-     * `path_open::fd` directory.
-     */
-    const char *path,
-    /**
-     * The method by which to open the file.
-     */
-    __wasi_oflags_t oflags,
-    /**
-     * The initial rights of the newly created file descriptor. The
-     * implementation is allowed to return a file descriptor with fewer rights
-     * than specified, if and only if those rights do not apply to the type of
-     * file being opened.
-     * The *base* rights are rights that will apply to operations using the file
-     * descriptor itself, while the *inheriting* rights are rights that apply to
-     * file descriptors derived from it.
-     */
-    __wasi_rights_t fs_rights_base,
-    __wasi_rights_t fs_rights_inheriting,
-    __wasi_fdflags_t fdflags,
-    __wasi_fd_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Read the contents of a symbolic link.
- * Note: This is similar to `readlinkat` in POSIX.
- * @return
- * The number of bytes placed in the buffer.
- */
-__wasi_errno_t __wasi_path_readlink(
-    __wasi_fd_t fd,
-    /**
-     * The path of the symbolic link from which to read.
-     */
-    const char *path,
-    /**
-     * The buffer to which to write the contents of the symbolic link.
-     */
-    uint8_t * buf,
-    __wasi_size_t buf_len,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Remove a directory.
- * Return `errno::notempty` if the directory is not empty.
- * Note: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX.
- */
-__wasi_errno_t __wasi_path_remove_directory(
-    __wasi_fd_t fd,
-    /**
-     * The path to a directory to remove.
-     */
-    const char *path
-) __attribute__((__warn_unused_result__));
-/**
- * Rename a file or directory.
- * Note: This is similar to `renameat` in POSIX.
- */
-__wasi_errno_t __wasi_path_rename(
-    __wasi_fd_t fd,
-    /**
-     * The source path of the file or directory to rename.
-     */
-    const char *old_path,
-    /**
-     * The working directory at which the resolution of the new path starts.
-     */
-    __wasi_fd_t new_fd,
-    /**
-     * The destination path to which to rename the file or directory.
-     */
-    const char *new_path
-) __attribute__((__warn_unused_result__));
-/**
- * Create a symbolic link.
- * Note: This is similar to `symlinkat` in POSIX.
- */
-__wasi_errno_t __wasi_path_symlink(
-    /**
-     * The contents of the symbolic link.
-     */
-    const char *old_path,
-    __wasi_fd_t fd,
-    /**
-     * The destination path at which to create the symbolic link.
-     */
-    const char *new_path
-) __attribute__((__warn_unused_result__));
-/**
- * Unlink a file.
- * Return `errno::isdir` if the path refers to a directory.
- * Note: This is similar to `unlinkat(fd, path, 0)` in POSIX.
- */
-__wasi_errno_t __wasi_path_unlink_file(
-    __wasi_fd_t fd,
-    /**
-     * The path to a file to unlink.
-     */
-    const char *path
-) __attribute__((__warn_unused_result__));
-/**
- * Concurrently poll for the occurrence of a set of events.
- * @return
- * The number of events stored.
- */
-__wasi_errno_t __wasi_poll_oneoff(
-    /**
-     * The events to which to subscribe.
-     */
-    const __wasi_subscription_t * in,
-    /**
-     * The events that have occurred.
-     */
-    __wasi_event_t * out,
-    /**
-     * Both the number of subscriptions and events.
-     */
-    __wasi_size_t nsubscriptions,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Terminate the process normally. An exit code of 0 indicates successful
- * termination of the program. The meanings of other values is dependent on
- * the environment.
- */
-_Noreturn void __wasi_proc_exit(
-    /**
-     * The exit code returned by the process.
-     */
-    __wasi_exitcode_t rval
-);
-/**
- * Send a signal to the process of the calling thread.
- * Note: This is similar to `raise` in POSIX.
- */
-__wasi_errno_t __wasi_proc_raise(
-    /**
-     * The signal condition to trigger.
-     */
-    __wasi_signal_t sig
-) __attribute__((__warn_unused_result__));
-/**
- * Temporarily yield execution of the calling thread.
- * Note: This is similar to `sched_yield` in POSIX.
- */
-__wasi_errno_t __wasi_sched_yield(
-    void
-) __attribute__((__warn_unused_result__));
-/**
- * Write high-quality random data into a buffer.
- * This function blocks when the implementation is unable to immediately
- * provide sufficient high-quality random data.
- * This function may execute slowly, so when large mounts of random data are
- * required, it's advisable to use this function to seed a pseudo-random
- * number generator, rather than to provide the random data directly.
- */
-__wasi_errno_t __wasi_random_get(
-    /**
-     * The buffer to fill with random data.
-     */
-    uint8_t * buf,
-    __wasi_size_t buf_len
-) __attribute__((__warn_unused_result__));
-/**
- * Receive a message from a socket.
- * Note: This is similar to `recv` in POSIX, though it also supports reading
- * the data into multiple buffers in the manner of `readv`.
- * @return
- * Number of bytes stored in ri_data and message flags.
- */
-__wasi_errno_t __wasi_sock_recv(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors to which to store data.
-     */
-    const __wasi_iovec_t *ri_data,
-    /**
-     * The length of the array pointed to by `ri_data`.
-     */
-    size_t ri_data_len,
-    /**
-     * Message flags.
-     */
-    __wasi_riflags_t ri_flags,
-    __wasi_size_t *retptr0,
-    __wasi_roflags_t *retptr1
-) __attribute__((__warn_unused_result__));
-/**
- * Send a message on a socket.
- * Note: This is similar to `send` in POSIX, though it also supports writing
- * the data from multiple buffers in the manner of `writev`.
- * @return
- * Number of bytes transmitted.
- */
-__wasi_errno_t __wasi_sock_send(
-    __wasi_fd_t fd,
-    /**
-     * List of scatter/gather vectors to which to retrieve data
-     */
-    const __wasi_ciovec_t *si_data,
-    /**
-     * The length of the array pointed to by `si_data`.
-     */
-    size_t si_data_len,
-    /**
-     * Message flags.
-     */
-    __wasi_siflags_t si_flags,
-    __wasi_size_t *retptr0
-) __attribute__((__warn_unused_result__));
-/**
- * Shut down socket send and receive channels.
- * Note: This is similar to `shutdown` in POSIX.
- */
-__wasi_errno_t __wasi_sock_shutdown(
-    __wasi_fd_t fd,
-    /**
-     * Which channels on the socket to shut down.
-     */
-    __wasi_sdflags_t how
-) __attribute__((__warn_unused_result__));
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wasi/libc-environ.h
@@ -1,19 +0,0 @@
-#ifndef __wasi_libc_environ_h
-#define __wasi_libc_environ_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/// Initialize the global environment variable state. Only needs to be
-/// called once; most users should call `__wasilibc_ensure_environ` instead.
-void __wasilibc_initialize_environ(void);
-
-/// If `__wasilibc_initialize_environ` has not yet been called, call it.
-void __wasilibc_ensure_environ(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wasi/libc-find-relpath.h
@@ -1,79 +0,0 @@
-#ifndef __wasi_libc_find_relpath_h
-#define __wasi_libc_find_relpath_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Look up the given `path`, relative to the cwd, in the preopened directory
- * map. If a suitable entry is found, then the file descriptor for that entry
- * is returned. Additionally the absolute path of the directory's file
- * descriptor is returned in `abs_prefix` and the relative portion that needs
- * to be opened is stored in `*relative_path`.
- *
- * The `relative_path` argument must be a pointer to a buffer valid  for
- * `relative_path_len` bytes, and this may be used as storage for the relative
- * portion of the path being returned through `*relative_path`.
- *
- * See documentation on `__wasilibc_find_abspath` for more info about what the
- * paths look like.
- *
- * Returns -1 on failure. Errno is set to either:
- *
- *  * ENOMEM - failed to allocate memory for internal routines.
- *  * ENOENT - the `path` could not be found relative to any preopened dir.
- *  * ERANGE - the `relative_path` buffer is too small to hold the relative path.
- */
-int __wasilibc_find_relpath(const char *path,
-                            const char **__restrict__ abs_prefix,
-                            char **relative_path,
-                            size_t relative_path_len);
-
-/**
- * Look up the given `path`, which is interpreted as absolute, in the preopened
- * directory map. If a suitable entry is found, then the file descriptor for
- * that entry is returned. Additionally the relative portion of the path to
- * where the fd is opened is returned through `relative_path`, the absolute
- * prefix which was matched is stored to `abs_prefix`, and `relative_path` may
- * be an interior pointer to the `abspath` string.
- *
- * The `abs_prefix` returned string will not contain a leading `/`. Note that
- * this may be the empty string. Additionally the returned `relative_path` will
- * not contain a leading `/`. The `relative_path` return will not return an
- * empty string, it will return `"."` instead if it would otherwise do so.
- *
- * Returns -1 on failure. Errno is set to either:
- *
- *  * ENOMEM - failed to allocate memory for internal routines.
- *  * ENOENT - the `path` could not be found relative to any preopened dir.
- */
-int __wasilibc_find_abspath(const char *abspath,
-                            const char **__restrict__ abs_prefix,
-                            const char **__restrict__ relative_path);
-
-/**
- * Same as `__wasilibc_find_relpath`, except that this function will interpret
- * `relative` as a malloc'd buffer that will be `realloc`'d to the appropriate
- * size to contain the relative path.
- *
- * Note that this is a weak symbol and if it's not defined you can use
- * `__wasilibc_find_relpath`. The weak-nature of this symbols means that if it's
- * not otherwise included in the compilation then `chdir` wasn't used an there's
- * no need for this symbol.
- *
- * See documentation on `__wasilibc_find_relpath` for more information.
- */
-int __wasilibc_find_relpath_alloc(
-    const char *path,
-    const char **abs,
-    char **relative,
-    size_t *relative_len,
-    int can_realloc
-) __attribute__((weak));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wasi/libc-nocwd.h
@@ -1,58 +0,0 @@
-#ifndef __wasi_libc_nocwd_h
-#define __wasi_libc_nocwd_h
-
-/*
- * In order to support AT_FDCWD, we need to wrap the *at functions to handle
- * it by calling back into the non-at versions which perform libpreopen
- * queries. These __wasilibc_nocwd_* forms are the underlying calls which
- * assume AT_FDCWD has already been resolved.
- */
-
-#define __need_size_t
-#include <stddef.h>
-#include <__typedef_ssize_t.h>
-#include <__typedef_mode_t.h>
-#include <__typedef_DIR.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct timespec;
-struct stat;
-struct dirent;
-
-int __wasilibc_nocwd___wasilibc_unlinkat(int, const char *)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd___wasilibc_rmdirat(int, const char *)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_linkat(int, const char *, int, const char *, int)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_symlinkat(const char *, int, const char *)
-    __attribute__((__warn_unused_result__));
-ssize_t __wasilibc_nocwd_readlinkat(int, const char *__restrict, char *__restrict, size_t)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_faccessat(int, const char *, int, int)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_renameat(int, const char *, int, const char *)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_openat_nomode(int, const char *, int)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_fstatat(int, const char *__restrict, struct stat *__restrict, int)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_mkdirat_nomode(int, const char *)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_utimensat(int, const char *, const struct timespec [2], int)
-    __attribute__((__warn_unused_result__));
-DIR *__wasilibc_nocwd_opendirat(int, const char *)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_nocwd_scandirat(int, const char *, struct dirent ***,
-                               int (*)(const struct dirent *),
-                               int (*)(const struct dirent **, const struct dirent **))
-    __attribute__((__warn_unused_result__));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wasi/libc.h
@@ -1,65 +0,0 @@
-#ifndef __wasi_libc_h
-#define __wasi_libc_h
-
-#include <__typedef_off_t.h>
-#include <__struct_timespec.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct stat;
-struct timespec;
-
-/// Register the given pre-opened file descriptor under the given path.
-///
-/// This function does not take ownership of `prefix` (it makes its own copy).
-int __wasilibc_register_preopened_fd(int fd, const char *prefix);
-
-/// Renumber `fd` to `newfd`; similar to `dup2` but does a move rather than a
-/// copy.
-int __wasilibc_fd_renumber(int fd, int newfd)
-    __attribute__((__warn_unused_result__));
-
-/// Like `unlinkat`, but without depending on `__wasi_path_remove_directory`.
-int __wasilibc_unlinkat(int fd, const char *path)
-    __attribute__((__warn_unused_result__));
-
-/// An `*at` version of rmdir.
-int __wasilibc_rmdirat(int fd, const char *path)
-    __attribute__((__warn_unused_result__));
-
-/// Like `open`, but without the varargs in the signature.
-int __wasilibc_open_nomode(const char *path, int oflag);
-
-/// Like `openat`, but without the varargs in the signature.
-int __wasilibc_openat_nomode(int fd, const char *path, int oflag);
-
-/// Return the current file offset. Like `lseek(fd, 0, SEEK_CUR)`, but without
-/// depending on `lseek`.
-off_t __wasilibc_tell(int fd)
-    __attribute__((__warn_unused_result__));
-
-/* Non-`at` forms of various `*at` functions. */
-int __wasilibc_access(const char *pathname, int mode, int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_stat(const char *__restrict pathname, struct stat *__restrict statbuf, int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_utimens(const char *pathname, const struct timespec times[2], int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_link(const char *oldpath, const char *newpath, int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_link_oldat(int olddirfd, const char *oldpath, const char *newpath, int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_link_newat(const char *oldpath, int newdirfd, const char *newpath, int flags)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_rename_oldat(int olddirfd, const char *oldpath, const char *newpath)
-    __attribute__((__warn_unused_result__));
-int __wasilibc_rename_newat(const char *oldpath, int newdirfd, const char *newpath)
-    __attribute__((__warn_unused_result__));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__errno.h
@@ -1,20 +0,0 @@
-#ifndef __wasilibc___errno_h
-#define __wasilibc___errno_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-extern thread_local int errno;
-#else
-extern _Thread_local int errno;
-#endif
-
-#define errno errno
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__errno_values.h
@@ -1,86 +0,0 @@
-#ifndef __wasilibc___errno_values_h
-#define __wasilibc___errno_values_h
-
-#include <wasi/api.h>
-
-#define E2BIG __WASI_ERRNO_2BIG
-#define EACCES __WASI_ERRNO_ACCES
-#define EADDRINUSE __WASI_ERRNO_ADDRINUSE
-#define EADDRNOTAVAIL __WASI_ERRNO_ADDRNOTAVAIL
-#define EAFNOSUPPORT __WASI_ERRNO_AFNOSUPPORT
-#define EAGAIN __WASI_ERRNO_AGAIN
-#define EALREADY __WASI_ERRNO_ALREADY
-#define EBADF __WASI_ERRNO_BADF
-#define EBADMSG __WASI_ERRNO_BADMSG
-#define EBUSY __WASI_ERRNO_BUSY
-#define ECANCELED __WASI_ERRNO_CANCELED
-#define ECHILD __WASI_ERRNO_CHILD
-#define ECONNABORTED __WASI_ERRNO_CONNABORTED
-#define ECONNREFUSED __WASI_ERRNO_CONNREFUSED
-#define ECONNRESET __WASI_ERRNO_CONNRESET
-#define EDEADLK __WASI_ERRNO_DEADLK
-#define EDESTADDRREQ __WASI_ERRNO_DESTADDRREQ
-#define EDOM __WASI_ERRNO_DOM
-#define EDQUOT __WASI_ERRNO_DQUOT
-#define EEXIST __WASI_ERRNO_EXIST
-#define EFAULT __WASI_ERRNO_FAULT
-#define EFBIG __WASI_ERRNO_FBIG
-#define EHOSTUNREACH __WASI_ERRNO_HOSTUNREACH
-#define EIDRM __WASI_ERRNO_IDRM
-#define EILSEQ __WASI_ERRNO_ILSEQ
-#define EINPROGRESS __WASI_ERRNO_INPROGRESS
-#define EINTR __WASI_ERRNO_INTR
-#define EINVAL __WASI_ERRNO_INVAL
-#define EIO __WASI_ERRNO_IO
-#define EISCONN __WASI_ERRNO_ISCONN
-#define EISDIR __WASI_ERRNO_ISDIR
-#define ELOOP __WASI_ERRNO_LOOP
-#define EMFILE __WASI_ERRNO_MFILE
-#define EMLINK __WASI_ERRNO_MLINK
-#define EMSGSIZE __WASI_ERRNO_MSGSIZE
-#define EMULTIHOP __WASI_ERRNO_MULTIHOP
-#define ENAMETOOLONG __WASI_ERRNO_NAMETOOLONG
-#define ENETDOWN __WASI_ERRNO_NETDOWN
-#define ENETRESET __WASI_ERRNO_NETRESET
-#define ENETUNREACH __WASI_ERRNO_NETUNREACH
-#define ENFILE __WASI_ERRNO_NFILE
-#define ENOBUFS __WASI_ERRNO_NOBUFS
-#define ENODEV __WASI_ERRNO_NODEV
-#define ENOENT __WASI_ERRNO_NOENT
-#define ENOEXEC __WASI_ERRNO_NOEXEC
-#define ENOLCK __WASI_ERRNO_NOLCK
-#define ENOLINK __WASI_ERRNO_NOLINK
-#define ENOMEM __WASI_ERRNO_NOMEM
-#define ENOMSG __WASI_ERRNO_NOMSG
-#define ENOPROTOOPT __WASI_ERRNO_NOPROTOOPT
-#define ENOSPC __WASI_ERRNO_NOSPC
-#define ENOSYS __WASI_ERRNO_NOSYS
-#define ENOTCONN __WASI_ERRNO_NOTCONN
-#define ENOTDIR __WASI_ERRNO_NOTDIR
-#define ENOTEMPTY __WASI_ERRNO_NOTEMPTY
-#define ENOTRECOVERABLE __WASI_ERRNO_NOTRECOVERABLE
-#define ENOTSOCK __WASI_ERRNO_NOTSOCK
-#define ENOTSUP __WASI_ERRNO_NOTSUP
-#define ENOTTY __WASI_ERRNO_NOTTY
-#define ENXIO __WASI_ERRNO_NXIO
-#define EOVERFLOW __WASI_ERRNO_OVERFLOW
-#define EOWNERDEAD __WASI_ERRNO_OWNERDEAD
-#define EPERM __WASI_ERRNO_PERM
-#define EPIPE __WASI_ERRNO_PIPE
-#define EPROTO __WASI_ERRNO_PROTO
-#define EPROTONOSUPPORT __WASI_ERRNO_PROTONOSUPPORT
-#define EPROTOTYPE __WASI_ERRNO_PROTOTYPE
-#define ERANGE __WASI_ERRNO_RANGE
-#define EROFS __WASI_ERRNO_ROFS
-#define ESPIPE __WASI_ERRNO_SPIPE
-#define ESRCH __WASI_ERRNO_SRCH
-#define ESTALE __WASI_ERRNO_STALE
-#define ETIMEDOUT __WASI_ERRNO_TIMEDOUT
-#define ETXTBSY __WASI_ERRNO_TXTBSY
-#define EXDEV __WASI_ERRNO_XDEV
-#define ENOTCAPABLE __WASI_ERRNO_NOTCAPABLE
-
-#define EOPNOTSUPP ENOTSUP
-#define EWOULDBLOCK EAGAIN
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__fd_set.h
@@ -1,76 +0,0 @@
-#ifndef __wasilibc___fd_set_h
-#define __wasilibc___fd_set_h
-
-#include <__typedef_fd_set.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline void FD_CLR(int __fd, fd_set *__set) {
-    size_t __n = __set->__nfds;
-    for (int *__p = __set->__fds, *__e = __p + __n;
-         __p < __e; ++__p)
-    {
-        if (*__p == __fd) {
-            *__p = __e[-1];
-            __set->__nfds = __n - 1;
-            return;
-        }
-    }
-}
-
-static __inline
-#ifdef __cplusplus
-bool
-#else
-_Bool
-#endif
-FD_ISSET(int __fd, const fd_set *__set)
-{
-    size_t __n = __set->__nfds;
-    for (const int *__p = __set->__fds, *__e = __p + __n;
-         __p < __e; ++__p)
-    {
-        if (*__p == __fd) {
-            return 1;
-        }
-    }
-    return 0;
-}
-
-static __inline void FD_SET(int __fd, fd_set *__set) {
-    size_t __n = __set->__nfds;
-    for (const int *__p = __set->__fds, *__e = __p + __n;
-         __p < __e; ++__p)
-    {
-        if (*__p == __fd) {
-            return;
-        }
-    }
-    __set->__nfds = __n + 1;
-    __set->__fds[__n] = __fd;
-}
-
-static __inline void FD_ZERO(fd_set *__set) {
-    __set->__nfds = 0;
-}
-
-static __inline void FD_COPY(const fd_set *__restrict __from,
-                             fd_set *__restrict __to) {
-    size_t __n = __from->__nfds;
-    __to->__nfds = __n;
-    __builtin_memcpy(__to->__fds, __from->__fds, __n * sizeof(int));
-}
-
-#define FD_CLR(fd, set)   (FD_CLR((fd), (set)))
-#define FD_ISSET(fd, set) (FD_ISSET((fd), (set)))
-#define FD_SET(fd, set)   (FD_SET((fd), (set)))
-#define FD_ZERO(set)      (FD_ZERO((set)))
-#define FD_COPY(from, to) (FD_COPY((from), (to)))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__function___isatty.h
@@ -1,14 +0,0 @@
-#ifndef __wasilibc___function___isatty_h
-#define __wasilibc___function___isatty_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int __isatty(int fd);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__functions_malloc.h
@@ -1,26 +0,0 @@
-#ifndef __wasilibc___functions_malloc_h
-#define __wasilibc___functions_malloc_h
-
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void *malloc(size_t __size) __attribute__((__malloc__, __warn_unused_result__));
-void free(void *__ptr);
-void *calloc(size_t __nmemb, size_t __size) __attribute__((__malloc__, __warn_unused_result__));
-void *realloc(void *__ptr, size_t __size) __attribute__((__warn_unused_result__));
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-void *reallocarray(void *__ptr, size_t __nmemb, size_t __size) __attribute__((__warn_unused_result__));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__functions_memcpy.h
@@ -1,20 +0,0 @@
-#ifndef __wasilibc___functions_memcpy_h
-#define __wasilibc___functions_memcpy_h
-
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void *memcpy(void *__restrict__ __dst, const void *__restrict__ __src, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
-void *memmove(void *__dst, const void *__src, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
-void *memset(void *__dst, int __c, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1)));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_dirent.h
@@ -1,39 +0,0 @@
-#ifndef __wasilibc___header_dirent_h
-#define __wasilibc___header_dirent_h
-
-#include <wasi/api.h>
-
-#define DT_BLK __WASI_FILETYPE_BLOCK_DEVICE
-#define DT_CHR __WASI_FILETYPE_CHARACTER_DEVICE
-#define DT_DIR __WASI_FILETYPE_DIRECTORY
-#define DT_FIFO __WASI_FILETYPE_SOCKET_STREAM
-#define DT_LNK __WASI_FILETYPE_SYMBOLIC_LINK
-#define DT_REG __WASI_FILETYPE_REGULAR_FILE
-#define DT_UNKNOWN __WASI_FILETYPE_UNKNOWN
-
-#include <__struct_dirent.h>
-#include <__typedef_DIR.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int closedir(DIR *);
-DIR *opendir(const char *);
-DIR *fdopendir(int);
-int fdclosedir(DIR *);
-struct dirent *readdir(DIR *);
-void rewinddir(DIR *);
-void seekdir(DIR *, long);
-long telldir(DIR *);
-DIR *opendirat(int, const char *);
-void rewinddir(DIR *);
-int scandirat(int, const char *, struct dirent ***,
-              int (*)(const struct dirent *),
-              int (*)(const struct dirent **, const struct dirent **));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_fcntl.h
@@ -1,61 +0,0 @@
-#ifndef __wasilibc___header_fcntl_h
-#define __wasilibc___header_fcntl_h
-
-#include <wasi/api.h>
-#include <__seek.h>
-#include <__mode_t.h>
-
-#define O_APPEND __WASI_FDFLAGS_APPEND
-#define O_DSYNC __WASI_FDFLAGS_DSYNC
-#define O_NONBLOCK __WASI_FDFLAGS_NONBLOCK
-#define O_RSYNC __WASI_FDFLAGS_RSYNC
-#define O_SYNC __WASI_FDFLAGS_SYNC
-#define O_CREAT (__WASI_OFLAGS_CREAT << 12)
-#define O_DIRECTORY (__WASI_OFLAGS_DIRECTORY << 12)
-#define O_EXCL (__WASI_OFLAGS_EXCL << 12)
-#define O_TRUNC (__WASI_OFLAGS_TRUNC << 12)
-
-#define O_NOFOLLOW (0x01000000)
-#define O_EXEC     (0x02000000)
-#define O_RDONLY   (0x04000000)
-#define O_SEARCH   (0x08000000)
-#define O_WRONLY   (0x10000000)
-
-/*
- * O_CLOEXEC is defined to be zero, as WASI has no exec-style functions.
- */
-#define O_CLOEXEC  (0)
-
-/*
- * O_TTY_INIT is defined to be zero, meaning that WASI implementations are
- * expected to always initialize a terminal the first time it's opened.
- */
-#define O_TTY_INIT (0)
-
-#define O_NOCTTY   (0)
-
-#define O_RDWR (O_RDONLY | O_WRONLY)
-#define O_ACCMODE (O_EXEC | O_RDWR | O_SEARCH)
-
-#define POSIX_FADV_DONTNEED __WASI_ADVICE_DONTNEED
-#define POSIX_FADV_NOREUSE __WASI_ADVICE_NOREUSE
-#define POSIX_FADV_NORMAL __WASI_ADVICE_NORMAL
-#define POSIX_FADV_RANDOM __WASI_ADVICE_RANDOM
-#define POSIX_FADV_SEQUENTIAL __WASI_ADVICE_SEQUENTIAL
-#define POSIX_FADV_WILLNEED __WASI_ADVICE_WILLNEED
-
-#define F_GETFD (1)
-#define F_SETFD (2)
-#define F_GETFL (3)
-#define F_SETFL (4)
-
-#define FD_CLOEXEC (1)
-
-#define AT_EACCESS          (0x0)
-#define AT_SYMLINK_NOFOLLOW (0x1)
-#define AT_SYMLINK_FOLLOW   (0x2)
-#define AT_REMOVEDIR        (0x4)
-
-#define AT_FDCWD (-2)
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_inttypes.h
@@ -1,182 +0,0 @@
-#ifndef __wasilibc___include_inttypes_h
-#define __wasilibc___include_inttypes_h
-
-#include <stdint.h>
-
-#define __need_wchar_t
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct { intmax_t quot, rem; } imaxdiv_t;
-
-intmax_t  imaxabs(intmax_t);
-imaxdiv_t imaxdiv(intmax_t, intmax_t);
-intmax_t  strtoimax(const char *__restrict, char **__restrict, int);
-uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
-intmax_t  wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
-uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);
-
-#define PRId16 __INT16_FMTd__
-#define PRIi16 __INT16_FMTi__
-#define PRId32 __INT32_FMTd__
-#define PRIi32 __INT32_FMTi__
-#define PRId64 __INT64_FMTd__
-#define PRIi64 __INT64_FMTi__
-#define PRId8 __INT8_FMTd__
-#define PRIi8 __INT8_FMTi__
-#define PRIdMAX __INTMAX_FMTd__
-#define PRIiMAX __INTMAX_FMTi__
-#define PRIdPTR __INTPTR_FMTd__
-#define PRIiPTR __INTPTR_FMTi__
-#define PRIdFAST16 __INT_FAST16_FMTd__
-#define PRIiFAST16 __INT_FAST16_FMTi__
-#define PRIdFAST32 __INT_FAST32_FMTd__
-#define PRIiFAST32 __INT_FAST32_FMTi__
-#define PRIdFAST64 __INT_FAST64_FMTd__
-#define PRIiFAST64 __INT_FAST64_FMTi__
-#define PRIdFAST8 __INT_FAST8_FMTd__
-#define PRIiFAST8 __INT_FAST8_FMTi__
-#define PRIdLEAST16 __INT_LEAST16_FMTd__
-#define PRIiLEAST16 __INT_LEAST16_FMTi__
-#define PRIdLEAST32 __INT_LEAST32_FMTd__
-#define PRIiLEAST32 __INT_LEAST32_FMTi__
-#define PRIdLEAST64 __INT_LEAST64_FMTd__
-#define PRIiLEAST64 __INT_LEAST64_FMTi__
-#define PRIdLEAST8 __INT_LEAST8_FMTd__
-#define PRIiLEAST8 __INT_LEAST8_FMTi__
-#define PRIX16 __UINT16_FMTX__
-#define PRIo16 __UINT16_FMTo__
-#define PRIu16 __UINT16_FMTu__
-#define PRIx16 __UINT16_FMTx__
-#define PRIX32 __UINT32_FMTX__
-#define PRIo32 __UINT32_FMTo__
-#define PRIu32 __UINT32_FMTu__
-#define PRIx32 __UINT32_FMTx__
-#define PRIX64 __UINT64_FMTX__
-#define PRIo64 __UINT64_FMTo__
-#define PRIu64 __UINT64_FMTu__
-#define PRIx64 __UINT64_FMTx__
-#define PRIX8 __UINT8_FMTX__
-#define PRIo8 __UINT8_FMTo__
-#define PRIu8 __UINT8_FMTu__
-#define PRIx8 __UINT8_FMTx__
-#define PRIXMAX __UINTMAX_FMTX__
-#define PRIoMAX __UINTMAX_FMTo__
-#define PRIuMAX __UINTMAX_FMTu__
-#define PRIxMAX __UINTMAX_FMTx__
-#define PRIXPTR __UINTPTR_FMTX__
-#define PRIoPTR __UINTPTR_FMTo__
-#define PRIuPTR __UINTPTR_FMTu__
-#define PRIxPTR __UINTPTR_FMTx__
-#define PRIXFAST16 __UINT_FAST16_FMTX__
-#define PRIoFAST16 __UINT_FAST16_FMTo__
-#define PRIuFAST16 __UINT_FAST16_FMTu__
-#define PRIxFAST16 __UINT_FAST16_FMTx__
-#define PRIXFAST32 __UINT_FAST32_FMTX__
-#define PRIoFAST32 __UINT_FAST32_FMTo__
-#define PRIuFAST32 __UINT_FAST32_FMTu__
-#define PRIxFAST32 __UINT_FAST32_FMTx__
-#define PRIXFAST64 __UINT_FAST64_FMTX__
-#define PRIoFAST64 __UINT_FAST64_FMTo__
-#define PRIuFAST64 __UINT_FAST64_FMTu__
-#define PRIxFAST64 __UINT_FAST64_FMTx__
-#define PRIXFAST8 __UINT_FAST8_FMTX__
-#define PRIoFAST8 __UINT_FAST8_FMTo__
-#define PRIuFAST8 __UINT_FAST8_FMTu__
-#define PRIxFAST8 __UINT_FAST8_FMTx__
-#define PRIXLEAST16 __UINT_LEAST16_FMTX__
-#define PRIoLEAST16 __UINT_LEAST16_FMTo__
-#define PRIuLEAST16 __UINT_LEAST16_FMTu__
-#define PRIxLEAST16 __UINT_LEAST16_FMTx__
-#define PRIXLEAST32 __UINT_LEAST32_FMTX__
-#define PRIoLEAST32 __UINT_LEAST32_FMTo__
-#define PRIuLEAST32 __UINT_LEAST32_FMTu__
-#define PRIxLEAST32 __UINT_LEAST32_FMTx__
-#define PRIXLEAST64 __UINT_LEAST64_FMTX__
-#define PRIoLEAST64 __UINT_LEAST64_FMTo__
-#define PRIuLEAST64 __UINT_LEAST64_FMTu__
-#define PRIxLEAST64 __UINT_LEAST64_FMTx__
-#define PRIXLEAST8 __UINT_LEAST8_FMTX__
-#define PRIoLEAST8 __UINT_LEAST8_FMTo__
-#define PRIuLEAST8 __UINT_LEAST8_FMTu__
-#define PRIxLEAST8 __UINT_LEAST8_FMTx__
-
-#define SCNd16 __INT16_FMTd__
-#define SCNi16 __INT16_FMTi__
-#define SCNd32 __INT32_FMTd__
-#define SCNi32 __INT32_FMTi__
-#define SCNd64 __INT64_FMTd__
-#define SCNi64 __INT64_FMTi__
-#define SCNd8 __INT8_FMTd__
-#define SCNi8 __INT8_FMTi__
-#define SCNdMAX __INTMAX_FMTd__
-#define SCNiMAX __INTMAX_FMTi__
-#define SCNdPTR __INTPTR_FMTd__
-#define SCNiPTR __INTPTR_FMTi__
-#define SCNdFAST16 __INT_FAST16_FMTd__
-#define SCNiFAST16 __INT_FAST16_FMTi__
-#define SCNdFAST32 __INT_FAST32_FMTd__
-#define SCNiFAST32 __INT_FAST32_FMTi__
-#define SCNdFAST64 __INT_FAST64_FMTd__
-#define SCNiFAST64 __INT_FAST64_FMTi__
-#define SCNdFAST8 __INT_FAST8_FMTd__
-#define SCNiFAST8 __INT_FAST8_FMTi__
-#define SCNdLEAST16 __INT_LEAST16_FMTd__
-#define SCNiLEAST16 __INT_LEAST16_FMTi__
-#define SCNdLEAST32 __INT_LEAST32_FMTd__
-#define SCNiLEAST32 __INT_LEAST32_FMTi__
-#define SCNdLEAST64 __INT_LEAST64_FMTd__
-#define SCNiLEAST64 __INT_LEAST64_FMTi__
-#define SCNdLEAST8 __INT_LEAST8_FMTd__
-#define SCNiLEAST8 __INT_LEAST8_FMTi__
-#define SCNo16 __UINT16_FMTo__
-#define SCNu16 __UINT16_FMTu__
-#define SCNx16 __UINT16_FMTx__
-#define SCNo32 __UINT32_FMTo__
-#define SCNu32 __UINT32_FMTu__
-#define SCNx32 __UINT32_FMTx__
-#define SCNo64 __UINT64_FMTo__
-#define SCNu64 __UINT64_FMTu__
-#define SCNx64 __UINT64_FMTx__
-#define SCNo8 __UINT8_FMTo__
-#define SCNu8 __UINT8_FMTu__
-#define SCNx8 __UINT8_FMTx__
-#define SCNoMAX __UINTMAX_FMTo__
-#define SCNuMAX __UINTMAX_FMTu__
-#define SCNxMAX __UINTMAX_FMTx__
-#define SCNoPTR __UINTPTR_FMTo__
-#define SCNuPTR __UINTPTR_FMTu__
-#define SCNxPTR __UINTPTR_FMTx__
-#define SCNoFAST16 __UINT_FAST16_FMTo__
-#define SCNuFAST16 __UINT_FAST16_FMTu__
-#define SCNxFAST16 __UINT_FAST16_FMTx__
-#define SCNoFAST32 __UINT_FAST32_FMTo__
-#define SCNuFAST32 __UINT_FAST32_FMTu__
-#define SCNxFAST32 __UINT_FAST32_FMTx__
-#define SCNoFAST64 __UINT_FAST64_FMTo__
-#define SCNuFAST64 __UINT_FAST64_FMTu__
-#define SCNxFAST64 __UINT_FAST64_FMTx__
-#define SCNoFAST8 __UINT_FAST8_FMTo__
-#define SCNuFAST8 __UINT_FAST8_FMTu__
-#define SCNxFAST8 __UINT_FAST8_FMTx__
-#define SCNoLEAST16 __UINT_LEAST16_FMTo__
-#define SCNuLEAST16 __UINT_LEAST16_FMTu__
-#define SCNxLEAST16 __UINT_LEAST16_FMTx__
-#define SCNoLEAST32 __UINT_LEAST32_FMTo__
-#define SCNuLEAST32 __UINT_LEAST32_FMTu__
-#define SCNxLEAST32 __UINT_LEAST32_FMTx__
-#define SCNoLEAST64 __UINT_LEAST64_FMTo__
-#define SCNuLEAST64 __UINT_LEAST64_FMTu__
-#define SCNxLEAST64 __UINT_LEAST64_FMTx__
-#define SCNoLEAST8 __UINT_LEAST8_FMTo__
-#define SCNuLEAST8 __UINT_LEAST8_FMTu__
-#define SCNxLEAST8 __UINT_LEAST8_FMTx__
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_netinet_in.h
@@ -1,30 +0,0 @@
-#ifndef __wasilibc___header_netinet_in_h
-#define __wasilibc___header_netinet_in_h
-
-#include <__struct_in_addr.h>
-#include <__struct_in6_addr.h>
-#include <__struct_sockaddr_in.h>
-#include <__struct_sockaddr_in6.h>
-
-#define IPPROTO_IP 0
-#define IPPROTO_ICMP 1
-#define IPPROTO_TCP 6
-#define IPPROTO_UDP 17
-#define IPPROTO_IPV6 41
-#define IPPROTO_RAW 255
-
-#define IN6ADDR_ANY_INIT { { \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x00  \
-} }
-
-#define IN6ADDR_LOOPBACK_INIT { { \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x00, \
-    0x00, 0x00, 0x00, 0x01  \
-} }
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_poll.h
@@ -1,27 +0,0 @@
-#ifndef __wasilibc___header_poll_h
-#define __wasilibc___header_poll_h
-
-#include <__struct_pollfd.h>
-#include <__typedef_nfds_t.h>
-
-#define POLLRDNORM 0x1
-#define POLLWRNORM 0x2
-
-#define POLLIN POLLRDNORM
-#define POLLOUT POLLWRNORM
-
-#define POLLERR 0x1000
-#define POLLHUP 0x2000
-#define POLLNVAL 0x4000
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int poll(struct pollfd[], nfds_t, int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_stdlib.h
@@ -1,21 +0,0 @@
-#ifndef __wasilibc___header_stdlib_h
-#define __wasilibc___header_stdlib_h
-
-#define __need_size_t
-#include <stddef.h>
-
-#include <__functions_malloc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void abort(void) __attribute__((__noreturn__));
-void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
-void _Exit(int) __attribute__((__noreturn__));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_string.h
@@ -1,23 +0,0 @@
-#ifndef __wasilibc___header_string_h
-#define __wasilibc___header_string_h
-
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#include <__functions_memcpy.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-size_t strlen(const char *) __attribute__((__nothrow__, __leaf__, __pure__, __nonnull__(1)));
-char *strdup(const char *) __attribute__((__nothrow__, __nonnull__(1)));
-int strcmp(const char *, const char *) __attribute__((__nothrow__, __pure__, __nonnull__(1, 2)));
-void *memchr(const void *, int, size_t) __attribute__((__nothrow__, __pure__, __nonnull__(1)));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_sys_ioctl.h
@@ -1,17 +0,0 @@
-#ifndef __wasilibc___header_sys_ioctl_h
-#define __wasilibc___header_sys_ioctl_h
-
-#define FIONREAD 1
-#define FIONBIO 2
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int ioctl(int, int, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_sys_resource.h
@@ -1,19 +0,0 @@
-#ifndef __wasilibc___header_sys_resource_h
-#define __wasilibc___header_sys_resource_h
-
-#include <__struct_rusage.h>
-
-#define RUSAGE_SELF 1
-#define RUSAGE_CHILDREN 2
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int getrusage(int who, struct rusage *usage);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_sys_socket.h
@@ -1,41 +0,0 @@
-#ifndef __wasilibc___header_sys_socket_h
-#define __wasilibc___header_sys_socket_h
-
-#include <__struct_msghdr.h>
-#include <__struct_sockaddr.h>
-#include <__struct_sockaddr_storage.h>
-
-#include <wasi/api.h>
-
-#define SHUT_RD __WASI_SDFLAGS_RD
-#define SHUT_WR __WASI_SDFLAGS_WR
-#define SHUT_RDWR (SHUT_RD | SHUT_WR)
-
-#define MSG_PEEK __WASI_RIFLAGS_RECV_PEEK
-#define MSG_WAITALL __WASI_RIFLAGS_RECV_WAITALL
-#define MSG_TRUNC __WASI_RIFLAGS_RECV_DATA_TRUNCATED
-
-#define SOCK_DGRAM __WASI_FILETYPE_SOCKET_DGRAM
-#define SOCK_STREAM __WASI_FILETYPE_SOCKET_STREAM
-
-#define SOCK_NONBLOCK (0x00004000)
-#define SOCK_CLOEXEC (0x00002000)
-
-#define SOL_SOCKET 0x7fffffff
-
-#define SO_TYPE 3
-
-#define AF_UNSPEC 0
-#define AF_INET 1
-#define AF_INET6 2
-#define AF_UNIX 3
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_sys_stat.h
@@ -1,15 +0,0 @@
-#ifndef __wasilibc___header_sys_stat_h
-#define __wasilibc___header_sys_stat_h
-
-#include <__struct_stat.h>
-
-#define st_atime st_atim.tv_sec
-#define st_mtime st_mtim.tv_sec
-#define st_ctime st_ctim.tv_sec
-
-#include <__mode_t.h>
-
-#define UTIME_NOW (-1)
-#define UTIME_OMIT (-2)
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_time.h
@@ -1,37 +0,0 @@
-#ifndef __wasilibc___header_time_h
-#define __wasilibc___header_time_h
-
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#include <__typedef_time_t.h>
-#include <__struct_timespec.h>
-#include <__struct_tm.h>
-#include <__typedef_clockid_t.h>
-
-#include <wasi/api.h>
-
-#define TIMER_ABSTIME __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
-
-extern const struct __clockid _CLOCK_MONOTONIC;
-#define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC)
-extern const struct __clockid _CLOCK_PROCESS_CPUTIME_ID;
-#define CLOCK_PROCESS_CPUTIME_ID (&_CLOCK_PROCESS_CPUTIME_ID)
-extern const struct __clockid _CLOCK_REALTIME;
-#define CLOCK_REALTIME (&_CLOCK_REALTIME)
-extern const struct __clockid _CLOCK_THREAD_CPUTIME_ID;
-#define CLOCK_THREAD_CPUTIME_ID (&_CLOCK_THREAD_CPUTIME_ID)
-
-/*
- * TIME_UTC is the only standardized time base value.
- */
-#define TIME_UTC 1
-
-/*
- * Note that XSI specifies CLOCKS_PER_SEC to be 1000000, rather than
- * 1000000000; the clock API is providing more precision than XSI specifies.
- */
-#define CLOCKS_PER_SEC ((clock_t)1000000000)
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__header_unistd.h
@@ -1,28 +0,0 @@
-#ifndef __wasilibc___header_unistd_h
-#define __wasilibc___header_unistd_h
-
-struct stat;
-
-#include <__seek.h>
-
-#define F_OK (0)
-#define X_OK (1)
-#define W_OK (2)
-#define R_OK (4)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int close(int fd);
-int faccessat(int, const char *, int, int);
-int fstatat(int, const char *__restrict, struct stat *__restrict, int);
-int renameat(int, const char *, int, const char *);
-int openat(int, const char *, int, ...);
-void *sbrk(intptr_t increment);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__macro_FD_SETSIZE.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___macro_FD_SETSIZE_h
-#define __wasilibc___macro_FD_SETSIZE_h
-
-#define FD_SETSIZE 1024
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__macro_PAGESIZE.h
@@ -1,11 +0,0 @@
-#ifndef __wasilibc___macro_PAGESIZE_h
-#define __wasilibc___macro_PAGESIZE_h
-
-/*
- * The page size in WebAssembly is fixed at 64 KiB. If this ever changes,
- * it's expected that applications will need to opt in, so we can change
- * this.
- */
-#define PAGESIZE (0x10000)
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__mode_t.h
@@ -1,38 +0,0 @@
-#ifndef __wasilibc___mode_t_h
-#define __wasilibc___mode_t_h
-
-#define S_IFMT \
-    (S_IFBLK | S_IFCHR | S_IFDIR | S_IFIFO | S_IFLNK | S_IFREG | S_IFSOCK)
-#define S_IFBLK (0x6000)
-#define S_IFCHR (0x2000)
-#define S_IFDIR (0x4000)
-#define S_IFLNK (0xa000)
-#define S_IFREG (0x8000)
-#define S_IFSOCK (0xc000)
-#define S_IFIFO (0xc000)
-
-#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK)
-#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR)
-#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
-#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO)
-#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK)
-#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
-#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK)
-
-#define S_IXOTH (0x1)
-#define S_IWOTH (0x2)
-#define S_IROTH (0x4)
-#define S_IRWXO (S_IXOTH | S_IWOTH | S_IROTH)
-#define S_IXGRP (0x8)
-#define S_IWGRP (0x10)
-#define S_IRGRP (0x20)
-#define S_IRWXG (S_IXGRP | S_IWGRP | S_IRGRP)
-#define S_IXUSR (0x40)
-#define S_IWUSR (0x80)
-#define S_IRUSR (0x100)
-#define S_IRWXU (S_IXUSR | S_IWUSR | S_IRUSR)
-#define S_ISVTX (0x200)
-#define S_ISGID (0x400)
-#define S_ISUID (0x800)
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__seek.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc___seek_h
-#define __wasilibc___seek_h
-
-#include <wasi/api.h>
-
-#define SEEK_CUR __WASI_WHENCE_CUR
-#define SEEK_END __WASI_WHENCE_END
-#define SEEK_SET __WASI_WHENCE_SET
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_dirent.h
@@ -1,14 +0,0 @@
-#ifndef __wasilibc___struct_dirent_h
-#define __wasilibc___struct_dirent_h
-
-#include <__typedef_ino_t.h>
-
-#define _DIRENT_HAVE_D_TYPE
-
-struct dirent {
-    ino_t d_ino;
-    unsigned char d_type;
-    char d_name[];
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_in6_addr.h
@@ -1,8 +0,0 @@
-#ifndef __wasilibc___struct_in6_addr_h
-#define __wasilibc___struct_in6_addr_h
-
-struct in6_addr {
-    _Alignas(int32_t) unsigned char s6_addr[16];
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_in_addr.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc___struct_in_addr_h
-#define __wasilibc___struct_in_addr_h
-
-#include <__typedef_in_addr_t.h>
-
-struct in_addr {
-    in_addr_t s_addr;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_iovec.h
@@ -1,12 +0,0 @@
-#ifndef __wasilibc___struct_iovec_h
-#define __wasilibc___struct_iovec_h
-
-#define __need_size_t
-#include <stddef.h>
-
-struct iovec {
-    void *iov_base;
-    size_t iov_len;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_msghdr.h
@@ -1,16 +0,0 @@
-#ifndef __wasilibc___struct_msghdr_h
-#define __wasilibc___struct_msghdr_h
-
-#include <__typedef_socklen_t.h>
-
-struct msghdr {
-    void *msg_name;
-    socklen_t msg_namelen;
-    struct iovec *msg_iov;
-    int msg_iovlen;
-    void *msg_control;
-    socklen_t msg_controllen;
-    int msg_flags;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_pollfd.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc___struct_pollfd_h
-#define __wasilibc___struct_pollfd_h
-
-struct pollfd {
-    int fd;
-    short events;
-    short revents;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_rusage.h
@@ -1,12 +0,0 @@
-#ifndef __wasilibc___struct_rusage_h
-#define __wasilibc___struct_rusage_h
-
-#include <__struct_timeval.h>
-
-/* TODO: Add more features here. */
-struct rusage {
-    struct timeval ru_utime;
-    struct timeval ru_stime;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_sockaddr.h
@@ -1,14 +0,0 @@
-#ifndef __wasilibc___struct_sockaddr_h
-#define __wasilibc___struct_sockaddr_h
-
-#define __need_STDDEF_H_misc
-#include <stddef.h>
-
-#include <__typedef_sa_family_t.h>
-
-struct sockaddr {
-    _Alignas(max_align_t) sa_family_t sa_family;
-    char sa_data[0];
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_sockaddr_in.h
@@ -1,17 +0,0 @@
-#ifndef __wasilibc___struct_sockaddr_in_h
-#define __wasilibc___struct_sockaddr_in_h
-
-#define __need_STDDEF_H_misc
-#include <stddef.h>
-
-#include <__typedef_sa_family_t.h>
-#include <__typedef_in_port_t.h>
-#include <__struct_in_addr.h>
-
-struct sockaddr_in {
-    _Alignas(max_align_t) sa_family_t sin_family;
-    in_port_t sin_port;
-    struct in_addr sin_addr;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_sockaddr_in6.h
@@ -1,19 +0,0 @@
-#ifndef __wasilibc___struct_sockaddr_in6_h
-#define __wasilibc___struct_sockaddr_in6_h
-
-#define __need_STDDEF_H_misc
-#include <stddef.h>
-
-#include <__typedef_sa_family_t.h>
-#include <__typedef_in_port_t.h>
-#include <__struct_in6_addr.h>
-
-struct sockaddr_in6 {
-    _Alignas(max_align_t) sa_family_t sin6_family;
-    in_port_t sin6_port;
-    unsigned sin6_flowinfo;
-    struct in6_addr sin6_addr;
-    unsigned sin6_scope_id;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_sockaddr_storage.h
@@ -1,14 +0,0 @@
-#ifndef __wasilibc___struct_sockaddr_storage_h
-#define __wasilibc___struct_sockaddr_storage_h
-
-#define __need_STDDEF_H_misc
-#include <stddef.h>
-
-#include <__typedef_sa_family_t.h>
-
-struct sockaddr_storage {
-    _Alignas(max_align_t) sa_family_t ss_family;
-    char __ss_data[32];
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_sockaddr_un.h
@@ -1,13 +0,0 @@
-#ifndef __wasilibc___struct_sockaddr_un_h
-#define __wasilibc___struct_sockaddr_un_h
-
-#define __need_STDDEF_H_misc
-#include <stddef.h>
-
-#include <__typedef_sa_family_t.h>
-
-struct sockaddr_un {
-    _Alignas(max_align_t) sa_family_t sun_family;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_stat.h
@@ -1,35 +0,0 @@
-#ifndef __wasilibc___struct_stat_h
-#define __wasilibc___struct_stat_h
-
-#include <__typedef_dev_t.h>
-#include <__typedef_ino_t.h>
-#include <__typedef_nlink_t.h>
-#include <__typedef_mode_t.h>
-#include <__typedef_uid_t.h>
-#include <__typedef_gid_t.h>
-#include <__typedef_off_t.h>
-#include <__typedef_blksize_t.h>
-#include <__typedef_blkcnt_t.h>
-#include <__struct_timespec.h>
-
-struct stat {
-    dev_t st_dev;
-    ino_t st_ino;
-    nlink_t st_nlink;
-
-    mode_t st_mode;
-    uid_t st_uid;
-    gid_t st_gid;
-    unsigned int __pad0;
-    dev_t st_rdev;
-    off_t st_size;
-    blksize_t st_blksize;
-    blkcnt_t st_blocks;
-
-    struct timespec st_atim;
-    struct timespec st_mtim;
-    struct timespec st_ctim;
-    long long __reserved[3];
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_timespec.h
@@ -1,12 +0,0 @@
-#ifndef __wasilibc___struct_timespec_h
-#define __wasilibc___struct_timespec_h
-
-#include <__typedef_time_t.h>
-
-/* As specified in POSIX. */
-struct timespec {
-    time_t tv_sec;
-    long tv_nsec;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_timeval.h
@@ -1,13 +0,0 @@
-#ifndef __wasilibc___struct_timeval_h
-#define __wasilibc___struct_timeval_h
-
-#include <__typedef_time_t.h>
-#include <__typedef_suseconds_t.h>
-
-/* As specified in POSIX. */
-struct timeval {
-    time_t tv_sec;
-    suseconds_t tv_usec;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_tm.h
@@ -1,19 +0,0 @@
-#ifndef __wasilibc___struct_tm_h
-#define __wasilibc___struct_tm_h
-
-struct tm {
-    int tm_sec;
-    int tm_min;
-    int tm_hour;
-    int tm_mday;
-    int tm_mon;
-    int tm_year;
-    int tm_wday;
-    int tm_yday;
-    int tm_isdst;
-    int __tm_gmtoff;
-    const char *__tm_zone;
-    int __tm_nsec;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__struct_tms.h
@@ -1,13 +0,0 @@
-#ifndef __wasilibc___struct_tms_h
-#define __wasilibc___struct_tms_h
-
-#include <__typedef_clock_t.h>
-
-struct tms {
-    clock_t tms_utime;
-    clock_t tms_stime;
-    clock_t tms_cutime;
-    clock_t tms_cstime;
-};
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_blkcnt_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_blkcnt_t_h
-#define __wasilibc___typedef_blkcnt_t_h
-
-/* Define these as 64-bit signed integers to support files larger than 2 GiB. */
-typedef long long blkcnt_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_blksize_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_blksize_t_h
-#define __wasilibc___typedef_blksize_t_h
-
-typedef long blksize_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_clock_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_clock_t_h
-#define __wasilibc___typedef_clock_t_h
-
-/* Define this as a 64-bit signed integer to avoid wraparounds. */
-typedef long long clock_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_clockid_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_clockid_t_h
-#define __wasilibc___typedef_clockid_t_h
-
-typedef const struct __clockid *clockid_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_dev_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_dev_t_h
-#define __wasilibc___typedef_dev_t_h
-
-/* Define these as 64-bit integers to support billions of devices. */
-typedef unsigned long long dev_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_DIR.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_DIR_h
-#define __wasilibc___typedef_DIR_h
-
-typedef struct _DIR DIR;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_fd_set.h
@@ -1,14 +0,0 @@
-#ifndef __wasilibc___typedef_fd_set_h
-#define __wasilibc___typedef_fd_set_h
-
-#define __need_size_t
-#include <stddef.h>
-
-#include <__macro_FD_SETSIZE.h>
-
-typedef struct {
-    size_t __nfds;
-    int __fds[FD_SETSIZE];
-} fd_set;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_gid_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_gid_t_h
-#define __wasilibc___typedef_gid_t_h
-
-typedef unsigned gid_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_in_addr_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_in_addr_t_h
-#define __wasilibc___typedef_in_addr_t_h
-
-typedef unsigned in_addr_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_in_port_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_in_port_t_h
-#define __wasilibc___typedef_in_port_t_h
-
-typedef unsigned short in_port_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_ino_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_ino_t_h
-#define __wasilibc___typedef_ino_t_h
-
-/* Define these as 64-bit integers to support billions of inodes. */
-typedef unsigned long long ino_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_mode_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_mode_t_h
-#define __wasilibc___typedef_mode_t_h
-
-typedef unsigned mode_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_nfds_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_nfds_t_h
-#define __wasilibc___typedef_nfds_t_h
-
-typedef unsigned long nfds_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_off_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_off_t_h
-#define __wasilibc___typedef_off_t_h
-
-/* Define these as 64-bit signed integers to support files larger than 2 GiB. */
-typedef long long off_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_sa_family_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_sa_family_t_h
-#define __wasilibc___typedef_sa_family_t_h
-
-typedef unsigned short sa_family_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_sigset_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_sigset_t_h
-#define __wasilibc___typedef_sigset_t_h
-
-/* TODO: This is just a placeholder for now. Keep this in sync with musl. */
-typedef unsigned char sigset_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_socklen_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_socklen_t_h
-#define __wasilibc___typedef_socklen_t_h
-
-typedef unsigned socklen_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_ssize_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_ssize_t_h
-#define __wasilibc___typedef_ssize_t_h
-
-/* This is defined to be the same size as size_t. */
-typedef long ssize_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_suseconds_t.h
@@ -1,8 +0,0 @@
-#ifndef __wasilibc___typedef_suseconds_t_h
-#define __wasilibc___typedef_suseconds_t_h
-
-/* Define this to be 64-bit as its main use is in struct timeval where the
-   extra space would otherwise be padding. */
-typedef long long suseconds_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_time_t.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc___typedef_time_t_h
-#define __wasilibc___typedef_time_t_h
-
-/* Define this as a 64-bit signed integer to avoid the 2038 bug. */
-typedef long long time_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/__typedef_uid_t.h
@@ -1,6 +0,0 @@
-#ifndef __wasilibc___typedef_uid_t_h
-#define __wasilibc___typedef_uid_t_h
-
-typedef unsigned uid_t;
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/dirent.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_dirent_h
-#define __wasilibc_dirent_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc dirent implementations.
- */
-#include <__header_dirent.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/errno.h
@@ -1,7 +0,0 @@
-#ifndef __wasilibc_errno_h
-#define __wasilibc_errno_h
-
-#include <__errno.h>
-#include <__errno_values.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/fcntl.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_fcntl_h
-#define __wasilibc_fcntl_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc fcntl implementations.
- */
-#include <__header_fcntl.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/inttypes.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_inttypes_h
-#define __wasilibc_inttypes_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc stdlib implementations.
- */
-#include <__header_inttypes.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/poll.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_poll_h
-#define __wasilibc_poll_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc poll implementations.
- */
-#include <__header_poll.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/stdlib.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_stdlib_h
-#define __wasilibc_stdlib_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc stdlib implementations.
- */
-#include <__functions_malloc.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/string.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_string_h
-#define __wasilibc_string_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc string implementations.
- */
-#include <__header_string.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/time.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_time_h
-#define __wasilibc_time_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc time implementations.
- */
-#include <__header_time.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/unistd.h
@@ -1,10 +0,0 @@
-#ifndef __wasilibc_unistd_h
-#define __wasilibc_unistd_h
-
-/*
- * Include the real implementation, which is factored into a separate file so
- * that it can be reused by other libc unistd implementations.
- */
-#include <__header_unistd.h>
-
-#endif
lib/libc/wasi/libc-bottom-half/headers/public/wchar.h
@@ -1,9 +0,0 @@
-#ifndef __wasilibc_wchar_h
-#define __wasilibc_wchar_h
-
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#include <stddef.h>
-
-#endif
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/alltypes.h.in
@@ -1,24 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#if __AARCH64EB__
-#define __BYTE_ORDER 4321
-#else
-#define __BYTE_ORDER 1234
-#endif
-
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF unsigned wchar_t;
-#endif
-TYPEDEF unsigned wint_t;
-
-TYPEDEF int blksize_t;
-TYPEDEF unsigned int nlink_t;
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/fcntl.h
@@ -1,38 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY  040000
-#define O_NOFOLLOW  0100000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT    0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-#define F_GETLK  5
-#define F_SETLK  6
-#define F_SETLKW 7
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/fenv.h
@@ -1,19 +0,0 @@
-#define FE_INVALID    1
-#define FE_DIVBYZERO  2
-#define FE_OVERFLOW   4
-#define FE_UNDERFLOW  8
-#define FE_INEXACT    16
-#define FE_ALL_EXCEPT 31
-#define FE_TONEAREST  0
-#define FE_DOWNWARD   0x800000
-#define FE_UPWARD     0x400000
-#define FE_TOWARDZERO 0xc00000
-
-typedef unsigned int fexcept_t;
-
-typedef struct {
-	unsigned int __fpcr;
-	unsigned int __fpsr;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/float.h
@@ -1,16 +0,0 @@
-#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
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/hwcap.h
@@ -1,50 +0,0 @@
-#define HWCAP_FP		(1 << 0)
-#define HWCAP_ASIMD		(1 << 1)
-#define HWCAP_EVTSTRM		(1 << 2)
-#define HWCAP_AES		(1 << 3)
-#define HWCAP_PMULL		(1 << 4)
-#define HWCAP_SHA1		(1 << 5)
-#define HWCAP_SHA2		(1 << 6)
-#define HWCAP_CRC32		(1 << 7)
-#define HWCAP_ATOMICS		(1 << 8)
-#define HWCAP_FPHP		(1 << 9)
-#define HWCAP_ASIMDHP		(1 << 10)
-#define HWCAP_CPUID		(1 << 11)
-#define HWCAP_ASIMDRDM		(1 << 12)
-#define HWCAP_JSCVT		(1 << 13)
-#define HWCAP_FCMA		(1 << 14)
-#define HWCAP_LRCPC		(1 << 15)
-#define HWCAP_DCPOP		(1 << 16)
-#define HWCAP_SHA3		(1 << 17)
-#define HWCAP_SM3		(1 << 18)
-#define HWCAP_SM4		(1 << 19)
-#define HWCAP_ASIMDDP		(1 << 20)
-#define HWCAP_SHA512		(1 << 21)
-#define HWCAP_SVE		(1 << 22)
-#define HWCAP_ASIMDFHM		(1 << 23)
-#define HWCAP_DIT		(1 << 24)
-#define HWCAP_USCAT		(1 << 25)
-#define HWCAP_ILRCPC		(1 << 26)
-#define HWCAP_FLAGM		(1 << 27)
-#define HWCAP_SSBS		(1 << 28)
-#define HWCAP_SB		(1 << 29)
-#define HWCAP_PACA		(1 << 30)
-#define HWCAP_PACG		(1UL << 31)
-
-#define HWCAP2_DCPODP		(1 << 0)
-#define HWCAP2_SVE2		(1 << 1)
-#define HWCAP2_SVEAES		(1 << 2)
-#define HWCAP2_SVEPMULL		(1 << 3)
-#define HWCAP2_SVEBITPERM	(1 << 4)
-#define HWCAP2_SVESHA3		(1 << 5)
-#define HWCAP2_SVESM4		(1 << 6)
-#define HWCAP2_FLAGM2		(1 << 7)
-#define HWCAP2_FRINT		(1 << 8)
-#define HWCAP2_SVEI8MM		(1 << 9)
-#define HWCAP2_SVEF32MM		(1 << 10)
-#define HWCAP2_SVEF64MM		(1 << 11)
-#define HWCAP2_SVEBF16		(1 << 12)
-#define HWCAP2_I8MM		(1 << 13)
-#define HWCAP2_BF16		(1 << 14)
-#define HWCAP2_DGH		(1 << 15)
-#define HWCAP2_RNG		(1 << 16)
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/reg.h
@@ -1,2 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[22];
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/signal.h
@@ -1,153 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 6144
-#define SIGSTKSZ 12288
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t;
-typedef unsigned long gregset_t[34];
-
-typedef struct {
-	__uint128_t vregs[32];
-	unsigned int fpsr;
-	unsigned int fpcr;
-} fpregset_t;
-typedef struct sigcontext {
-	unsigned long fault_address;
-	unsigned long regs[31];
-	unsigned long sp, pc, pstate;
-	long double __reserved[256];
-} mcontext_t;
-
-#define FPSIMD_MAGIC 0x46508001
-#define ESR_MAGIC 0x45535201
-#define EXTRA_MAGIC 0x45585401
-#define SVE_MAGIC 0x53564501
-struct _aarch64_ctx {
-	unsigned int magic;
-	unsigned int size;
-};
-struct fpsimd_context {
-	struct _aarch64_ctx head;
-	unsigned int fpsr;
-	unsigned int fpcr;
-	__uint128_t vregs[32];
-};
-struct esr_context {
-	struct _aarch64_ctx head;
-	unsigned long esr;
-};
-struct extra_context {
-	struct _aarch64_ctx head;
-	unsigned long datap;
-	unsigned int size;
-	unsigned int __reserved[3];
-};
-struct sve_context {
-	struct _aarch64_ctx head;
-	unsigned short vl;
-	unsigned short __reserved[3];
-};
-#define SVE_VQ_BYTES		16
-#define SVE_VQ_MIN		1
-#define SVE_VQ_MAX		512
-#define SVE_VL_MIN		(SVE_VQ_MIN * SVE_VQ_BYTES)
-#define SVE_VL_MAX		(SVE_VQ_MAX * SVE_VQ_BYTES)
-#define SVE_NUM_ZREGS		32
-#define SVE_NUM_PREGS		16
-#define sve_vl_valid(vl) \
-	((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX)
-#define sve_vq_from_vl(vl)	((vl) / SVE_VQ_BYTES)
-#define sve_vl_from_vq(vq)	((vq) * SVE_VQ_BYTES)
-#define SVE_SIG_ZREG_SIZE(vq)	((unsigned)(vq) * SVE_VQ_BYTES)
-#define SVE_SIG_PREG_SIZE(vq)	((unsigned)(vq) * (SVE_VQ_BYTES / 8))
-#define SVE_SIG_FFR_SIZE(vq)	SVE_SIG_PREG_SIZE(vq)
-#define SVE_SIG_REGS_OFFSET					\
-	((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1))	\
-		/ SVE_VQ_BYTES * SVE_VQ_BYTES)
-#define SVE_SIG_ZREGS_OFFSET	SVE_SIG_REGS_OFFSET
-#define SVE_SIG_ZREG_OFFSET(vq, n) \
-	(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n))
-#define SVE_SIG_ZREGS_SIZE(vq) \
-	(SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET)
-#define SVE_SIG_PREGS_OFFSET(vq) \
-	(SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq))
-#define SVE_SIG_PREG_OFFSET(vq, n) \
-	(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n))
-#define SVE_SIG_PREGS_SIZE(vq) \
-	(SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq))
-#define SVE_SIG_FFR_OFFSET(vq) \
-	(SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq))
-#define SVE_SIG_REGS_SIZE(vq) \
-	(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
-#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
-#else
-typedef struct {
-	long double __regs[18+256];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	sigset_t uc_sigmask;
-	mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/stat.h
@@ -1,18 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	unsigned long __pad;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __pad2;
-	blkcnt_t st_blocks;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/syscall.h.in
@@ -1,296 +0,0 @@
-#define __NR_io_setup 0
-#define __NR_io_destroy 1
-#define __NR_io_submit 2
-#define __NR_io_cancel 3
-#define __NR_io_getevents 4
-#define __NR_setxattr 5
-#define __NR_lsetxattr 6
-#define __NR_fsetxattr 7
-#define __NR_getxattr 8
-#define __NR_lgetxattr 9
-#define __NR_fgetxattr 10
-#define __NR_listxattr 11
-#define __NR_llistxattr 12
-#define __NR_flistxattr 13
-#define __NR_removexattr 14
-#define __NR_lremovexattr 15
-#define __NR_fremovexattr 16
-#define __NR_getcwd 17
-#define __NR_lookup_dcookie 18
-#define __NR_eventfd2 19
-#define __NR_epoll_create1 20
-#define __NR_epoll_ctl 21
-#define __NR_epoll_pwait 22
-#define __NR_dup 23
-#define __NR_dup3 24
-#define __NR_fcntl 25
-#define __NR_inotify_init1 26
-#define __NR_inotify_add_watch 27
-#define __NR_inotify_rm_watch 28
-#define __NR_ioctl 29
-#define __NR_ioprio_set 30
-#define __NR_ioprio_get 31
-#define __NR_flock 32
-#define __NR_mknodat 33
-#define __NR_mkdirat 34
-#define __NR_unlinkat 35
-#define __NR_symlinkat 36
-#define __NR_linkat 37
-#define __NR_renameat 38
-#define __NR_umount2 39
-#define __NR_mount 40
-#define __NR_pivot_root 41
-#define __NR_nfsservctl 42
-#define __NR_statfs 43
-#define __NR_fstatfs 44
-#define __NR_truncate 45
-#define __NR_ftruncate 46
-#define __NR_fallocate 47
-#define __NR_faccessat 48
-#define __NR_chdir 49
-#define __NR_fchdir 50
-#define __NR_chroot 51
-#define __NR_fchmod 52
-#define __NR_fchmodat 53
-#define __NR_fchownat 54
-#define __NR_fchown 55
-#define __NR_openat 56
-#define __NR_close 57
-#define __NR_vhangup 58
-#define __NR_pipe2 59
-#define __NR_quotactl 60
-#define __NR_getdents64 61
-#define __NR_lseek 62
-#define __NR_read 63
-#define __NR_write 64
-#define __NR_readv 65
-#define __NR_writev 66
-#define __NR_pread64 67
-#define __NR_pwrite64 68
-#define __NR_preadv 69
-#define __NR_pwritev 70
-#define __NR_sendfile 71
-#define __NR_pselect6 72
-#define __NR_ppoll 73
-#define __NR_signalfd4 74
-#define __NR_vmsplice 75
-#define __NR_splice 76
-#define __NR_tee 77
-#define __NR_readlinkat 78
-#define __NR_newfstatat 79
-#define __NR_fstat 80
-#define __NR_sync 81
-#define __NR_fsync 82
-#define __NR_fdatasync 83
-#define __NR_sync_file_range 84
-#define __NR_timerfd_create 85
-#define __NR_timerfd_settime 86
-#define __NR_timerfd_gettime 87
-#define __NR_utimensat 88
-#define __NR_acct 89
-#define __NR_capget 90
-#define __NR_capset 91
-#define __NR_personality 92
-#define __NR_exit 93
-#define __NR_exit_group 94
-#define __NR_waitid 95
-#define __NR_set_tid_address 96
-#define __NR_unshare 97
-#define __NR_futex 98
-#define __NR_set_robust_list 99
-#define __NR_get_robust_list 100
-#define __NR_nanosleep 101
-#define __NR_getitimer 102
-#define __NR_setitimer 103
-#define __NR_kexec_load 104
-#define __NR_init_module 105
-#define __NR_delete_module 106
-#define __NR_timer_create 107
-#define __NR_timer_gettime 108
-#define __NR_timer_getoverrun 109
-#define __NR_timer_settime 110
-#define __NR_timer_delete 111
-#define __NR_clock_settime 112
-#define __NR_clock_gettime 113
-#define __NR_clock_getres 114
-#define __NR_clock_nanosleep 115
-#define __NR_syslog 116
-#define __NR_ptrace 117
-#define __NR_sched_setparam 118
-#define __NR_sched_setscheduler 119
-#define __NR_sched_getscheduler 120
-#define __NR_sched_getparam 121
-#define __NR_sched_setaffinity 122
-#define __NR_sched_getaffinity 123
-#define __NR_sched_yield 124
-#define __NR_sched_get_priority_max 125
-#define __NR_sched_get_priority_min 126
-#define __NR_sched_rr_get_interval 127
-#define __NR_restart_syscall 128
-#define __NR_kill 129
-#define __NR_tkill 130
-#define __NR_tgkill 131
-#define __NR_sigaltstack 132
-#define __NR_rt_sigsuspend 133
-#define __NR_rt_sigaction 134
-#define __NR_rt_sigprocmask 135
-#define __NR_rt_sigpending 136
-#define __NR_rt_sigtimedwait 137
-#define __NR_rt_sigqueueinfo 138
-#define __NR_rt_sigreturn 139
-#define __NR_setpriority 140
-#define __NR_getpriority 141
-#define __NR_reboot 142
-#define __NR_setregid 143
-#define __NR_setgid 144
-#define __NR_setreuid 145
-#define __NR_setuid 146
-#define __NR_setresuid 147
-#define __NR_getresuid 148
-#define __NR_setresgid 149
-#define __NR_getresgid 150
-#define __NR_setfsuid 151
-#define __NR_setfsgid 152
-#define __NR_times 153
-#define __NR_setpgid 154
-#define __NR_getpgid 155
-#define __NR_getsid 156
-#define __NR_setsid 157
-#define __NR_getgroups 158
-#define __NR_setgroups 159
-#define __NR_uname 160
-#define __NR_sethostname 161
-#define __NR_setdomainname 162
-#define __NR_getrlimit 163
-#define __NR_setrlimit 164
-#define __NR_getrusage 165
-#define __NR_umask 166
-#define __NR_prctl 167
-#define __NR_getcpu 168
-#define __NR_gettimeofday 169
-#define __NR_settimeofday 170
-#define __NR_adjtimex 171
-#define __NR_getpid 172
-#define __NR_getppid 173
-#define __NR_getuid 174
-#define __NR_geteuid 175
-#define __NR_getgid 176
-#define __NR_getegid 177
-#define __NR_gettid 178
-#define __NR_sysinfo 179
-#define __NR_mq_open 180
-#define __NR_mq_unlink 181
-#define __NR_mq_timedsend 182
-#define __NR_mq_timedreceive 183
-#define __NR_mq_notify 184
-#define __NR_mq_getsetattr 185
-#define __NR_msgget 186
-#define __NR_msgctl 187
-#define __NR_msgrcv 188
-#define __NR_msgsnd 189
-#define __NR_semget 190
-#define __NR_semctl 191
-#define __NR_semtimedop 192
-#define __NR_semop 193
-#define __NR_shmget 194
-#define __NR_shmctl 195
-#define __NR_shmat 196
-#define __NR_shmdt 197
-#define __NR_socket 198
-#define __NR_socketpair 199
-#define __NR_bind 200
-#define __NR_listen 201
-#define __NR_accept 202
-#define __NR_connect 203
-#define __NR_getsockname 204
-#define __NR_getpeername 205
-#define __NR_sendto 206
-#define __NR_recvfrom 207
-#define __NR_setsockopt 208
-#define __NR_getsockopt 209
-#define __NR_shutdown 210
-#define __NR_sendmsg 211
-#define __NR_recvmsg 212
-#define __NR_readahead 213
-#define __NR_brk 214
-#define __NR_munmap 215
-#define __NR_mremap 216
-#define __NR_add_key 217
-#define __NR_request_key 218
-#define __NR_keyctl 219
-#define __NR_clone 220
-#define __NR_execve 221
-#define __NR_mmap 222
-#define __NR_fadvise64 223
-#define __NR_swapon 224
-#define __NR_swapoff 225
-#define __NR_mprotect 226
-#define __NR_msync 227
-#define __NR_mlock 228
-#define __NR_munlock 229
-#define __NR_mlockall 230
-#define __NR_munlockall 231
-#define __NR_mincore 232
-#define __NR_madvise 233
-#define __NR_remap_file_pages 234
-#define __NR_mbind 235
-#define __NR_get_mempolicy 236
-#define __NR_set_mempolicy 237
-#define __NR_migrate_pages 238
-#define __NR_move_pages 239
-#define __NR_rt_tgsigqueueinfo 240
-#define __NR_perf_event_open 241
-#define __NR_accept4 242
-#define __NR_recvmmsg 243
-#define __NR_wait4 260
-#define __NR_prlimit64 261
-#define __NR_fanotify_init 262
-#define __NR_fanotify_mark 263
-#define __NR_name_to_handle_at 264
-#define __NR_open_by_handle_at 265
-#define __NR_clock_adjtime 266
-#define __NR_syncfs 267
-#define __NR_setns 268
-#define __NR_sendmmsg 269
-#define __NR_process_vm_readv 270
-#define __NR_process_vm_writev 271
-#define __NR_kcmp 272
-#define __NR_finit_module 273
-#define __NR_sched_setattr 274
-#define __NR_sched_getattr 275
-#define __NR_renameat2 276
-#define __NR_seccomp 277
-#define __NR_getrandom 278
-#define __NR_memfd_create 279
-#define __NR_bpf 280
-#define __NR_execveat 281
-#define __NR_userfaultfd 282
-#define __NR_membarrier 283
-#define __NR_mlock2 284
-#define __NR_copy_file_range 285
-#define __NR_preadv2 286
-#define __NR_pwritev2 287
-#define __NR_pkey_mprotect 288
-#define __NR_pkey_alloc 289
-#define __NR_pkey_free 290
-#define __NR_statx 291
-#define __NR_io_pgetevents 292
-#define __NR_rseq 293
-#define __NR_kexec_file_load 294
-#define __NR_pidfd_send_signal 424
-#define __NR_io_uring_setup 425
-#define __NR_io_uring_enter 426
-#define __NR_io_uring_register 427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/aarch64/bits/user.h
@@ -1,16 +0,0 @@
-struct user_regs_struct {
-	unsigned long long regs[31];
-	unsigned long long sp;
-	unsigned long long pc;
-	unsigned long long pstate;
-};
-
-struct user_fpsimd_struct {
-	__uint128_t vregs[32];
-	unsigned int fpsr;
-	unsigned int fpcr;
-};
-
-#define ELF_NREG 34
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG];
-typedef struct user_fpsimd_struct elf_fpregset_t;
lib/libc/wasi/libc-top-half/musl/arch/aarch64/atomic_arch.h
@@ -1,82 +0,0 @@
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ ("ldaxr %w0,%1" : "=r"(v) : "Q"(*p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ ("stlxr %w0,%w2,%1" : "=&r"(r), "=Q"(*p) : "r"(v) : "memory");
-	return !r;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("dmb ish" : : : "memory");
-}
-
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	int old;
-	do {
-		old = a_ll(p);
-		if (old != t) {
-			a_barrier();
-			break;
-		}
-	} while (!a_sc(p, s));
-	return old;
-}
-
-#define a_ll_p a_ll_p
-static inline void *a_ll_p(volatile void *p)
-{
-	void *v;
-	__asm__ __volatile__ ("ldaxr %0, %1" : "=r"(v) : "Q"(*(void *volatile *)p));
-	return v;
-}
-
-#define a_sc_p a_sc_p
-static inline int a_sc_p(volatile int *p, void *v)
-{
-	int r;
-	__asm__ __volatile__ ("stlxr %w0,%2,%1" : "=&r"(r), "=Q"(*(void *volatile *)p) : "r"(v) : "memory");
-	return !r;
-}
-
-#define a_cas_p a_cas_p
-static inline void *a_cas_p(volatile void *p, void *t, void *s)
-{
-	void *old;
-	do {
-		old = a_ll_p(p);
-		if (old != t) {
-			a_barrier();
-			break;
-		}
-	} while (!a_sc_p(p, s));
-	return old;
-}
-
-#define a_ctz_64 a_ctz_64
-static inline int a_ctz_64(uint64_t x)
-{
-	__asm__(
-		"	rbit %0, %1\n"
-		"	clz %0, %0\n"
-		: "=r"(x) : "r"(x));
-	return x;
-}
-
-#define a_clz_64 a_clz_64
-static inline int a_clz_64(uint64_t x)
-{
-	__asm__("clz %0, %1" : "=r"(x) : "r"(x));
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/aarch64/crt_arch.h
@@ -1,15 +0,0 @@
-__asm__(
-".text \n"
-".global " START "\n"
-".type " START ",%function\n"
-START ":\n"
-"	mov x29, #0\n"
-"	mov x30, #0\n"
-"	mov x0, sp\n"
-".weak _DYNAMIC\n"
-".hidden _DYNAMIC\n"
-"	adrp x1, _DYNAMIC\n"
-"	add x1, x1, #:lo12:_DYNAMIC\n"
-"	and sp, x0, #-16\n"
-"	b " START "_c\n"
-);
lib/libc/wasi/libc-top-half/musl/arch/aarch64/fp_arch.h
@@ -1,25 +0,0 @@
-#define fp_barrierf fp_barrierf
-static inline float fp_barrierf(float x)
-{
-	__asm__ __volatile__ ("" : "+w"(x));
-	return x;
-}
-
-#define fp_barrier fp_barrier
-static inline double fp_barrier(double x)
-{
-	__asm__ __volatile__ ("" : "+w"(x));
-	return x;
-}
-
-#define fp_force_evalf fp_force_evalf
-static inline void fp_force_evalf(float x)
-{
-	__asm__ __volatile__ ("" : "+w"(x));
-}
-
-#define fp_force_eval fp_force_eval
-static inline void fp_force_eval(double x)
-{
-	__asm__ __volatile__ ("" : "+w"(x));
-}
lib/libc/wasi/libc-top-half/musl/arch/aarch64/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	unsigned long __pad;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __pad2;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/aarch64/pthread_arch.h
@@ -1,11 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("mrs %0,tpidr_el0" : "=r"(tp));
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 16
-
-#define MC_PC pc
lib/libc/wasi/libc-top-half/musl/arch/aarch64/reloc.h
@@ -1,24 +0,0 @@
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define ENDIAN_SUFFIX "_be"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "aarch64" ENDIAN_SUFFIX
-
-#define NO_LEGACY_INITFINI
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_AARCH64_ABS64
-#define REL_GOT         R_AARCH64_GLOB_DAT
-#define REL_PLT         R_AARCH64_JUMP_SLOT
-#define REL_RELATIVE    R_AARCH64_RELATIVE
-#define REL_COPY        R_AARCH64_COPY
-#define REL_DTPMOD      R_AARCH64_TLS_DTPMOD64
-#define REL_DTPOFF      R_AARCH64_TLS_DTPREL64
-#define REL_TPOFF       R_AARCH64_TLS_TPREL64
-#define REL_TLSDESC     R_AARCH64_TLSDESC
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mov sp,%1 ; br %0" : : "r"(pc), "r"(sp) : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/aarch64/syscall_arch.h
@@ -1,78 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define __asm_syscall(...) do { \
-	__asm__ __volatile__ ( "svc 0" \
-	: "=r"(x0) : __VA_ARGS__ : "memory", "cc"); \
-	return x0; \
-	} while (0)
-
-static inline long __syscall0(long n)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0");
-	__asm_syscall("r"(x8));
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	__asm_syscall("r"(x8), "0"(x0));
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	register long x1 __asm__("x1") = b;
-	__asm_syscall("r"(x8), "0"(x0), "r"(x1));
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	register long x1 __asm__("x1") = b;
-	register long x2 __asm__("x2") = c;
-	__asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2));
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	register long x1 __asm__("x1") = b;
-	register long x2 __asm__("x2") = c;
-	register long x3 __asm__("x3") = d;
-	__asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3));
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	register long x1 __asm__("x1") = b;
-	register long x2 __asm__("x2") = c;
-	register long x3 __asm__("x3") = d;
-	register long x4 __asm__("x4") = e;
-	__asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4));
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long x8 __asm__("x8") = n;
-	register long x0 __asm__("x0") = a;
-	register long x1 __asm__("x1") = b;
-	register long x2 __asm__("x2") = c;
-	register long x3 __asm__("x3") = d;
-	register long x4 __asm__("x4") = e;
-	register long x5 __asm__("x5") = f;
-	__asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(x5));
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__kernel_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6.39"
-
-#define IPC_64 0
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/alltypes.h.in
@@ -1,21 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#if __ARMEB__
-#define __BYTE_ORDER 4321
-#else
-#define __BYTE_ORDER 1234
-#endif
-
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-TYPEDEF unsigned wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY  040000
-#define O_NOFOLLOW  0100000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT    0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/fenv.h
@@ -1,23 +0,0 @@
-#ifndef __ARM_PCS_VFP
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-#else
-#define FE_INVALID    1
-#define FE_DIVBYZERO  2
-#define FE_OVERFLOW   4
-#define FE_UNDERFLOW  8
-#define FE_INEXACT    16
-#define FE_ALL_EXCEPT 31
-#define FE_TONEAREST  0
-#define FE_DOWNWARD   0x800000
-#define FE_UPWARD     0x400000
-#define FE_TOWARDZERO 0xc00000
-#endif
-
-typedef unsigned long fexcept_t;
-
-typedef struct {
-	unsigned long __cw;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/hwcap.h
@@ -1,53 +0,0 @@
-#define HWCAP_SWP	(1 << 0)
-#define HWCAP_HALF	(1 << 1)
-#define HWCAP_THUMB	(1 << 2)
-#define HWCAP_26BIT	(1 << 3)
-#define HWCAP_FAST_MULT	(1 << 4)
-#define HWCAP_FPA	(1 << 5)
-#define HWCAP_VFP	(1 << 6)
-#define HWCAP_EDSP	(1 << 7)
-#define HWCAP_JAVA	(1 << 8)
-#define HWCAP_IWMMXT	(1 << 9)
-#define HWCAP_CRUNCH	(1 << 10)
-#define HWCAP_THUMBEE	(1 << 11)
-#define HWCAP_NEON	(1 << 12)
-#define HWCAP_VFPv3	(1 << 13)
-#define HWCAP_VFPv3D16	(1 << 14)
-#define HWCAP_TLS	(1 << 15)
-#define HWCAP_VFPv4	(1 << 16)
-#define HWCAP_IDIVA	(1 << 17)
-#define HWCAP_IDIVT	(1 << 18)
-#define HWCAP_VFPD32	(1 << 19)
-#define HWCAP_IDIV	(HWCAP_IDIVA | HWCAP_IDIVT)
-#define HWCAP_LPAE	(1 << 20)
-#define HWCAP_EVTSTRM	(1 << 21)
-
-#define HWCAP2_AES	(1 << 0)
-#define HWCAP2_PMULL	(1 << 1)
-#define HWCAP2_SHA1	(1 << 2)
-#define HWCAP2_SHA2	(1 << 3)
-#define HWCAP2_CRC32	(1 << 4)
-
-#define HWCAP_ARM_SWP	(1 << 0)
-#define HWCAP_ARM_HALF	(1 << 1)
-#define HWCAP_ARM_THUMB	(1 << 2)
-#define HWCAP_ARM_26BIT	(1 << 3)
-#define HWCAP_ARM_FAST_MULT	(1 << 4)
-#define HWCAP_ARM_FPA	(1 << 5)
-#define HWCAP_ARM_VFP	(1 << 6)
-#define HWCAP_ARM_EDSP	(1 << 7)
-#define HWCAP_ARM_JAVA	(1 << 8)
-#define HWCAP_ARM_IWMMXT	(1 << 9)
-#define HWCAP_ARM_CRUNCH	(1 << 10)
-#define HWCAP_ARM_THUMBEE	(1 << 11)
-#define HWCAP_ARM_NEON	(1 << 12)
-#define HWCAP_ARM_VFPv3	(1 << 13)
-#define HWCAP_ARM_VFPv3D16	(1 << 14)
-#define HWCAP_ARM_TLS	(1 << 15)
-#define HWCAP_ARM_VFPv4	(1 << 16)
-#define HWCAP_ARM_IDIVA	(1 << 17)
-#define HWCAP_ARM_IDIVT	(1 << 18)
-#define HWCAP_ARM_VFPD32	(1 << 19)
-#define HWCAP_ARM_IDIV	(HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT)
-#define HWCAP_ARM_LPAE	(1 << 20)
-#define HWCAP_ARM_EVTSTRM	(1 << 21)
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/ioctl_fix.h
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/ptrace.h
@@ -1,25 +0,0 @@
-#define PTRACE_GETWMMXREGS	18
-#define PTRACE_SETWMMXREGS	19
-#define PTRACE_GET_THREAD_AREA	22
-#define PTRACE_SET_SYSCALL	23
-#define PTRACE_GETCRUNCHREGS	25
-#define PTRACE_SETCRUNCHREGS	26
-#define PTRACE_GETVFPREGS	27
-#define PTRACE_SETVFPREGS	28
-#define PTRACE_GETHBPREGS	29
-#define PTRACE_SETHBPREGS	30
-#define PTRACE_GETFDPIC		31
-#define PTRACE_GETFDPIC_EXEC	0
-#define PTRACE_GETFDPIC_INTERP	1
-
-#define PT_GETWMMXREGS PTRACE_GETWMMXREGS
-#define PT_SETWMMXREGS PTRACE_SETWMMXREGS
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_SYSCALL PTRACE_SET_SYSCALL
-#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS
-#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS
-#define PT_GETVFPREGS PTRACE_GETVFPREGS
-#define PT_SETVFPREGS PTRACE_SETVFPREGS
-#define PT_GETHBPREGS PTRACE_GETHBPREGS
-#define PT_SETHBPREGS PTRACE_SETHBPREGS
-#define PT_GETFDPIC PTRACE_GETFDPIC
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/reg.h
@@ -1,3 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-/* FIXME */
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/sem.h
@@ -1,18 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-#else
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-#endif
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[32];
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/signal.h
@@ -1,86 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef int greg_t, gregset_t[18];
-typedef struct sigcontext {
-	unsigned long trap_no, error_code, oldmask;
-	unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
-	unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
-	unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
-	unsigned long arm_ip, arm_sp, arm_lr, arm_pc;
-	unsigned long arm_cpsr, fault_address;
-} mcontext_t;
-#else
-typedef struct {
-	unsigned long __regs[21];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-	unsigned long long uc_regspace[64];
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	ino_t st_ino;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/syscall.h.in
@@ -1,403 +0,0 @@
-#define __NR_restart_syscall	0
-#define __NR_exit	1
-#define __NR_fork	2
-#define __NR_read	3
-#define __NR_write	4
-#define __NR_open	5
-#define __NR_close	6
-#define __NR_creat	8
-#define __NR_link	9
-#define __NR_unlink	10
-#define __NR_execve	11
-#define __NR_chdir	12
-#define __NR_mknod	14
-#define __NR_chmod	15
-#define __NR_lchown	16
-#define __NR_lseek	19
-#define __NR_getpid	20
-#define __NR_mount	21
-#define __NR_setuid	23
-#define __NR_getuid	24
-#define __NR_ptrace	26
-#define __NR_pause	29
-#define __NR_access	33
-#define __NR_nice	34
-#define __NR_sync	36
-#define __NR_kill	37
-#define __NR_rename	38
-#define __NR_mkdir	39
-#define __NR_rmdir	40
-#define __NR_dup	41
-#define __NR_pipe	42
-#define __NR_times	43
-#define __NR_brk	45
-#define __NR_setgid	46
-#define __NR_getgid	47
-#define __NR_geteuid	49
-#define __NR_getegid	50
-#define __NR_acct	51
-#define __NR_umount2	52
-#define __NR_ioctl	54
-#define __NR_fcntl	55
-#define __NR_setpgid	57
-#define __NR_umask	60
-#define __NR_chroot	61
-#define __NR_ustat	62
-#define __NR_dup2	63
-#define __NR_getppid	64
-#define __NR_getpgrp	65
-#define __NR_setsid	66
-#define __NR_sigaction	67
-#define __NR_setreuid	70
-#define __NR_setregid	71
-#define __NR_sigsuspend	72
-#define __NR_sigpending	73
-#define __NR_sethostname	74
-#define __NR_setrlimit	75
-#define __NR_getrusage	77
-#define __NR_gettimeofday_time32	78
-#define __NR_settimeofday_time32	79
-#define __NR_getgroups	80
-#define __NR_setgroups	81
-#define __NR_symlink	83
-#define __NR_readlink	85
-#define __NR_uselib	86
-#define __NR_swapon	87
-#define __NR_reboot	88
-#define __NR_munmap	91
-#define __NR_truncate	92
-#define __NR_ftruncate	93
-#define __NR_fchmod	94
-#define __NR_fchown	95
-#define __NR_getpriority	96
-#define __NR_setpriority	97
-#define __NR_statfs	99
-#define __NR_fstatfs	100
-#define __NR_syslog	103
-#define __NR_setitimer	104
-#define __NR_getitimer	105
-#define __NR_stat	106
-#define __NR_lstat	107
-#define __NR_fstat	108
-#define __NR_vhangup	111
-#define __NR_wait4	114
-#define __NR_swapoff	115
-#define __NR_sysinfo	116
-#define __NR_fsync	118
-#define __NR_sigreturn	119
-#define __NR_clone	120
-#define __NR_setdomainname	121
-#define __NR_uname	122
-#define __NR_adjtimex	124
-#define __NR_mprotect	125
-#define __NR_sigprocmask	126
-#define __NR_init_module	128
-#define __NR_delete_module	129
-#define __NR_quotactl	131
-#define __NR_getpgid	132
-#define __NR_fchdir	133
-#define __NR_bdflush	134
-#define __NR_sysfs	135
-#define __NR_personality	136
-#define __NR_setfsuid	138
-#define __NR_setfsgid	139
-#define __NR__llseek	140
-#define __NR_getdents	141
-#define __NR__newselect	142
-#define __NR_flock	143
-#define __NR_msync	144
-#define __NR_readv	145
-#define __NR_writev	146
-#define __NR_getsid	147
-#define __NR_fdatasync	148
-#define __NR__sysctl	149
-#define __NR_mlock	150
-#define __NR_munlock	151
-#define __NR_mlockall	152
-#define __NR_munlockall	153
-#define __NR_sched_setparam	154
-#define __NR_sched_getparam	155
-#define __NR_sched_setscheduler	156
-#define __NR_sched_getscheduler	157
-#define __NR_sched_yield	158
-#define __NR_sched_get_priority_max	159
-#define __NR_sched_get_priority_min	160
-#define __NR_sched_rr_get_interval	161
-#define __NR_nanosleep	162
-#define __NR_mremap	163
-#define __NR_setresuid	164
-#define __NR_getresuid	165
-#define __NR_poll	168
-#define __NR_nfsservctl	169
-#define __NR_setresgid	170
-#define __NR_getresgid	171
-#define __NR_prctl	172
-#define __NR_rt_sigreturn	173
-#define __NR_rt_sigaction	174
-#define __NR_rt_sigprocmask	175
-#define __NR_rt_sigpending	176
-#define __NR_rt_sigtimedwait	177
-#define __NR_rt_sigqueueinfo	178
-#define __NR_rt_sigsuspend	179
-#define __NR_pread64	180
-#define __NR_pwrite64	181
-#define __NR_chown	182
-#define __NR_getcwd	183
-#define __NR_capget	184
-#define __NR_capset	185
-#define __NR_sigaltstack	186
-#define __NR_sendfile	187
-#define __NR_vfork	190
-#define __NR_ugetrlimit	191
-#define __NR_mmap2	192
-#define __NR_truncate64	193
-#define __NR_ftruncate64	194
-#define __NR_stat64	195
-#define __NR_lstat64	196
-#define __NR_fstat64	197
-#define __NR_lchown32	198
-#define __NR_getuid32	199
-#define __NR_getgid32	200
-#define __NR_geteuid32	201
-#define __NR_getegid32	202
-#define __NR_setreuid32	203
-#define __NR_setregid32	204
-#define __NR_getgroups32	205
-#define __NR_setgroups32	206
-#define __NR_fchown32	207
-#define __NR_setresuid32	208
-#define __NR_getresuid32	209
-#define __NR_setresgid32	210
-#define __NR_getresgid32	211
-#define __NR_chown32	212
-#define __NR_setuid32	213
-#define __NR_setgid32	214
-#define __NR_setfsuid32	215
-#define __NR_setfsgid32	216
-#define __NR_getdents64	217
-#define __NR_pivot_root	218
-#define __NR_mincore	219
-#define __NR_madvise	220
-#define __NR_fcntl64	221
-#define __NR_gettid	224
-#define __NR_readahead	225
-#define __NR_setxattr	226
-#define __NR_lsetxattr	227
-#define __NR_fsetxattr	228
-#define __NR_getxattr	229
-#define __NR_lgetxattr	230
-#define __NR_fgetxattr	231
-#define __NR_listxattr	232
-#define __NR_llistxattr	233
-#define __NR_flistxattr	234
-#define __NR_removexattr	235
-#define __NR_lremovexattr	236
-#define __NR_fremovexattr	237
-#define __NR_tkill	238
-#define __NR_sendfile64	239
-#define __NR_futex	240
-#define __NR_sched_setaffinity	241
-#define __NR_sched_getaffinity	242
-#define __NR_io_setup	243
-#define __NR_io_destroy	244
-#define __NR_io_getevents	245
-#define __NR_io_submit	246
-#define __NR_io_cancel	247
-#define __NR_exit_group	248
-#define __NR_lookup_dcookie	249
-#define __NR_epoll_create	250
-#define __NR_epoll_ctl	251
-#define __NR_epoll_wait	252
-#define __NR_remap_file_pages	253
-#define __NR_set_tid_address	256
-#define __NR_timer_create	257
-#define __NR_timer_settime32	258
-#define __NR_timer_gettime32	259
-#define __NR_timer_getoverrun	260
-#define __NR_timer_delete	261
-#define __NR_clock_settime32	262
-#define __NR_clock_gettime32	263
-#define __NR_clock_getres_time32	264
-#define __NR_clock_nanosleep_time32	265
-#define __NR_statfs64	266
-#define __NR_fstatfs64	267
-#define __NR_tgkill	268
-#define __NR_utimes	269
-#define __NR_fadvise64_64	270
-#define __NR_arm_fadvise64_64	270
-#define __NR_pciconfig_iobase	271
-#define __NR_pciconfig_read	272
-#define __NR_pciconfig_write	273
-#define __NR_mq_open	274
-#define __NR_mq_unlink	275
-#define __NR_mq_timedsend	276
-#define __NR_mq_timedreceive	277
-#define __NR_mq_notify	278
-#define __NR_mq_getsetattr	279
-#define __NR_waitid	280
-#define __NR_socket	281
-#define __NR_bind	282
-#define __NR_connect	283
-#define __NR_listen	284
-#define __NR_accept	285
-#define __NR_getsockname	286
-#define __NR_getpeername	287
-#define __NR_socketpair	288
-#define __NR_send	289
-#define __NR_sendto	290
-#define __NR_recv	291
-#define __NR_recvfrom	292
-#define __NR_shutdown	293
-#define __NR_setsockopt	294
-#define __NR_getsockopt	295
-#define __NR_sendmsg	296
-#define __NR_recvmsg	297
-#define __NR_semop	298
-#define __NR_semget	299
-#define __NR_semctl	300
-#define __NR_msgsnd	301
-#define __NR_msgrcv	302
-#define __NR_msgget	303
-#define __NR_msgctl	304
-#define __NR_shmat	305
-#define __NR_shmdt	306
-#define __NR_shmget	307
-#define __NR_shmctl	308
-#define __NR_add_key	309
-#define __NR_request_key	310
-#define __NR_keyctl	311
-#define __NR_semtimedop	312
-#define __NR_vserver	313
-#define __NR_ioprio_set	314
-#define __NR_ioprio_get	315
-#define __NR_inotify_init	316
-#define __NR_inotify_add_watch	317
-#define __NR_inotify_rm_watch	318
-#define __NR_mbind	319
-#define __NR_get_mempolicy	320
-#define __NR_set_mempolicy	321
-#define __NR_openat	322
-#define __NR_mkdirat	323
-#define __NR_mknodat	324
-#define __NR_fchownat	325
-#define __NR_futimesat	326
-#define __NR_fstatat64	327
-#define __NR_unlinkat	328
-#define __NR_renameat	329
-#define __NR_linkat	330
-#define __NR_symlinkat	331
-#define __NR_readlinkat	332
-#define __NR_fchmodat	333
-#define __NR_faccessat	334
-#define __NR_pselect6	335
-#define __NR_ppoll	336
-#define __NR_unshare	337
-#define __NR_set_robust_list	338
-#define __NR_get_robust_list	339
-#define __NR_splice	340
-#define __NR_sync_file_range2	341
-#define __NR_arm_sync_file_range	341
-#define __NR_tee	342
-#define __NR_vmsplice	343
-#define __NR_move_pages	344
-#define __NR_getcpu	345
-#define __NR_epoll_pwait	346
-#define __NR_kexec_load	347
-#define __NR_utimensat	348
-#define __NR_signalfd	349
-#define __NR_timerfd_create	350
-#define __NR_eventfd	351
-#define __NR_fallocate	352
-#define __NR_timerfd_settime32	353
-#define __NR_timerfd_gettime32	354
-#define __NR_signalfd4	355
-#define __NR_eventfd2	356
-#define __NR_epoll_create1	357
-#define __NR_dup3	358
-#define __NR_pipe2	359
-#define __NR_inotify_init1	360
-#define __NR_preadv	361
-#define __NR_pwritev	362
-#define __NR_rt_tgsigqueueinfo	363
-#define __NR_perf_event_open	364
-#define __NR_recvmmsg	365
-#define __NR_accept4	366
-#define __NR_fanotify_init	367
-#define __NR_fanotify_mark	368
-#define __NR_prlimit64	369
-#define __NR_name_to_handle_at	370
-#define __NR_open_by_handle_at	371
-#define __NR_clock_adjtime	372
-#define __NR_syncfs	373
-#define __NR_sendmmsg	374
-#define __NR_setns	375
-#define __NR_process_vm_readv	376
-#define __NR_process_vm_writev	377
-#define __NR_kcmp		378
-#define __NR_finit_module	379
-#define __NR_sched_setattr	380
-#define __NR_sched_getattr	381
-#define __NR_renameat2	382
-#define __NR_seccomp	383
-#define __NR_getrandom	384
-#define __NR_memfd_create	385
-#define __NR_bpf	386
-#define __NR_execveat	387
-#define __NR_userfaultfd	388
-#define __NR_membarrier		389
-#define __NR_mlock2		390
-#define __NR_copy_file_range	391
-#define __NR_preadv2	392
-#define __NR_pwritev2	393
-#define __NR_pkey_mprotect	394
-#define __NR_pkey_alloc	395
-#define __NR_pkey_free	396
-#define __NR_statx	397
-#define __NR_rseq	398
-#define __NR_io_pgetevents	399
-#define __NR_migrate_pages	400
-#define __NR_kexec_file_load	401
-#define __NR_clock_gettime64	403
-#define __NR_clock_settime64	404
-#define __NR_clock_adjtime64	405
-#define __NR_clock_getres_time64	406
-#define __NR_clock_nanosleep_time64	407
-#define __NR_timer_gettime64	408
-#define __NR_timer_settime64	409
-#define __NR_timerfd_gettime64	410
-#define __NR_timerfd_settime64	411
-#define __NR_utimensat_time64	412
-#define __NR_pselect6_time64	413
-#define __NR_ppoll_time64	414
-#define __NR_io_pgetevents_time64	416
-#define __NR_recvmmsg_time64	417
-#define __NR_mq_timedsend_time64	418
-#define __NR_mq_timedreceive_time64	419
-#define __NR_semtimedop_time64	420
-#define __NR_rt_sigtimedwait_time64	421
-#define __NR_futex_time64	422
-#define __NR_sched_rr_get_interval_time64	423
-#define __NR_pidfd_send_signal	424
-#define __NR_io_uring_setup	425
-#define __NR_io_uring_enter	426
-#define __NR_io_uring_register	427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
-#define __ARM_NR_breakpoint	0x0f0001
-#define __ARM_NR_cacheflush	0x0f0002
-#define __ARM_NR_usr26		0x0f0003
-#define __ARM_NR_usr32		0x0f0004
-#define __ARM_NR_set_tls	0x0f0005
-#define __ARM_NR_get_tls	0x0f0006
-
lib/libc/wasi/libc-top-half/musl/arch/arm/bits/user.h
@@ -1,36 +0,0 @@
-typedef struct user_fpregs {
-	struct fp_reg {
-		unsigned sign1:1;
-		unsigned unused:15;
-		unsigned sign2:1;
-		unsigned exponent:14;
-		unsigned j:1;
-		unsigned mantissa1:31;
-		unsigned mantissa0:32;
-	} fpregs[8];
-	unsigned fpsr:32;
-	unsigned fpcr:32;
-	unsigned char ftype[8];
-	unsigned int init_flag;
-} elf_fpregset_t;
-
-struct user_regs {
-	unsigned long uregs[18];
-};
-#define ELF_NGREG 18
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct user {
-	struct user_regs regs;
-	int u_fpvalid;
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long start_code, start_stack;
-	long signal;
-	int reserved;
-	struct user_regs *u_ar0;
-	unsigned long magic;
-	char u_comm[32];
-	int u_debugreg[8];
-	struct user_fpregs u_fp;
-	struct user_fpregs *u_fp0;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/arm/atomic_arch.h
@@ -1,107 +0,0 @@
-#include "libc.h"
-
-#if __ARM_ARCH_4__ || __ARM_ARCH_4T__ || __ARM_ARCH == 4
-#define BLX "mov lr,pc\n\tbx"
-#else
-#define BLX "blx"
-#endif
-
-extern hidden uintptr_t __a_cas_ptr, __a_barrier_ptr;
-
-#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
- || __ARM_ARCH_6T2__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
-
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ ("ldrex %0, %1" : "=r"(v) : "Q"(*p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ ("strex %0,%2,%1" : "=&r"(r), "=Q"(*p) : "r"(v) : "memory");
-	return !r;
-}
-
-#if __ARM_ARCH_7A__ || __ARM_ARCH_7R__ ||  __ARM_ARCH >= 7
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("dmb ish" : : : "memory");
-}
-
-#endif
-
-#define a_pre_llsc a_barrier
-#define a_post_llsc a_barrier
-
-#else
-
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	for (;;) {
-		register int r0 __asm__("r0") = t;
-		register int r1 __asm__("r1") = s;
-		register volatile int *r2 __asm__("r2") = p;
-		register uintptr_t r3 __asm__("r3") = __a_cas_ptr;
-		int old;
-		__asm__ __volatile__ (
-			BLX " r3"
-			: "+r"(r0), "+r"(r3) : "r"(r1), "r"(r2)
-			: "memory", "lr", "ip", "cc" );
-		if (!r0) return t;
-		if ((old=*p)!=t) return old;
-	}
-}
-
-#endif
-
-#ifndef a_barrier
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	register uintptr_t ip __asm__("ip") = __a_barrier_ptr;
-	__asm__ __volatile__( BLX " ip" : "+r"(ip) : : "memory", "cc", "lr" );
-}
-#endif
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__(
-#ifndef __thumb__
-		".word 0xe7f000f0"
-#else
-		".short 0xdeff"
-#endif
-		: : : "memory");
-}
-
-#if __ARM_ARCH >= 5 && (!__thumb__ || __thumb2__)
-
-#define a_clz_32 a_clz_32
-static inline int a_clz_32(uint32_t x)
-{
-	__asm__ ("clz %0, %1" : "=r"(x) : "r"(x));
-	return x;
-}
-
-#if __ARM_ARCH_6T2__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
-
-#define a_ctz_32 a_ctz_32
-static inline int a_ctz_32(uint32_t x)
-{
-	uint32_t xr;
-	__asm__ ("rbit %0, %1" : "=r"(xr) : "r"(x));
-	return a_clz_32(xr);
-}
-
-#endif
-
-#endif
lib/libc/wasi/libc-top-half/musl/arch/arm/crt_arch.h
@@ -1,18 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-".type " START ",%function \n"
-START ": \n"
-"	mov fp, #0 \n"
-"	mov lr, #0 \n"
-"	ldr a2, 1f \n"
-"	add a2, pc, a2 \n"
-"	mov a1, sp \n"
-"2:	and ip, a1, #-16 \n"
-"	mov sp, ip \n"
-"	bl " START "_c \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-".align 2 \n"
-"1:	.word _DYNAMIC-2b \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/arm/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	ino_t st_ino;
-};
lib/libc/wasi/libc-top-half/musl/arch/arm/pthread_arch.h
@@ -1,32 +0,0 @@
-#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
- || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
-
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ( "mrc p15,0,%0,c13,c0,3" : "=r"(tp) );
-	return tp;
-}
-
-#else
-
-#if __ARM_ARCH_4__ || __ARM_ARCH_4T__ || __ARM_ARCH == 4
-#define BLX "mov lr,pc\n\tbx"
-#else
-#define BLX "blx"
-#endif
-
-static inline uintptr_t __get_tp()
-{
-	extern hidden uintptr_t __a_gettp_ptr;
-	register uintptr_t tp __asm__("r0");
-	__asm__ ( BLX " %1" : "=r"(tp) : "r"(__a_gettp_ptr) : "cc", "lr" );
-	return tp;
-}
-
-#endif
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 8
-
-#define MC_PC arm_pc
lib/libc/wasi/libc-top-half/musl/arch/arm/reloc.h
@@ -1,32 +0,0 @@
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define ENDIAN_SUFFIX "eb"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#if __ARM_PCS_VFP
-#define FP_SUFFIX "hf"
-#else
-#define FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "arm" ENDIAN_SUFFIX FP_SUFFIX
-
-#define NO_LEGACY_INITFINI
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_ARM_ABS32
-#define REL_GOT         R_ARM_GLOB_DAT
-#define REL_PLT         R_ARM_JUMP_SLOT
-#define REL_RELATIVE    R_ARM_RELATIVE
-#define REL_COPY        R_ARM_COPY
-#define REL_DTPMOD      R_ARM_TLS_DTPMOD32
-#define REL_DTPOFF      R_ARM_TLS_DTPOFF32
-#define REL_TPOFF       R_ARM_TLS_TPOFF32
-#define REL_TLSDESC     R_ARM_TLS_DESC
-
-#define TLSDESC_BACKWARDS
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mov sp,%1 ; bx %0" : : "r"(pc), "r"(sp) : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/arm/syscall_arch.h
@@ -1,103 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-#ifdef __thumb__
-
-/* Avoid use of r7 in asm constraints when producing thumb code,
- * since it's reserved as frame pointer and might not be supported. */
-#define __ASM____R7__
-#define __asm_syscall(...) do { \
-	__asm__ __volatile__ ( "mov %1,r7 ; mov r7,%2 ; svc 0 ; mov r7,%1" \
-	: "=r"(r0), "=&r"((int){0}) : __VA_ARGS__ : "memory"); \
-	return r0; \
-	} while (0)
-
-#else
-
-#define __ASM____R7__ __asm__("r7")
-#define __asm_syscall(...) do { \
-	__asm__ __volatile__ ( "svc 0" \
-	: "=r"(r0) : __VA_ARGS__ : "memory"); \
-	return r0; \
-	} while (0)
-#endif
-
-/* For thumb2, we can allow 8-bit immediate syscall numbers, saving a
- * register in the above dance around r7. Does not work for thumb1 where
- * only movs, not mov, supports immediates, and we can't use movs because
- * it doesn't support high regs. */
-#ifdef __thumb2__
-#define R7_OPERAND "rI"(r7)
-#else
-#define R7_OPERAND "r"(r7)
-#endif
-
-static inline long __syscall0(long n)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0");
-	__asm_syscall(R7_OPERAND);
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	__asm_syscall(R7_OPERAND, "0"(r0));
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	register long r1 __asm__("r1") = b;
-	__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1));
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	register long r1 __asm__("r1") = b;
-	register long r2 __asm__("r2") = c;
-	__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1), "r"(r2));
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	register long r1 __asm__("r1") = b;
-	register long r2 __asm__("r2") = c;
-	register long r3 __asm__("r3") = d;
-	__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1), "r"(r2), "r"(r3));
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	register long r1 __asm__("r1") = b;
-	register long r2 __asm__("r2") = c;
-	register long r3 __asm__("r3") = d;
-	register long r4 __asm__("r4") = e;
-	__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4));
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r7 __ASM____R7__ = n;
-	register long r0 __asm__("r0") = a;
-	register long r1 __asm__("r1") = b;
-	register long r2 __asm__("r2") = c;
-	register long r3 __asm__("r3") = d;
-	register long r4 __asm__("r4") = e;
-	register long r5 __asm__("r5") = f;
-	__asm_syscall(R7_OPERAND, "0"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5));
-}
-
-#define SYSCALL_FADVISE_6_ARG
-
-#define SYSCALL_IPC_BROKEN_MODE
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/alltypes.h.in
@@ -1,31 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#define __BYTE_ORDER 1234
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-#ifdef __WCHAR_TYPE__
-TYPEDEF __WCHAR_TYPE__ wchar_t;
-#else
-TYPEDEF long wchar_t;
-#endif
-#endif
-
-#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-#else
-TYPEDEF long double float_t;
-TYPEDEF long double double_t;
-#endif
-
-#if !defined(__cplusplus)
-TYPEDEF struct { _Alignas(8) long long __ll; long double __ld; } max_align_t;
-#elif defined(__GNUC__)
-TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __ld; } max_align_t;
-#else
-TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t;
-#endif
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/fenv.h
@@ -1,33 +0,0 @@
-#define FE_INVALID    1
-#define __FE_DENORM   2
-#define FE_DIVBYZERO  4
-#define FE_OVERFLOW   8
-#define FE_UNDERFLOW  16
-#define FE_INEXACT    32
-
-#define FE_ALL_EXCEPT 63
-
-#define FE_TONEAREST  0
-#define FE_DOWNWARD   0x400
-#define FE_UPWARD     0x800
-#define FE_TOWARDZERO 0xc00
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned short __control_word;
-	unsigned short __unused1;
-	unsigned short __status_word;
-	unsigned short __unused2;
-	unsigned short __tags;
-	unsigned short __unused3;
-	unsigned int __eip;
-	unsigned short __cs_selector;
-	unsigned int __opcode:11;
-	unsigned int __unused4:5;
-	unsigned int __data_offset;
-	unsigned short __data_selector;
-	unsigned short __unused5;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/float.h
@@ -1,20 +0,0 @@
-#ifdef __FLT_EVAL_METHOD__
-#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-#else
-#define FLT_EVAL_METHOD 2
-#endif
-
-#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L
-#define LDBL_MIN     3.3621031431120935063e-4932L
-#define LDBL_MAX     1.1897314953572317650e+4932L
-#define LDBL_EPSILON 1.0842021724855044340e-19L
-
-#define LDBL_MANT_DIG 64
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 18
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 21
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/io.h
@@ -1,77 +0,0 @@
-static __inline void outb(unsigned char __val, unsigned short __port)
-{
-	__asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outw(unsigned short __val, unsigned short __port)
-{
-	__asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outl(unsigned int __val, unsigned short __port)
-{
-	__asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline unsigned char inb(unsigned short __port)
-{
-	unsigned char __val;
-	__asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned short inw(unsigned short __port)
-{
-	unsigned short __val;
-	__asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned int inl(unsigned short __port)
-{
-	unsigned int __val;
-	__asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsb"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsw"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsl"
-		      : "+S" (__buf), "+c"(__n)
-		      : "d" (__port));
-}
-
-static __inline void insb(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insb"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insw(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insw"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insl(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insl"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 4096
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/mman.h
@@ -1,1 +0,0 @@
-#define MAP_32BIT      0x40
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/ptrace.h
@@ -1,11 +0,0 @@
-#define PTRACE_GET_THREAD_AREA		25
-#define PTRACE_SET_THREAD_AREA		26
-#define PTRACE_SYSEMU			31
-#define PTRACE_SYSEMU_SINGLESTEP	32
-#define PTRACE_SINGLEBLOCK		33
-
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
-#define PT_SYSEMU PTRACE_SYSEMU
-#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/reg.h
@@ -1,19 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-#define EBX 0
-#define ECX 1
-#define EDX 2
-#define ESI 3
-#define EDI 4
-#define EBP 5
-#define EAX 6
-#define DS 7
-#define ES 8
-#define FS 9
-#define GS 10
-#define ORIG_EAX 11
-#define EIP 12
-#define CS 13
-#define EFL 14
-#define UESP 15
-#define SS 16
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/sem.h
@@ -1,13 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[6];
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/signal.h
@@ -1,142 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#ifdef _GNU_SOURCE
-enum { REG_GS = 0 };
-#define REG_GS REG_GS
-enum { REG_FS = 1 };
-#define REG_FS REG_FS
-enum { REG_ES = 2 };
-#define REG_ES REG_ES
-enum { REG_DS = 3 };
-#define REG_DS REG_DS
-enum { REG_EDI = 4 };
-#define REG_EDI REG_EDI
-enum { REG_ESI = 5 };
-#define REG_ESI REG_ESI
-enum { REG_EBP = 6 };
-#define REG_EBP REG_EBP
-enum { REG_ESP = 7 };
-#define REG_ESP REG_ESP
-enum { REG_EBX = 8 };
-#define REG_EBX REG_EBX
-enum { REG_EDX = 9 };
-#define REG_EDX REG_EDX
-enum { REG_ECX = 10 };
-#define REG_ECX REG_ECX
-enum { REG_EAX = 11 };
-#define REG_EAX REG_EAX
-enum { REG_TRAPNO = 12 };
-#define REG_TRAPNO REG_TRAPNO
-enum { REG_ERR = 13 };
-#define REG_ERR REG_ERR
-enum { REG_EIP = 14 };
-#define REG_EIP REG_EIP
-enum { REG_CS = 15 };
-#define REG_CS REG_CS
-enum { REG_EFL = 16 };
-#define REG_EFL REG_EFL
-enum { REG_UESP = 17 };
-#define REG_UESP REG_UESP
-enum { REG_SS = 18 };
-#define REG_SS REG_SS
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef int greg_t, gregset_t[19];
-typedef struct _fpstate {
-	unsigned long cw, sw, tag, ipoff, cssel, dataoff, datasel;
-	struct {
-		unsigned short significand[4], exponent;
-	} _st[8];
-	unsigned long status;
-} *fpregset_t;
-struct sigcontext {
-	unsigned short gs, __gsh, fs, __fsh, es, __esh, ds, __dsh;
-	unsigned long edi, esi, ebp, esp, ebx, edx, ecx, eax;
-	unsigned long trapno, err, eip;
-	unsigned short cs, __csh;
-	unsigned long eflags, esp_at_signal;
-	unsigned short ss, __ssh;
-	struct _fpstate *fpstate;
-	unsigned long oldmask, cr2;
-};
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	unsigned long oldmask, cr2;
-} mcontext_t;
-#else
-typedef struct {
-	unsigned __space[22];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-	unsigned long __fpregs_mem[28];
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
-
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	ino_t st_ino;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/syscall.h.in
@@ -1,433 +0,0 @@
-#define __NR_restart_syscall      0
-#define __NR_exit		  1
-#define __NR_fork		  2
-#define __NR_read		  3
-#define __NR_write		  4
-#define __NR_open		  5
-#define __NR_close		  6
-#define __NR_waitpid		  7
-#define __NR_creat		  8
-#define __NR_link		  9
-#define __NR_unlink		 10
-#define __NR_execve		 11
-#define __NR_chdir		 12
-#define __NR_time		 13
-#define __NR_mknod		 14
-#define __NR_chmod		 15
-#define __NR_lchown		 16
-#define __NR_break		 17
-#define __NR_oldstat		 18
-#define __NR_lseek		 19
-#define __NR_getpid		 20
-#define __NR_mount		 21
-#define __NR_umount		 22
-#define __NR_setuid		 23
-#define __NR_getuid		 24
-#define __NR_stime		 25
-#define __NR_ptrace		 26
-#define __NR_alarm		 27
-#define __NR_oldfstat		 28
-#define __NR_pause		 29
-#define __NR_utime		 30
-#define __NR_stty		 31
-#define __NR_gtty		 32
-#define __NR_access		 33
-#define __NR_nice		 34
-#define __NR_ftime		 35
-#define __NR_sync		 36
-#define __NR_kill		 37
-#define __NR_rename		 38
-#define __NR_mkdir		 39
-#define __NR_rmdir		 40
-#define __NR_dup		 41
-#define __NR_pipe		 42
-#define __NR_times		 43
-#define __NR_prof		 44
-#define __NR_brk		 45
-#define __NR_setgid		 46
-#define __NR_getgid		 47
-#define __NR_signal		 48
-#define __NR_geteuid		 49
-#define __NR_getegid		 50
-#define __NR_acct		 51
-#define __NR_umount2		 52
-#define __NR_lock		 53
-#define __NR_ioctl		 54
-#define __NR_fcntl		 55
-#define __NR_mpx		 56
-#define __NR_setpgid		 57
-#define __NR_ulimit		 58
-#define __NR_oldolduname	 59
-#define __NR_umask		 60
-#define __NR_chroot		 61
-#define __NR_ustat		 62
-#define __NR_dup2		 63
-#define __NR_getppid		 64
-#define __NR_getpgrp		 65
-#define __NR_setsid		 66
-#define __NR_sigaction		 67
-#define __NR_sgetmask		 68
-#define __NR_ssetmask		 69
-#define __NR_setreuid		 70
-#define __NR_setregid		 71
-#define __NR_sigsuspend		 72
-#define __NR_sigpending		 73
-#define __NR_sethostname	 74
-#define __NR_setrlimit		 75
-#define __NR_getrlimit		 76   /* Back compatible 2Gig limited rlimit */
-#define __NR_getrusage		 77
-#define __NR_gettimeofday_time32	 78
-#define __NR_settimeofday_time32	 79
-#define __NR_getgroups		 80
-#define __NR_setgroups		 81
-#define __NR_select		 82
-#define __NR_symlink		 83
-#define __NR_oldlstat		 84
-#define __NR_readlink		 85
-#define __NR_uselib		 86
-#define __NR_swapon		 87
-#define __NR_reboot		 88
-#define __NR_readdir		 89
-#define __NR_mmap		 90
-#define __NR_munmap		 91
-#define __NR_truncate		 92
-#define __NR_ftruncate		 93
-#define __NR_fchmod		 94
-#define __NR_fchown		 95
-#define __NR_getpriority	 96
-#define __NR_setpriority	 97
-#define __NR_profil		 98
-#define __NR_statfs		99
-#define __NR_fstatfs		100
-#define __NR_ioperm		101
-#define __NR_socketcall		102
-#define __NR_syslog		103
-#define __NR_setitimer		104
-#define __NR_getitimer		105
-#define __NR_stat		106
-#define __NR_lstat		107
-#define __NR_fstat		108
-#define __NR_olduname		109
-#define __NR_iopl		110
-#define __NR_vhangup		111
-#define __NR_idle		112
-#define __NR_vm86old		113
-#define __NR_wait4		114
-#define __NR_swapoff		115
-#define __NR_sysinfo		116
-#define __NR_ipc		117
-#define __NR_fsync		118
-#define __NR_sigreturn		119
-#define __NR_clone		120
-#define __NR_setdomainname	121
-#define __NR_uname		122
-#define __NR_modify_ldt		123
-#define __NR_adjtimex		124
-#define __NR_mprotect		125
-#define __NR_sigprocmask	126
-#define __NR_create_module	127
-#define __NR_init_module	128
-#define __NR_delete_module	129
-#define __NR_get_kernel_syms	130
-#define __NR_quotactl		131
-#define __NR_getpgid		132
-#define __NR_fchdir		133
-#define __NR_bdflush		134
-#define __NR_sysfs		135
-#define __NR_personality	136
-#define __NR_afs_syscall	137
-#define __NR_setfsuid		138
-#define __NR_setfsgid		139
-#define __NR__llseek		140
-#define __NR_getdents		141
-#define __NR__newselect		142
-#define __NR_flock		143
-#define __NR_msync		144
-#define __NR_readv		145
-#define __NR_writev		146
-#define __NR_getsid		147
-#define __NR_fdatasync		148
-#define __NR__sysctl		149
-#define __NR_mlock		150
-#define __NR_munlock		151
-#define __NR_mlockall		152
-#define __NR_munlockall		153
-#define __NR_sched_setparam		154
-#define __NR_sched_getparam		155
-#define __NR_sched_setscheduler		156
-#define __NR_sched_getscheduler		157
-#define __NR_sched_yield		158
-#define __NR_sched_get_priority_max	159
-#define __NR_sched_get_priority_min	160
-#define __NR_sched_rr_get_interval	161
-#define __NR_nanosleep		162
-#define __NR_mremap		163
-#define __NR_setresuid		164
-#define __NR_getresuid		165
-#define __NR_vm86		166
-#define __NR_query_module	167
-#define __NR_poll		168
-#define __NR_nfsservctl		169
-#define __NR_setresgid		170
-#define __NR_getresgid		171
-#define __NR_prctl              172
-#define __NR_rt_sigreturn	173
-#define __NR_rt_sigaction	174
-#define __NR_rt_sigprocmask	175
-#define __NR_rt_sigpending	176
-#define __NR_rt_sigtimedwait	177
-#define __NR_rt_sigqueueinfo	178
-#define __NR_rt_sigsuspend	179
-#define __NR_pread64		180
-#define __NR_pwrite64		181
-#define __NR_chown		182
-#define __NR_getcwd		183
-#define __NR_capget		184
-#define __NR_capset		185
-#define __NR_sigaltstack	186
-#define __NR_sendfile		187
-#define __NR_getpmsg		188
-#define __NR_putpmsg		189
-#define __NR_vfork		190
-#define __NR_ugetrlimit		191
-#define __NR_mmap2		192
-#define __NR_truncate64		193
-#define __NR_ftruncate64	194
-#define __NR_stat64		195
-#define __NR_lstat64		196
-#define __NR_fstat64		197
-#define __NR_lchown32		198
-#define __NR_getuid32		199
-#define __NR_getgid32		200
-#define __NR_geteuid32		201
-#define __NR_getegid32		202
-#define __NR_setreuid32		203
-#define __NR_setregid32		204
-#define __NR_getgroups32	205
-#define __NR_setgroups32	206
-#define __NR_fchown32		207
-#define __NR_setresuid32	208
-#define __NR_getresuid32	209
-#define __NR_setresgid32	210
-#define __NR_getresgid32	211
-#define __NR_chown32		212
-#define __NR_setuid32		213
-#define __NR_setgid32		214
-#define __NR_setfsuid32		215
-#define __NR_setfsgid32		216
-#define __NR_pivot_root		217
-#define __NR_mincore		218
-#define __NR_madvise		219
-#define __NR_getdents64		220
-#define __NR_fcntl64		221
-/* 223 is unused */
-#define __NR_gettid		224
-#define __NR_readahead		225
-#define __NR_setxattr		226
-#define __NR_lsetxattr		227
-#define __NR_fsetxattr		228
-#define __NR_getxattr		229
-#define __NR_lgetxattr		230
-#define __NR_fgetxattr		231
-#define __NR_listxattr		232
-#define __NR_llistxattr		233
-#define __NR_flistxattr		234
-#define __NR_removexattr	235
-#define __NR_lremovexattr	236
-#define __NR_fremovexattr	237
-#define __NR_tkill		238
-#define __NR_sendfile64		239
-#define __NR_futex		240
-#define __NR_sched_setaffinity	241
-#define __NR_sched_getaffinity	242
-#define __NR_set_thread_area	243
-#define __NR_get_thread_area	244
-#define __NR_io_setup		245
-#define __NR_io_destroy		246
-#define __NR_io_getevents	247
-#define __NR_io_submit		248
-#define __NR_io_cancel		249
-#define __NR_fadvise64		250
-/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
-#define __NR_exit_group		252
-#define __NR_lookup_dcookie	253
-#define __NR_epoll_create	254
-#define __NR_epoll_ctl		255
-#define __NR_epoll_wait		256
-#define __NR_remap_file_pages	257
-#define __NR_set_tid_address	258
-#define __NR_timer_create	259
-#define __NR_timer_settime32	(__NR_timer_create+1)
-#define __NR_timer_gettime32	(__NR_timer_create+2)
-#define __NR_timer_getoverrun	(__NR_timer_create+3)
-#define __NR_timer_delete	(__NR_timer_create+4)
-#define __NR_clock_settime32	(__NR_timer_create+5)
-#define __NR_clock_gettime32	(__NR_timer_create+6)
-#define __NR_clock_getres_time32	(__NR_timer_create+7)
-#define __NR_clock_nanosleep_time32	(__NR_timer_create+8)
-#define __NR_statfs64		268
-#define __NR_fstatfs64		269
-#define __NR_tgkill		270
-#define __NR_utimes		271
-#define __NR_fadvise64_64	272
-#define __NR_vserver		273
-#define __NR_mbind		274
-#define __NR_get_mempolicy	275
-#define __NR_set_mempolicy	276
-#define __NR_mq_open 		277
-#define __NR_mq_unlink		(__NR_mq_open+1)
-#define __NR_mq_timedsend	(__NR_mq_open+2)
-#define __NR_mq_timedreceive	(__NR_mq_open+3)
-#define __NR_mq_notify		(__NR_mq_open+4)
-#define __NR_mq_getsetattr	(__NR_mq_open+5)
-#define __NR_kexec_load		283
-#define __NR_waitid		284
-/* #define __NR_sys_setaltroot	285 */
-#define __NR_add_key		286
-#define __NR_request_key	287
-#define __NR_keyctl		288
-#define __NR_ioprio_set		289
-#define __NR_ioprio_get		290
-#define __NR_inotify_init	291
-#define __NR_inotify_add_watch	292
-#define __NR_inotify_rm_watch	293
-#define __NR_migrate_pages	294
-#define __NR_openat		295
-#define __NR_mkdirat		296
-#define __NR_mknodat		297
-#define __NR_fchownat		298
-#define __NR_futimesat		299
-#define __NR_fstatat64		300
-#define __NR_unlinkat		301
-#define __NR_renameat		302
-#define __NR_linkat		303
-#define __NR_symlinkat		304
-#define __NR_readlinkat		305
-#define __NR_fchmodat		306
-#define __NR_faccessat		307
-#define __NR_pselect6		308
-#define __NR_ppoll		309
-#define __NR_unshare		310
-#define __NR_set_robust_list	311
-#define __NR_get_robust_list	312
-#define __NR_splice		313
-#define __NR_sync_file_range	314
-#define __NR_tee		315
-#define __NR_vmsplice		316
-#define __NR_move_pages		317
-#define __NR_getcpu		318
-#define __NR_epoll_pwait	319
-#define __NR_utimensat		320
-#define __NR_signalfd		321
-#define __NR_timerfd_create	322
-#define __NR_eventfd		323
-#define __NR_fallocate		324
-#define __NR_timerfd_settime32	325
-#define __NR_timerfd_gettime32	326
-#define __NR_signalfd4		327
-#define __NR_eventfd2		328
-#define __NR_epoll_create1	329
-#define __NR_dup3		330
-#define __NR_pipe2		331
-#define __NR_inotify_init1	332
-#define __NR_preadv		333
-#define __NR_pwritev		334
-#define __NR_rt_tgsigqueueinfo	335
-#define __NR_perf_event_open	336
-#define __NR_recvmmsg		337
-#define __NR_fanotify_init	338
-#define __NR_fanotify_mark	339
-#define __NR_prlimit64		340
-#define __NR_name_to_handle_at	341
-#define __NR_open_by_handle_at	342
-#define __NR_clock_adjtime	343
-#define __NR_syncfs		344
-#define __NR_sendmmsg		345
-#define __NR_setns		346
-#define __NR_process_vm_readv	347
-#define __NR_process_vm_writev	348
-#define __NR_kcmp		349
-#define __NR_finit_module	350
-#define __NR_sched_setattr	351
-#define __NR_sched_getattr	352
-#define __NR_renameat2		353
-#define __NR_seccomp		354
-#define __NR_getrandom		355
-#define __NR_memfd_create	356
-#define __NR_bpf		357
-#define __NR_execveat		358
-#define __NR_socket		359
-#define __NR_socketpair		360
-#define __NR_bind		361
-#define __NR_connect		362
-#define __NR_listen		363
-#define __NR_accept4		364
-#define __NR_getsockopt		365
-#define __NR_setsockopt		366
-#define __NR_getsockname	367
-#define __NR_getpeername	368
-#define __NR_sendto		369
-#define __NR_sendmsg		370
-#define __NR_recvfrom		371
-#define __NR_recvmsg		372
-#define __NR_shutdown		373
-#define __NR_userfaultfd	374
-#define __NR_membarrier		375
-#define __NR_mlock2		376
-#define __NR_copy_file_range	377
-#define __NR_preadv2		378
-#define __NR_pwritev2		379
-#define __NR_pkey_mprotect	380
-#define __NR_pkey_alloc		381
-#define __NR_pkey_free		382
-#define __NR_statx		383
-#define __NR_arch_prctl		384
-#define __NR_io_pgetevents	385
-#define __NR_rseq		386
-#define __NR_semget		393
-#define __NR_semctl		394
-#define __NR_shmget		395
-#define __NR_shmctl		396
-#define __NR_shmat		397
-#define __NR_shmdt		398
-#define __NR_msgget		399
-#define __NR_msgsnd		400
-#define __NR_msgrcv		401
-#define __NR_msgctl		402
-#define __NR_clock_gettime64	403
-#define __NR_clock_settime64	404
-#define __NR_clock_adjtime64	405
-#define __NR_clock_getres_time64 406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64	408
-#define __NR_timer_settime64	409
-#define __NR_timerfd_gettime64	410
-#define __NR_timerfd_settime64	411
-#define __NR_utimensat_time64	412
-#define __NR_pselect6_time64	413
-#define __NR_ppoll_time64	414
-#define __NR_io_pgetevents_time64 416
-#define __NR_recvmmsg_time64	417
-#define __NR_mq_timedsend_time64 418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64	420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64	422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal	424
-#define __NR_io_uring_setup	425
-#define __NR_io_uring_enter	426
-#define __NR_io_uring_register	427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/i386/bits/user.h
@@ -1,44 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-
-typedef struct user_fpregs_struct {
-	long cwd, swd, twd, fip, fcs, foo, fos, st_space[20];
-} elf_fpregset_t;
-
-typedef struct user_fpxregs_struct {
-	unsigned short cwd, swd, twd, fop;
-	long fip, fcs, foo, fos, mxcsr, reserved;
-	long st_space[32], xmm_space[32], padding[56];
-} elf_fpxregset_t;
-
-struct user_regs_struct {
-	long ebx, ecx, edx, esi, edi, ebp, eax, xds, xes, xfs, xgs;
-	long orig_eax, eip, xcs, eflags, esp, xss;
-};
-
-#define ELF_NGREG 17
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct user {
-	struct user_regs_struct		regs;
-	int				u_fpvalid;
-	struct user_fpregs_struct	i387;
-	unsigned long			u_tsize;
-	unsigned long			u_dsize;
-	unsigned long			u_ssize;
-	unsigned long			start_code;
-	unsigned long			start_stack;
-	long				signal;
-	int				reserved;
-	struct user_regs_struct		*u_ar0;
-	struct user_fpregs_struct	*u_fpstate;
-	unsigned long			magic;
-	char				u_comm[32];
-	int				u_debugreg[8];
-};
-
-#define PAGE_MASK		(~(PAGESIZE-1))
-#define NBPG			PAGESIZE
-#define UPAGES			1
-#define HOST_TEXT_START_ADDR	(u.start_code)
-#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
lib/libc/wasi/libc-top-half/musl/arch/i386/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/i386/atomic_arch.h
@@ -1,108 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__ __volatile__ (
-		"lock ; cmpxchg %3, %1"
-		: "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" );
-	return t;
-}
-
-#define a_swap a_swap
-static inline int a_swap(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"xchg %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_fetch_add a_fetch_add
-static inline int a_fetch_add(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; xadd %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_and a_and
-static inline void a_and(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; and %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_or a_or
-static inline void a_or(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; or %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_inc a_inc
-static inline void a_inc(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; incl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_dec a_dec
-static inline void a_dec(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; decl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_store a_store
-static inline void a_store(volatile int *p, int x)
-{
-	__asm__ __volatile__(
-		"mov %1, %0 ; lock ; orl $0,(%%esp)"
-		: "=m"(*p) : "r"(x) : "memory" );
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__( "" : : : "memory" );
-}
-
-#define a_spin a_spin
-static inline void a_spin()
-{
-	__asm__ __volatile__( "pause" : : : "memory" );
-}
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__( "hlt" : : : "memory" );
-}
-
-#define a_ctz_64 a_ctz_64
-static inline int a_ctz_64(uint64_t x)
-{
-	int r;
-	__asm__( "bsf %1,%0 ; jnz 1f ; bsf %2,%0 ; add $32,%0\n1:"
-		: "=&r"(r) : "r"((unsigned)x), "r"((unsigned)(x>>32)) );
-	return r;
-}
-
-#define a_ctz_32 a_ctz_32
-static inline int a_ctz_32(uint32_t x)
-{
-	int r;
-	__asm__( "bsf %1,%0" : "=r"(r) : "r"(x) );
-	return r;
-}
-
-#define a_clz_32 a_clz_32
-static inline int a_clz_32(uint32_t x)
-{
-	__asm__( "bsr %1,%0 ; xor $31,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/i386/crt_arch.h
@@ -1,16 +0,0 @@
-__asm__(
-".text\n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-".global " START "\n"
-START ":\n"
-"	xor %ebp,%ebp \n"
-"	mov %esp,%eax \n"
-"	and $-16,%esp \n"
-"	push %eax \n"
-"	push %eax \n"
-"	call 1f \n"
-"1:	addl $_DYNAMIC-1b,(%esp) \n"
-"	push %eax \n"
-"	call " START "_c \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/i386/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	ino_t st_ino;
-};
lib/libc/wasi/libc-top-half/musl/arch/i386/pthread_arch.h
@@ -1,8 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("movl %%gs:0,%0" : "=r" (tp) );
-	return tp;
-}
-
-#define MC_PC gregs[REG_EIP]
lib/libc/wasi/libc-top-half/musl/arch/i386/reloc.h
@@ -1,23 +0,0 @@
-#define LDSO_ARCH "i386"
-
-#define REL_SYMBOLIC    R_386_32
-#define REL_OFFSET      R_386_PC32
-#define REL_GOT         R_386_GLOB_DAT
-#define REL_PLT         R_386_JMP_SLOT
-#define REL_RELATIVE    R_386_RELATIVE
-#define REL_COPY        R_386_COPY
-#define REL_DTPMOD      R_386_TLS_DTPMOD32
-#define REL_DTPOFF      R_386_TLS_DTPOFF32
-#define REL_TPOFF       R_386_TLS_TPOFF
-#define REL_TPOFF_NEG   R_386_TLS_TPOFF32
-#define REL_TLSDESC     R_386_TLS_DESC
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mov %1,%%esp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	"	call 1f\n" \
-	"1:	addl $" #sym "-.,(%%esp)\n" \
-	"	pop %0" \
-	: "=r"(*fp) : : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/i386/syscall_arch.h
@@ -1,89 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-
-#if SYSCALL_NO_TLS
-#define SYSCALL_INSNS "int $128"
-#else
-#define SYSCALL_INSNS "call *%%gs:16"
-#endif
-
-#define SYSCALL_INSNS_12 "xchg %%ebx,%%edx ; " SYSCALL_INSNS " ; xchg %%ebx,%%edx"
-#define SYSCALL_INSNS_34 "xchg %%ebx,%%edi ; " SYSCALL_INSNS " ; xchg %%ebx,%%edi"
-
-static inline long __syscall0(long n)
-{
-	unsigned long __ret;
-	__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n) : "memory");
-	return __ret;
-}
-
-static inline long __syscall1(long n, long a1)
-{
-	unsigned long __ret;
-	__asm__ __volatile__ (SYSCALL_INSNS_12 : "=a"(__ret) : "a"(n), "d"(a1) : "memory");
-	return __ret;
-}
-
-static inline long __syscall2(long n, long a1, long a2)
-{
-	unsigned long __ret;
-	__asm__ __volatile__ (SYSCALL_INSNS_12 : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2) : "memory");
-	return __ret;
-}
-
-static inline long __syscall3(long n, long a1, long a2, long a3)
-{
-	unsigned long __ret;
-#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
-	__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3) : "memory");
-#else
-	__asm__ __volatile__ (SYSCALL_INSNS_34 : "=a"(__ret) : "a"(n), "D"(a1), "c"(a2), "d"(a3) : "memory");
-#endif
-	return __ret;
-}
-
-static inline long __syscall4(long n, long a1, long a2, long a3, long a4)
-{
-	unsigned long __ret;
-#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
-	__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4) : "memory");
-#else
-	__asm__ __volatile__ (SYSCALL_INSNS_34 : "=a"(__ret) : "a"(n), "D"(a1), "c"(a2), "d"(a3), "S"(a4) : "memory");
-#endif
-	return __ret;
-}
-
-static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
-{
-	unsigned long __ret;
-#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
-	__asm__ __volatile__ (SYSCALL_INSNS
-		: "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
-#else
-	__asm__ __volatile__ ("pushl %2 ; push %%ebx ; mov 4(%%esp),%%ebx ; " SYSCALL_INSNS " ; pop %%ebx ; add $4,%%esp"
-		: "=a"(__ret) : "a"(n), "g"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
-#endif
-	return __ret;
-}
-
-static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
-{
-	unsigned long __ret;
-#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
-	__asm__ __volatile__ ("pushl %7 ; push %%ebp ; mov 4(%%esp),%%ebp ; " SYSCALL_INSNS " ; pop %%ebp ; add $4,%%esp"
-		: "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4), "D"(a5), "g"(a6) : "memory");
-#else
-	unsigned long a1a6[2] = { a1, a6 };
-	__asm__ __volatile__ ("pushl %1 ; push %%ebx ; push %%ebp ; mov 8(%%esp),%%ebx ; mov 4(%%ebx),%%ebp ; mov (%%ebx),%%ebx ; " SYSCALL_INSNS " ; pop %%ebp ; pop %%ebx ; add $4,%%esp"
-		: "=a"(__ret) : "g"(&a1a6), "a"(n), "c"(a2), "d"(a3), "S"(a4), "D"(a5) : "memory");
-#endif
-	return __ret;
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT32_SYM "__vdso_clock_gettime"
-#define VDSO_CGT32_VER "LINUX_2.6"
-#define VDSO_CGT_SYM "__vdso_clock_gettime64"
-#define VDSO_CGT_VER "LINUX_2.6"
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/alltypes.h.in
@@ -1,25 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#define __BYTE_ORDER 4321
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-#ifdef __WCHAR_TYPE__
-TYPEDEF __WCHAR_TYPE__ wchar_t;
-#else
-TYPEDEF long wchar_t;
-#endif
-#endif
-
-#if __mcffpu__
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-#else
-TYPEDEF long double float_t;
-TYPEDEF long double double_t;
-#endif
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY  040000
-#define O_NOFOLLOW  0100000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT    0200000
-#define O_LARGEFILE 0400000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/fenv.h
@@ -1,29 +0,0 @@
-#if __HAVE_68881__ || __mcffpu__
-
-#define FE_INEXACT    8
-#define FE_DIVBYZERO  16
-#define FE_UNDERFLOW  32
-#define FE_OVERFLOW   64
-#define FE_INVALID    128
-
-#define FE_ALL_EXCEPT 0xf8
-
-#define FE_TONEAREST  0
-#define FE_TOWARDZERO 16
-#define FE_DOWNWARD   32
-#define FE_UPWARD     48
-
-#else
-
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-
-#endif
-
-typedef unsigned fexcept_t;
-
-typedef struct {
-	unsigned __control_register, __status_register, __instruction_address;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/float.h
@@ -1,39 +0,0 @@
-#if !__mcffpu__
-
-#define FLT_EVAL_METHOD 2
-
-#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L
-#define LDBL_MIN     1.68105157155604675313e-4932L
-#define LDBL_MAX     1.1897314953572317650e+4932L
-#define LDBL_EPSILON 1.0842021724855044340e-19L
-
-#define LDBL_MANT_DIG 64
-#define LDBL_MIN_EXP (-16382)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 18
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 21
-
-#else
-
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
-
-#endif
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/ptrace.h
@@ -1,2 +0,0 @@
-#define PTRACE_GET_THREAD_AREA	25
-#define PTRACE_SINGLEBLOCK	33
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/reg.h
@@ -1,45 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-#define PT_D1 0
-#define PT_D2 1
-#define PT_D3 2
-#define PT_D4 3
-#define PT_D5 4
-#define PT_D6 5
-#define PT_D7 6
-#define PT_A0 7
-#define PT_A1 8
-#define PT_A2 9
-#define PT_A3 10
-#define PT_A4 11
-#define PT_A5 12
-#define PT_A6 13
-#define PT_D0 14
-#define PT_USP 15
-#define PT_ORIG_D0 16
-#define PT_SR 17
-#define PT_PC 18
-
-#if __mcffpu__
-#define PT_FP0 21
-#define PT_FP1 23
-#define PT_FP2 25
-#define PT_FP3 27
-#define PT_FP4 29
-#define PT_FP5 31
-#define PT_FP6 33
-#define PT_FP7 35
-#else
-#define PT_FP0 21
-#define PT_FP1 24
-#define PT_FP2 27
-#define PT_FP3 30
-#define PT_FP4 33
-#define PT_FP5 36
-#define PT_FP6 39
-#define PT_FP7 42
-#endif
-
-#define PT_FPCR 45
-#define PT_FPSR 46
-#define PT_FPIAR 47
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/sem.h
@@ -1,13 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[39];
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/signal.h
@@ -1,140 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#ifdef _GNU_SOURCE
-enum { R_D0 = 0 };
-#define R_D0 R_D0
-enum { R_D1 = 1 };
-#define R_D1 R_D1
-enum { R_D2 = 2 };
-#define R_D2 R_D2
-enum { R_D3 = 3 };
-#define R_D3 R_D3
-enum { R_D4 = 4 };
-#define R_D4 R_D4
-enum { R_D5 = 5 };
-#define R_D5 R_D5
-enum { R_D6 = 6 };
-#define R_D6 R_D6
-enum { R_D7 = 7 };
-#define R_D7 R_D7
-enum { R_A0 = 8 };
-#define R_A0 R_A0
-enum { R_A1 = 9 };
-#define R_A1 R_A1
-enum { R_A2 = 10 };
-#define R_A2 R_A2
-enum { R_A3 = 11 };
-#define R_A3 R_A3
-enum { R_A4 = 12 };
-#define R_A4 R_A4
-enum { R_A5 = 13 };
-#define R_A5 R_A5
-enum { R_A6 = 14 };
-#define R_A6 R_A6
-enum { R_A7 = 15 };
-#define R_A7 R_A7
-enum { R_SP = 15 };
-#define R_SP R_SP
-enum { R_PC = 16 };
-#define R_PC R_PC
-enum { R_PS = 17 };
-#define R_PS R_PS
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-struct sigcontext {
-	unsigned long sc_mask, sc_usp, sc_d0, sc_d1, sc_a0, sc_a1;
-	unsigned short sc_sr;
-	unsigned long sc_pc;
-	unsigned short sc_formatvec;
-	unsigned long sc_fpregs[6], sc_fpcntl[3];
-	unsigned char sc_fpstate[216];
-};
-
-typedef int greg_t, gregset_t[18];
-typedef struct {
-	int f_pcr, f_psr, f_fpiaddr, f_fpregs[8][3];
-} fpregset_t;
-
-typedef struct {
-	int version;
-	gregset_t gregs;
-	fpregset_t fpregs;
-} mcontext_t;
-#else
-typedef struct {
-	int __version;
-	int __gregs[18];
-	int __fpregs[27];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	long __reserved[80];
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	short __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	short __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	ino_t st_ino;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/syscall.h.in
@@ -1,412 +0,0 @@
-#define __NR_restart_syscall	  0
-#define __NR_exit		  1
-#define __NR_fork		  2
-#define __NR_read		  3
-#define __NR_write		  4
-#define __NR_open		  5
-#define __NR_close		  6
-#define __NR_waitpid		  7
-#define __NR_creat		  8
-#define __NR_link		  9
-#define __NR_unlink		 10
-#define __NR_execve		 11
-#define __NR_chdir		 12
-#define __NR_time		 13
-#define __NR_mknod		 14
-#define __NR_chmod		 15
-#define __NR_chown		 16
-#define __NR_oldstat		 18
-#define __NR_lseek		 19
-#define __NR_getpid		 20
-#define __NR_mount		 21
-#define __NR_umount		 22
-#define __NR_setuid		 23
-#define __NR_getuid		 24
-#define __NR_stime		 25
-#define __NR_ptrace		 26
-#define __NR_alarm		 27
-#define __NR_oldfstat		 28
-#define __NR_pause		 29
-#define __NR_utime		 30
-#define __NR_access		 33
-#define __NR_nice		 34
-#define __NR_sync		 36
-#define __NR_kill		 37
-#define __NR_rename		 38
-#define __NR_mkdir		 39
-#define __NR_rmdir		 40
-#define __NR_dup		 41
-#define __NR_pipe		 42
-#define __NR_times		 43
-#define __NR_brk		 45
-#define __NR_setgid		 46
-#define __NR_getgid		 47
-#define __NR_signal		 48
-#define __NR_geteuid		 49
-#define __NR_getegid		 50
-#define __NR_acct		 51
-#define __NR_umount2		 52
-#define __NR_ioctl		 54
-#define __NR_fcntl		 55
-#define __NR_setpgid		 57
-#define __NR_umask		 60
-#define __NR_chroot		 61
-#define __NR_ustat		 62
-#define __NR_dup2		 63
-#define __NR_getppid		 64
-#define __NR_getpgrp		 65
-#define __NR_setsid		 66
-#define __NR_sigaction		 67
-#define __NR_sgetmask		 68
-#define __NR_ssetmask		 69
-#define __NR_setreuid		 70
-#define __NR_setregid		 71
-#define __NR_sigsuspend		 72
-#define __NR_sigpending		 73
-#define __NR_sethostname	 74
-#define __NR_setrlimit		 75
-#define __NR_getrlimit		 76
-#define __NR_getrusage		 77
-#define __NR_gettimeofday_time32	 78
-#define __NR_settimeofday_time32	 79
-#define __NR_getgroups		 80
-#define __NR_setgroups		 81
-#define __NR_select		 82
-#define __NR_symlink		 83
-#define __NR_oldlstat		 84
-#define __NR_readlink		 85
-#define __NR_uselib		 86
-#define __NR_swapon		 87
-#define __NR_reboot		 88
-#define __NR_readdir		 89
-#define __NR_mmap		 90
-#define __NR_munmap		 91
-#define __NR_truncate		 92
-#define __NR_ftruncate		 93
-#define __NR_fchmod		 94
-#define __NR_fchown		 95
-#define __NR_getpriority	 96
-#define __NR_setpriority	 97
-#define __NR_statfs		 99
-#define __NR_fstatfs		100
-#define __NR_socketcall		102
-#define __NR_syslog		103
-#define __NR_setitimer		104
-#define __NR_getitimer		105
-#define __NR_stat		106
-#define __NR_lstat		107
-#define __NR_fstat		108
-#define __NR_vhangup		111
-#define __NR_wait4		114
-#define __NR_swapoff		115
-#define __NR_sysinfo		116
-#define __NR_ipc		117
-#define __NR_fsync		118
-#define __NR_sigreturn		119
-#define __NR_clone		120
-#define __NR_setdomainname	121
-#define __NR_uname		122
-#define __NR_cacheflush		123
-#define __NR_adjtimex		124
-#define __NR_mprotect		125
-#define __NR_sigprocmask	126
-#define __NR_create_module	127
-#define __NR_init_module	128
-#define __NR_delete_module	129
-#define __NR_get_kernel_syms	130
-#define __NR_quotactl		131
-#define __NR_getpgid		132
-#define __NR_fchdir		133
-#define __NR_bdflush		134
-#define __NR_sysfs		135
-#define __NR_personality	136
-#define __NR_setfsuid		138
-#define __NR_setfsgid		139
-#define __NR__llseek		140
-#define __NR_getdents		141
-#define __NR__newselect		142
-#define __NR_flock		143
-#define __NR_msync		144
-#define __NR_readv		145
-#define __NR_writev		146
-#define __NR_getsid		147
-#define __NR_fdatasync		148
-#define __NR__sysctl		149
-#define __NR_mlock		150
-#define __NR_munlock		151
-#define __NR_mlockall		152
-#define __NR_munlockall		153
-#define __NR_sched_setparam		154
-#define __NR_sched_getparam		155
-#define __NR_sched_setscheduler		156
-#define __NR_sched_getscheduler		157
-#define __NR_sched_yield		158
-#define __NR_sched_get_priority_max	159
-#define __NR_sched_get_priority_min	160
-#define __NR_sched_rr_get_interval	161
-#define __NR_nanosleep		162
-#define __NR_mremap		163
-#define __NR_setresuid		164
-#define __NR_getresuid		165
-#define __NR_getpagesize	166
-#define __NR_query_module	167
-#define __NR_poll		168
-#define __NR_nfsservctl		169
-#define __NR_setresgid		170
-#define __NR_getresgid		171
-#define __NR_prctl		172
-#define __NR_rt_sigreturn	173
-#define __NR_rt_sigaction	174
-#define __NR_rt_sigprocmask	175
-#define __NR_rt_sigpending	176
-#define __NR_rt_sigtimedwait	177
-#define __NR_rt_sigqueueinfo	178
-#define __NR_rt_sigsuspend	179
-#define __NR_pread64		180
-#define __NR_pwrite64		181
-#define __NR_lchown		182
-#define __NR_getcwd		183
-#define __NR_capget		184
-#define __NR_capset		185
-#define __NR_sigaltstack	186
-#define __NR_sendfile		187
-#define __NR_getpmsg		188
-#define __NR_putpmsg		189
-#define __NR_vfork		190
-#define __NR_ugetrlimit		191
-#define __NR_mmap2		192
-#define __NR_truncate64		193
-#define __NR_ftruncate64	194
-#define __NR_stat64		195
-#define __NR_lstat64		196
-#define __NR_fstat64		197
-#define __NR_chown32		198
-#define __NR_getuid32		199
-#define __NR_getgid32		200
-#define __NR_geteuid32		201
-#define __NR_getegid32		202
-#define __NR_setreuid32		203
-#define __NR_setregid32		204
-#define __NR_getgroups32	205
-#define __NR_setgroups32	206
-#define __NR_fchown32		207
-#define __NR_setresuid32	208
-#define __NR_getresuid32	209
-#define __NR_setresgid32	210
-#define __NR_getresgid32	211
-#define __NR_lchown32		212
-#define __NR_setuid32		213
-#define __NR_setgid32		214
-#define __NR_setfsuid32		215
-#define __NR_setfsgid32		216
-#define __NR_pivot_root		217
-#define __NR_getdents64		220
-#define __NR_gettid		221
-#define __NR_tkill		222
-#define __NR_setxattr		223
-#define __NR_lsetxattr		224
-#define __NR_fsetxattr		225
-#define __NR_getxattr		226
-#define __NR_lgetxattr		227
-#define __NR_fgetxattr		228
-#define __NR_listxattr		229
-#define __NR_llistxattr		230
-#define __NR_flistxattr		231
-#define __NR_removexattr	232
-#define __NR_lremovexattr	233
-#define __NR_fremovexattr	234
-#define __NR_futex		235
-#define __NR_sendfile64		236
-#define __NR_mincore		237
-#define __NR_madvise		238
-#define __NR_fcntl64		239
-#define __NR_readahead		240
-#define __NR_io_setup		241
-#define __NR_io_destroy		242
-#define __NR_io_getevents	243
-#define __NR_io_submit		244
-#define __NR_io_cancel		245
-#define __NR_fadvise64		246
-#define __NR_exit_group		247
-#define __NR_lookup_dcookie	248
-#define __NR_epoll_create	249
-#define __NR_epoll_ctl		250
-#define __NR_epoll_wait		251
-#define __NR_remap_file_pages	252
-#define __NR_set_tid_address	253
-#define __NR_timer_create	254
-#define __NR_timer_settime32	255
-#define __NR_timer_gettime32	256
-#define __NR_timer_getoverrun	257
-#define __NR_timer_delete	258
-#define __NR_clock_settime32	259
-#define __NR_clock_gettime32	260
-#define __NR_clock_getres_time32	261
-#define __NR_clock_nanosleep_time32	262
-#define __NR_statfs64		263
-#define __NR_fstatfs64		264
-#define __NR_tgkill		265
-#define __NR_utimes		266
-#define __NR_fadvise64_64	267
-#define __NR_mbind		268
-#define __NR_get_mempolicy	269
-#define __NR_set_mempolicy	270
-#define __NR_mq_open		271
-#define __NR_mq_unlink		272
-#define __NR_mq_timedsend	273
-#define __NR_mq_timedreceive	274
-#define __NR_mq_notify		275
-#define __NR_mq_getsetattr	276
-#define __NR_waitid		277
-#define __NR_add_key		279
-#define __NR_request_key	280
-#define __NR_keyctl		281
-#define __NR_ioprio_set		282
-#define __NR_ioprio_get		283
-#define __NR_inotify_init	284
-#define __NR_inotify_add_watch	285
-#define __NR_inotify_rm_watch	286
-#define __NR_migrate_pages	287
-#define __NR_openat		288
-#define __NR_mkdirat		289
-#define __NR_mknodat		290
-#define __NR_fchownat		291
-#define __NR_futimesat		292
-#define __NR_fstatat64		293
-#define __NR_unlinkat		294
-#define __NR_renameat		295
-#define __NR_linkat		296
-#define __NR_symlinkat		297
-#define __NR_readlinkat		298
-#define __NR_fchmodat		299
-#define __NR_faccessat		300
-#define __NR_pselect6		301
-#define __NR_ppoll		302
-#define __NR_unshare		303
-#define __NR_set_robust_list	304
-#define __NR_get_robust_list	305
-#define __NR_splice		306
-#define __NR_sync_file_range	307
-#define __NR_tee		308
-#define __NR_vmsplice		309
-#define __NR_move_pages		310
-#define __NR_sched_setaffinity	311
-#define __NR_sched_getaffinity	312
-#define __NR_kexec_load		313
-#define __NR_getcpu		314
-#define __NR_epoll_pwait	315
-#define __NR_utimensat		316
-#define __NR_signalfd		317
-#define __NR_timerfd_create	318
-#define __NR_eventfd		319
-#define __NR_fallocate		320
-#define __NR_timerfd_settime32	321
-#define __NR_timerfd_gettime32	322
-#define __NR_signalfd4		323
-#define __NR_eventfd2		324
-#define __NR_epoll_create1	325
-#define __NR_dup3		326
-#define __NR_pipe2		327
-#define __NR_inotify_init1	328
-#define __NR_preadv		329
-#define __NR_pwritev		330
-#define __NR_rt_tgsigqueueinfo	331
-#define __NR_perf_event_open	332
-#define __NR_get_thread_area	333
-#define __NR_set_thread_area	334
-#define __NR_atomic_cmpxchg_32	335
-#define __NR_atomic_barrier	336
-#define __NR_fanotify_init	337
-#define __NR_fanotify_mark	338
-#define __NR_prlimit64		339
-#define __NR_name_to_handle_at	340
-#define __NR_open_by_handle_at	341
-#define __NR_clock_adjtime	342
-#define __NR_syncfs		343
-#define __NR_setns		344
-#define __NR_process_vm_readv	345
-#define __NR_process_vm_writev	346
-#define __NR_kcmp		347
-#define __NR_finit_module	348
-#define __NR_sched_setattr	349
-#define __NR_sched_getattr	350
-#define __NR_renameat2		351
-#define __NR_getrandom		352
-#define __NR_memfd_create	353
-#define __NR_bpf		354
-#define __NR_execveat		355
-#define __NR_socket		356
-#define __NR_socketpair		357
-#define __NR_bind		358
-#define __NR_connect		359
-#define __NR_listen		360
-#define __NR_accept4		361
-#define __NR_getsockopt		362
-#define __NR_setsockopt		363
-#define __NR_getsockname	364
-#define __NR_getpeername	365
-#define __NR_sendto		366
-#define __NR_sendmsg		367
-#define __NR_recvfrom		368
-#define __NR_recvmsg		369
-#define __NR_shutdown		370
-#define __NR_recvmmsg		371
-#define __NR_sendmmsg		372
-#define __NR_userfaultfd	373
-#define __NR_membarrier		374
-#define __NR_mlock2		375
-#define __NR_copy_file_range	376
-#define __NR_preadv2		377
-#define __NR_pwritev2		378
-#define __NR_statx		379
-#define __NR_seccomp		380
-#define __NR_pkey_mprotect	381
-#define __NR_pkey_alloc		382
-#define __NR_pkey_free		383
-#define __NR_rseq		384
-#define __NR_semget		393
-#define __NR_semctl		394
-#define __NR_shmget		395
-#define __NR_shmctl		396
-#define __NR_shmat		397
-#define __NR_shmdt		398
-#define __NR_msgget		399
-#define __NR_msgsnd		400
-#define __NR_msgrcv		401
-#define __NR_msgctl		402
-#define __NR_clock_gettime64	403
-#define __NR_clock_settime64	404
-#define __NR_clock_adjtime64	405
-#define __NR_clock_getres_time64 406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64	408
-#define __NR_timer_settime64	409
-#define __NR_timerfd_gettime64	410
-#define __NR_timerfd_settime64	411
-#define __NR_utimensat_time64	412
-#define __NR_pselect6_time64	413
-#define __NR_ppoll_time64	414
-#define __NR_io_pgetevents_time64 416
-#define __NR_recvmmsg_time64	417
-#define __NR_mq_timedsend_time64 418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64	420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64	422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal	424
-#define __NR_io_uring_setup	425
-#define __NR_io_uring_enter	426
-#define __NR_io_uring_register	427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
lib/libc/wasi/libc-top-half/musl/arch/m68k/bits/user.h
@@ -1,38 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-
-struct user_m68kfp_struct {
-	unsigned long fpregs[24], fpcntl[3];
-};
-
-struct user_regs_struct {
-	long d1, d2, d3, d4, d5, d6, d7;
-	long a0, a1, a2, a3, a4, a5, a6;
-	long d0, usp, orig_d0;
-	short stkadj, sr;
-	long pc;
-	short fmtvec, __pad;
-};
-
-struct user {
-	struct user_regs_struct regs;
-	int u_fpvalid;
-	struct user_m68kfp_struct m68kfp;
-	unsigned long u_tsize, u_dsize, u_ssize, start_code, start_stack;
-	long signal;
-	int reserved;
-	unsigned long u_ar0;
-	struct user_m68kfp_struct *u_fpstate;
-	unsigned long magic;
-	char u_comm[32];
-};
-
-#define ELF_NGREG 20
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-typedef struct user_m68kfp_struct elf_fpregset_t;
-
-#define NBPG			4096
-#define UPAGES			1
-#define HOST_TEXT_START_ADDR	(u.start_code)
-#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
lib/libc/wasi/libc-top-half/musl/arch/m68k/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/m68k/atomic_arch.h
@@ -1,8 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__ __volatile__ (
-		"cas.l %0, %2, (%1)"
-		: "+d"(t) : "a"(p), "d"(s) : "memory", "cc");
-	return t;
-}
lib/libc/wasi/libc-top-half/musl/arch/m68k/crt_arch.h
@@ -1,14 +0,0 @@
-__asm__(
-".text\n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-".global " START "\n"
-START ":\n"
-"	suba.l %fp,%fp \n"
-"	movea.l %sp,%a0 \n"
-"	lea _DYNAMIC-.-8,%a1 \n"
-"	pea (%pc,%a1) \n"
-"	pea (%a0) \n"
-"	lea " START "_c-.-8,%a1 \n"
-"	jsr (%pc,%a1) \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/m68k/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	short __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	short __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	ino_t st_ino;
-};
lib/libc/wasi/libc-top-half/musl/arch/m68k/pthread_arch.h
@@ -1,12 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	return __syscall(SYS_get_thread_area);
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-#define MC_PC gregs[R_PC]
lib/libc/wasi/libc-top-half/musl/arch/m68k/reloc.h
@@ -1,30 +0,0 @@
-#if __HAVE_68881__
-#define FP_SUFFIX ""
-#elif __mcffpu__
-#define FP_SUFFIX "-fp64"
-#else
-#define FP_SUFFIX "-sf"
-#endif
-
-#define LDSO_ARCH "m68k" FP_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYMBOLIC    R_68K_32
-#define REL_OFFSET      R_68K_PC32
-#define REL_GOT         R_68K_GLOB_DAT
-#define REL_PLT         R_68K_JMP_SLOT
-#define REL_RELATIVE    R_68K_RELATIVE
-#define REL_COPY        R_68K_COPY
-#define REL_DTPMOD      R_68K_TLS_DTPMOD32
-#define REL_DTPOFF      R_68K_TLS_DTPREL32
-#define REL_TPOFF       R_68K_TLS_TPREL32
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"move.l %1,%%sp ; jmp (%0)" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	"lea " #sym "-.-8,%0 \n" \
-	"lea (%%pc,%0),%0 \n" \
-	: "=a"(*fp) : : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/m68k/syscall_arch.h
@@ -1,90 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-
-static __inline long __syscall0(long n)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		:
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1)
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	register unsigned long d2 __asm__("d2") = b;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1), "r"(d2)
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	register unsigned long d2 __asm__("d2") = b;
-	register unsigned long d3 __asm__("d3") = c;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1), "r"(d2), "r"(d3)
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	register unsigned long d2 __asm__("d2") = b;
-	register unsigned long d3 __asm__("d3") = c;
-	register unsigned long d4 __asm__("d4") = d;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1), "r"(d2), "r"(d3), "r"(d4)
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	register unsigned long d2 __asm__("d2") = b;
-	register unsigned long d3 __asm__("d3") = c;
-	register unsigned long d4 __asm__("d4") = d;
-	register unsigned long d5 __asm__("d5") = e;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1), "r"(d2), "r"(d3), "r"(d4), "r"(d5)
-		: "memory");
-	return d0;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register unsigned long d0 __asm__("d0") = n;
-	register unsigned long d1 __asm__("d1") = a;
-	register unsigned long d2 __asm__("d2") = b;
-	register unsigned long d3 __asm__("d3") = c;
-	register unsigned long d4 __asm__("d4") = d;
-	register unsigned long d5 __asm__("d5") = e;
-	register unsigned long a0 __asm__("a0") = f;
-	__asm__ __volatile__ ("trap #0" : "+r"(d0)
-		: "r"(d1), "r"(d2), "r"(d3), "r"(d4), "r"(d5), "r"(a0)
-		: "memory");
-	return d0;
-}
-
-#define SYSCALL_IPC_BROKEN_MODE
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/alltypes.h.in
@@ -1,21 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#if __MICROBLAZEEL__
-#define __BYTE_ORDER 1234
-#else
-#define __BYTE_ORDER 4321
-#endif
-
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/reg.h
@@ -1,3 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-/* FIXME */
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/sem.h
@@ -1,18 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-#else
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-#endif
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[18];
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/signal.h
@@ -1,88 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t, gregset_t[38];
-typedef struct sigcontext {
-	struct {
-		unsigned long r0, r1, r2, r3, r4, r5, r6, r7;
-		unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
-		unsigned long r16, r17, r18, r19, r20, r21, r22, r23;
-		unsigned long r24, r25, r26, r27, r28, r29, r30, r31;
-		unsigned long pc, msr, ear, esr, fsr;
-		int pt_mode;
-	} regs;
-	unsigned long oldmask;
-} mcontext_t;
-#else
-typedef struct {
-	unsigned long __regs[39];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long long __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __st_blksize_padding;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	unsigned __unused[2];
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/syscall.h.in
@@ -1,434 +0,0 @@
-#define __NR_restart_syscall 0
-#define __NR_exit 1
-#define __NR_fork 2
-#define __NR_read 3
-#define __NR_write 4
-#define __NR_open 5
-#define __NR_close 6
-#define __NR_waitpid 7
-#define __NR_creat 8
-#define __NR_link 9
-#define __NR_unlink 10
-#define __NR_execve 11
-#define __NR_chdir 12
-#define __NR_time 13
-#define __NR_mknod 14
-#define __NR_chmod 15
-#define __NR_lchown 16
-#define __NR_break 17
-#define __NR_oldstat 18
-#define __NR_lseek 19
-#define __NR_getpid 20
-#define __NR_mount 21
-#define __NR_umount 22
-#define __NR_setuid 23
-#define __NR_getuid 24
-#define __NR_stime 25
-#define __NR_ptrace 26
-#define __NR_alarm 27
-#define __NR_oldfstat 28
-#define __NR_pause 29
-#define __NR_utime 30
-#define __NR_stty 31
-#define __NR_gtty 32
-#define __NR_access 33
-#define __NR_nice 34
-#define __NR_ftime 35
-#define __NR_sync 36
-#define __NR_kill 37
-#define __NR_rename 38
-#define __NR_mkdir 39
-#define __NR_rmdir 40
-#define __NR_dup 41
-#define __NR_pipe 42
-#define __NR_times 43
-#define __NR_prof 44
-#define __NR_brk 45
-#define __NR_setgid 46
-#define __NR_getgid 47
-#define __NR_signal 48
-#define __NR_geteuid 49
-#define __NR_getegid 50
-#define __NR_acct 51
-#define __NR_umount2 52
-#define __NR_lock 53
-#define __NR_ioctl 54
-#define __NR_fcntl 55
-#define __NR_mpx 56
-#define __NR_setpgid 57
-#define __NR_ulimit 58
-#define __NR_oldolduname 59
-#define __NR_umask 60
-#define __NR_chroot 61
-#define __NR_ustat 62
-#define __NR_dup2 63
-#define __NR_getppid 64
-#define __NR_getpgrp 65
-#define __NR_setsid 66
-#define __NR_sigaction 67
-#define __NR_sgetmask 68
-#define __NR_ssetmask 69
-#define __NR_setreuid 70
-#define __NR_setregid 71
-#define __NR_sigsuspend 72
-#define __NR_sigpending 73
-#define __NR_sethostname 74
-#define __NR_setrlimit 75
-#define __NR_getrlimit 76
-#define __NR_getrusage 77
-#define __NR_gettimeofday_time32 78
-#define __NR_settimeofday_time32 79
-#define __NR_getgroups 80
-#define __NR_setgroups 81
-#define __NR_select 82
-#define __NR_symlink 83
-#define __NR_oldlstat 84
-#define __NR_readlink 85
-#define __NR_uselib 86
-#define __NR_swapon 87
-#define __NR_reboot 88
-#define __NR_readdir 89
-#define __NR_mmap 90
-#define __NR_munmap 91
-#define __NR_truncate 92
-#define __NR_ftruncate 93
-#define __NR_fchmod 94
-#define __NR_fchown 95
-#define __NR_getpriority 96
-#define __NR_setpriority 97
-#define __NR_profil 98
-#define __NR_statfs 99
-#define __NR_fstatfs 100
-#define __NR_ioperm 101
-#define __NR_socketcall 102
-#define __NR_syslog 103
-#define __NR_setitimer 104
-#define __NR_getitimer 105
-#define __NR_stat 106
-#define __NR_lstat 107
-#define __NR_fstat 108
-#define __NR_olduname 109
-#define __NR_iopl 110
-#define __NR_vhangup 111
-#define __NR_idle 112
-#define __NR_vm86old 113
-#define __NR_wait4 114
-#define __NR_swapoff 115
-#define __NR_sysinfo 116
-#define __NR_ipc 117
-#define __NR_fsync 118
-#define __NR_sigreturn 119
-#define __NR_clone 120
-#define __NR_setdomainname 121
-#define __NR_uname 122
-#define __NR_modify_ldt 123
-#define __NR_adjtimex 124
-#define __NR_mprotect 125
-#define __NR_sigprocmask 126
-#define __NR_create_module 127
-#define __NR_init_module 128
-#define __NR_delete_module 129
-#define __NR_get_kernel_syms 130
-#define __NR_quotactl 131
-#define __NR_getpgid 132
-#define __NR_fchdir 133
-#define __NR_bdflush 134
-#define __NR_sysfs 135
-#define __NR_personality 136
-#define __NR_afs_syscall 137
-#define __NR_setfsuid 138
-#define __NR_setfsgid 139
-#define __NR__llseek 140
-#define __NR_getdents 141
-#define __NR__newselect 142
-#define __NR_flock 143
-#define __NR_msync 144
-#define __NR_readv 145
-#define __NR_writev 146
-#define __NR_getsid 147
-#define __NR_fdatasync 148
-#define __NR__sysctl 149
-#define __NR_mlock 150
-#define __NR_munlock 151
-#define __NR_mlockall 152
-#define __NR_munlockall 153
-#define __NR_sched_setparam 154
-#define __NR_sched_getparam 155
-#define __NR_sched_setscheduler 156
-#define __NR_sched_getscheduler 157
-#define __NR_sched_yield 158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval 161
-#define __NR_nanosleep 162
-#define __NR_mremap 163
-#define __NR_setresuid 164
-#define __NR_getresuid 165
-#define __NR_vm86 166
-#define __NR_query_module 167
-#define __NR_poll 168
-#define __NR_nfsservctl 169
-#define __NR_setresgid 170
-#define __NR_getresgid 171
-#define __NR_prctl 172
-#define __NR_rt_sigreturn 173
-#define __NR_rt_sigaction 174
-#define __NR_rt_sigprocmask 175
-#define __NR_rt_sigpending 176
-#define __NR_rt_sigtimedwait 177
-#define __NR_rt_sigqueueinfo 178
-#define __NR_rt_sigsuspend 179
-#define __NR_pread64 180
-#define __NR_pwrite64 181
-#define __NR_chown 182
-#define __NR_getcwd 183
-#define __NR_capget 184
-#define __NR_capset 185
-#define __NR_sigaltstack 186
-#define __NR_sendfile 187
-#define __NR_getpmsg 188
-#define __NR_putpmsg 189
-#define __NR_vfork 190
-#define __NR_ugetrlimit 191
-#define __NR_mmap2 192
-#define __NR_truncate64 193
-#define __NR_ftruncate64 194
-#define __NR_stat64 195
-#define __NR_lstat64 196
-#define __NR_fstat64 197
-#define __NR_lchown32 198
-#define __NR_getuid32 199
-#define __NR_getgid32 200
-#define __NR_geteuid32 201
-#define __NR_getegid32 202
-#define __NR_setreuid32 203
-#define __NR_setregid32 204
-#define __NR_getgroups32 205
-#define __NR_setgroups32 206
-#define __NR_fchown32 207
-#define __NR_setresuid32 208
-#define __NR_getresuid32 209
-#define __NR_setresgid32 210
-#define __NR_getresgid32 211
-#define __NR_chown32 212
-#define __NR_setuid32 213
-#define __NR_setgid32 214
-#define __NR_setfsuid32 215
-#define __NR_setfsgid32 216
-#define __NR_pivot_root 217
-#define __NR_mincore 218
-#define __NR_madvise 219
-#define __NR_getdents64 220
-#define __NR_fcntl64 221
-#define __NR_gettid 224
-#define __NR_readahead 225
-#define __NR_setxattr 226
-#define __NR_lsetxattr 227
-#define __NR_fsetxattr 228
-#define __NR_getxattr 229
-#define __NR_lgetxattr 230
-#define __NR_fgetxattr 231
-#define __NR_listxattr 232
-#define __NR_llistxattr 233
-#define __NR_flistxattr 234
-#define __NR_removexattr 235
-#define __NR_lremovexattr 236
-#define __NR_fremovexattr 237
-#define __NR_tkill 238
-#define __NR_sendfile64 239
-#define __NR_futex 240
-#define __NR_sched_setaffinity 241
-#define __NR_sched_getaffinity 242
-#define __NR_set_thread_area 243
-#define __NR_get_thread_area 244
-#define __NR_io_setup 245
-#define __NR_io_destroy 246
-#define __NR_io_getevents 247
-#define __NR_io_submit 248
-#define __NR_io_cancel 249
-#define __NR_fadvise64 250
-#define __NR_exit_group 252
-#define __NR_lookup_dcookie 253
-#define __NR_epoll_create 254
-#define __NR_epoll_ctl 255
-#define __NR_epoll_wait 256
-#define __NR_remap_file_pages 257
-#define __NR_set_tid_address 258
-#define __NR_timer_create 259
-#define __NR_timer_settime32 260
-#define __NR_timer_gettime32 261
-#define __NR_timer_getoverrun 262
-#define __NR_timer_delete 263
-#define __NR_clock_settime32 264
-#define __NR_clock_gettime32 265
-#define __NR_clock_getres_time32 266
-#define __NR_clock_nanosleep_time32 267
-#define __NR_statfs64 268
-#define __NR_fstatfs64 269
-#define __NR_tgkill 270
-#define __NR_utimes 271
-#define __NR_fadvise64_64 272
-#define __NR_vserver 273
-#define __NR_mbind 274
-#define __NR_get_mempolicy 275
-#define __NR_set_mempolicy 276
-#define __NR_mq_open 277
-#define __NR_mq_unlink 278
-#define __NR_mq_timedsend 279
-#define __NR_mq_timedreceive 280
-#define __NR_mq_notify 281
-#define __NR_mq_getsetattr 282
-#define __NR_kexec_load 283
-#define __NR_waitid 284
-#define __NR_add_key 286
-#define __NR_request_key 287
-#define __NR_keyctl 288
-#define __NR_ioprio_set 289
-#define __NR_ioprio_get 290
-#define __NR_inotify_init 291
-#define __NR_inotify_add_watch 292
-#define __NR_inotify_rm_watch 293
-#define __NR_migrate_pages 294
-#define __NR_openat 295
-#define __NR_mkdirat 296
-#define __NR_mknodat 297
-#define __NR_fchownat 298
-#define __NR_futimesat 299
-#define __NR_fstatat64 300
-#define __NR_unlinkat 301
-#define __NR_renameat 302
-#define __NR_linkat 303
-#define __NR_symlinkat 304
-#define __NR_readlinkat 305
-#define __NR_fchmodat 306
-#define __NR_faccessat 307
-#define __NR_pselect6 308
-#define __NR_ppoll 309
-#define __NR_unshare 310
-#define __NR_set_robust_list 311
-#define __NR_get_robust_list 312
-#define __NR_splice 313
-#define __NR_sync_file_range 314
-#define __NR_tee 315
-#define __NR_vmsplice 316
-#define __NR_move_pages 317
-#define __NR_getcpu 318
-#define __NR_epoll_pwait 319
-#define __NR_utimensat 320
-#define __NR_signalfd 321
-#define __NR_timerfd_create 322
-#define __NR_eventfd 323
-#define __NR_fallocate 324
-#define __NR_semtimedop 325
-#define __NR_timerfd_settime32 326
-#define __NR_timerfd_gettime32 327
-#define __NR_semctl 328
-#define __NR_semget 329
-#define __NR_semop 330
-#define __NR_msgctl 331
-#define __NR_msgget 332
-#define __NR_msgrcv 333
-#define __NR_msgsnd 334
-#define __NR_shmat 335
-#define __NR_shmctl 336
-#define __NR_shmdt 337
-#define __NR_shmget 338
-#define __NR_signalfd4 339
-#define __NR_eventfd2 340
-#define __NR_epoll_create1 341
-#define __NR_dup3 342
-#define __NR_pipe2 343
-#define __NR_inotify_init1 344
-#define __NR_socket 345
-#define __NR_socketpair 346
-#define __NR_bind 347
-#define __NR_listen 348
-#define __NR_accept 349
-#define __NR_connect 350
-#define __NR_getsockname 351
-#define __NR_getpeername 352
-#define __NR_sendto 353
-#define __NR_send 354
-#define __NR_recvfrom 355
-#define __NR_recv 356
-#define __NR_setsockopt 357
-#define __NR_getsockopt 358
-#define __NR_shutdown 359
-#define __NR_sendmsg 360
-#define __NR_recvmsg 361
-#define __NR_accept4 362
-#define __NR_preadv 363
-#define __NR_pwritev 364
-#define __NR_rt_tgsigqueueinfo 365
-#define __NR_perf_event_open 366
-#define __NR_recvmmsg 367
-#define __NR_fanotify_init 368
-#define __NR_fanotify_mark 369
-#define __NR_prlimit64 370
-#define __NR_name_to_handle_at 371
-#define __NR_open_by_handle_at 372
-#define __NR_clock_adjtime 373
-#define __NR_syncfs 374
-#define __NR_setns 375
-#define __NR_sendmmsg 376
-#define __NR_process_vm_readv 377
-#define __NR_process_vm_writev 378
-#define __NR_kcmp 379
-#define __NR_finit_module 380
-#define __NR_sched_setattr 381
-#define __NR_sched_getattr 382
-#define __NR_renameat2 383
-#define __NR_seccomp 384
-#define __NR_getrandom 385
-#define __NR_memfd_create 386
-#define __NR_bpf 387
-#define __NR_execveat 388
-#define __NR_userfaultfd 389
-#define __NR_membarrier 390
-#define __NR_mlock2 391
-#define __NR_copy_file_range 392
-#define __NR_preadv2 393
-#define __NR_pwritev2 394
-#define __NR_pkey_mprotect 395
-#define __NR_pkey_alloc 396
-#define __NR_pkey_free 397
-#define __NR_statx 398
-#define __NR_io_pgetevents 399
-#define __NR_rseq 400
-#define __NR_clock_gettime64 403
-#define __NR_clock_settime64 404
-#define __NR_clock_adjtime64 405
-#define __NR_clock_getres_time64 406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64 408
-#define __NR_timer_settime64 409
-#define __NR_timerfd_gettime64 410
-#define __NR_timerfd_settime64 411
-#define __NR_utimensat_time64 412
-#define __NR_pselect6_time64 413
-#define __NR_ppoll_time64 414
-#define __NR_io_pgetevents_time64 416
-#define __NR_recvmmsg_time64 417
-#define __NR_mq_timedsend_time64 418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64 420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64 422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal 424
-#define __NR_io_uring_setup 425
-#define __NR_io_uring_enter 426
-#define __NR_io_uring_register 427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/microblaze/bits/user.h
@@ -1,25 +0,0 @@
-struct user_fpregs_struct {
-	long cwd, swd, twd, fip, fcs, foo, fos, st_space[20];
-};
-
-struct user_regs_struct {
-	unsigned grp[32], pc, msr, ear, esr, fsr, btr, pvr[12];
-};
-
-struct user {
-	struct user_regs_struct regs;
-	int u_fpvalid;
-	struct user_fpregs_struct elf_fpregset_t;
-	unsigned long u_tsize, u_dsize, u_ssize, start_code, start_stack;
-	long signal;
-	int reserved;
-	struct user_regs_struct *u_ar0;
-	struct user_fpregs_struct *u_fpstate;
-	unsigned long magic;
-	char u_comm[32];
-	int u_debugreg[8];
-};
-
-#define ELF_NGREG 50
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef struct user_fpregs_struct elf_fpregset_t;
lib/libc/wasi/libc-top-half/musl/arch/microblaze/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/microblaze/atomic_arch.h
@@ -1,53 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	register int old, tmp;
-	__asm__ __volatile__ (
-		"	addi %0, r0, 0\n"
-		"1:	lwx %0, %2, r0\n"
-		"	rsubk %1, %0, %3\n"
-		"	bnei %1, 1f\n"
-		"	swx %4, %2, r0\n"
-		"	addic %1, r0, 0\n"
-		"	bnei %1, 1b\n"
-		"1:	"
-		: "=&r"(old), "=&r"(tmp)
-		: "r"(p), "r"(t), "r"(s)
-		: "cc", "memory" );
-	return old;
-}
-
-#define a_swap a_swap
-static inline int a_swap(volatile int *x, int v)
-{
-	register int old, tmp;
-	__asm__ __volatile__ (
-		"	addi %0, r0, 0\n"
-		"1:	lwx %0, %2, r0\n"
-		"	swx %3, %2, r0\n"
-		"	addic %1, r0, 0\n"
-		"	bnei %1, 1b\n"
-		"1:	"
-		: "=&r"(old), "=&r"(tmp)
-		: "r"(x), "r"(v)
-		: "cc", "memory" );
-	return old;
-}
-
-#define a_fetch_add a_fetch_add
-static inline int a_fetch_add(volatile int *x, int v)
-{
-	register int new, tmp;
-	__asm__ __volatile__ (
-		"	addi %0, r0, 0\n"
-		"1:	lwx %0, %2, r0\n"
-		"	addk %0, %0, %3\n"
-		"	swx %0, %2, r0\n"
-		"	addic %1, r0, 0\n"
-		"	bnei %1, 1b\n"
-		"1:	"
-		: "=&r"(new), "=&r"(tmp)
-		: "r"(x), "r"(v)
-		: "cc", "memory" );
-	return new-v;
-}
lib/libc/wasi/libc-top-half/musl/arch/microblaze/crt_arch.h
@@ -1,17 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-".align  2 \n"
-START ": \n"
-"	add r19, r0, r0 \n"
-"	ori r5, r1, 0 \n"
-"1:	mfs r6, rpc \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	addik r6, r6, _GLOBAL_OFFSET_TABLE_+8 \n"
-"	addik r6, r6, _DYNAMIC@GOTOFF \n"
-"	andi r1, r1, -8 \n"
-"	addik r1, r1, -8 \n"
-"	bri " START "_c \n"
-"	nop \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/microblaze/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long long __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __st_blksize_padding;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/microblaze/pthread_arch.h
@@ -1,8 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("ori %0, r21, 0" : "=r" (tp) );
-	return tp;
-}
-
-#define MC_PC regs.pc
lib/libc/wasi/libc-top-half/musl/arch/microblaze/reloc.h
@@ -1,27 +0,0 @@
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "el"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "microblaze" ENDIAN_SUFFIX
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_MICROBLAZE_32
-#define REL_GOT         R_MICROBLAZE_GLOB_DAT
-#define REL_PLT         R_MICROBLAZE_JUMP_SLOT
-#define REL_RELATIVE    R_MICROBLAZE_REL
-#define REL_COPY        R_MICROBLAZE_COPY
-#define REL_DTPMOD      R_MICROBLAZE_TLSDTPMOD32
-#define REL_DTPOFF      R_MICROBLAZE_TLSDTPREL32
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"addik r1,%1,0 ; bra %0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym " \n" \
-	"	mfs %0, rpc \n" \
-	"	addik %0, %0, _GLOBAL_OFFSET_TABLE_+8 \n" \
-	"	addik %0, %0, " #sym "@GOTOFF \n" \
-	: "=r"(*(fp)) : : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/microblaze/syscall_arch.h
@@ -1,99 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-
-static __inline long __syscall0(long n)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	register unsigned long r6 __asm__("r6") = b;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5), "r"(r6)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	register unsigned long r6 __asm__("r6") = b;
-	register unsigned long r7 __asm__("r7") = c;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5), "r"(r6), "r"(r7)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	register unsigned long r6 __asm__("r6") = b;
-	register unsigned long r7 __asm__("r7") = c;
-	register unsigned long r8 __asm__("r8") = d;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5), "r"(r6), "r"(r7), "r"(r8)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	register unsigned long r6 __asm__("r6") = b;
-	register unsigned long r7 __asm__("r7") = c;
-	register unsigned long r8 __asm__("r8") = d;
-	register unsigned long r9 __asm__("r9") = e;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5), "r"(r6), "r"(r7), "r"(r8), "r"(r9)
-		: "memory", "r4");
-	return r3;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register unsigned long r12 __asm__("r12") = n;
-	register unsigned long r3 __asm__("r3");
-	register unsigned long r5 __asm__("r5") = a;
-	register unsigned long r6 __asm__("r6") = b;
-	register unsigned long r7 __asm__("r7") = c;
-	register unsigned long r8 __asm__("r8") = d;
-	register unsigned long r9 __asm__("r9") = e;
-	register unsigned long r10 __asm__("r10") = f;
-	__asm__ __volatile__ ("brki r14, 0x8" : "=r"(r3)
-		: "r"(r12), "r"(r5), "r"(r6), "r"(r7), "r"(r8), "r"(r9), "r"(r10)
-		: "memory", "r4");
-	return r3;
-}
-
-#define SYSCALL_IPC_BROKEN_MODE
-
-#undef SYS_socketcall
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/alltypes.h.in
@@ -1,21 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-#define __BYTE_ORDER 1234
-#else
-#define __BYTE_ORDER 4321
-#endif
-
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/errno.h
@@ -1,134 +0,0 @@
-#define EPERM            1
-#define ENOENT           2
-#define ESRCH            3
-#define EINTR            4
-#define EIO              5
-#define ENXIO            6
-#define E2BIG            7
-#define ENOEXEC          8
-#define EBADF            9
-#define ECHILD          10
-#define EAGAIN          11
-#define ENOMEM          12
-#define EACCES          13
-#define EFAULT          14
-#define ENOTBLK         15
-#define EBUSY           16
-#define EEXIST          17
-#define EXDEV           18
-#define ENODEV          19
-#define ENOTDIR         20
-#define EISDIR          21
-#define EINVAL          22
-#define ENFILE          23
-#define EMFILE          24
-#define ENOTTY          25
-#define ETXTBSY         26
-#define EFBIG           27
-#define ENOSPC          28
-#define ESPIPE          29
-#define EROFS           30
-#define EMLINK          31
-#define EPIPE           32
-#define EDOM            33
-#define ERANGE          34
-#define ENOMSG          35
-#define EIDRM           36
-#define ECHRNG          37
-#define EL2NSYNC        38
-#define EL3HLT          39
-#define EL3RST          40
-#define ELNRNG          41
-#define EUNATCH         42
-#define ENOCSI          43
-#define EL2HLT          44
-#define EDEADLK         45
-#define ENOLCK          46
-#define EBADE           50
-#define EBADR           51
-#define EXFULL          52
-#define ENOANO          53
-#define EBADRQC         54
-#define EBADSLT         55
-#define EDEADLOCK       56
-#define EBFONT          59
-#define ENOSTR          60
-#define ENODATA         61
-#define ETIME           62
-#define ENOSR           63
-#define ENONET          64
-#define ENOPKG          65
-#define EREMOTE         66
-#define ENOLINK         67
-#define EADV            68
-#define ESRMNT          69
-#define ECOMM           70
-#define EPROTO          71
-#define EDOTDOT         73
-#define EMULTIHOP       74
-#define EBADMSG         77
-#define ENAMETOOLONG    78
-#define EOVERFLOW       79
-#define ENOTUNIQ        80
-#define EBADFD          81
-#define EREMCHG         82
-#define ELIBACC         83
-#define ELIBBAD         84
-#define ELIBSCN         85
-#define ELIBMAX         86
-#define ELIBEXEC        87
-#define EILSEQ          88
-#define ENOSYS          89
-#define ELOOP           90
-#define ERESTART        91
-#define ESTRPIPE        92
-#define ENOTEMPTY       93
-#define EUSERS          94
-#define ENOTSOCK        95
-#define EDESTADDRREQ    96
-#define EMSGSIZE        97
-#define EPROTOTYPE      98
-#define ENOPROTOOPT     99
-#define EPROTONOSUPPORT 120
-#define ESOCKTNOSUPPORT 121
-#define EOPNOTSUPP      122
-#define ENOTSUP         EOPNOTSUPP
-#define EPFNOSUPPORT    123
-#define EAFNOSUPPORT    124
-#define EADDRINUSE      125
-#define EADDRNOTAVAIL   126
-#define ENETDOWN        127
-#define ENETUNREACH     128
-#define ENETRESET       129
-#define ECONNABORTED    130
-#define ECONNRESET      131
-#define ENOBUFS         132
-#define EISCONN         133
-#define ENOTCONN        134
-#define EUCLEAN         135
-#define ENOTNAM         137
-#define ENAVAIL         138
-#define EISNAM          139
-#define EREMOTEIO       140
-#define ESHUTDOWN       143
-#define ETOOMANYREFS    144
-#define ETIMEDOUT       145
-#define ECONNREFUSED    146
-#define EHOSTDOWN       147
-#define EHOSTUNREACH    148
-#define EWOULDBLOCK     EAGAIN
-#define EALREADY        149
-#define EINPROGRESS     150
-#define ESTALE          151
-#define ECANCELED       158
-#define ENOMEDIUM       159
-#define EMEDIUMTYPE     160
-#define ENOKEY          161
-#define EKEYEXPIRED     162
-#define EKEYREVOKED     163
-#define EKEYREJECTED    164
-#define EOWNERDEAD      165
-#define ENOTRECOVERABLE 166
-#define ERFKILL         167
-#define EHWPOISON       168
-#define EDQUOT          1133
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0400
-#define O_EXCL        02000
-#define O_NOCTTY      04000
-#define O_TRUNC       01000
-#define O_APPEND       0010
-#define O_NONBLOCK     0200
-#define O_DSYNC        0020
-#define O_SYNC       040020
-#define O_RSYNC      040020
-#define O_DIRECTORY 0200000
-#define O_NOFOLLOW  0400000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      010000
-#define O_DIRECT    0100000
-#define O_LARGEFILE  020000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 24
-#define F_GETOWN 23
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 33
-#define F_SETLK 34
-#define F_SETLKW 35
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/fenv.h
@@ -1,25 +0,0 @@
-#ifdef __mips_soft_float
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-#else
-#define FE_INEXACT    4
-#define FE_UNDERFLOW  8
-#define FE_OVERFLOW   16
-#define FE_DIVBYZERO  32
-#define FE_INVALID    64
-
-#define FE_ALL_EXCEPT 124
-
-#define FE_TONEAREST  0
-#define FE_TOWARDZERO 1
-#define FE_UPWARD     2
-#define FE_DOWNWARD   3
-#endif
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned __cw;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/hwcap.h
@@ -1,14 +0,0 @@
-#define HWCAP_MIPS_R6		(1 << 0)
-#define HWCAP_MIPS_MSA		(1 << 1)
-#define HWCAP_MIPS_CRC32	(1 << 2)
-#define HWCAP_MIPS_MIPS16	(1 << 3)
-#define HWCAP_MIPS_MDMX		(1 << 4)
-#define HWCAP_MIPS_MIPS3D	(1 << 5)
-#define HWCAP_MIPS_SMARTMIPS	(1 << 6)
-#define HWCAP_MIPS_DSP		(1 << 7)
-#define HWCAP_MIPS_DSP2		(1 << 8)
-#define HWCAP_MIPS_DSP3		(1 << 9)
-#define HWCAP_MIPS_MIPS16E2	(1 << 10)
-#define HWCAP_LOONGSON_MMI	(1 << 11)
-#define HWCAP_LOONGSON_EXT	(1 << 12)
-#define HWCAP_LOONGSON_EXT2	(1 << 13)
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/ioctl.h
@@ -1,114 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  1U
-#define _IOC_READ  2U
-#define _IOC_WRITE 4U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define TCGETA		0x5401
-#define TCSETA		0x5402
-#define TCSETAW		0x5403
-#define TCSETAF		0x5404
-#define TCSBRK		0x5405
-#define TCXONC		0x5406
-#define TCFLSH		0x5407
-#define TCGETS		0x540D
-#define TCSETS		0x540E
-#define TCSETSW		0x540F
-#define TCSETSF		0x5410
-
-#define TIOCEXCL	0x740D
-#define TIOCNXCL	0x740E
-#define TIOCOUTQ	0x7472
-#define TIOCSTI		0x5472
-#define TIOCMGET	0x741D
-#define TIOCMBIS	0x741B
-#define TIOCMBIC	0x741C
-#define TIOCMSET	0x741A
-
-#define TIOCPKT		0x5470
-#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
-#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
-#define TIOCNOTTY	0x5471
-#define TIOCSETD	0x7401
-#define TIOCGETD	0x7400
-
-#define FIOCLEX		0x6601
-#define FIONCLEX	0x6602
-#define FIOASYNC	0x667D
-#define FIONBIO		0x667E
-#define FIOQSIZE	0x667F
-
-#define TIOCGLTC        0x7474
-#define TIOCSLTC        0x7475
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-#define TIOCCONS	_IOW('t', 120, int)
-
-#define FIONREAD	0x467F
-#define TIOCINQ		FIONREAD
-
-#define TIOCGETP        0x7408
-#define TIOCSETP        0x7409
-#define TIOCSETN        0x740A
-
-#define TIOCSBRK	0x5427
-#define TIOCCBRK	0x5428
-#define TIOCGSID	0x7416
-#define TIOCGRS485	_IOR('T', 0x2E, char[32])
-#define TIOCSRS485	_IOWR('T', 0x2F, char[32])
-#define TIOCGPTN	_IOR('T', 0x30, unsigned int)
-#define TIOCSPTLCK	_IOW('T', 0x31, int)
-#define TIOCGDEV	_IOR('T', 0x32, unsigned int)
-#define TIOCSIG		_IOW('T', 0x36, int)
-#define TIOCVHANGUP	0x5437
-#define TIOCGPKT	_IOR('T', 0x38, int)
-#define TIOCGPTLCK	_IOR('T', 0x39, int)
-#define TIOCGEXCL	_IOR('T', 0x40, int)
-#define TIOCGPTPEER	_IO('T', 0x41)
-
-#define TIOCSCTTY	0x5480
-#define TIOCGSOFTCAR	0x5481
-#define TIOCSSOFTCAR	0x5482
-#define TIOCLINUX	0x5483
-#define TIOCGSERIAL	0x5484
-#define TIOCSSERIAL	0x5485
-#define TCSBRKP		0x5486
-
-#define TIOCSERCONFIG	0x5488
-#define TIOCSERGWILD	0x5489
-#define TIOCSERSWILD	0x548A
-#define TIOCGLCKTRMIOS	0x548B
-#define TIOCSLCKTRMIOS	0x548C
-#define TIOCSERGSTRUCT	0x548D
-#define TIOCSERGETLSR   0x548E
-#define TIOCSERGETMULTI 0x548F
-#define TIOCSERSETMULTI 0x5490
-#define TIOCMIWAIT	0x5491
-#define TIOCGICOUNT	0x5492
-
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x010
-#define TIOCM_SR	0x020
-#define TIOCM_CTS	0x040
-#define TIOCM_CAR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RNG	0x200
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_DSR	0x400
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-#define FIOGETOWN       _IOR('f', 123, int)
-#define FIOSETOWN       _IOW('f', 124, int)
-#define SIOCATMARK      _IOR('s', 7, int)
-#define SIOCSPGRP       _IOW('s', 8, pid_t)
-#define SIOCGPGRP       _IOR('s', 9, pid_t)
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/mman.h
@@ -1,25 +0,0 @@
-#undef MAP_ANON
-#define MAP_ANON       0x800
-#undef MAP_NORESERVE
-#define MAP_NORESERVE  0x0400
-#undef MAP_GROWSDOWN
-#define MAP_GROWSDOWN  0x1000
-#undef MAP_DENYWRITE
-#define MAP_DENYWRITE  0x2000
-#undef MAP_EXECUTABLE
-#define MAP_EXECUTABLE 0x4000
-#undef MAP_LOCKED
-#define MAP_LOCKED     0x8000
-#undef MAP_POPULATE
-#define MAP_POPULATE   0x10000
-#undef MAP_NONBLOCK
-#define MAP_NONBLOCK   0x20000
-#undef MAP_STACK
-#define MAP_STACK      0x40000
-#undef MAP_HUGETLB
-#define MAP_HUGETLB    0x80000
-#undef MAP_SYNC
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#undef MADV_SOFT_OFFLINE
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/msg.h
@@ -1,27 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-#else
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long __msg_ctime_lo;
-#endif
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/poll.h
@@ -1,2 +0,0 @@
-#define POLLWRNORM POLLOUT
-#define POLLWRBAND 0x100
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/ptrace.h
@@ -1,9 +0,0 @@
-#define PTRACE_GET_THREAD_AREA	25
-#define PTRACE_SET_THREAD_AREA	26
-#define PTRACE_PEEKTEXT_3264	0xc0
-#define PTRACE_PEEKDATA_3264	0xc1
-#define PTRACE_POKETEXT_3264	0xc2
-#define PTRACE_POKEDATA_3264	0xc3
-#define PTRACE_GET_THREAD_AREA_3264	0xc4
-#define PTRACE_GET_WATCH_REGS	0xd0
-#define PTRACE_SET_WATCH_REGS	0xd1
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/reg.h
@@ -1,47 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-
-#define EF_R0 6
-#define EF_R1 7
-#define EF_R2 8
-#define EF_R3 9
-#define EF_R4 10
-#define EF_R5 11
-#define EF_R6 12
-#define EF_R7 13
-#define EF_R8 14
-#define EF_R9 15
-#define EF_R10 16
-#define EF_R11 17
-#define EF_R12 18
-#define EF_R13 19
-#define EF_R14 20
-#define EF_R15 21
-#define EF_R16 22
-#define EF_R17 23
-#define EF_R18 24
-#define EF_R19 25
-#define EF_R20 26
-#define EF_R21 27
-#define EF_R22 28
-#define EF_R23 29
-#define EF_R24 30
-#define EF_R25 31
-
-#define EF_R26 32
-#define EF_R27 33
-#define EF_R28 34
-#define EF_R29 35
-#define EF_R30 36
-#define EF_R31 37
-
-#define EF_LO 38
-#define EF_HI 39
-
-#define EF_CP0_EPC 40
-#define EF_CP0_BADVADDR 41
-#define EF_CP0_STATUS 42
-#define EF_CP0_CAUSE 43
-#define EF_UNUSED0 44
-
-#define EF_SIZE 180
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/resource.h
@@ -1,5 +0,0 @@
-#define RLIMIT_NOFILE  5
-#define RLIMIT_AS      6
-#define RLIMIT_RSS     7
-#define RLIMIT_NPROC   8
-#define RLIMIT_MEMLOCK 9
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/sem.h
@@ -1,16 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_ctime_lo;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-#else
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-#endif
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_hi;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[13];
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/shm.h
@@ -1,29 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_ctime_lo;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned short __shm_atime_hi;
-	unsigned short __shm_dtime_hi;
-	unsigned short __shm_ctime_hi;
-	unsigned short __pad1;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/signal.h
@@ -1,124 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long long greg_t, gregset_t[32];
-typedef struct {
-	union {
-		double fp_dregs[32];
-		struct {
-			float _fp_fregs;
-			unsigned _fp_pad;
-		} fp_fregs[32];
-	} fp_r;
-} fpregset_t;
-struct sigcontext {
-	unsigned sc_regmask, sc_status;
-	unsigned long long sc_pc;
-	gregset_t sc_regs;
-	fpregset_t sc_fpregs;
-	unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
-	unsigned long long sc_mdhi, sc_mdlo;
-	unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
-};
-typedef struct {
-	unsigned regmask, status;
-	unsigned long long pc;
-	gregset_t gregs;
-	fpregset_t fpregs;
-	unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;
-	unsigned long long mdhi, mdlo;
-	unsigned long hi1, lo1, hi2, lo2, hi3, lo3;
-} mcontext_t;
-#else
-typedef struct {
-	unsigned __mc1[2];
-	unsigned long long __mc2[65];
-	unsigned __mc3[5];
-	unsigned long long __mc4[2];
-	unsigned __mc5[6];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	size_t ss_size;
-	int ss_flags;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  0x10000
-#define SA_SIGINFO    8
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#undef SIG_BLOCK
-#undef SIG_UNBLOCK
-#undef SIG_SETMASK
-#define SIG_BLOCK     1
-#define SIG_UNBLOCK   2
-#define SIG_SETMASK   3
-
-#undef SI_ASYNCIO
-#undef SI_MESGQ
-#undef SI_TIMER
-#define SI_ASYNCIO (-2)
-#define SI_MESGQ (-4)
-#define SI_TIMER (-3)
-
-#define __SI_SWAP_ERRNO_CODE
-
-#endif
-
-#define SIGHUP    1
-#define SIGINT    2
-#define SIGQUIT   3
-#define SIGILL    4
-#define SIGTRAP   5
-#define SIGABRT   6
-#define SIGIOT    SIGABRT
-#define SIGEMT    7
-#define SIGFPE    8
-#define SIGKILL   9
-#define SIGBUS    10
-#define SIGSEGV   11
-#define SIGSYS    12
-#define SIGPIPE   13
-#define SIGALRM   14
-#define SIGTERM   15
-#define SIGUSR1   16
-#define SIGUSR2   17
-#define SIGCHLD   18
-#define SIGPWR    19
-#define SIGWINCH  20
-#define SIGURG    21
-#define SIGIO     22
-#define SIGPOLL   SIGIO
-#define SIGSTOP   23
-#define SIGTSTP   24
-#define SIGCONT   25
-#define SIGTTIN   26
-#define SIGTTOU   27
-#define SIGVTALRM 28
-#define SIGPROF   29
-#define SIGXCPU   30
-#define SIGXFSZ   31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 128
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/socket.h
@@ -1,35 +0,0 @@
-#define SOCK_STREAM    2
-#define SOCK_DGRAM     1
-
-#define SOL_SOCKET     65535
-
-#define SO_DEBUG        1
-
-#define SO_REUSEADDR    0x0004
-#define SO_KEEPALIVE    0x0008
-#define SO_DONTROUTE    0x0010
-#define SO_BROADCAST    0x0020
-#define SO_LINGER       0x0080
-#define SO_OOBINLINE    0x0100
-#define SO_REUSEPORT    0x0200
-#define SO_SNDBUF       0x1001
-#define SO_RCVBUF       0x1002
-#define SO_SNDLOWAT     0x1003
-#define SO_RCVLOWAT     0x1004
-#define SO_ERROR        0x1007
-#define SO_TYPE         0x1008
-#define SO_ACCEPTCONN   0x1009
-#define SO_PROTOCOL     0x1028
-#define SO_DOMAIN       0x1029
-
-#define SO_NO_CHECK     11
-#define SO_PRIORITY     12
-#define SO_BSDCOMPAT    14
-#define SO_PASSCRED     17
-#define SO_PEERCRED     18
-#define SO_PEERSEC      30
-#define SO_SNDBUFFORCE  31
-#define SO_RCVBUFFORCE  33
-
-#define SOCK_NONBLOCK     0200
-#define SOCK_CLOEXEC  02000000
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/stat.h
@@ -1,26 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	long __st_padding1[2];
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long __st_padding2[2];
-	off_t st_size;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	blksize_t st_blksize;
-	long __st_padding3;
-	blkcnt_t st_blocks;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	long __st_padding4[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/statfs.h
@@ -1,8 +0,0 @@
-struct statfs {
-	unsigned long f_type, f_bsize, f_frsize;
-	fsblkcnt_t f_blocks, f_bfree;
-	fsfilcnt_t f_files, f_ffree;
-	fsblkcnt_t f_bavail;
-	fsid_t f_fsid;
-	unsigned long f_namelen, f_flags, f_spare[5];
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/syscall.h.in
@@ -1,415 +0,0 @@
-#define __NR_syscall                 4000
-#define __NR_exit                    4001
-#define __NR_fork                    4002
-#define __NR_read                    4003
-#define __NR_write                   4004
-#define __NR_open                    4005
-#define __NR_close                   4006
-#define __NR_waitpid                 4007
-#define __NR_creat                   4008
-#define __NR_link                    4009
-#define __NR_unlink                  4010
-#define __NR_execve                  4011
-#define __NR_chdir                   4012
-#define __NR_time                    4013
-#define __NR_mknod                   4014
-#define __NR_chmod                   4015
-#define __NR_lchown                  4016
-#define __NR_break                   4017
-#define __NR_unused18                4018
-#define __NR_lseek                   4019
-#define __NR_getpid                  4020
-#define __NR_mount                   4021
-#define __NR_umount                  4022
-#define __NR_setuid                  4023
-#define __NR_getuid                  4024
-#define __NR_stime                   4025
-#define __NR_ptrace                  4026
-#define __NR_alarm                   4027
-#define __NR_unused28                4028
-#define __NR_pause                   4029
-#define __NR_utime                   4030
-#define __NR_stty                    4031
-#define __NR_gtty                    4032
-#define __NR_access                  4033
-#define __NR_nice                    4034
-#define __NR_ftime                   4035
-#define __NR_sync                    4036
-#define __NR_kill                    4037
-#define __NR_rename                  4038
-#define __NR_mkdir                   4039
-#define __NR_rmdir                   4040
-#define __NR_dup                     4041
-#define __NR_pipe                    4042
-#define __NR_times                   4043
-#define __NR_prof                    4044
-#define __NR_brk                     4045
-#define __NR_setgid                  4046
-#define __NR_getgid                  4047
-#define __NR_signal                  4048
-#define __NR_geteuid                 4049
-#define __NR_getegid                 4050
-#define __NR_acct                    4051
-#define __NR_umount2                 4052
-#define __NR_lock                    4053
-#define __NR_ioctl                   4054
-#define __NR_fcntl                   4055
-#define __NR_mpx                     4056
-#define __NR_setpgid                 4057
-#define __NR_ulimit                  4058
-#define __NR_unused59                4059
-#define __NR_umask                   4060
-#define __NR_chroot                  4061
-#define __NR_ustat                   4062
-#define __NR_dup2                    4063
-#define __NR_getppid                 4064
-#define __NR_getpgrp                 4065
-#define __NR_setsid                  4066
-#define __NR_sigaction               4067
-#define __NR_sgetmask                4068
-#define __NR_ssetmask                4069
-#define __NR_setreuid                4070
-#define __NR_setregid                4071
-#define __NR_sigsuspend              4072
-#define __NR_sigpending              4073
-#define __NR_sethostname             4074
-#define __NR_setrlimit               4075
-#define __NR_getrlimit               4076
-#define __NR_getrusage               4077
-#define __NR_gettimeofday_time32            4078
-#define __NR_settimeofday_time32            4079
-#define __NR_getgroups               4080
-#define __NR_setgroups               4081
-#define __NR_reserved82              4082
-#define __NR_symlink                 4083
-#define __NR_unused84                4084
-#define __NR_readlink                4085
-#define __NR_uselib                  4086
-#define __NR_swapon                  4087
-#define __NR_reboot                  4088
-#define __NR_readdir                 4089
-#define __NR_mmap                    4090
-#define __NR_munmap                  4091
-#define __NR_truncate                4092
-#define __NR_ftruncate               4093
-#define __NR_fchmod                  4094
-#define __NR_fchown                  4095
-#define __NR_getpriority             4096
-#define __NR_setpriority             4097
-#define __NR_profil                  4098
-#define __NR_statfs                  4099
-#define __NR_fstatfs                 4100
-#define __NR_ioperm                  4101
-#define __NR_socketcall              4102
-#define __NR_syslog                  4103
-#define __NR_setitimer               4104
-#define __NR_getitimer               4105
-#define __NR_stat                    4106
-#define __NR_lstat                   4107
-#define __NR_fstat                   4108
-#define __NR_unused109               4109
-#define __NR_iopl                    4110
-#define __NR_vhangup                 4111
-#define __NR_idle                    4112
-#define __NR_vm86                    4113
-#define __NR_wait4                   4114
-#define __NR_swapoff                 4115
-#define __NR_sysinfo                 4116
-#define __NR_ipc                     4117
-#define __NR_fsync                   4118
-#define __NR_sigreturn               4119
-#define __NR_clone                   4120
-#define __NR_setdomainname           4121
-#define __NR_uname                   4122
-#define __NR_modify_ldt              4123
-#define __NR_adjtimex                4124
-#define __NR_mprotect                4125
-#define __NR_sigprocmask             4126
-#define __NR_create_module           4127
-#define __NR_init_module             4128
-#define __NR_delete_module           4129
-#define __NR_get_kernel_syms         4130
-#define __NR_quotactl                4131
-#define __NR_getpgid                 4132
-#define __NR_fchdir                  4133
-#define __NR_bdflush                 4134
-#define __NR_sysfs                   4135
-#define __NR_personality             4136
-#define __NR_afs_syscall             4137
-#define __NR_setfsuid                4138
-#define __NR_setfsgid                4139
-#define __NR__llseek                 4140
-#define __NR_getdents                4141
-#define __NR__newselect              4142
-#define __NR_flock                   4143
-#define __NR_msync                   4144
-#define __NR_readv                   4145
-#define __NR_writev                  4146
-#define __NR_cacheflush              4147
-#define __NR_cachectl                4148
-#define __NR_sysmips                 4149
-#define __NR_unused150               4150
-#define __NR_getsid                  4151
-#define __NR_fdatasync               4152
-#define __NR__sysctl                 4153
-#define __NR_mlock                   4154
-#define __NR_munlock                 4155
-#define __NR_mlockall                4156
-#define __NR_munlockall              4157
-#define __NR_sched_setparam          4158
-#define __NR_sched_getparam          4159
-#define __NR_sched_setscheduler      4160
-#define __NR_sched_getscheduler      4161
-#define __NR_sched_yield             4162
-#define __NR_sched_get_priority_max  4163
-#define __NR_sched_get_priority_min  4164
-#define __NR_sched_rr_get_interval   4165
-#define __NR_nanosleep               4166
-#define __NR_mremap                  4167
-#define __NR_accept                  4168
-#define __NR_bind                    4169
-#define __NR_connect                 4170
-#define __NR_getpeername             4171
-#define __NR_getsockname             4172
-#define __NR_getsockopt              4173
-#define __NR_listen                  4174
-#define __NR_recv                    4175
-#define __NR_recvfrom                4176
-#define __NR_recvmsg                 4177
-#define __NR_send                    4178
-#define __NR_sendmsg                 4179
-#define __NR_sendto                  4180
-#define __NR_setsockopt              4181
-#define __NR_shutdown                4182
-#define __NR_socket                  4183
-#define __NR_socketpair              4184
-#define __NR_setresuid               4185
-#define __NR_getresuid               4186
-#define __NR_query_module            4187
-#define __NR_poll                    4188
-#define __NR_nfsservctl              4189
-#define __NR_setresgid               4190
-#define __NR_getresgid               4191
-#define __NR_prctl                   4192
-#define __NR_rt_sigreturn            4193
-#define __NR_rt_sigaction            4194
-#define __NR_rt_sigprocmask          4195
-#define __NR_rt_sigpending           4196
-#define __NR_rt_sigtimedwait         4197
-#define __NR_rt_sigqueueinfo         4198
-#define __NR_rt_sigsuspend           4199
-#define __NR_pread64                 4200
-#define __NR_pwrite64                4201
-#define __NR_chown                   4202
-#define __NR_getcwd                  4203
-#define __NR_capget                  4204
-#define __NR_capset                  4205
-#define __NR_sigaltstack             4206
-#define __NR_sendfile                4207
-#define __NR_getpmsg                 4208
-#define __NR_putpmsg                 4209
-#define __NR_mmap2                   4210
-#define __NR_truncate64              4211
-#define __NR_ftruncate64             4212
-#define __NR_stat64                  4213
-#define __NR_lstat64                 4214
-#define __NR_fstat64                 4215
-#define __NR_pivot_root              4216
-#define __NR_mincore                 4217
-#define __NR_madvise                 4218
-#define __NR_getdents64              4219
-#define __NR_fcntl64                 4220
-#define __NR_reserved221             4221
-#define __NR_gettid                  4222
-#define __NR_readahead               4223
-#define __NR_setxattr                4224
-#define __NR_lsetxattr               4225
-#define __NR_fsetxattr               4226
-#define __NR_getxattr                4227
-#define __NR_lgetxattr               4228
-#define __NR_fgetxattr               4229
-#define __NR_listxattr               4230
-#define __NR_llistxattr              4231
-#define __NR_flistxattr              4232
-#define __NR_removexattr             4233
-#define __NR_lremovexattr            4234
-#define __NR_fremovexattr            4235
-#define __NR_tkill                   4236
-#define __NR_sendfile64              4237
-#define __NR_futex                   4238
-#define __NR_sched_setaffinity       4239
-#define __NR_sched_getaffinity       4240
-#define __NR_io_setup                4241
-#define __NR_io_destroy              4242
-#define __NR_io_getevents            4243
-#define __NR_io_submit               4244
-#define __NR_io_cancel               4245
-#define __NR_exit_group              4246
-#define __NR_lookup_dcookie          4247
-#define __NR_epoll_create            4248
-#define __NR_epoll_ctl               4249
-#define __NR_epoll_wait              4250
-#define __NR_remap_file_pages        4251
-#define __NR_set_tid_address         4252
-#define __NR_restart_syscall         4253
-#define __NR_fadvise64               4254
-#define __NR_statfs64                4255
-#define __NR_fstatfs64               4256
-#define __NR_timer_create            4257
-#define __NR_timer_settime32           4258
-#define __NR_timer_gettime32           4259
-#define __NR_timer_getoverrun        4260
-#define __NR_timer_delete            4261
-#define __NR_clock_settime32           4262
-#define __NR_clock_gettime32           4263
-#define __NR_clock_getres_time32            4264
-#define __NR_clock_nanosleep_time32         4265
-#define __NR_tgkill                  4266
-#define __NR_utimes                  4267
-#define __NR_mbind                   4268
-#define __NR_get_mempolicy           4269
-#define __NR_set_mempolicy           4270
-#define __NR_mq_open                 4271
-#define __NR_mq_unlink               4272
-#define __NR_mq_timedsend            4273
-#define __NR_mq_timedreceive         4274
-#define __NR_mq_notify               4275
-#define __NR_mq_getsetattr           4276
-#define __NR_vserver                 4277
-#define __NR_waitid                  4278
-#define __NR_add_key                 4280
-#define __NR_request_key             4281
-#define __NR_keyctl                  4282
-#define __NR_set_thread_area         4283
-#define __NR_inotify_init            4284
-#define __NR_inotify_add_watch       4285
-#define __NR_inotify_rm_watch        4286
-#define __NR_migrate_pages           4287
-#define __NR_openat                  4288
-#define __NR_mkdirat                 4289
-#define __NR_mknodat                 4290
-#define __NR_fchownat                4291
-#define __NR_futimesat               4292
-#define __NR_fstatat64               4293
-#define __NR_unlinkat                4294
-#define __NR_renameat                4295
-#define __NR_linkat                  4296
-#define __NR_symlinkat               4297
-#define __NR_readlinkat              4298
-#define __NR_fchmodat                4299
-#define __NR_faccessat               4300
-#define __NR_pselect6                4301
-#define __NR_ppoll                   4302
-#define __NR_unshare                 4303
-#define __NR_splice                  4304
-#define __NR_sync_file_range         4305
-#define __NR_tee                     4306
-#define __NR_vmsplice                4307
-#define __NR_move_pages              4308
-#define __NR_set_robust_list         4309
-#define __NR_get_robust_list         4310
-#define __NR_kexec_load              4311
-#define __NR_getcpu                  4312
-#define __NR_epoll_pwait             4313
-#define __NR_ioprio_set              4314
-#define __NR_ioprio_get              4315
-#define __NR_utimensat               4316
-#define __NR_signalfd                4317
-#define __NR_timerfd                 4318
-#define __NR_eventfd                 4319
-#define __NR_fallocate               4320
-#define __NR_timerfd_create          4321
-#define __NR_timerfd_gettime32         4322
-#define __NR_timerfd_settime32         4323
-#define __NR_signalfd4               4324
-#define __NR_eventfd2                4325
-#define __NR_epoll_create1           4326
-#define __NR_dup3                    4327
-#define __NR_pipe2                   4328
-#define __NR_inotify_init1           4329
-#define __NR_preadv                  4330
-#define __NR_pwritev                 4331
-#define __NR_rt_tgsigqueueinfo       4332
-#define __NR_perf_event_open         4333
-#define __NR_accept4                 4334
-#define __NR_recvmmsg                4335
-#define __NR_fanotify_init           4336
-#define __NR_fanotify_mark           4337
-#define __NR_prlimit64               4338
-#define __NR_name_to_handle_at       4339
-#define __NR_open_by_handle_at       4340
-#define __NR_clock_adjtime           4341
-#define __NR_syncfs                  4342
-#define __NR_sendmmsg                4343
-#define __NR_setns                   4344
-#define __NR_process_vm_readv        4345
-#define __NR_process_vm_writev       4346
-#define __NR_kcmp                    4347
-#define __NR_finit_module            4348
-#define __NR_sched_setattr           4349
-#define __NR_sched_getattr           4350
-#define __NR_renameat2               4351
-#define __NR_seccomp                 4352
-#define __NR_getrandom               4353
-#define __NR_memfd_create            4354
-#define __NR_bpf                     4355
-#define __NR_execveat                4356
-#define __NR_userfaultfd             4357
-#define __NR_membarrier              4358
-#define __NR_mlock2                  4359
-#define __NR_copy_file_range         4360
-#define __NR_preadv2                 4361
-#define __NR_pwritev2                4362
-#define __NR_pkey_mprotect           4363
-#define __NR_pkey_alloc              4364
-#define __NR_pkey_free               4365
-#define __NR_statx                   4366
-#define __NR_rseq                    4367
-#define __NR_io_pgetevents           4368
-#define __NR_semget                  4393
-#define __NR_semctl                  4394
-#define __NR_shmget                  4395
-#define __NR_shmctl                  4396
-#define __NR_shmat                   4397
-#define __NR_shmdt                   4398
-#define __NR_msgget                  4399
-#define __NR_msgsnd                  4400
-#define __NR_msgrcv                  4401
-#define __NR_msgctl                  4402
-#define __NR_clock_gettime64         4403
-#define __NR_clock_settime64         4404
-#define __NR_clock_adjtime64         4405
-#define __NR_clock_getres_time64     4406
-#define __NR_clock_nanosleep_time64  4407
-#define __NR_timer_gettime64         4408
-#define __NR_timer_settime64         4409
-#define __NR_timerfd_gettime64       4410
-#define __NR_timerfd_settime64       4411
-#define __NR_utimensat_time64        4412
-#define __NR_pselect6_time64         4413
-#define __NR_ppoll_time64            4414
-#define __NR_io_pgetevents_time64    4416
-#define __NR_recvmmsg_time64         4417
-#define __NR_mq_timedsend_time64     4418
-#define __NR_mq_timedreceive_time64  4419
-#define __NR_semtimedop_time64       4420
-#define __NR_rt_sigtimedwait_time64  4421
-#define __NR_futex_time64            4422
-#define __NR_sched_rr_get_interval_time64 4423
-#define __NR_pidfd_send_signal       4424
-#define __NR_io_uring_setup          4425
-#define __NR_io_uring_enter          4426
-#define __NR_io_uring_register       4427
-#define __NR_open_tree		4428
-#define __NR_move_mount		4429
-#define __NR_fsopen		4430
-#define __NR_fsconfig		4431
-#define __NR_fsmount		4432
-#define __NR_fspick		4433
-#define __NR_pidfd_open		4434
-#define __NR_clone3		4435
-#define __NR_close_range	4436
-#define __NR_openat2		4437
-#define __NR_pidfd_getfd	4438
-#define __NR_faccessat2		4439
-
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/termios.h
@@ -1,169 +0,0 @@
-struct termios {
-	tcflag_t c_iflag;
-	tcflag_t c_oflag;
-	tcflag_t c_cflag;
-	tcflag_t c_lflag;
-	cc_t c_line;
-	cc_t c_cc[NCCS];
-	speed_t __c_ispeed;
-	speed_t __c_ospeed;
-};
-
-#define VINTR     0
-#define VQUIT     1
-#define VERASE    2
-#define VKILL     3
-#define VMIN      4
-#define VTIME     5
-#define VEOL2     6
-#define VSWTC     7
-#define VSWTCH    7
-#define VSTART    8
-#define VSTOP     9
-#define VSUSP    10
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE  14
-#define VLNEXT   15
-#define VEOF     16
-#define VEOL     17
-
-#define IGNBRK  0000001
-#define BRKINT  0000002
-#define IGNPAR  0000004
-#define PARMRK  0000010
-#define INPCK   0000020
-#define ISTRIP  0000040
-#define INLCR   0000100
-#define IGNCR   0000200
-#define ICRNL   0000400
-#define IUCLC   0001000
-#define IXON    0002000
-#define IXANY   0004000
-#define IXOFF   0010000
-#define IMAXBEL 0020000
-#define IUTF8   0040000
-
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
-#define NLDLY  0000400
-#define NL0    0000000
-#define NL1    0000400
-#define CRDLY  0003000
-#define CR0    0000000
-#define CR1    0001000
-#define CR2    0002000
-#define CR3    0003000
-#define TABDLY 0014000
-#define TAB0   0000000
-#define TAB1   0004000
-#define TAB2   0010000
-#define TAB3   0014000
-#define BSDLY  0020000
-#define BS0    0000000
-#define BS1    0020000
-#define FFDLY  0100000
-#define FF0    0000000
-#define FF1    0100000
-#endif
-
-#define VTDLY  0040000
-#define VT0    0000000
-#define VT1    0040000
-
-#define B0       0000000
-#define B50      0000001
-#define B75      0000002
-#define B110     0000003
-#define B134     0000004
-#define B150     0000005
-#define B200     0000006
-#define B300     0000007
-#define B600     0000010
-#define B1200    0000011
-#define B1800    0000012
-#define B2400    0000013
-#define B4800    0000014
-#define B9600    0000015
-#define B19200   0000016
-#define B38400   0000017
-
-#define B57600   0010001
-#define B115200  0010002
-#define B230400  0010003
-#define B460800  0010004
-#define B500000  0010005
-#define B576000  0010006
-#define B921600  0010007
-#define B1000000 0010010
-#define B1152000 0010011
-#define B1500000 0010012
-#define B2000000 0010013
-#define B2500000 0010014
-#define B3000000 0010015
-#define B3500000 0010016
-#define B4000000 0010017
-
-#define CSIZE  0000060
-#define CS5    0000000
-#define CS6    0000020
-#define CS7    0000040
-#define CS8    0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-
-#define ISIG   0000001
-#define ICANON 0000002
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define IEXTEN 0000400
-#define TOSTOP 0100000
-#define ITOSTOP 0100000
-
-#define TCOOFF 0
-#define TCOON  1
-#define TCIOFF 2
-#define TCION  3
-
-#define TCIFLUSH  0
-#define TCOFLUSH  1
-#define TCIOFLUSH 2
-
-#define TCSANOW   0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define EXTA    0000016
-#define EXTB    0000017
-#define CBAUD   0010017
-#define CBAUDEX 0010000
-#define CIBAUD  002003600000
-#define CMSPAR  010000000000
-#define CRTSCTS 020000000000
-
-#define XCASE   0000004
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE  0004000
-#define FLUSHO  0020000
-#define PENDIN  0040000
-#define EXTPROC 0200000
-
-#define XTABS  0014000
-#define TIOCSER_TEMT 1
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mips/bits/user.h
@@ -1,13 +0,0 @@
-struct user {
-	unsigned long regs[45+64];
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long start_code, start_data, start_stack;
-	long signal;
-	void *u_ar0;
-	unsigned long magic;
-	char u_comm[32];
-};
-#define ELF_NGREG 45
-#define ELF_NFPREG 33
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG];
lib/libc/wasi/libc-top-half/musl/arch/mips/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/mips/atomic_arch.h
@@ -1,58 +0,0 @@
-#if __mips_isa_rev < 6
-#define LLSC_M "m"
-#else
-#define LLSC_M "ZC"
-#endif
-
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-#if __mips < 2
-	__asm__ __volatile__ (
-		".set push ; .set mips2\n\t"
-		"ll %0, %1"
-		"\n\t.set pop"
-		: "=r"(v) : "m"(*p));
-#else
-	__asm__ __volatile__ (
-		"ll %0, %1"
-		: "=r"(v) : LLSC_M(*p));
-#endif
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-#if __mips < 2
-	__asm__ __volatile__ (
-		".set push ; .set mips2\n\t"
-		"sc %0, %1"
-		"\n\t.set pop"
-		: "=r"(r), "=m"(*p) : "0"(v) : "memory");
-#else
-	__asm__ __volatile__ (
-		"sc %0, %1"
-		: "=r"(r), "="LLSC_M(*p) : "0"(v) : "memory");
-#endif
-	return r;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-#if __mips < 2
-	/* mips2 sync, but using too many directives causes
-	 * gcc not to inline it, so encode with .long instead. */
-	__asm__ __volatile__ (".long 0xf" : : : "memory");
-#else
-	__asm__ __volatile__ ("sync" : : : "memory");
-#endif
-}
-
-#define a_pre_llsc a_barrier
-#define a_post_llsc a_barrier
-
-#undef LLSC_M
lib/libc/wasi/libc-top-half/musl/arch/mips/crt_arch.h
@@ -1,29 +0,0 @@
-__asm__(
-".set push\n"
-".set noreorder\n"
-".text \n"
-".global _" START "\n"
-".global " START "\n"
-".type   _" START ", @function\n"
-".type   " START ", @function\n"
-"_" START ":\n"
-"" START ":\n"
-"	bal 1f \n"
-"	 move $fp, $0 \n"
-"	.gpword . \n"
-"	.gpword " START "_c \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	.gpword _DYNAMIC \n"
-"1:	lw $gp, 0($ra) \n"
-"	subu $gp, $ra, $gp \n"
-"	move $4, $sp \n"
-"	lw $5, 8($ra) \n"
-"	addu $5, $5, $gp \n"
-"	lw $25, 4($ra) \n"
-"	addu $25, $25, $gp \n"
-"	and $sp, $sp, -8 \n"
-"	jalr $25 \n"
-"	 subu $sp, $sp, 16 \n"
-".set pop \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/mips/ksigaction.h
@@ -1,13 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	unsigned flags;
-	void (*handler)(int);
-	unsigned long mask[4];
-	/* The following field is past the end of the structure the
-	 * kernel will read or write, and exists only to avoid having
-	 * mips-specific preprocessor conditionals in sigaction.c. */
-	void (*restorer)();
-};
-
-hidden void __restore(), __restore_rt();
lib/libc/wasi/libc-top-half/musl/arch/mips/kstat.h
@@ -1,22 +0,0 @@
-struct kstat {
-	unsigned st_dev;
-	long __st_padding1[3];
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned st_rdev;
-	long __st_padding2[3];
-	off_t st_size;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	blksize_t st_blksize;
-	long __st_padding3;
-	blkcnt_t st_blocks;
-        long __st_padding4[14];
-};
lib/libc/wasi/libc-top-half/musl/arch/mips/pthread_arch.h
@@ -1,19 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-#if __mips_isa_rev < 2
-	register uintptr_t tp __asm__("$3");
-	__asm__ (".word 0x7c03e83b" : "=r" (tp) );
-#else
-	uintptr_t tp;
-	__asm__ ("rdhwr %0, $29" : "=r" (tp) );
-#endif
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-#define MC_PC pc
lib/libc/wasi/libc-top-half/musl/arch/mips/reloc.h
@@ -1,50 +0,0 @@
-#if __mips_isa_rev >= 6
-#define ISA_SUFFIX "r6"
-#else
-#define ISA_SUFFIX ""
-#endif
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "el"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#ifdef __mips_soft_float
-#define FP_SUFFIX "-sf"
-#else
-#define FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "mips" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYM_OR_REL  R_MIPS_REL32
-#define REL_PLT         R_MIPS_JUMP_SLOT
-#define REL_COPY        R_MIPS_COPY
-#define REL_DTPMOD      R_MIPS_TLS_DTPMOD32
-#define REL_DTPOFF      R_MIPS_TLS_DTPREL32
-#define REL_TPOFF       R_MIPS_TLS_TPREL32
-
-#define NEED_MIPS_GOT_RELOCS 1
-#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
-#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	".set push \n" \
-	".set noreorder \n" \
-	"	bal 1f \n" \
-	"	 nop \n" \
-	"	.gpword . \n" \
-	"	.gpword " #sym " \n" \
-	"1:	lw %0, ($ra) \n" \
-	"	subu %0, $ra, %0 \n" \
-	"	lw $ra, 4($ra) \n" \
-	"	addu %0, %0, $ra \n" \
-	".set pop \n" \
-	: "=r"(*(fp)) : : "memory", "ra" )
lib/libc/wasi/libc-top-half/musl/arch/mips/syscall_arch.h
@@ -1,153 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-#define SYSCALL_RLIM_INFINITY (-1UL/2)
-
-#if __mips_isa_rev >= 6
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-#else
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
-#endif
-
-static inline long __syscall0(long n)
-{
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"addu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2)
-		: SYSCALL_CLOBBERLIST, "$8", "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r4 __asm__("$4") = a;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"addu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4)
-		: SYSCALL_CLOBBERLIST, "$8", "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"addu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5)
-		: SYSCALL_CLOBBERLIST, "$8", "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"addu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST, "$8", "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"addu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST, "$8", "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"subu $sp,$sp,32 ; sw $8,16($sp) ; "
-		"addu $2,$0,%3 ; syscall ;"
-		"addu $sp,$sp,32"
-		: "=&r"(r2), "+r"(r7), "+r"(r8)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST, "$9", "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r9 __asm__("$9") = f;
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"subu $sp,$sp,32 ; sw $8,16($sp) ; sw $9,20($sp) ; "
-		"addu $2,$0,%4 ; syscall ;"
-		"addu $sp,$sp,32"
-		: "=&r"(r2), "+r"(r7), "+r"(r8), "+r"(r9)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST, "$10");
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall7(long n, long a, long b, long c, long d, long e, long f, long g)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r9 __asm__("$9") = f;
-	register long r10 __asm__("$10") = g;
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"subu $sp,$sp,32 ; sw $8,16($sp) ; sw $9,20($sp) ; sw $10,24($sp) ; "
-		"addu $2,$0,%5 ; syscall ;"
-		"addu $sp,$sp,32"
-		: "=&r"(r2), "+r"(r7), "+r"(r8), "+r"(r9), "+r"(r10)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT32_SYM "__vdso_clock_gettime"
-#define VDSO_CGT32_VER "LINUX_2.6"
-#define VDSO_CGT_SYM "__vdso_clock_gettime64"
-#define VDSO_CGT_VER "LINUX_2.6"
-
-#define SO_SNDTIMEO_OLD 0x1005
-#define SO_RCVTIMEO_OLD 0x1006
-
-#undef SYS_socketcall
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/alltypes.h.in
@@ -1,22 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-#define __BYTE_ORDER 1234
-#else
-#define __BYTE_ORDER 4321
-#endif
-
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
-
-TYPEDEF unsigned nlink_t;
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/errno.h
@@ -1,134 +0,0 @@
-#define EPERM            1
-#define ENOENT           2
-#define ESRCH            3
-#define EINTR            4
-#define EIO              5
-#define ENXIO            6
-#define E2BIG            7
-#define ENOEXEC          8
-#define EBADF            9
-#define ECHILD          10
-#define EAGAIN          11
-#define ENOMEM          12
-#define EACCES          13
-#define EFAULT          14
-#define ENOTBLK         15
-#define EBUSY           16
-#define EEXIST          17
-#define EXDEV           18
-#define ENODEV          19
-#define ENOTDIR         20
-#define EISDIR          21
-#define EINVAL          22
-#define ENFILE          23
-#define EMFILE          24
-#define ENOTTY          25
-#define ETXTBSY         26
-#define EFBIG           27
-#define ENOSPC          28
-#define ESPIPE          29
-#define EROFS           30
-#define EMLINK          31
-#define EPIPE           32
-#define EDOM            33
-#define ERANGE          34
-#define ENOMSG          35
-#define EIDRM           36
-#define ECHRNG          37
-#define EL2NSYNC        38
-#define EL3HLT          39
-#define EL3RST          40
-#define ELNRNG          41
-#define EUNATCH         42
-#define ENOCSI          43
-#define EL2HLT          44
-#define EDEADLK         45
-#define ENOLCK          46
-#define EBADE           50
-#define EBADR           51
-#define EXFULL          52
-#define ENOANO          53
-#define EBADRQC         54
-#define EBADSLT         55
-#define EDEADLOCK       56
-#define EBFONT          59
-#define ENOSTR          60
-#define ENODATA         61
-#define ETIME           62
-#define ENOSR           63
-#define ENONET          64
-#define ENOPKG          65
-#define EREMOTE         66
-#define ENOLINK         67
-#define EADV            68
-#define ESRMNT          69
-#define ECOMM           70
-#define EPROTO          71
-#define EDOTDOT         73
-#define EMULTIHOP       74
-#define EBADMSG         77
-#define ENAMETOOLONG    78
-#define EOVERFLOW       79
-#define ENOTUNIQ        80
-#define EBADFD          81
-#define EREMCHG         82
-#define ELIBACC         83
-#define ELIBBAD         84
-#define ELIBSCN         85
-#define ELIBMAX         86
-#define ELIBEXEC        87
-#define EILSEQ          88
-#define ENOSYS          89
-#define ELOOP           90
-#define ERESTART        91
-#define ESTRPIPE        92
-#define ENOTEMPTY       93
-#define EUSERS          94
-#define ENOTSOCK        95
-#define EDESTADDRREQ    96
-#define EMSGSIZE        97
-#define EPROTOTYPE      98
-#define ENOPROTOOPT     99
-#define EPROTONOSUPPORT 120
-#define ESOCKTNOSUPPORT 121
-#define EOPNOTSUPP      122
-#define ENOTSUP         EOPNOTSUPP
-#define EPFNOSUPPORT    123
-#define EAFNOSUPPORT    124
-#define EADDRINUSE      125
-#define EADDRNOTAVAIL   126
-#define ENETDOWN        127
-#define ENETUNREACH     128
-#define ENETRESET       129
-#define ECONNABORTED    130
-#define ECONNRESET      131
-#define ENOBUFS         132
-#define EISCONN         133
-#define ENOTCONN        134
-#define EUCLEAN         135
-#define ENOTNAM         137
-#define ENAVAIL         138
-#define EISNAM          139
-#define EREMOTEIO       140
-#define ESHUTDOWN       143
-#define ETOOMANYREFS    144
-#define ETIMEDOUT       145
-#define ECONNREFUSED    146
-#define EHOSTDOWN       147
-#define EHOSTUNREACH    148
-#define EWOULDBLOCK     EAGAIN
-#define EALREADY        149
-#define EINPROGRESS     150
-#define ESTALE          151
-#define ECANCELED       158
-#define ENOMEDIUM       159
-#define EMEDIUMTYPE     160
-#define ENOKEY          161
-#define EKEYEXPIRED     162
-#define EKEYREVOKED     163
-#define EKEYREJECTED    164
-#define EOWNERDEAD      165
-#define ENOTRECOVERABLE 166
-#define ERFKILL         167
-#define EHWPOISON       168
-#define EDQUOT          1133
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0400
-#define O_EXCL        02000
-#define O_NOCTTY      04000
-#define O_TRUNC       01000
-#define O_APPEND       0010
-#define O_NONBLOCK     0200
-#define O_DSYNC        0020
-#define O_SYNC       040020
-#define O_RSYNC      040020
-#define O_DIRECTORY 0200000
-#define O_NOFOLLOW  0400000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      010000
-#define O_DIRECT    0100000
-#define O_LARGEFILE  020000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 24
-#define F_GETOWN 23
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 14
-#define F_SETLK  6
-#define F_SETLKW 7
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/fenv.h
@@ -1,25 +0,0 @@
-#ifdef __mips_soft_float
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-#else
-#define FE_INEXACT    4
-#define FE_UNDERFLOW  8
-#define FE_OVERFLOW   16
-#define FE_DIVBYZERO  32
-#define FE_INVALID    64
-
-#define FE_ALL_EXCEPT 124
-
-#define FE_TONEAREST  0
-#define FE_TOWARDZERO 1
-#define FE_UPWARD     2
-#define FE_DOWNWARD   3
-#endif
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned __cw;
-} fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/float.h
@@ -1,16 +0,0 @@
-#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
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/hwcap.h
@@ -1,3 +0,0 @@
-#define HWCAP_MIPS_R6		(1 << 0)
-#define HWCAP_MIPS_MSA		(1 << 1)
-#define HWCAP_MIPS_CRC32	(1 << 2)
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/ioctl.h
@@ -1,114 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  1U
-#define _IOC_READ  2U
-#define _IOC_WRITE 4U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define TCGETA		0x5401
-#define TCSETA		0x5402
-#define TCSETAW		0x5403
-#define TCSETAF		0x5404
-#define TCSBRK		0x5405
-#define TCXONC		0x5406
-#define TCFLSH		0x5407
-#define TCGETS		0x540D
-#define TCSETS		0x540E
-#define TCSETSW		0x540F
-#define TCSETSF		0x5410
-
-#define TIOCEXCL	0x740D
-#define TIOCNXCL	0x740E
-#define TIOCOUTQ	0x7472
-#define TIOCSTI		0x5472
-#define TIOCMGET	0x741D
-#define TIOCMBIS	0x741B
-#define TIOCMBIC	0x741C
-#define TIOCMSET	0x741A
-
-#define TIOCPKT		0x5470
-#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
-#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
-#define TIOCNOTTY	0x5471
-#define TIOCSETD	0x7401
-#define TIOCGETD	0x7400
-
-#define FIOCLEX		0x6601
-#define FIONCLEX	0x6602
-#define FIOASYNC	0x667D
-#define FIONBIO		0x667E
-#define FIOQSIZE	0x667F
-
-#define TIOCGLTC        0x7474
-#define TIOCSLTC        0x7475
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-#define TIOCCONS	_IOW('t', 120, int)
-
-#define FIONREAD	0x467F
-#define TIOCINQ		FIONREAD
-
-#define TIOCGETP        0x7408
-#define TIOCSETP        0x7409
-#define TIOCSETN        0x740A
-
-#define TIOCSBRK	0x5427
-#define TIOCCBRK	0x5428
-#define TIOCGSID	0x7416
-#define TIOCGRS485	_IOR('T', 0x2E, char[32])
-#define TIOCSRS485	_IOWR('T', 0x2F, char[32])
-#define TIOCGPTN	_IOR('T', 0x30, unsigned int)
-#define TIOCSPTLCK	_IOW('T', 0x31, int)
-#define TIOCGDEV	_IOR('T', 0x32, unsigned int)
-#define TIOCSIG		_IOW('T', 0x36, int)
-#define TIOCVHANGUP	0x5437
-#define TIOCGPKT	_IOR('T', 0x38, int)
-#define TIOCGPTLCK	_IOR('T', 0x39, int)
-#define TIOCGEXCL	_IOR('T', 0x40, int)
-#define TIOCGPTPEER	_IO('T', 0x41)
-
-#define TIOCSCTTY	0x5480
-#define TIOCGSOFTCAR	0x5481
-#define TIOCSSOFTCAR	0x5482
-#define TIOCLINUX	0x5483
-#define TIOCGSERIAL	0x5484
-#define TIOCSSERIAL	0x5485
-#define TCSBRKP		0x5486
-
-#define TIOCSERCONFIG	0x5488
-#define TIOCSERGWILD	0x5489
-#define TIOCSERSWILD	0x548A
-#define TIOCGLCKTRMIOS	0x548B
-#define TIOCSLCKTRMIOS	0x548C
-#define TIOCSERGSTRUCT	0x548D
-#define TIOCSERGETLSR   0x548E
-#define TIOCSERGETMULTI 0x548F
-#define TIOCSERSETMULTI 0x5490
-#define TIOCMIWAIT	0x5491
-#define TIOCGICOUNT	0x5492
-
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x010
-#define TIOCM_SR	0x020
-#define TIOCM_CTS	0x040
-#define TIOCM_CAR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RNG	0x200
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_DSR	0x400
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-#define FIOGETOWN       _IOR('f', 123, int)
-#define FIOSETOWN       _IOW('f', 124, int)
-#define SIOCATMARK      _IOR('s', 7, int)
-#define SIOCSPGRP       _IOW('s', 8, pid_t)
-#define SIOCGPGRP       _IOR('s', 9, pid_t)
-#define SIOCGSTAMP      0x8906
-#define SIOCGSTAMPNS    0x8907
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/ipc.h
@@ -1,12 +0,0 @@
-struct ipc_perm {
-	key_t __ipc_perm_key;
-	uid_t uid;
-	gid_t gid;
-	uid_t cuid;
-	gid_t cgid;
-	mode_t mode;
-	int __ipc_perm_seq;
-	int __pad1;
-	unsigned long __unused1;
-	unsigned long __unused2;
-};
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/mman.h
@@ -1,25 +0,0 @@
-#undef MAP_ANON
-#define MAP_ANON       0x800
-#undef MAP_NORESERVE
-#define MAP_NORESERVE  0x0400
-#undef MAP_GROWSDOWN
-#define MAP_GROWSDOWN  0x1000
-#undef MAP_DENYWRITE
-#define MAP_DENYWRITE  0x2000
-#undef MAP_EXECUTABLE
-#define MAP_EXECUTABLE 0x4000
-#undef MAP_LOCKED
-#define MAP_LOCKED     0x8000
-#undef MAP_POPULATE
-#define MAP_POPULATE   0x10000
-#undef MAP_NONBLOCK
-#define MAP_NONBLOCK   0x20000
-#undef MAP_STACK
-#define MAP_STACK      0x40000
-#undef MAP_HUGETLB
-#define MAP_HUGETLB    0x80000
-#undef MAP_SYNC
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#undef MADV_SOFT_OFFLINE
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/poll.h
@@ -1,2 +0,0 @@
-#define POLLWRNORM POLLOUT
-#define POLLWRBAND 0x100
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFFBIG 1
-#define _POSIX_V7_LP64_OFFBIG 1
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/ptrace.h
@@ -1,9 +0,0 @@
-#define PTRACE_GET_THREAD_AREA	25
-#define PTRACE_SET_THREAD_AREA	26
-#define PTRACE_PEEKTEXT_3264	0xc0
-#define PTRACE_PEEKDATA_3264	0xc1
-#define PTRACE_POKETEXT_3264	0xc2
-#define PTRACE_POKEDATA_3264	0xc3
-#define PTRACE_GET_THREAD_AREA_3264	0xc4
-#define PTRACE_GET_WATCH_REGS	0xd0
-#define PTRACE_SET_WATCH_REGS	0xd1
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/reg.h
@@ -1,47 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-
-#define EF_R0 0
-#define EF_R1 1
-#define EF_R2 2
-#define EF_R3 3
-#define EF_R4 4
-#define EF_R5 5
-#define EF_R6 6
-#define EF_R7 7
-#define EF_R8 8
-#define EF_R9 9
-#define EF_R10 10
-#define EF_R11 11
-#define EF_R12 12
-#define EF_R13 13
-#define EF_R14 14
-#define EF_R15 15
-#define EF_R16 16
-#define EF_R17 17
-#define EF_R18 18
-#define EF_R19 19
-#define EF_R20 20
-#define EF_R21 21
-#define EF_R22 22
-#define EF_R23 23
-#define EF_R24 24
-#define EF_R25 25
-
-#define EF_R26 26
-#define EF_R27 27
-#define EF_R28 28
-#define EF_R29 29
-#define EF_R30 30
-#define EF_R31 31
-
-#define EF_LO 32
-#define EF_HI 33
-
-#define EF_CP0_EPC 34
-#define EF_CP0_BADVADDR 35
-#define EF_CP0_STATUS 36
-#define EF_CP0_CAUSE 37
-#define EF_UNUSED0 38
-
-#define EF_SIZE 304
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/resource.h
@@ -1,5 +0,0 @@
-#define RLIMIT_NOFILE  5
-#define RLIMIT_AS      6
-#define RLIMIT_RSS     7
-#define RLIMIT_NPROC   8
-#define RLIMIT_MEMLOCK 9
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[23];
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/signal.h
@@ -1,143 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long long greg_t, gregset_t[32];
-
-typedef struct {
-	union {
-		double fp_dregs[32];
-		struct {
-			float _fp_fregs;
-			unsigned _fp_pad;
-		} fp_fregs[32];
-	} fp_r;
-} fpregset_t;
-
-struct sigcontext {
-	unsigned long long sc_regs[32];
-	unsigned long long sc_fpregs[32];
-	unsigned long long sc_mdhi;
-	unsigned long long sc_hi1;
-	unsigned long long sc_hi2;
-	unsigned long long sc_hi3;
-	unsigned long long sc_mdlo;
-	unsigned long long sc_lo1;
-	unsigned long long sc_lo2;
-	unsigned long long sc_lo3;
-	unsigned long long sc_pc;
-	unsigned int sc_fpc_csr;
-	unsigned int sc_used_math;
-	unsigned int sc_dsp;
-	unsigned int sc_reserved;
-};
-
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	greg_t mdhi;
-	greg_t hi1;
-	greg_t hi2;
-	greg_t hi3;
-	greg_t mdlo;
-	greg_t lo1;
-	greg_t lo2;
-	greg_t lo3;
-	greg_t pc;
-	unsigned int fpc_csr;
-	unsigned int used_math;
-	unsigned int dsp;
-	unsigned int reserved;
-} mcontext_t;
-
-#else
-typedef struct {
-	unsigned long long __mc1[32];
-	double __mc2[32];
-	unsigned long long __mc3[9];
-	unsigned __mc4[4];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	size_t ss_size;
-	int ss_flags;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  0x10000
-#define SA_SIGINFO    8
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#undef SIG_BLOCK
-#undef SIG_UNBLOCK
-#undef SIG_SETMASK
-#define SIG_BLOCK     1
-#define SIG_UNBLOCK   2
-#define SIG_SETMASK   3
-
-#undef SI_ASYNCIO
-#undef SI_MESGQ
-#undef SI_TIMER
-#define SI_ASYNCIO (-2)
-#define SI_MESGQ (-4)
-#define SI_TIMER (-3)
-
-#define __SI_SWAP_ERRNO_CODE
-
-#endif
-
-#define SIGHUP    1
-#define SIGINT    2
-#define SIGQUIT   3
-#define SIGILL    4
-#define SIGTRAP   5
-#define SIGABRT   6
-#define SIGIOT    SIGABRT
-#define SIGEMT    7
-#define SIGFPE    8
-#define SIGKILL   9
-#define SIGBUS    10
-#define SIGSEGV   11
-#define SIGSYS    12
-#define SIGPIPE   13
-#define SIGALRM   14
-#define SIGTERM   15
-#define SIGUSR1   16
-#define SIGUSR2   17
-#define SIGCHLD   18
-#define SIGPWR    19
-#define SIGWINCH  20
-#define SIGURG    21
-#define SIGIO     22
-#define SIGPOLL   SIGIO
-#define SIGSTOP   23
-#define SIGTSTP   24
-#define SIGCONT   25
-#define SIGTTIN   26
-#define SIGTTOU   27
-#define SIGVTALRM 28
-#define SIGPROF   29
-#define SIGXCPU   30
-#define SIGXFSZ   31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 128
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/socket.h
@@ -1,35 +0,0 @@
-#define SOCK_STREAM    2
-#define SOCK_DGRAM     1
-#define SOL_SOCKET     65535
-#define SO_DEBUG       1
-
-#define SO_REUSEADDR    0x0004
-#define SO_KEEPALIVE    0x0008
-#define SO_DONTROUTE    0x0010
-#define SO_BROADCAST    0x0020
-#define SO_LINGER       0x0080
-#define SO_OOBINLINE    0x0100
-#define SO_REUSEPORT    0x0200
-#define SO_SNDBUF       0x1001
-#define SO_RCVBUF       0x1002
-#define SO_SNDLOWAT     0x1003
-#define SO_RCVLOWAT     0x1004
-#define SO_RCVTIMEO     0x1006
-#define SO_SNDTIMEO     0x1005
-#define SO_ERROR        0x1007
-#define SO_TYPE         0x1008
-#define SO_ACCEPTCONN   0x1009
-#define SO_PROTOCOL     0x1028
-#define SO_DOMAIN       0x1029
-
-#define SO_NO_CHECK     11
-#define SO_PRIORITY     12
-#define SO_BSDCOMPAT    14
-#define SO_PASSCRED     17
-#define SO_PEERCRED     18
-#define SO_PEERSEC      30
-#define SO_SNDBUFFORCE  31
-#define SO_RCVBUFFORCE  33
-
-#define SOCK_NONBLOCK     0200
-#define SOCK_CLOEXEC  02000000
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/stat.h
@@ -1,20 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	int __pad1[3];
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	unsigned int __pad2[2];
-	off_t st_size;
-	int __pad3;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	blksize_t st_blksize;
-	unsigned int __pad4;
-	blkcnt_t st_blocks;
-	int __pad5[14];
-};
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/statfs.h
@@ -1,8 +0,0 @@
-struct statfs {
-	unsigned long f_type, f_bsize, f_frsize;
-	fsblkcnt_t f_blocks, f_bfree;
-	fsfilcnt_t f_files, f_ffree;
-	fsblkcnt_t f_bavail;
-	fsid_t f_fsid;
-	unsigned long f_namelen, f_flags, f_spare[5];
-};
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/syscall.h.in
@@ -1,345 +0,0 @@
-#define __NR_read			5000
-#define __NR_write			5001
-#define __NR_open			5002
-#define __NR_close			5003
-#define __NR_stat			5004
-#define __NR_fstat			5005
-#define __NR_lstat			5006
-#define __NR_poll			5007
-#define __NR_lseek			5008
-#define __NR_mmap			5009
-#define __NR_mprotect			5010
-#define __NR_munmap			5011
-#define __NR_brk			5012
-#define __NR_rt_sigaction		5013
-#define __NR_rt_sigprocmask		5014
-#define __NR_ioctl			5015
-#define __NR_pread64			5016
-#define __NR_pwrite64			5017
-#define __NR_readv			5018
-#define __NR_writev			5019
-#define __NR_access			5020
-#define __NR_pipe			5021
-#define __NR__newselect			5022
-#define __NR_sched_yield		5023
-#define __NR_mremap			5024
-#define __NR_msync			5025
-#define __NR_mincore			5026
-#define __NR_madvise			5027
-#define __NR_shmget			5028
-#define __NR_shmat			5029
-#define __NR_shmctl			5030
-#define __NR_dup			5031
-#define __NR_dup2			5032
-#define __NR_pause			5033
-#define __NR_nanosleep			5034
-#define __NR_getitimer			5035
-#define __NR_setitimer			5036
-#define __NR_alarm			5037
-#define __NR_getpid			5038
-#define __NR_sendfile			5039
-#define __NR_socket			5040
-#define __NR_connect			5041
-#define __NR_accept			5042
-#define __NR_sendto			5043
-#define __NR_recvfrom			5044
-#define __NR_sendmsg			5045
-#define __NR_recvmsg			5046
-#define __NR_shutdown			5047
-#define __NR_bind			5048
-#define __NR_listen			5049
-#define __NR_getsockname		5050
-#define __NR_getpeername		5051
-#define __NR_socketpair			5052
-#define __NR_setsockopt			5053
-#define __NR_getsockopt			5054
-#define __NR_clone			5055
-#define __NR_fork			5056
-#define __NR_execve			5057
-#define __NR_exit			5058
-#define __NR_wait4			5059
-#define __NR_kill			5060
-#define __NR_uname			5061
-#define __NR_semget			5062
-#define __NR_semop			5063
-#define __NR_semctl			5064
-#define __NR_shmdt			5065
-#define __NR_msgget			5066
-#define __NR_msgsnd			5067
-#define __NR_msgrcv			5068
-#define __NR_msgctl			5069
-#define __NR_fcntl			5070
-#define __NR_flock			5071
-#define __NR_fsync			5072
-#define __NR_fdatasync			5073
-#define __NR_truncate			5074
-#define __NR_ftruncate			5075
-#define __NR_getdents			5076
-#define __NR_getcwd			5077
-#define __NR_chdir			5078
-#define __NR_fchdir			5079
-#define __NR_rename			5080
-#define __NR_mkdir			5081
-#define __NR_rmdir			5082
-#define __NR_creat			5083
-#define __NR_link			5084
-#define __NR_unlink			5085
-#define __NR_symlink			5086
-#define __NR_readlink			5087
-#define __NR_chmod			5088
-#define __NR_fchmod			5089
-#define __NR_chown			5090
-#define __NR_fchown			5091
-#define __NR_lchown			5092
-#define __NR_umask			5093
-#define __NR_gettimeofday		5094
-#define __NR_getrlimit			5095
-#define __NR_getrusage			5096
-#define __NR_sysinfo			5097
-#define __NR_times			5098
-#define __NR_ptrace			5099
-#define __NR_getuid			5100
-#define __NR_syslog			5101
-#define __NR_getgid			5102
-#define __NR_setuid			5103
-#define __NR_setgid			5104
-#define __NR_geteuid			5105
-#define __NR_getegid			5106
-#define __NR_setpgid			5107
-#define __NR_getppid			5108
-#define __NR_getpgrp			5109
-#define __NR_setsid			5110
-#define __NR_setreuid			5111
-#define __NR_setregid			5112
-#define __NR_getgroups			5113
-#define __NR_setgroups			5114
-#define __NR_setresuid			5115
-#define __NR_getresuid			5116
-#define __NR_setresgid			5117
-#define __NR_getresgid			5118
-#define __NR_getpgid			5119
-#define __NR_setfsuid			5120
-#define __NR_setfsgid			5121
-#define __NR_getsid			5122
-#define __NR_capget			5123
-#define __NR_capset			5124
-#define __NR_rt_sigpending		5125
-#define __NR_rt_sigtimedwait		5126
-#define __NR_rt_sigqueueinfo		5127
-#define __NR_rt_sigsuspend		5128
-#define __NR_sigaltstack		5129
-#define __NR_utime			5130
-#define __NR_mknod			5131
-#define __NR_personality		5132
-#define __NR_ustat			5133
-#define __NR_statfs			5134
-#define __NR_fstatfs			5135
-#define __NR_sysfs			5136
-#define __NR_getpriority		5137
-#define __NR_setpriority		5138
-#define __NR_sched_setparam		5139
-#define __NR_sched_getparam		5140
-#define __NR_sched_setscheduler		5141
-#define __NR_sched_getscheduler		5142
-#define __NR_sched_get_priority_max	5143
-#define __NR_sched_get_priority_min	5144
-#define __NR_sched_rr_get_interval	5145
-#define __NR_mlock			5146
-#define __NR_munlock			5147
-#define __NR_mlockall			5148
-#define __NR_munlockall			5149
-#define __NR_vhangup			5150
-#define __NR_pivot_root			5151
-#define __NR__sysctl			5152
-#define __NR_prctl			5153
-#define __NR_adjtimex			5154
-#define __NR_setrlimit			5155
-#define __NR_chroot			5156
-#define __NR_sync			5157
-#define __NR_acct			5158
-#define __NR_settimeofday		5159
-#define __NR_mount			5160
-#define __NR_umount2			5161
-#define __NR_swapon			5162
-#define __NR_swapoff			5163
-#define __NR_reboot			5164
-#define __NR_sethostname		5165
-#define __NR_setdomainname		5166
-#define __NR_create_module		5167
-#define __NR_init_module		5168
-#define __NR_delete_module		5169
-#define __NR_get_kernel_syms		5170
-#define __NR_query_module		5171
-#define __NR_quotactl			5172
-#define __NR_nfsservctl			5173
-#define __NR_getpmsg			5174
-#define __NR_putpmsg			5175
-#define __NR_afs_syscall		5176
-#define __NR_reserved177		5177
-#define __NR_gettid			5178
-#define __NR_readahead			5179
-#define __NR_setxattr			5180
-#define __NR_lsetxattr			5181
-#define __NR_fsetxattr			5182
-#define __NR_getxattr			5183
-#define __NR_lgetxattr			5184
-#define __NR_fgetxattr			5185
-#define __NR_listxattr			5186
-#define __NR_llistxattr			5187
-#define __NR_flistxattr			5188
-#define __NR_removexattr		5189
-#define __NR_lremovexattr		5190
-#define __NR_fremovexattr		5191
-#define __NR_tkill			5192
-#define __NR_reserved193		5193
-#define __NR_futex			5194
-#define __NR_sched_setaffinity		5195
-#define __NR_sched_getaffinity		5196
-#define __NR_cacheflush			5197
-#define __NR_cachectl			5198
-#define __NR_sysmips			5199
-#define __NR_io_setup			5200
-#define __NR_io_destroy			5201
-#define __NR_io_getevents		5202
-#define __NR_io_submit			5203
-#define __NR_io_cancel			5204
-#define __NR_exit_group			5205
-#define __NR_lookup_dcookie		5206
-#define __NR_epoll_create		5207
-#define __NR_epoll_ctl			5208
-#define __NR_epoll_wait			5209
-#define __NR_remap_file_pages		5210
-#define __NR_rt_sigreturn		5211
-#define __NR_set_tid_address		5212
-#define __NR_restart_syscall		5213
-#define __NR_semtimedop			5214
-#define __NR_fadvise64			5215
-#define __NR_timer_create		5216
-#define __NR_timer_settime		5217
-#define __NR_timer_gettime		5218
-#define __NR_timer_getoverrun		5219
-#define __NR_timer_delete		5220
-#define __NR_clock_settime		5221
-#define __NR_clock_gettime		5222
-#define __NR_clock_getres		5223
-#define __NR_clock_nanosleep		5224
-#define __NR_tgkill			5225
-#define __NR_utimes			5226
-#define __NR_mbind			5227
-#define __NR_get_mempolicy		5228
-#define __NR_set_mempolicy		5229
-#define __NR_mq_open			5230
-#define __NR_mq_unlink			5231
-#define __NR_mq_timedsend		5232
-#define __NR_mq_timedreceive		5233
-#define __NR_mq_notify			5234
-#define __NR_mq_getsetattr		5235
-#define __NR_vserver			5236
-#define __NR_waitid			5237
-#define __NR_add_key			5239
-#define __NR_request_key		5240
-#define __NR_keyctl			5241
-#define __NR_set_thread_area		5242
-#define __NR_inotify_init		5243
-#define __NR_inotify_add_watch		5244
-#define __NR_inotify_rm_watch		5245
-#define __NR_migrate_pages		5246
-#define __NR_openat			5247
-#define __NR_mkdirat			5248
-#define __NR_mknodat			5249
-#define __NR_fchownat			5250
-#define __NR_futimesat			5251
-#define __NR_newfstatat			5252
-#define __NR_unlinkat			5253
-#define __NR_renameat			5254
-#define __NR_linkat			5255
-#define __NR_symlinkat			5256
-#define __NR_readlinkat			5257
-#define __NR_fchmodat			5258
-#define __NR_faccessat			5259
-#define __NR_pselect6			5260
-#define __NR_ppoll			5261
-#define __NR_unshare			5262
-#define __NR_splice			5263
-#define __NR_sync_file_range		5264
-#define __NR_tee			5265
-#define __NR_vmsplice			5266
-#define __NR_move_pages			5267
-#define __NR_set_robust_list		5268
-#define __NR_get_robust_list		5269
-#define __NR_kexec_load			5270
-#define __NR_getcpu			5271
-#define __NR_epoll_pwait		5272
-#define __NR_ioprio_set			5273
-#define __NR_ioprio_get			5274
-#define __NR_utimensat			5275
-#define __NR_signalfd			5276
-#define __NR_timerfd			5277
-#define __NR_eventfd			5278
-#define __NR_fallocate			5279
-#define __NR_timerfd_create		5280
-#define __NR_timerfd_gettime		5281
-#define __NR_timerfd_settime		5282
-#define __NR_signalfd4			5283
-#define __NR_eventfd2			5284
-#define __NR_epoll_create1		5285
-#define __NR_dup3			5286
-#define __NR_pipe2			5287
-#define __NR_inotify_init1		5288
-#define __NR_preadv			5289
-#define __NR_pwritev			5290
-#define __NR_rt_tgsigqueueinfo		5291
-#define __NR_perf_event_open		5292
-#define __NR_accept4			5293
-#define __NR_recvmmsg			5294
-#define __NR_fanotify_init		5295
-#define __NR_fanotify_mark		5296
-#define __NR_prlimit64			5297
-#define __NR_name_to_handle_at		5298
-#define __NR_open_by_handle_at		5299
-#define __NR_clock_adjtime		5300
-#define __NR_syncfs			5301
-#define __NR_sendmmsg			5302
-#define __NR_setns			5303
-#define __NR_process_vm_readv		5304
-#define __NR_process_vm_writev		5305
-#define __NR_kcmp			5306
-#define __NR_finit_module		5307
-#define __NR_getdents64			5308
-#define __NR_sched_setattr		5309
-#define __NR_sched_getattr		5310
-#define __NR_renameat2			5311
-#define __NR_seccomp			5312
-#define __NR_getrandom			5313
-#define __NR_memfd_create		5314
-#define __NR_bpf			5315
-#define __NR_execveat			5316
-#define __NR_userfaultfd		5317
-#define __NR_membarrier			5318
-#define __NR_mlock2			5319
-#define __NR_copy_file_range		5320
-#define __NR_preadv2			5321
-#define __NR_pwritev2			5322
-#define __NR_pkey_mprotect		5323
-#define __NR_pkey_alloc			5324
-#define __NR_pkey_free			5325
-#define __NR_statx			5326
-#define __NR_rseq			5327
-#define __NR_io_pgetevents		5328
-#define __NR_pidfd_send_signal		5424
-#define __NR_io_uring_setup		5425
-#define __NR_io_uring_enter		5426
-#define __NR_io_uring_register		5427
-#define __NR_open_tree		5428
-#define __NR_move_mount		5429
-#define __NR_fsopen		5430
-#define __NR_fsconfig		5431
-#define __NR_fsmount		5432
-#define __NR_fspick		5433
-#define __NR_pidfd_open		5434
-#define __NR_clone3		5435
-#define __NR_close_range	5436
-#define __NR_openat2		5437
-#define __NR_pidfd_getfd	5438
-#define __NR_faccessat2		5439
-
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/termios.h
@@ -1,169 +0,0 @@
-struct termios {
-	tcflag_t c_iflag;
-	tcflag_t c_oflag;
-	tcflag_t c_cflag;
-	tcflag_t c_lflag;
-	cc_t c_line;
-	cc_t c_cc[NCCS];
-	speed_t __c_ispeed;
-	speed_t __c_ospeed;
-};
-
-#define VINTR     0
-#define VQUIT     1
-#define VERASE    2
-#define VKILL     3
-#define VMIN      4
-#define VTIME     5
-#define VEOL2     6
-#define VSWTC     7
-#define VSWTCH    7
-#define VSTART    8
-#define VSTOP     9
-#define VSUSP    10
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE  14
-#define VLNEXT   15
-#define VEOF     16
-#define VEOL     17
-
-#define IGNBRK  0000001
-#define BRKINT  0000002
-#define IGNPAR  0000004
-#define PARMRK  0000010
-#define INPCK   0000020
-#define ISTRIP  0000040
-#define INLCR   0000100
-#define IGNCR   0000200
-#define ICRNL   0000400
-#define IUCLC   0001000
-#define IXON    0002000
-#define IXANY   0004000
-#define IXOFF   0010000
-#define IMAXBEL 0020000
-#define IUTF8   0040000
-
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
-#define NLDLY  0000400
-#define NL0    0000000
-#define NL1    0000400
-#define CRDLY  0003000
-#define CR0    0000000
-#define CR1    0001000
-#define CR2    0002000
-#define CR3    0003000
-#define TABDLY 0014000
-#define TAB0   0000000
-#define TAB1   0004000
-#define TAB2   0010000
-#define TAB3   0014000
-#define BSDLY  0020000
-#define BS0    0000000
-#define BS1    0020000
-#define FFDLY  0100000
-#define FF0    0000000
-#define FF1    0100000
-#endif
-
-#define VTDLY  0040000
-#define VT0    0000000
-#define VT1    0040000
-
-#define B0       0000000
-#define B50      0000001
-#define B75      0000002
-#define B110     0000003
-#define B134     0000004
-#define B150     0000005
-#define B200     0000006
-#define B300     0000007
-#define B600     0000010
-#define B1200    0000011
-#define B1800    0000012
-#define B2400    0000013
-#define B4800    0000014
-#define B9600    0000015
-#define B19200   0000016
-#define B38400   0000017
-
-#define B57600   0010001
-#define B115200  0010002
-#define B230400  0010003
-#define B460800  0010004
-#define B500000  0010005
-#define B576000  0010006
-#define B921600  0010007
-#define B1000000 0010010
-#define B1152000 0010011
-#define B1500000 0010012
-#define B2000000 0010013
-#define B2500000 0010014
-#define B3000000 0010015
-#define B3500000 0010016
-#define B4000000 0010017
-
-#define CSIZE  0000060
-#define CS5    0000000
-#define CS6    0000020
-#define CS7    0000040
-#define CS8    0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-
-#define ISIG   0000001
-#define ICANON 0000002
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define IEXTEN 0000400
-#define TOSTOP 0100000
-#define ITOSTOP 0100000
-
-#define TCOOFF 0
-#define TCOON  1
-#define TCIOFF 2
-#define TCION  3
-
-#define TCIFLUSH  0
-#define TCOFLUSH  1
-#define TCIOFLUSH 2
-
-#define TCSANOW   0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define EXTA    0000016
-#define EXTB    0000017
-#define CBAUD   0010017
-#define CBAUDEX 0010000
-#define CIBAUD  002003600000
-#define CMSPAR  010000000000
-#define CRTSCTS 020000000000
-
-#define XCASE   0000004
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE  0004000
-#define FLUSHO  0020000
-#define PENDIN  0040000
-#define EXTPROC 0200000
-
-#define XTABS  0014000
-#define TIOCSER_TEMT 1
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mips64/bits/user.h
@@ -1,15 +0,0 @@
-struct user {
-	unsigned long regs[102];
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long long start_code, start_data, start_stack;
-	long long signal;
-	unsigned long long *u_ar0;
-	unsigned long long magic;
-	char u_comm[32];
-};
-
-#define ELF_NGREG 45
-#define ELF_NFPREG 33
-
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG];
lib/libc/wasi/libc-top-half/musl/arch/mips64/atomic_arch.h
@@ -1,56 +0,0 @@
-#if __mips_isa_rev < 6
-#define LLSC_M "m"
-#else
-#define LLSC_M "ZC"
-#endif
-
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ (
-		"ll %0, %1"
-		: "=r"(v) : LLSC_M(*p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ (
-		"sc %0, %1"
-		: "=r"(r), "="LLSC_M(*p) : "0"(v) : "memory");
-	return r;
-}
-
-#define a_ll_p a_ll_p
-static inline void *a_ll_p(volatile void *p)
-{
-	void *v;
-	__asm__ __volatile__ (
-		"lld %0, %1"
-		: "=r"(v) : LLSC_M(*(void *volatile *)p));
-	return v;
-}
-
-#define a_sc_p a_sc_p
-static inline int a_sc_p(volatile void *p, void *v)
-{
-	long r;
-	__asm__ __volatile__ (
-		"scd %0, %1"
-		: "=r"(r), "="LLSC_M(*(void *volatile *)p) : "0"(v) : "memory");
-	return r;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("sync" : : : "memory");
-}
-
-#define a_pre_llsc a_barrier
-#define a_post_llsc a_barrier
-
-#undef LLSC_M
lib/libc/wasi/libc-top-half/musl/arch/mips64/crt_arch.h
@@ -1,33 +0,0 @@
-__asm__(
-".set push\n"
-".set noreorder\n"
-".text \n"
-".global _" START "\n"
-".global " START "\n"
-".global " START "_data\n"
-".type   _" START ", @function\n"
-".type   " START ", @function\n"
-".type   " START "_data, @function\n"
-"_" START ":\n"
-"" START ":\n"
-".align 8 \n"
-"	bal 1f \n"
-"	 move $fp, $0 \n"
-"" START "_data: \n"
-"	.gpdword " START "_data \n"
-"	.gpdword " START "_c \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	.gpdword _DYNAMIC \n"
-"1:	ld $gp, 0($ra) \n"
-"	dsubu $gp, $ra, $gp \n"
-"	move $4, $sp \n"
-"	ld $5, 16($ra) \n"
-"	daddu $5, $5, $gp \n"
-"	ld $25, 8($ra) \n"
-"	daddu $25, $25, $gp \n"
-"	and $sp, $sp, -16 \n"
-"	jalr $25 \n"
-"	nop \n"
-".set pop \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/mips64/ksigaction.h
@@ -1,10 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	unsigned flags;
-	void (*handler)(int);
-	unsigned long mask[2];
-	void (*restorer)();
-};
-
-hidden void __restore(), __restore_rt();
lib/libc/wasi/libc-top-half/musl/arch/mips64/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	unsigned st_dev;
-	int __pad1[3];
-	ino_t st_ino;
-	mode_t st_mode;
-	unsigned st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned st_rdev;
-	int __pad2[3];
-	off_t st_size;
-	int st_atime_sec;
-	int st_atime_nsec;
-	int st_mtime_sec;
-	int st_mtime_nsec;
-	int st_ctime_sec;
-	int st_ctime_nsec;
-	unsigned st_blksize;
-	unsigned __pad3;
-	blkcnt_t st_blocks;
-};
lib/libc/wasi/libc-top-half/musl/arch/mips64/pthread_arch.h
@@ -1,19 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-#if __mips_isa_rev < 2
-	register uintptr_t tp __asm__("$3");
-	__asm__ (".word 0x7c03e83b" : "=r" (tp) );
-#else
-	uintptr_t tp;
-	__asm__ ("rdhwr %0, $29" : "=r" (tp) );
-#endif
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-#define MC_PC pc
lib/libc/wasi/libc-top-half/musl/arch/mips64/reloc.h
@@ -1,60 +0,0 @@
-#if __mips_isa_rev >= 6
-#define ISA_SUFFIX "r6"
-#else
-#define ISA_SUFFIX ""
-#endif
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "el"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#ifdef __mips_soft_float
-#define FP_SUFFIX "-sf"
-#else
-#define FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "mips64" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYM_OR_REL  4611
-#define REL_PLT         R_MIPS_JUMP_SLOT
-#define REL_COPY        R_MIPS_COPY
-#define REL_DTPMOD      R_MIPS_TLS_DTPMOD64
-#define REL_DTPOFF      R_MIPS_TLS_DTPREL64
-#define REL_TPOFF       R_MIPS_TLS_TPREL64
-
-#include <endian.h>
-
-#undef R_TYPE
-#undef R_SYM
-#undef R_INFO
-#define R_TYPE(x) (be64toh(x)&0x7fffffff)
-#define R_SYM(x) (be32toh(be64toh(x)>>32))
-#define R_INFO(s,t) (htobe64((uint64_t)htobe32(s)<<32 | (uint64_t)t))
-
-#define NEED_MIPS_GOT_RELOCS 1
-#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
-#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	".set push \n" \
-	".set noreorder \n" \
-	".align 8 \n" \
-	"	bal 1f \n" \
-	"	 nop \n" \
-	"	.gpdword . \n" \
-	"	.gpdword " #sym " \n" \
-	"1:	ld %0, ($ra) \n" \
-	"	dsubu %0, $ra, %0 \n" \
-	"	ld $ra, 8($ra) \n" \
-	"	daddu %0, %0, $ra \n" \
-	".set pop \n" \
-	: "=r"(*(fp)) : : "memory", "ra" )
lib/libc/wasi/libc-top-half/musl/arch/mips64/syscall_arch.h
@@ -1,128 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define SYSCALL_RLIM_INFINITY (-1UL/2)
-
-#if __mips_isa_rev >= 6
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-#else
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
-#endif
-
-static inline long __syscall0(long n)
-{
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r4 __asm__("$4") = a;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r9 __asm__("$9") = f;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6"
-
-#define SO_SNDTIMEO_OLD 0x1005
-#define SO_RCVTIMEO_OLD 0x1006
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/alltypes.h.in
@@ -1,21 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-#define __BYTE_ORDER 1234
-#else
-#define __BYTE_ORDER 4321
-#endif
-
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/errno.h
@@ -1,134 +0,0 @@
-#define EPERM            1
-#define ENOENT           2
-#define ESRCH            3
-#define EINTR            4
-#define EIO              5
-#define ENXIO            6
-#define E2BIG            7
-#define ENOEXEC          8
-#define EBADF            9
-#define ECHILD          10
-#define EAGAIN          11
-#define ENOMEM          12
-#define EACCES          13
-#define EFAULT          14
-#define ENOTBLK         15
-#define EBUSY           16
-#define EEXIST          17
-#define EXDEV           18
-#define ENODEV          19
-#define ENOTDIR         20
-#define EISDIR          21
-#define EINVAL          22
-#define ENFILE          23
-#define EMFILE          24
-#define ENOTTY          25
-#define ETXTBSY         26
-#define EFBIG           27
-#define ENOSPC          28
-#define ESPIPE          29
-#define EROFS           30
-#define EMLINK          31
-#define EPIPE           32
-#define EDOM            33
-#define ERANGE          34
-#define ENOMSG          35
-#define EIDRM           36
-#define ECHRNG          37
-#define EL2NSYNC        38
-#define EL3HLT          39
-#define EL3RST          40
-#define ELNRNG          41
-#define EUNATCH         42
-#define ENOCSI          43
-#define EL2HLT          44
-#define EDEADLK         45
-#define ENOLCK          46
-#define EBADE           50
-#define EBADR           51
-#define EXFULL          52
-#define ENOANO          53
-#define EBADRQC         54
-#define EBADSLT         55
-#define EDEADLOCK       56
-#define EBFONT          59
-#define ENOSTR          60
-#define ENODATA         61
-#define ETIME           62
-#define ENOSR           63
-#define ENONET          64
-#define ENOPKG          65
-#define EREMOTE         66
-#define ENOLINK         67
-#define EADV            68
-#define ESRMNT          69
-#define ECOMM           70
-#define EPROTO          71
-#define EDOTDOT         73
-#define EMULTIHOP       74
-#define EBADMSG         77
-#define ENAMETOOLONG    78
-#define EOVERFLOW       79
-#define ENOTUNIQ        80
-#define EBADFD          81
-#define EREMCHG         82
-#define ELIBACC         83
-#define ELIBBAD         84
-#define ELIBSCN         85
-#define ELIBMAX         86
-#define ELIBEXEC        87
-#define EILSEQ          88
-#define ENOSYS          89
-#define ELOOP           90
-#define ERESTART        91
-#define ESTRPIPE        92
-#define ENOTEMPTY       93
-#define EUSERS          94
-#define ENOTSOCK        95
-#define EDESTADDRREQ    96
-#define EMSGSIZE        97
-#define EPROTOTYPE      98
-#define ENOPROTOOPT     99
-#define EPROTONOSUPPORT 120
-#define ESOCKTNOSUPPORT 121
-#define EOPNOTSUPP      122
-#define ENOTSUP         EOPNOTSUPP
-#define EPFNOSUPPORT    123
-#define EAFNOSUPPORT    124
-#define EADDRINUSE      125
-#define EADDRNOTAVAIL   126
-#define ENETDOWN        127
-#define ENETUNREACH     128
-#define ENETRESET       129
-#define ECONNABORTED    130
-#define ECONNRESET      131
-#define ENOBUFS         132
-#define EISCONN         133
-#define ENOTCONN        134
-#define EUCLEAN         135
-#define ENOTNAM         137
-#define ENAVAIL         138
-#define EISNAM          139
-#define EREMOTEIO       140
-#define ESHUTDOWN       143
-#define ETOOMANYREFS    144
-#define ETIMEDOUT       145
-#define ECONNREFUSED    146
-#define EHOSTDOWN       147
-#define EHOSTUNREACH    148
-#define EWOULDBLOCK     EAGAIN
-#define EALREADY        149
-#define EINPROGRESS     150
-#define ESTALE          151
-#define ECANCELED       158
-#define ENOMEDIUM       159
-#define EMEDIUMTYPE     160
-#define ENOKEY          161
-#define EKEYEXPIRED     162
-#define EKEYREVOKED     163
-#define EKEYREJECTED    164
-#define EOWNERDEAD      165
-#define ENOTRECOVERABLE 166
-#define ERFKILL         167
-#define EHWPOISON       168
-#define EDQUOT          1133
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0400
-#define O_EXCL        02000
-#define O_NOCTTY      04000
-#define O_TRUNC       01000
-#define O_APPEND       0010
-#define O_NONBLOCK     0200
-#define O_DSYNC        0020
-#define O_SYNC       040020
-#define O_RSYNC      040020
-#define O_DIRECTORY 0200000
-#define O_NOFOLLOW  0400000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      010000
-#define O_DIRECT    0100000
-#define O_LARGEFILE  020000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 24
-#define F_GETOWN 23
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 33
-#define F_SETLK 34
-#define F_SETLKW 35
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/fenv.h
@@ -1,25 +0,0 @@
-#ifdef __mips_soft_float
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-#else
-#define FE_INEXACT    4
-#define FE_UNDERFLOW  8
-#define FE_OVERFLOW   16
-#define FE_DIVBYZERO  32
-#define FE_INVALID    64
-
-#define FE_ALL_EXCEPT 124
-
-#define FE_TONEAREST  0
-#define FE_TOWARDZERO 1
-#define FE_UPWARD     2
-#define FE_DOWNWARD   3
-#endif
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned __cw;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/float.h
@@ -1,16 +0,0 @@
-#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
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/hwcap.h
@@ -1,3 +0,0 @@
-#define HWCAP_MIPS_R6		(1 << 0)
-#define HWCAP_MIPS_MSA		(1 << 1)
-#define HWCAP_MIPS_CRC32	(1 << 2)
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/ioctl.h
@@ -1,114 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  1U
-#define _IOC_READ  2U
-#define _IOC_WRITE 4U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define TCGETA		0x5401
-#define TCSETA		0x5402
-#define TCSETAW		0x5403
-#define TCSETAF		0x5404
-#define TCSBRK		0x5405
-#define TCXONC		0x5406
-#define TCFLSH		0x5407
-#define TCGETS		0x540D
-#define TCSETS		0x540E
-#define TCSETSW		0x540F
-#define TCSETSF		0x5410
-
-#define TIOCEXCL	0x740D
-#define TIOCNXCL	0x740E
-#define TIOCOUTQ	0x7472
-#define TIOCSTI		0x5472
-#define TIOCMGET	0x741D
-#define TIOCMBIS	0x741B
-#define TIOCMBIC	0x741C
-#define TIOCMSET	0x741A
-
-#define TIOCPKT		0x5470
-#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
-#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
-#define TIOCNOTTY	0x5471
-#define TIOCSETD	0x7401
-#define TIOCGETD	0x7400
-
-#define FIOCLEX		0x6601
-#define FIONCLEX	0x6602
-#define FIOASYNC	0x667D
-#define FIONBIO		0x667E
-#define FIOQSIZE	0x667F
-
-#define TIOCGLTC        0x7474
-#define TIOCSLTC        0x7475
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-#define TIOCCONS	_IOW('t', 120, int)
-
-#define FIONREAD	0x467F
-#define TIOCINQ		FIONREAD
-
-#define TIOCGETP        0x7408
-#define TIOCSETP        0x7409
-#define TIOCSETN        0x740A
-
-#define TIOCSBRK	0x5427
-#define TIOCCBRK	0x5428
-#define TIOCGSID	0x7416
-#define TIOCGRS485	_IOR('T', 0x2E, char[32])
-#define TIOCSRS485	_IOWR('T', 0x2F, char[32])
-#define TIOCGPTN	_IOR('T', 0x30, unsigned int)
-#define TIOCSPTLCK	_IOW('T', 0x31, int)
-#define TIOCGDEV	_IOR('T', 0x32, unsigned int)
-#define TIOCSIG		_IOW('T', 0x36, int)
-#define TIOCVHANGUP	0x5437
-#define TIOCGPKT	_IOR('T', 0x38, int)
-#define TIOCGPTLCK	_IOR('T', 0x39, int)
-#define TIOCGEXCL	_IOR('T', 0x40, int)
-#define TIOCGPTPEER	_IO('T', 0x41)
-
-#define TIOCSCTTY	0x5480
-#define TIOCGSOFTCAR	0x5481
-#define TIOCSSOFTCAR	0x5482
-#define TIOCLINUX	0x5483
-#define TIOCGSERIAL	0x5484
-#define TIOCSSERIAL	0x5485
-#define TCSBRKP		0x5486
-
-#define TIOCSERCONFIG	0x5488
-#define TIOCSERGWILD	0x5489
-#define TIOCSERSWILD	0x548A
-#define TIOCGLCKTRMIOS	0x548B
-#define TIOCSLCKTRMIOS	0x548C
-#define TIOCSERGSTRUCT	0x548D
-#define TIOCSERGETLSR   0x548E
-#define TIOCSERGETMULTI 0x548F
-#define TIOCSERSETMULTI 0x5490
-#define TIOCMIWAIT	0x5491
-#define TIOCGICOUNT	0x5492
-
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x010
-#define TIOCM_SR	0x020
-#define TIOCM_CTS	0x040
-#define TIOCM_CAR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RNG	0x200
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_DSR	0x400
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-#define FIOGETOWN       _IOR('f', 123, int)
-#define FIOSETOWN       _IOW('f', 124, int)
-#define SIOCATMARK      _IOR('s', 7, int)
-#define SIOCSPGRP       _IOW('s', 8, pid_t)
-#define SIOCGPGRP       _IOR('s', 9, pid_t)
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/mman.h
@@ -1,25 +0,0 @@
-#undef MAP_ANON
-#define MAP_ANON       0x800
-#undef MAP_NORESERVE
-#define MAP_NORESERVE  0x0400
-#undef MAP_GROWSDOWN
-#define MAP_GROWSDOWN  0x1000
-#undef MAP_DENYWRITE
-#define MAP_DENYWRITE  0x2000
-#undef MAP_EXECUTABLE
-#define MAP_EXECUTABLE 0x4000
-#undef MAP_LOCKED
-#define MAP_LOCKED     0x8000
-#undef MAP_POPULATE
-#define MAP_POPULATE   0x10000
-#undef MAP_NONBLOCK
-#define MAP_NONBLOCK   0x20000
-#undef MAP_STACK
-#define MAP_STACK      0x40000
-#undef MAP_HUGETLB
-#define MAP_HUGETLB    0x80000
-#undef MAP_SYNC
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#undef MADV_SOFT_OFFLINE
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/msg.h
@@ -1,27 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-#else
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long __msg_ctime_lo;
-#endif
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/poll.h
@@ -1,2 +0,0 @@
-#define POLLWRNORM POLLOUT
-#define POLLWRBAND 0x100
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/ptrace.h
@@ -1,9 +0,0 @@
-#define PTRACE_GET_THREAD_AREA	25
-#define PTRACE_SET_THREAD_AREA	26
-#define PTRACE_PEEKTEXT_3264	0xc0
-#define PTRACE_PEEKDATA_3264	0xc1
-#define PTRACE_POKETEXT_3264	0xc2
-#define PTRACE_POKEDATA_3264	0xc3
-#define PTRACE_GET_THREAD_AREA_3264	0xc4
-#define PTRACE_GET_WATCH_REGS	0xd0
-#define PTRACE_SET_WATCH_REGS	0xd1
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/reg.h
@@ -1,47 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-
-#define EF_R0 0
-#define EF_R1 1
-#define EF_R2 2
-#define EF_R3 3
-#define EF_R4 4
-#define EF_R5 5
-#define EF_R6 6
-#define EF_R7 7
-#define EF_R8 8
-#define EF_R9 9
-#define EF_R10 10
-#define EF_R11 11
-#define EF_R12 12
-#define EF_R13 13
-#define EF_R14 14
-#define EF_R15 15
-#define EF_R16 16
-#define EF_R17 17
-#define EF_R18 18
-#define EF_R19 19
-#define EF_R20 20
-#define EF_R21 21
-#define EF_R22 22
-#define EF_R23 23
-#define EF_R24 24
-#define EF_R25 25
-
-#define EF_R26 26
-#define EF_R27 27
-#define EF_R28 28
-#define EF_R29 29
-#define EF_R30 30
-#define EF_R31 31
-
-#define EF_LO 32
-#define EF_HI 33
-
-#define EF_CP0_EPC 34
-#define EF_CP0_BADVADDR 35
-#define EF_CP0_STATUS 36
-#define EF_CP0_CAUSE 37
-#define EF_UNUSED0 38
-
-#define EF_SIZE 304
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/resource.h
@@ -1,5 +0,0 @@
-#define RLIMIT_NOFILE  5
-#define RLIMIT_AS      6
-#define RLIMIT_RSS     7
-#define RLIMIT_NPROC   8
-#define RLIMIT_MEMLOCK 9
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/sem.h
@@ -1,16 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_ctime_lo;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-#else
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-#endif
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_hi;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[23];
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/shm.h
@@ -1,29 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_ctime_lo;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned short __shm_atime_hi;
-	unsigned short __shm_dtime_hi;
-	unsigned short __shm_ctime_hi;
-	unsigned short __pad1;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/signal.h
@@ -1,143 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long long greg_t, gregset_t[32];
-
-typedef struct {
-	union {
-		double fp_dregs[32];
-		struct {
-			float _fp_fregs;
-			unsigned _fp_pad;
-		} fp_fregs[32];
-	} fp_r;
-} fpregset_t;
-
-struct sigcontext {
-	unsigned long long sc_regs[32];
-	unsigned long long sc_fpregs[32];
-	unsigned long long sc_mdhi;
-	unsigned long long sc_hi1;
-	unsigned long long sc_hi2;
-	unsigned long long sc_hi3;
-	unsigned long long sc_mdlo;
-	unsigned long long sc_lo1;
-	unsigned long long sc_lo2;
-	unsigned long long sc_lo3;
-	unsigned long long sc_pc;
-	unsigned int sc_fpc_csr;
-	unsigned int sc_used_math;
-	unsigned int sc_dsp;
-	unsigned int sc_reserved;
-};
-
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	greg_t mdhi;
-	greg_t hi1;
-	greg_t hi2;
-	greg_t hi3;
-	greg_t mdlo;
-	greg_t lo1;
-	greg_t lo2;
-	greg_t lo3;
-	greg_t pc;
-	unsigned int fpc_csr;
-	unsigned int used_math;
-	unsigned int dsp;
-	unsigned int reserved;
-} mcontext_t;
-
-#else
-typedef struct {
-	unsigned long long __mc1[32];
-	double __mc2[32];
-	unsigned long long __mc3[9];
-	unsigned __mc4[4];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	size_t ss_size;
-	int ss_flags;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  0x10000
-#define SA_SIGINFO    8
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#undef SIG_BLOCK
-#undef SIG_UNBLOCK
-#undef SIG_SETMASK
-#define SIG_BLOCK     1
-#define SIG_UNBLOCK   2
-#define SIG_SETMASK   3
-
-#undef SI_ASYNCIO
-#undef SI_MESGQ
-#undef SI_TIMER
-#define SI_ASYNCIO (-2)
-#define SI_MESGQ (-4)
-#define SI_TIMER (-3)
-
-#define __SI_SWAP_ERRNO_CODE
-
-#endif
-
-#define SIGHUP    1
-#define SIGINT    2
-#define SIGQUIT   3
-#define SIGILL    4
-#define SIGTRAP   5
-#define SIGABRT   6
-#define SIGIOT    SIGABRT
-#define SIGEMT    7
-#define SIGFPE    8
-#define SIGKILL   9
-#define SIGBUS    10
-#define SIGSEGV   11
-#define SIGSYS    12
-#define SIGPIPE   13
-#define SIGALRM   14
-#define SIGTERM   15
-#define SIGUSR1   16
-#define SIGUSR2   17
-#define SIGCHLD   18
-#define SIGPWR    19
-#define SIGWINCH  20
-#define SIGURG    21
-#define SIGIO     22
-#define SIGPOLL   SIGIO
-#define SIGSTOP   23
-#define SIGTSTP   24
-#define SIGCONT   25
-#define SIGTTIN   26
-#define SIGTTOU   27
-#define SIGVTALRM 28
-#define SIGPROF   29
-#define SIGXCPU   30
-#define SIGXFSZ   31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 128
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/socket.h
@@ -1,35 +0,0 @@
-#define SOCK_STREAM    2
-#define SOCK_DGRAM     1
-
-#define SOL_SOCKET     65535
-
-#define SO_DEBUG        1
-
-#define SO_REUSEADDR    0x0004
-#define SO_KEEPALIVE    0x0008
-#define SO_DONTROUTE    0x0010
-#define SO_BROADCAST    0x0020
-#define SO_LINGER       0x0080
-#define SO_OOBINLINE    0x0100
-#define SO_REUSEPORT    0x0200
-#define SO_SNDBUF       0x1001
-#define SO_RCVBUF       0x1002
-#define SO_SNDLOWAT     0x1003
-#define SO_RCVLOWAT     0x1004
-#define SO_ERROR        0x1007
-#define SO_TYPE         0x1008
-#define SO_ACCEPTCONN   0x1009
-#define SO_PROTOCOL     0x1028
-#define SO_DOMAIN       0x1029
-
-#define SO_NO_CHECK     11
-#define SO_PRIORITY     12
-#define SO_BSDCOMPAT    14
-#define SO_PASSCRED     17
-#define SO_PEERCRED     18
-#define SO_PEERSEC      30
-#define SO_SNDBUFFORCE  31
-#define SO_RCVBUFFORCE  33
-
-#define SOCK_NONBLOCK     0200
-#define SOCK_CLOEXEC  02000000
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/stat.h
@@ -1,23 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	long __pad1[2];
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long __pad2[2];
-	off_t st_size;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	blksize_t st_blksize;
-	long __pad3;
-	blkcnt_t st_blocks;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	long __pad4[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/statfs.h
@@ -1,8 +0,0 @@
-struct statfs {
-	unsigned long f_type, f_bsize, f_frsize;
-	fsblkcnt_t f_blocks, f_bfree;
-	fsfilcnt_t f_files, f_ffree;
-	fsblkcnt_t f_bavail;
-	fsid_t f_fsid;
-	unsigned long f_namelen, f_flags, f_spare[5];
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/syscall.h.in
@@ -1,369 +0,0 @@
-#define __NR_read			6000
-#define __NR_write			6001
-#define __NR_open			6002
-#define __NR_close			6003
-#define __NR_stat			6004
-#define __NR_fstat			6005
-#define __NR_lstat			6006
-#define __NR_poll			6007
-#define __NR_lseek			6008
-#define __NR_mmap			6009
-#define __NR_mprotect			6010
-#define __NR_munmap			6011
-#define __NR_brk			6012
-#define __NR_rt_sigaction		6013
-#define __NR_rt_sigprocmask		6014
-#define __NR_ioctl			6015
-#define __NR_pread64			6016
-#define __NR_pwrite64			6017
-#define __NR_readv			6018
-#define __NR_writev			6019
-#define __NR_access			6020
-#define __NR_pipe			6021
-#define __NR__newselect			6022
-#define __NR_sched_yield		6023
-#define __NR_mremap			6024
-#define __NR_msync			6025
-#define __NR_mincore			6026
-#define __NR_madvise			6027
-#define __NR_shmget			6028
-#define __NR_shmat			6029
-#define __NR_shmctl			6030
-#define __NR_dup			6031
-#define __NR_dup2			6032
-#define __NR_pause			6033
-#define __NR_nanosleep			6034
-#define __NR_getitimer			6035
-#define __NR_setitimer			6036
-#define __NR_alarm			6037
-#define __NR_getpid			6038
-#define __NR_sendfile			6039
-#define __NR_socket			6040
-#define __NR_connect			6041
-#define __NR_accept			6042
-#define __NR_sendto			6043
-#define __NR_recvfrom			6044
-#define __NR_sendmsg			6045
-#define __NR_recvmsg			6046
-#define __NR_shutdown			6047
-#define __NR_bind			6048
-#define __NR_listen			6049
-#define __NR_getsockname		6050
-#define __NR_getpeername		6051
-#define __NR_socketpair			6052
-#define __NR_setsockopt			6053
-#define __NR_getsockopt			6054
-#define __NR_clone			6055
-#define __NR_fork			6056
-#define __NR_execve			6057
-#define __NR_exit			6058
-#define __NR_wait4			6059
-#define __NR_kill			6060
-#define __NR_uname			6061
-#define __NR_semget			6062
-#define __NR_semop			6063
-#define __NR_semctl			6064
-#define __NR_shmdt			6065
-#define __NR_msgget			6066
-#define __NR_msgsnd			6067
-#define __NR_msgrcv			6068
-#define __NR_msgctl			6069
-#define __NR_fcntl			6070
-#define __NR_flock			6071
-#define __NR_fsync			6072
-#define __NR_fdatasync			6073
-#define __NR_truncate			6074
-#define __NR_ftruncate			6075
-#define __NR_getdents			6076
-#define __NR_getcwd			6077
-#define __NR_chdir			6078
-#define __NR_fchdir			6079
-#define __NR_rename			6080
-#define __NR_mkdir			6081
-#define __NR_rmdir			6082
-#define __NR_creat			6083
-#define __NR_link			6084
-#define __NR_unlink			6085
-#define __NR_symlink			6086
-#define __NR_readlink			6087
-#define __NR_chmod			6088
-#define __NR_fchmod			6089
-#define __NR_chown			6090
-#define __NR_fchown			6091
-#define __NR_lchown			6092
-#define __NR_umask			6093
-#define __NR_gettimeofday_time32		6094
-#define __NR_getrlimit			6095
-#define __NR_getrusage			6096
-#define __NR_sysinfo			6097
-#define __NR_times			6098
-#define __NR_ptrace			6099
-#define __NR_getuid			6100
-#define __NR_syslog			6101
-#define __NR_getgid			6102
-#define __NR_setuid			6103
-#define __NR_setgid			6104
-#define __NR_geteuid			6105
-#define __NR_getegid			6106
-#define __NR_setpgid			6107
-#define __NR_getppid			6108
-#define __NR_getpgrp			6109
-#define __NR_setsid			6110
-#define __NR_setreuid			6111
-#define __NR_setregid			6112
-#define __NR_getgroups			6113
-#define __NR_setgroups			6114
-#define __NR_setresuid			6115
-#define __NR_getresuid			6116
-#define __NR_setresgid			6117
-#define __NR_getresgid			6118
-#define __NR_getpgid			6119
-#define __NR_setfsuid			6120
-#define __NR_setfsgid			6121
-#define __NR_getsid			6122
-#define __NR_capget			6123
-#define __NR_capset			6124
-#define __NR_rt_sigpending		6125
-#define __NR_rt_sigtimedwait		6126
-#define __NR_rt_sigqueueinfo		6127
-#define __NR_rt_sigsuspend		6128
-#define __NR_sigaltstack		6129
-#define __NR_utime			6130
-#define __NR_mknod			6131
-#define __NR_personality		6132
-#define __NR_ustat			6133
-#define __NR_statfs			6134
-#define __NR_fstatfs			6135
-#define __NR_sysfs			6136
-#define __NR_getpriority		6137
-#define __NR_setpriority		6138
-#define __NR_sched_setparam		6139
-#define __NR_sched_getparam		6140
-#define __NR_sched_setscheduler		6141
-#define __NR_sched_getscheduler		6142
-#define __NR_sched_get_priority_max	6143
-#define __NR_sched_get_priority_min	6144
-#define __NR_sched_rr_get_interval	6145
-#define __NR_mlock			6146
-#define __NR_munlock			6147
-#define __NR_mlockall			6148
-#define __NR_munlockall			6149
-#define __NR_vhangup			6150
-#define __NR_pivot_root			6151
-#define __NR__sysctl			6152
-#define __NR_prctl			6153
-#define __NR_adjtimex			6154
-#define __NR_setrlimit			6155
-#define __NR_chroot			6156
-#define __NR_sync			6157
-#define __NR_acct			6158
-#define __NR_settimeofday_time32		6159
-#define __NR_mount			6160
-#define __NR_umount2			6161
-#define __NR_swapon			6162
-#define __NR_swapoff			6163
-#define __NR_reboot			6164
-#define __NR_sethostname		6165
-#define __NR_setdomainname		6166
-#define __NR_create_module		6167
-#define __NR_init_module		6168
-#define __NR_delete_module		6169
-#define __NR_get_kernel_syms		6170
-#define __NR_query_module		6171
-#define __NR_quotactl			6172
-#define __NR_nfsservctl			6173
-#define __NR_getpmsg			6174
-#define __NR_putpmsg			6175
-#define __NR_afs_syscall		6176
-#define __NR_reserved177		6177
-#define __NR_gettid			6178
-#define __NR_readahead			6179
-#define __NR_setxattr			6180
-#define __NR_lsetxattr			6181
-#define __NR_fsetxattr			6182
-#define __NR_getxattr			6183
-#define __NR_lgetxattr			6184
-#define __NR_fgetxattr			6185
-#define __NR_listxattr			6186
-#define __NR_llistxattr			6187
-#define __NR_flistxattr			6188
-#define __NR_removexattr		6189
-#define __NR_lremovexattr		6190
-#define __NR_fremovexattr		6191
-#define __NR_tkill			6192
-#define __NR_reserved193		6193
-#define __NR_futex			6194
-#define __NR_sched_setaffinity		6195
-#define __NR_sched_getaffinity		6196
-#define __NR_cacheflush			6197
-#define __NR_cachectl			6198
-#define __NR_sysmips			6199
-#define __NR_io_setup			6200
-#define __NR_io_destroy			6201
-#define __NR_io_getevents		6202
-#define __NR_io_submit			6203
-#define __NR_io_cancel			6204
-#define __NR_exit_group			6205
-#define __NR_lookup_dcookie		6206
-#define __NR_epoll_create		6207
-#define __NR_epoll_ctl			6208
-#define __NR_epoll_wait			6209
-#define __NR_remap_file_pages		6210
-#define __NR_rt_sigreturn		6211
-#define __NR_fcntl64			6212
-#define __NR_set_tid_address		6213
-#define __NR_restart_syscall		6214
-#define __NR_semtimedop			6215
-#define __NR_fadvise64			6216
-#define __NR_statfs64			6217
-#define __NR_fstatfs64			6218
-#define __NR_sendfile64			6219
-#define __NR_timer_create		6220
-#define __NR_timer_settime32		6221
-#define __NR_timer_gettime32		6222
-#define __NR_timer_getoverrun		6223
-#define __NR_timer_delete		6224
-#define __NR_clock_settime32		6225
-#define __NR_clock_gettime32		6226
-#define __NR_clock_getres_time32		6227
-#define __NR_clock_nanosleep_time32		6228
-#define __NR_tgkill			6229
-#define __NR_utimes			6230
-#define __NR_mbind			6231
-#define __NR_get_mempolicy		6232
-#define __NR_set_mempolicy		6233
-#define __NR_mq_open			6234
-#define __NR_mq_unlink			6235
-#define __NR_mq_timedsend		6236
-#define __NR_mq_timedreceive		6237
-#define __NR_mq_notify			6238
-#define __NR_mq_getsetattr		6239
-#define __NR_vserver			6240
-#define __NR_waitid			6241
-#define __NR_add_key			6243
-#define __NR_request_key		6244
-#define __NR_keyctl			6245
-#define __NR_set_thread_area		6246
-#define __NR_inotify_init		6247
-#define __NR_inotify_add_watch		6248
-#define __NR_inotify_rm_watch		6249
-#define __NR_migrate_pages		6250
-#define __NR_openat			6251
-#define __NR_mkdirat			6252
-#define __NR_mknodat			6253
-#define __NR_fchownat			6254
-#define __NR_futimesat			6255
-#define __NR_newfstatat			6256
-#define __NR_unlinkat			6257
-#define __NR_renameat			6258
-#define __NR_linkat			6259
-#define __NR_symlinkat			6260
-#define __NR_readlinkat			6261
-#define __NR_fchmodat			6262
-#define __NR_faccessat			6263
-#define __NR_pselect6			6264
-#define __NR_ppoll			6265
-#define __NR_unshare			6266
-#define __NR_splice			6267
-#define __NR_sync_file_range		6268
-#define __NR_tee			6269
-#define __NR_vmsplice			6270
-#define __NR_move_pages			6271
-#define __NR_set_robust_list		6272
-#define __NR_get_robust_list		6273
-#define __NR_kexec_load			6274
-#define __NR_getcpu			6275
-#define __NR_epoll_pwait		6276
-#define __NR_ioprio_set			6277
-#define __NR_ioprio_get			6278
-#define __NR_utimensat			6279
-#define __NR_signalfd			6280
-#define __NR_timerfd			6281
-#define __NR_eventfd			6282
-#define __NR_fallocate			6283
-#define __NR_timerfd_create		6284
-#define __NR_timerfd_gettime32		6285
-#define __NR_timerfd_settime32		6286
-#define __NR_signalfd4			6287
-#define __NR_eventfd2			6288
-#define __NR_epoll_create1		6289
-#define __NR_dup3			6290
-#define __NR_pipe2			6291
-#define __NR_inotify_init1		6292
-#define __NR_preadv			6293
-#define __NR_pwritev			6294
-#define __NR_rt_tgsigqueueinfo		6295
-#define __NR_perf_event_open		6296
-#define __NR_accept4			6297
-#define __NR_recvmmsg			6298
-#define __NR_getdents64			6299
-#define __NR_fanotify_init		6300
-#define __NR_fanotify_mark		6301
-#define __NR_prlimit64			6302
-#define __NR_name_to_handle_at		6303
-#define __NR_open_by_handle_at		6304
-#define __NR_clock_adjtime		6305
-#define __NR_syncfs			6306
-#define __NR_sendmmsg			6307
-#define __NR_setns			6308
-#define __NR_process_vm_readv		6309
-#define __NR_process_vm_writev		6310
-#define __NR_kcmp			6311
-#define __NR_finit_module		6312
-#define __NR_sched_setattr		6313
-#define __NR_sched_getattr		6314
-#define __NR_renameat2			6315
-#define __NR_seccomp			6316
-#define __NR_getrandom			6317
-#define __NR_memfd_create		6318
-#define __NR_bpf			6319
-#define __NR_execveat			6320
-#define __NR_userfaultfd		6321
-#define __NR_membarrier			6322
-#define __NR_mlock2			6323
-#define __NR_copy_file_range		6324
-#define __NR_preadv2			6325
-#define __NR_pwritev2			6326
-#define __NR_pkey_mprotect		6327
-#define __NR_pkey_alloc			6328
-#define __NR_pkey_free			6329
-#define __NR_statx			6330
-#define __NR_rseq			6331
-#define __NR_io_pgetevents		6332
-#define __NR_clock_gettime64		6403
-#define __NR_clock_settime64		6404
-#define __NR_clock_adjtime64		6405
-#define __NR_clock_getres_time64	6406
-#define __NR_clock_nanosleep_time64	6407
-#define __NR_timer_gettime64		6408
-#define __NR_timer_settime64		6409
-#define __NR_timerfd_gettime64		6410
-#define __NR_timerfd_settime64		6411
-#define __NR_utimensat_time64		6412
-#define __NR_pselect6_time64		6413
-#define __NR_ppoll_time64		6414
-#define __NR_io_pgetevents_time64	6416
-#define __NR_recvmmsg_time64		6417
-#define __NR_mq_timedsend_time64	6418
-#define __NR_mq_timedreceive_time64	6419
-#define __NR_semtimedop_time64		6420
-#define __NR_rt_sigtimedwait_time64	6421
-#define __NR_futex_time64		6422
-#define __NR_sched_rr_get_interval_time64 6423
-#define __NR_pidfd_send_signal		6424
-#define __NR_io_uring_setup		6425
-#define __NR_io_uring_enter		6426
-#define __NR_io_uring_register		6427
-#define __NR_open_tree		6428
-#define __NR_move_mount		6429
-#define __NR_fsopen		6430
-#define __NR_fsconfig		6431
-#define __NR_fsmount		6432
-#define __NR_fspick		6433
-#define __NR_pidfd_open		6434
-#define __NR_clone3		6435
-#define __NR_close_range	6436
-#define __NR_openat2		6437
-#define __NR_pidfd_getfd	6438
-#define __NR_faccessat2		6439
-
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/termios.h
@@ -1,169 +0,0 @@
-struct termios {
-	tcflag_t c_iflag;
-	tcflag_t c_oflag;
-	tcflag_t c_cflag;
-	tcflag_t c_lflag;
-	cc_t c_line;
-	cc_t c_cc[NCCS];
-	speed_t __c_ispeed;
-	speed_t __c_ospeed;
-};
-
-#define VINTR     0
-#define VQUIT     1
-#define VERASE    2
-#define VKILL     3
-#define VMIN      4
-#define VTIME     5
-#define VEOL2     6
-#define VSWTC     7
-#define VSWTCH    7
-#define VSTART    8
-#define VSTOP     9
-#define VSUSP    10
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE  14
-#define VLNEXT   15
-#define VEOF     16
-#define VEOL     17
-
-#define IGNBRK  0000001
-#define BRKINT  0000002
-#define IGNPAR  0000004
-#define PARMRK  0000010
-#define INPCK   0000020
-#define ISTRIP  0000040
-#define INLCR   0000100
-#define IGNCR   0000200
-#define ICRNL   0000400
-#define IUCLC   0001000
-#define IXON    0002000
-#define IXANY   0004000
-#define IXOFF   0010000
-#define IMAXBEL 0020000
-#define IUTF8   0040000
-
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
-#define NLDLY  0000400
-#define NL0    0000000
-#define NL1    0000400
-#define CRDLY  0003000
-#define CR0    0000000
-#define CR1    0001000
-#define CR2    0002000
-#define CR3    0003000
-#define TABDLY 0014000
-#define TAB0   0000000
-#define TAB1   0004000
-#define TAB2   0010000
-#define TAB3   0014000
-#define BSDLY  0020000
-#define BS0    0000000
-#define BS1    0020000
-#define FFDLY  0100000
-#define FF0    0000000
-#define FF1    0100000
-#endif
-
-#define VTDLY  0040000
-#define VT0    0000000
-#define VT1    0040000
-
-#define B0       0000000
-#define B50      0000001
-#define B75      0000002
-#define B110     0000003
-#define B134     0000004
-#define B150     0000005
-#define B200     0000006
-#define B300     0000007
-#define B600     0000010
-#define B1200    0000011
-#define B1800    0000012
-#define B2400    0000013
-#define B4800    0000014
-#define B9600    0000015
-#define B19200   0000016
-#define B38400   0000017
-
-#define B57600   0010001
-#define B115200  0010002
-#define B230400  0010003
-#define B460800  0010004
-#define B500000  0010005
-#define B576000  0010006
-#define B921600  0010007
-#define B1000000 0010010
-#define B1152000 0010011
-#define B1500000 0010012
-#define B2000000 0010013
-#define B2500000 0010014
-#define B3000000 0010015
-#define B3500000 0010016
-#define B4000000 0010017
-
-#define CSIZE  0000060
-#define CS5    0000000
-#define CS6    0000020
-#define CS7    0000040
-#define CS8    0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-
-#define ISIG   0000001
-#define ICANON 0000002
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define IEXTEN 0000400
-#define TOSTOP 0100000
-#define ITOSTOP 0100000
-
-#define TCOOFF 0
-#define TCOON  1
-#define TCIOFF 2
-#define TCION  3
-
-#define TCIFLUSH  0
-#define TCOFLUSH  1
-#define TCIOFLUSH 2
-
-#define TCSANOW   0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define EXTA    0000016
-#define EXTB    0000017
-#define CBAUD   0010017
-#define CBAUDEX 0010000
-#define CIBAUD  002003600000
-#define CMSPAR  010000000000
-#define CRTSCTS 020000000000
-
-#define XCASE   0000004
-#define ECHOCTL 0001000
-#define ECHOPRT 0002000
-#define ECHOKE  0004000
-#define FLUSHO  0020000
-#define PENDIN  0040000
-#define EXTPROC 0200000
-
-#define XTABS  0014000
-#define TIOCSER_TEMT 1
-#endif
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/bits/user.h
@@ -1,15 +0,0 @@
-struct user {
-	unsigned long regs[102];
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long long start_code, start_data, start_stack;
-	long long signal;
-	unsigned long long *u_ar0;
-	unsigned long long magic;
-	char u_comm[32];
-};
-
-#define ELF_NGREG 45
-#define ELF_NFPREG 33
-
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG];
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/atomic_arch.h
@@ -1,52 +0,0 @@
-#if __mips_isa_rev < 6
-#define LLSC_M "m"
-#else
-#define LLSC_M "ZC"
-#endif
-
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-#if __mips < 2
-	__asm__ __volatile__ (
-		".set push ; .set mips2\n\t"
-		"ll %0, %1"
-		"\n\t.set pop"
-		: "=r"(v) : "m"(*p));
-#else
-	__asm__ __volatile__ (
-		"ll %0, %1"
-		: "=r"(v) : LLSC_M(*p));
-#endif
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-#if __mips < 2
-	__asm__ __volatile__ (
-		".set push ; .set mips2\n\t"
-		"sc %0, %1"
-		"\n\t.set pop"
-		: "=r"(r), "=m"(*p) : "0"(v) : "memory");
-#else
-	__asm__ __volatile__ (
-		"sc %0, %1"
-		: "=r"(r), "="LLSC_M(*p) : "0"(v) : "memory");
-#endif
-	return r;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("sync" : : : "memory");
-}
-
-#define a_pre_llsc a_barrier
-#define a_post_llsc a_barrier
-
-#undef LLSC_M
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/crt_arch.h
@@ -1,32 +0,0 @@
-__asm__(
-".set push\n"
-".set noreorder\n"
-".text \n"
-".global _" START "\n"
-".global " START "\n"
-".global " START "_data\n"
-".type   _" START ", @function\n"
-".type   " START ", @function\n"
-".type   " START "_data, @function\n"
-"_" START ":\n"
-"" START ":\n"
-"	bal 1f \n"
-"	move $fp, $0 \n"
-"" START "_data: \n"
-"	.gpword " START "_data \n"
-"	.gpword " START "_c \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	.gpword _DYNAMIC \n"
-"1:	lw $gp, 0($ra) \n"
-"	subu $gp, $ra, $gp \n"
-"	move $4, $sp \n"
-"	lw $5, 8($ra) \n"
-"	addu $5, $5, $gp \n"
-"	lw $25, 4($ra) \n"
-"	addu $25, $25, $gp \n"
-"	and $sp, $sp, -8 \n"
-"	jalr $25 \n"
-"	subu $sp, $sp, 16 \n"
-".set pop \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/ksigaction.h
@@ -1,10 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	unsigned flags;
-	void (*handler)(int);
-	unsigned long mask[4];
-	void (*restorer)();
-};
-
-hidden void __restore(), __restore_rt();
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/kstat.h
@@ -1,22 +0,0 @@
-struct kstat {
-	unsigned st_dev;
-	long __pad1[3];
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned st_rdev;
-	long __pad2[3];
-	off_t st_size;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	blksize_t st_blksize;
-	long __pad3;
-	blkcnt_t st_blocks;
-	long __pad4[14];
-};
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/pthread_arch.h
@@ -1,19 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-#if __mips_isa_rev < 2
-	register uintptr_t tp __asm__("$3");
-	__asm__ (".word 0x7c03e83b" : "=r" (tp) );
-#else
-	uintptr_t tp;
-	__asm__ ("rdhwr %0, $29" : "=r" (tp) );
-#endif
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-#define MC_PC pc
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/reloc.h
@@ -1,50 +0,0 @@
-#if __mips_isa_rev >= 6
-#define ISA_SUFFIX "r6"
-#else
-#define ISA_SUFFIX ""
-#endif
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "el"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#ifdef __mips_soft_float
-#define FP_SUFFIX "-sf"
-#else
-#define FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "mipsn32" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYM_OR_REL  R_MIPS_REL32
-#define REL_PLT         R_MIPS_JUMP_SLOT
-#define REL_COPY        R_MIPS_COPY
-#define REL_DTPMOD      R_MIPS_TLS_DTPMOD32
-#define REL_DTPOFF      R_MIPS_TLS_DTPREL32
-#define REL_TPOFF       R_MIPS_TLS_TPREL32
-
-#define NEED_MIPS_GOT_RELOCS 1
-#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
-#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	".set push \n" \
-	".set noreorder \n" \
-	"	bal 1f \n" \
-	"	nop \n" \
-	"	.gpword . \n" \
-	"	.gpword " #sym " \n" \
-	"1:	lw %0, ($ra) \n" \
-	"	subu %0, $ra, %0 \n" \
-	"	lw $ra, 4($ra) \n" \
-	"	addu %0, %0, $ra \n" \
-	".set pop \n" \
-	: "=r"(*(fp)) : : "memory", "ra" )
lib/libc/wasi/libc-top-half/musl/arch/mipsn32/syscall_arch.h
@@ -1,130 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define SYSCALL_RLIM_INFINITY (-1UL/2)
-
-#if __mips_isa_rev >= 6
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "memory"
-#else
-#define SYSCALL_CLOBBERLIST \
-	"$1", "$3", "$10", "$11", "$12", "$13", \
-	"$14", "$15", "$24", "$25", "hi", "lo", "memory"
-#endif
-
-static inline long __syscall0(long n)
-{
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r4 __asm__("$4") = a;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7");
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "=r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r4 __asm__("$4") = a;
-	register long r5 __asm__("$5") = b;
-	register long r6 __asm__("$6") = c;
-	register long r7 __asm__("$7") = d;
-	register long r8 __asm__("$8") = e;
-	register long r9 __asm__("$9") = f;
-	register long r2 __asm__("$2");
-
-	__asm__ __volatile__ (
-		"daddu $2,$0,%2 ; syscall"
-		: "=&r"(r2), "+r"(r7)
-		: "ir"(n), "0"(r2), "r"(r4), "r"(r5), "r"(r6), "r"(r8), "r"(r9)
-		: SYSCALL_CLOBBERLIST);
-	return r7 && r2>0 ? -r2 : r2;
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT32_SYM "__vdso_clock_gettime"
-#define VDSO_CGT32_VER "LINUX_2.6"
-#define VDSO_CGT_SYM "__vdso_clock_gettime64"
-#define VDSO_CGT_VER "LINUX_2.6"
-
-#define SO_SNDTIMEO_OLD 0x1005
-#define SO_RCVTIMEO_OLD 0x1006
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/alltypes.h.in
@@ -1,16 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#define __BYTE_ORDER 4321
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-TYPEDEF unsigned wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 8192
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/reg.h
@@ -1,3 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-/* FIXME */
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/sem.h
@@ -1,13 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[13];
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/signal.h
@@ -1,85 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t, gregset_t[34];
-typedef struct sigcontext {
-	struct {
-		unsigned long gpr[32];
-		unsigned long pc;
-		unsigned long sr;
-	} regs;
-	unsigned long oldmask;
-} mcontext_t;
-#else
-typedef struct {
-	unsigned long __regs[35];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long long __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __st_blksize_padding;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	unsigned __unused[2];
- 	struct timespec st_atim;
- 	struct timespec st_mtim;
- 	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/syscall.h.in
@@ -1,318 +0,0 @@
-#define __NR_io_setup 0
-#define __NR_io_destroy 1
-#define __NR_io_submit 2
-#define __NR_io_cancel 3
-#define __NR_io_getevents 4
-#define __NR_setxattr 5
-#define __NR_lsetxattr 6
-#define __NR_fsetxattr 7
-#define __NR_getxattr 8
-#define __NR_lgetxattr 9
-#define __NR_fgetxattr 10
-#define __NR_listxattr 11
-#define __NR_llistxattr 12
-#define __NR_flistxattr 13
-#define __NR_removexattr 14
-#define __NR_lremovexattr 15
-#define __NR_fremovexattr 16
-#define __NR_getcwd 17
-#define __NR_lookup_dcookie 18
-#define __NR_eventfd2 19
-#define __NR_epoll_create1 20
-#define __NR_epoll_ctl 21
-#define __NR_epoll_pwait 22
-#define __NR_dup 23
-#define __NR_dup3 24
-#define __NR_fcntl64 25
-#define __NR_inotify_init1 26
-#define __NR_inotify_add_watch 27
-#define __NR_inotify_rm_watch 28
-#define __NR_ioctl 29
-#define __NR_ioprio_set 30
-#define __NR_ioprio_get 31
-#define __NR_flock 32
-#define __NR_mknodat 33
-#define __NR_mkdirat 34
-#define __NR_unlinkat 35
-#define __NR_symlinkat 36
-#define __NR_linkat 37
-#define __NR_renameat 38
-#define __NR_umount2 39
-#define __NR_mount 40
-#define __NR_pivot_root 41
-#define __NR_nfsservctl 42
-#define __NR_statfs64 43
-#define __NR_fstatfs64 44
-#define __NR_truncate64 45
-#define __NR_ftruncate64 46
-#define __NR_fallocate 47
-#define __NR_faccessat 48
-#define __NR_chdir 49
-#define __NR_fchdir 50
-#define __NR_chroot 51
-#define __NR_fchmod 52
-#define __NR_fchmodat 53
-#define __NR_fchownat 54
-#define __NR_fchown 55
-#define __NR_openat 56
-#define __NR_close 57
-#define __NR_vhangup 58
-#define __NR_pipe2 59
-#define __NR_quotactl 60
-#define __NR_getdents64 61
-#define __NR__llseek 62
-#define __NR_llseek 62
-#define __NR_read 63
-#define __NR_write 64
-#define __NR_readv 65
-#define __NR_writev 66
-#define __NR_pread64 67
-#define __NR_pwrite64 68
-#define __NR_preadv 69
-#define __NR_pwritev 70
-#define __NR_sendfile64 71
-#define __NR_pselect6 72
-#define __NR_ppoll 73
-#define __NR_signalfd4 74
-#define __NR_vmsplice 75
-#define __NR_splice 76
-#define __NR_tee 77
-#define __NR_readlinkat 78
-#define __NR_fstatat64 79
-#define __NR_fstat64 80
-#define __NR_sync 81
-#define __NR_fsync 82
-#define __NR_fdatasync 83
-#define __NR_sync_file_range 84
-#define __NR_timerfd_create 85
-#define __NR_timerfd_settime32 86
-#define __NR_timerfd_gettime32 87
-#define __NR_utimensat 88
-#define __NR_acct 89
-#define __NR_capget 90
-#define __NR_capset 91
-#define __NR_personality 92
-#define __NR_exit 93
-#define __NR_exit_group 94
-#define __NR_waitid 95
-#define __NR_set_tid_address 96
-#define __NR_unshare 97
-#define __NR_futex 98
-#define __NR_set_robust_list 99
-#define __NR_get_robust_list 100
-#define __NR_nanosleep 101
-#define __NR_getitimer 102
-#define __NR_setitimer 103
-#define __NR_kexec_load 104
-#define __NR_init_module 105
-#define __NR_delete_module 106
-#define __NR_timer_create 107
-#define __NR_timer_gettime32 108
-#define __NR_timer_getoverrun 109
-#define __NR_timer_settime32 110
-#define __NR_timer_delete 111
-#define __NR_clock_settime32 112
-#define __NR_clock_gettime32 113
-#define __NR_clock_getres_time32 114
-#define __NR_clock_nanosleep_time32 115
-#define __NR_syslog 116
-#define __NR_ptrace 117
-#define __NR_sched_setparam 118
-#define __NR_sched_setscheduler 119
-#define __NR_sched_getscheduler 120
-#define __NR_sched_getparam 121
-#define __NR_sched_setaffinity 122
-#define __NR_sched_getaffinity 123
-#define __NR_sched_yield 124
-#define __NR_sched_get_priority_max 125
-#define __NR_sched_get_priority_min 126
-#define __NR_sched_rr_get_interval 127
-#define __NR_restart_syscall 128
-#define __NR_kill 129
-#define __NR_tkill 130
-#define __NR_tgkill 131
-#define __NR_sigaltstack 132
-#define __NR_rt_sigsuspend 133
-#define __NR_rt_sigaction 134
-#define __NR_rt_sigprocmask 135
-#define __NR_rt_sigpending 136
-#define __NR_rt_sigtimedwait 137
-#define __NR_rt_sigqueueinfo 138
-#define __NR_rt_sigreturn 139
-#define __NR_setpriority 140
-#define __NR_getpriority 141
-#define __NR_reboot 142
-#define __NR_setregid 143
-#define __NR_setgid 144
-#define __NR_setreuid 145
-#define __NR_setuid 146
-#define __NR_setresuid 147
-#define __NR_getresuid 148
-#define __NR_setresgid 149
-#define __NR_getresgid 150
-#define __NR_setfsuid 151
-#define __NR_setfsgid 152
-#define __NR_times 153
-#define __NR_setpgid 154
-#define __NR_getpgid 155
-#define __NR_getsid 156
-#define __NR_setsid 157
-#define __NR_getgroups 158
-#define __NR_setgroups 159
-#define __NR_uname 160
-#define __NR_sethostname 161
-#define __NR_setdomainname 162
-#define __NR_getrlimit 163
-#define __NR_setrlimit 164
-#define __NR_getrusage 165
-#define __NR_umask 166
-#define __NR_prctl 167
-#define __NR_getcpu 168
-#define __NR_gettimeofday_time32 169
-#define __NR_settimeofday_time32 170
-#define __NR_adjtimex 171
-#define __NR_getpid 172
-#define __NR_getppid 173
-#define __NR_getuid 174
-#define __NR_geteuid 175
-#define __NR_getgid 176
-#define __NR_getegid 177
-#define __NR_gettid 178
-#define __NR_sysinfo 179
-#define __NR_mq_open 180
-#define __NR_mq_unlink 181
-#define __NR_mq_timedsend 182
-#define __NR_mq_timedreceive 183
-#define __NR_mq_notify 184
-#define __NR_mq_getsetattr 185
-#define __NR_msgget 186
-#define __NR_msgctl 187
-#define __NR_msgrcv 188
-#define __NR_msgsnd 189
-#define __NR_semget 190
-#define __NR_semctl 191
-#define __NR_semtimedop 192
-#define __NR_semop 193
-#define __NR_shmget 194
-#define __NR_shmctl 195
-#define __NR_shmat 196
-#define __NR_shmdt 197
-#define __NR_socket 198
-#define __NR_socketpair 199
-#define __NR_bind 200
-#define __NR_listen 201
-#define __NR_accept 202
-#define __NR_connect 203
-#define __NR_getsockname 204
-#define __NR_getpeername 205
-#define __NR_sendto 206
-#define __NR_recvfrom 207
-#define __NR_setsockopt 208
-#define __NR_getsockopt 209
-#define __NR_shutdown 210
-#define __NR_sendmsg 211
-#define __NR_recvmsg 212
-#define __NR_readahead 213
-#define __NR_brk 214
-#define __NR_munmap 215
-#define __NR_mremap 216
-#define __NR_add_key 217
-#define __NR_request_key 218
-#define __NR_keyctl 219
-#define __NR_clone 220
-#define __NR_execve 221
-#define __NR_mmap2 222
-#define __NR_fadvise64_64 223
-#define __NR_swapon 224
-#define __NR_swapoff 225
-#define __NR_mprotect 226
-#define __NR_msync 227
-#define __NR_mlock 228
-#define __NR_munlock 229
-#define __NR_mlockall 230
-#define __NR_munlockall 231
-#define __NR_mincore 232
-#define __NR_madvise 233
-#define __NR_remap_file_pages 234
-#define __NR_mbind 235
-#define __NR_get_mempolicy 236
-#define __NR_set_mempolicy 237
-#define __NR_migrate_pages 238
-#define __NR_move_pages 239
-#define __NR_rt_tgsigqueueinfo 240
-#define __NR_perf_event_open 241
-#define __NR_accept4 242
-#define __NR_recvmmsg 243
-#define __NR_or1k_atomic 244
-#define __NR_wait4 260
-#define __NR_prlimit64 261
-#define __NR_fanotify_init 262
-#define __NR_fanotify_mark 263
-#define __NR_name_to_handle_at 264
-#define __NR_open_by_handle_at 265
-#define __NR_clock_adjtime 266
-#define __NR_syncfs 267
-#define __NR_setns 268
-#define __NR_sendmmsg 269
-#define __NR_process_vm_readv 270
-#define __NR_process_vm_writev 271
-#define __NR_kcmp 272
-#define __NR_finit_module 273
-#define __NR_sched_setattr 274
-#define __NR_sched_getattr 275
-#define __NR_renameat2 276
-#define __NR_seccomp 277
-#define __NR_getrandom 278
-#define __NR_memfd_create 279
-#define __NR_bpf 280
-#define __NR_execveat 281
-#define __NR_userfaultfd 282
-#define __NR_membarrier 283
-#define __NR_mlock2 284
-#define __NR_copy_file_range 285
-#define __NR_preadv2 286
-#define __NR_pwritev2 287
-#define __NR_pkey_mprotect 288
-#define __NR_pkey_alloc 289
-#define __NR_pkey_free 290
-#define __NR_statx 291
-#define __NR_io_pgetevents 292
-#define __NR_rseq 293
-#define __NR_kexec_file_load 294
-#define __NR_clock_gettime64 403
-#define __NR_clock_settime64 404
-#define __NR_clock_adjtime64 405
-#define __NR_clock_getres_time64 406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64 408
-#define __NR_timer_settime64 409
-#define __NR_timerfd_gettime64 410
-#define __NR_timerfd_settime64 411
-#define __NR_utimensat_time64 412
-#define __NR_pselect6_time64 413
-#define __NR_ppoll_time64 414
-#define __NR_io_pgetevents_time64 416
-#define __NR_recvmmsg_time64 417
-#define __NR_mq_timedsend_time64 418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64 420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64 422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal 424
-#define __NR_io_uring_setup 425
-#define __NR_io_uring_enter 426
-#define __NR_io_uring_register 427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/or1k/bits/user.h
lib/libc/wasi/libc-top-half/musl/arch/or1k/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/or1k/atomic_arch.h
@@ -1,14 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__("1:	l.lwa %0, %1\n"
-		"	l.sfeq %0, %2\n"
-		"	l.bnf 1f\n"
-		"	 l.nop\n"
-		"	l.swa %1, %3\n"
-		"	l.bnf 1b\n"
-		"	 l.nop\n"
-		"1:	\n"
-		: "=&r"(t), "+m"(*p) : "r"(t), "r"(s) : "cc", "memory" );
-        return t;
-}
lib/libc/wasi/libc-top-half/musl/arch/or1k/crt_arch.h
@@ -1,18 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-".align  4 \n"
-START ": \n"
-"	l.jal 1f \n"
-"	 l.ori r3, r1, 0 \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	.word _DYNAMIC-. \n"
-"1:	l.lwz r4, 0(r9) \n"
-"	l.add r4, r4, r9 \n"
-"	l.addi r2, r0, -8 \n"
-"	l.and r1, r1, r2 \n"
-"	l.addi r1, r1, -16 \n"
-"	l.jal " START "_c \n"
-"	 l.ori r2, r0, 0 \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/or1k/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	long long __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __st_blksize_padding;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/or1k/pthread_arch.h
@@ -1,16 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-#ifdef __clang__
-	uintptr_t tp;
-	__asm__ ("l.ori %0, r10, 0" : "=r" (tp) );
-#else
-	register uintptr_t tp __asm__("r10");
-	__asm__ ("" : "=r" (tp) );
-#endif
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define MC_PC regs.pc
lib/libc/wasi/libc-top-half/musl/arch/or1k/reloc.h
@@ -1,24 +0,0 @@
-#define LDSO_ARCH "or1k"
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_OR1K_32
-#define REL_GOT         R_OR1K_GLOB_DAT
-#define REL_PLT         R_OR1K_JMP_SLOT
-#define REL_RELATIVE    R_OR1K_RELATIVE
-#define REL_COPY        R_OR1K_COPY
-#define REL_DTPMOD      R_OR1K_TLS_DTPMOD
-#define REL_DTPOFF      R_OR1K_TLS_DTPOFF
-#define REL_TPOFF       R_OR1K_TLS_TPOFF
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"l.jr %0 ; l.ori r1,%1,0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym " \n" \
-	"	l.jal 1f \n" \
-	"	 l.nop \n" \
-	"	.word " #sym "-. \n" \
-	"1:	l.lwz %0, 0(r9) \n" \
-	"	l.add %0, %0, r9 \n" \
-	: "=r"(*(fp)) : : "memory", "r9" )
lib/libc/wasi/libc-top-half/musl/arch/or1k/syscall_arch.h
@@ -1,115 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-
-#define SYSCALL_MMAP2_UNIT 8192ULL
-
-static __inline long __syscall0(long n)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11)
-			      : "memory", "r3", "r4", "r5", "r6", "r7", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3)
-			      : "memory", "r4", "r5", "r6", "r7", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	register unsigned long r4 __asm__("r4") = b;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3), "r"(r4)
-			      : "memory", "r5", "r6", "r7", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	register unsigned long r4 __asm__("r4") = b;
-	register unsigned long r5 __asm__("r5") = c;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3), "r"(r4), "r"(r5)
-			      : "memory", "r6", "r7", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	register unsigned long r4 __asm__("r4") = b;
-	register unsigned long r5 __asm__("r5") = c;
-	register unsigned long r6 __asm__("r6") = d;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3), "r"(r4), "r"(r5), "r"(r6)
-			      : "memory", "r7", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	register unsigned long r4 __asm__("r4") = b;
-	register unsigned long r5 __asm__("r5") = c;
-	register unsigned long r6 __asm__("r6") = d;
-	register unsigned long r7 __asm__("r7") = e;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3), "r"(r4), "r"(r5), "r"(r6),
-				"r"(r7)
-			      : "memory", "r8",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register unsigned long r11 __asm__("r11") = n;
-	register unsigned long r3 __asm__("r3") = a;
-	register unsigned long r4 __asm__("r4") = b;
-	register unsigned long r5 __asm__("r5") = c;
-	register unsigned long r6 __asm__("r6") = d;
-	register unsigned long r7 __asm__("r7") = e;
-	register unsigned long r8 __asm__("r8") = f;
-	__asm__ __volatile__ ("l.sys 1"
-			      : "=r"(r11)
-			      : "r"(r11), "r"(r3), "r"(r4), "r"(r5), "r"(r6),
-				"r"(r7), "r"(r8)
-			      : "memory",
-				"r12", "r13", "r15", "r17", "r19", "r21",
-				"r23", "r25", "r27", "r29", "r31");
-	return r11;
-}
-
-#define IPC_64 0
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/alltypes.h.in
@@ -1,20 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#define __BYTE_ORDER 4321
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-#ifdef __WCHAR_TYPE__
-TYPEDEF __WCHAR_TYPE__ wchar_t;
-#else
-TYPEDEF long wchar_t;
-#endif
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/errno.h
@@ -1,134 +0,0 @@
-#define EPERM            1
-#define ENOENT           2
-#define ESRCH            3
-#define EINTR            4
-#define EIO              5
-#define ENXIO            6
-#define E2BIG            7
-#define ENOEXEC          8
-#define EBADF            9
-#define ECHILD          10
-#define EAGAIN          11
-#define ENOMEM          12
-#define EACCES          13
-#define EFAULT          14
-#define ENOTBLK         15
-#define EBUSY           16
-#define EEXIST          17
-#define EXDEV           18
-#define ENODEV          19
-#define ENOTDIR         20
-#define EISDIR          21
-#define EINVAL          22
-#define ENFILE          23
-#define EMFILE          24
-#define ENOTTY          25
-#define ETXTBSY         26
-#define EFBIG           27
-#define ENOSPC          28
-#define ESPIPE          29
-#define EROFS           30
-#define EMLINK          31
-#define EPIPE           32
-#define EDOM            33
-#define ERANGE          34
-#define EDEADLK         35
-#define ENAMETOOLONG    36
-#define ENOLCK          37
-#define ENOSYS          38
-#define ENOTEMPTY       39
-#define ELOOP           40
-#define EWOULDBLOCK     EAGAIN
-#define ENOMSG          42
-#define EIDRM           43
-#define ECHRNG          44
-#define EL2NSYNC        45
-#define EL3HLT          46
-#define EL3RST          47
-#define ELNRNG          48
-#define EUNATCH         49
-#define ENOCSI          50
-#define EL2HLT          51
-#define EBADE           52
-#define EBADR           53
-#define EXFULL          54
-#define ENOANO          55
-#define EBADRQC         56
-#define EBADSLT         57
-#define EDEADLOCK       58
-#define EBFONT          59
-#define ENOSTR          60
-#define ENODATA         61
-#define ETIME           62
-#define ENOSR           63
-#define ENONET          64
-#define ENOPKG          65
-#define EREMOTE         66
-#define ENOLINK         67
-#define EADV            68
-#define ESRMNT          69
-#define ECOMM           70
-#define EPROTO          71
-#define EMULTIHOP       72
-#define EDOTDOT         73
-#define EBADMSG         74
-#define EOVERFLOW       75
-#define ENOTUNIQ        76
-#define EBADFD          77
-#define EREMCHG         78
-#define ELIBACC         79
-#define ELIBBAD         80
-#define ELIBSCN         81
-#define ELIBMAX         82
-#define ELIBEXEC        83
-#define EILSEQ          84
-#define ERESTART        85
-#define ESTRPIPE        86
-#define EUSERS          87
-#define ENOTSOCK        88
-#define EDESTADDRREQ    89
-#define EMSGSIZE        90
-#define EPROTOTYPE      91
-#define ENOPROTOOPT     92
-#define EPROTONOSUPPORT 93
-#define ESOCKTNOSUPPORT 94
-#define EOPNOTSUPP      95
-#define ENOTSUP         EOPNOTSUPP
-#define EPFNOSUPPORT    96
-#define EAFNOSUPPORT    97
-#define EADDRINUSE      98
-#define EADDRNOTAVAIL   99
-#define ENETDOWN        100
-#define ENETUNREACH     101
-#define ENETRESET       102
-#define ECONNABORTED    103
-#define ECONNRESET      104
-#define ENOBUFS         105
-#define EISCONN         106
-#define ENOTCONN        107
-#define ESHUTDOWN       108
-#define ETOOMANYREFS    109
-#define ETIMEDOUT       110
-#define ECONNREFUSED    111
-#define EHOSTDOWN       112
-#define EHOSTUNREACH    113
-#define EALREADY        114
-#define EINPROGRESS     115
-#define ESTALE          116
-#define EUCLEAN         117
-#define ENOTNAM         118
-#define ENAVAIL         119
-#define EISNAM          120
-#define EREMOTEIO       121
-#define EDQUOT          122
-#define ENOMEDIUM       123
-#define EMEDIUMTYPE     124
-#define ECANCELED       125
-#define ENOKEY          126
-#define EKEYEXPIRED     127
-#define EKEYREVOKED     128
-#define EKEYREJECTED    129
-#define EOWNERDEAD      130
-#define ENOTRECOVERABLE 131
-#define ERFKILL         132
-#define EHWPOISON       133
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY  040000
-#define O_NOFOLLOW  0100000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT    0400000
-#define O_LARGEFILE 0200000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 12
-#define F_SETLK 13
-#define F_SETLKW 14
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/fenv.h
@@ -1,36 +0,0 @@
-#ifdef _SOFT_FLOAT
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-#else
-#define FE_TONEAREST	0
-#define FE_TOWARDZERO	1
-#define FE_UPWARD	2
-#define FE_DOWNWARD	3
-
-#define FE_INEXACT	0x02000000
-#define FE_DIVBYZERO	0x04000000
-#define FE_UNDERFLOW	0x08000000
-#define FE_OVERFLOW	0x10000000
-#define FE_INVALID	0x20000000
-
-#define FE_ALL_EXCEPT	0x3e000000
-
-#ifdef _GNU_SOURCE
-#define FE_INVALID_SNAN		0x01000000
-#define FE_INVALID_ISI		0x00800000
-#define FE_INVALID_IDI		0x00400000
-#define FE_INVALID_ZDZ		0x00200000
-#define FE_INVALID_IMZ		0x00100000
-#define FE_INVALID_COMPARE	0x00080000
-#define FE_INVALID_SOFTWARE	0x00000400
-#define FE_INVALID_SQRT		0x00000200
-#define FE_INVALID_INTEGER_CONVERSION	0x00000100
-
-#define FE_ALL_INVALID		0x01f80700
-#endif
-#endif
-
-typedef unsigned fexcept_t;
-typedef double fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *)-1)
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/hwcap.h
@@ -1,43 +0,0 @@
-#define PPC_FEATURE_32			0x80000000
-#define PPC_FEATURE_64			0x40000000
-#define PPC_FEATURE_601_INSTR		0x20000000
-#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
-#define PPC_FEATURE_HAS_FPU		0x08000000
-#define PPC_FEATURE_HAS_MMU		0x04000000
-#define PPC_FEATURE_HAS_4xxMAC		0x02000000
-#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
-#define PPC_FEATURE_HAS_SPE		0x00800000
-#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
-#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
-#define PPC_FEATURE_NO_TB		0x00100000
-#define PPC_FEATURE_POWER4		0x00080000
-#define PPC_FEATURE_POWER5		0x00040000
-#define PPC_FEATURE_POWER5_PLUS		0x00020000
-#define PPC_FEATURE_CELL		0x00010000
-#define PPC_FEATURE_BOOKE		0x00008000
-#define PPC_FEATURE_SMT			0x00004000
-#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
-#define PPC_FEATURE_ARCH_2_05		0x00001000
-#define PPC_FEATURE_PA6T		0x00000800
-#define PPC_FEATURE_HAS_DFP		0x00000400
-#define PPC_FEATURE_POWER6_EXT		0x00000200
-#define PPC_FEATURE_ARCH_2_06		0x00000100
-#define PPC_FEATURE_HAS_VSX		0x00000080
-#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
-
-#define PPC_FEATURE_TRUE_LE		0x00000002
-#define PPC_FEATURE_PPC_LE		0x00000001
-
-#define PPC_FEATURE2_ARCH_2_07		0x80000000
-#define PPC_FEATURE2_HTM		0x40000000
-#define PPC_FEATURE2_DSCR		0x20000000
-#define PPC_FEATURE2_EBB		0x10000000
-#define PPC_FEATURE2_ISEL		0x08000000
-#define PPC_FEATURE2_TAR		0x04000000
-#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
-#define PPC_FEATURE2_HTM_NOSC		0x01000000
-#define PPC_FEATURE2_ARCH_3_00		0x00800000
-#define PPC_FEATURE2_HAS_IEEE128	0x00400000
-#define PPC_FEATURE2_DARN		0x00200000
-#define PPC_FEATURE2_SCV		0x00100000
-#define PPC_FEATURE2_HTM_NO_SUSPEND	0x00080000
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/ioctl.h
@@ -1,120 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  1U
-#define _IOC_WRITE 4U
-#define _IOC_READ  2U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define FIONCLEX	_IO('f', 2)
-#define FIOCLEX		_IO('f', 1)
-#define FIOASYNC	_IOW('f', 125, int)
-#define FIONBIO		_IOW('f', 126, int)
-#define FIONREAD	_IOR('f', 127, int)
-#define TIOCINQ		FIONREAD
-#define FIOQSIZE	_IOR('f', 128, char[8])
-#define TIOCGETP	_IOR('t', 8, char[6])
-#define TIOCSETP	_IOW('t', 9, char[6])
-#define TIOCSETN	_IOW('t', 10, char[6])
-
-#define TIOCSETC	_IOW('t', 17, char[6])
-#define TIOCGETC	_IOR('t', 18, char[6])
-#define TCGETS		_IOR('t', 19, char[44])
-#define TCSETS		_IOW('t', 20, char[44])
-#define TCSETSW		_IOW('t', 21, char[44])
-#define TCSETSF		_IOW('t', 22, char[44])
-
-#define TCGETA		_IOR('t', 23, char[20])
-#define TCSETA		_IOW('t', 24, char[20])
-#define TCSETAW		_IOW('t', 25, char[20])
-#define TCSETAF		_IOW('t', 28, char[20])
-
-#define TCSBRK		_IO('t', 29)
-#define TCXONC		_IO('t', 30)
-#define TCFLSH		_IO('t', 31)
-
-#define TIOCSWINSZ	_IOW('t', 103, char[8])
-#define TIOCGWINSZ	_IOR('t', 104, char[8])
-#define TIOCSTART	_IO('t', 110)
-#define TIOCSTOP	_IO('t', 111)
-
-#define TIOCOUTQ	_IOR('t', 115, int)
-
-#define TIOCGLTC	_IOR('t', 116, char[6])
-#define TIOCSLTC	_IOW('t', 117, char[6])
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-
-#define TIOCEXCL	0x540C
-#define TIOCNXCL	0x540D
-#define TIOCSCTTY	0x540E
-
-#define TIOCSTI		0x5412
-#define TIOCMGET	0x5415
-#define TIOCMBIS	0x5416
-#define TIOCMBIC	0x5417
-#define TIOCMSET	0x5418
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x008
-#define TIOCM_SR	0x010
-#define TIOCM_CTS	0x020
-#define TIOCM_CAR	0x040
-#define TIOCM_RNG	0x080
-#define TIOCM_DSR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-#define TIOCGSOFTCAR	0x5419
-#define TIOCSSOFTCAR	0x541A
-#define TIOCLINUX	0x541C
-#define TIOCCONS	0x541D
-#define TIOCGSERIAL	0x541E
-#define TIOCSSERIAL	0x541F
-#define TIOCPKT	0x5420
-
-#define TIOCNOTTY	0x5422
-#define TIOCSETD	0x5423
-#define TIOCGETD	0x5424
-#define TCSBRKP		0x5425
-#define TIOCSBRK	0x5427
-#define TIOCCBRK	0x5428
-#define TIOCGSID	0x5429
-#define TIOCGRS485	0x542e
-#define TIOCSRS485	0x542f
-#define TIOCGPTN	_IOR('T',0x30, unsigned int)
-#define TIOCSPTLCK	_IOW('T',0x31, int)
-#define TIOCGDEV	_IOR('T',0x32, unsigned int)
-#define TIOCSIG		_IOW('T',0x36, int)
-#define TIOCVHANGUP	0x5437
-#define TIOCGPKT	_IOR('T', 0x38, int)
-#define TIOCGPTLCK	_IOR('T', 0x39, int)
-#define TIOCGEXCL	_IOR('T', 0x40, int)
-#define TIOCGPTPEER	_IO('T', 0x41)
-
-#define TIOCSERCONFIG	0x5453
-#define TIOCSERGWILD	0x5454
-#define TIOCSERSWILD	0x5455
-#define TIOCGLCKTRMIOS	0x5456
-#define TIOCSLCKTRMIOS	0x5457
-#define TIOCSERGSTRUCT	0x5458
-#define TIOCSERGETLSR	0x5459
-#define TIOCSERGETMULTI	0x545A
-#define TIOCSERSETMULTI	0x545B
-
-#define TIOCMIWAIT	0x545C
-#define TIOCGICOUNT	0x545D
-
-#define FIOSETOWN       0x8901
-#define SIOCSPGRP       0x8902
-#define FIOGETOWN       0x8903
-#define SIOCGPGRP       0x8904
-#define SIOCATMARK      0x8905
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/ipc.h
@@ -1,12 +0,0 @@
-struct ipc_perm {
-	key_t __ipc_perm_key;
-	uid_t uid;
-	gid_t gid;
-	uid_t cuid;
-	gid_t cgid;
-	mode_t mode;
-	int __ipc_perm_seq;
-	int __pad1;
-	long long __pad2;
-	long long __pad3;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/mman.h
@@ -1,13 +0,0 @@
-#define PROT_SAO       0x10
-
-#undef MAP_NORESERVE
-#define MAP_NORESERVE   0x40
-#undef MAP_LOCKED
-#define MAP_LOCKED	0x80
-
-#undef MCL_CURRENT
-#define MCL_CURRENT     0x2000
-#undef MCL_FUTURE
-#define MCL_FUTURE      0x4000
-#undef MCL_ONFAULT
-#define MCL_ONFAULT     0x8000
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/ptrace.h
@@ -1,25 +0,0 @@
-#define PTRACE_GETVRREGS	0x12
-#define PTRACE_SETVRREGS	0x13
-#define PTRACE_GETEVRREGS	0x14
-#define PTRACE_SETEVRREGS	0x15
-#define PTRACE_GETREGS64	0x16
-#define PTRACE_SETREGS64	0x17
-#define PTRACE_GET_DEBUGREG	0x19
-#define PTRACE_SET_DEBUGREG	0x1a
-#define PTRACE_GETVSRREGS	0x1b
-#define PTRACE_SETVSRREGS	0x1c
-#define PTRACE_SYSEMU		0x1d
-#define PTRACE_SYSEMU_SINGLESTEP	0x1e
-#define PTRACE_SINGLEBLOCK	0x100
-
-#define PT_GETVRREGS PTRACE_GETVRREGS
-#define PT_SETVRREGS PTRACE_SETVRREGS
-#define PT_GETEVRREGS PTRACE_GETEVRREGS
-#define PT_SETEVRREGS PTRACE_SETEVRREGS
-#define PT_GETREGS64 PTRACE_GETREGS64
-#define PT_SETREGS64 PTRACE_SETREGS64
-#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG
-#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG
-#define PT_GETVSRREGS PTRACE_GETVSRREGS
-#define PT_SETVSRREGS PTRACE_SETVSRREGS
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/reg.h
@@ -1,3 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-/* FIXME */
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/sem.h
@@ -1,12 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_ctime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned short __sem_nsems_pad, sem_nsems;
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[56];
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/shm.h
@@ -1,30 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_ctime_hi;
-	unsigned long __shm_ctime_lo;
-	size_t shm_segsz;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/signal.h
@@ -1,119 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 4096
-#define SIGSTKSZ 10240
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-typedef unsigned long greg_t, gregset_t[48];
-
-typedef struct {
-	double fpregs[32];
-	double fpscr;
-	unsigned _pad[2];
-} fpregset_t;
-
-typedef struct {
-	unsigned vrregs[32][4];
-	unsigned vrsave;
-	unsigned _pad[2];
-	unsigned vscr;
-} vrregset_t;
-
-struct sigcontext {
-	unsigned long _unused[4];
-	int signal;
-	unsigned long handler;
-	unsigned long oldmask;
-	struct pt_regs *regs;
-};
-
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	vrregset_t vrregs
-#ifdef __GNUC__
-	__attribute__((__aligned__(16)))
-#endif
-	;
-} mcontext_t;
-
-#else
-
-typedef struct {
-	long __regs[48+68+4*32+4]
-#ifdef __GNUC__
-	__attribute__((__aligned__(16)))
-#endif
-	;
-} mcontext_t;
-
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	int uc_pad[7];
-	mcontext_t *uc_regs;
-	sigset_t uc_sigmask;
-        int             uc_pad2[3];
-	mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1U
-#define SA_NOCLDWAIT  2U
-#define SA_SIGINFO    4U
-#define SA_ONSTACK    0x08000000U
-#define SA_RESTART    0x10000000U
-#define SA_NODEFER    0x40000000U
-#define SA_RESETHAND  0x80000000U
-#define SA_RESTORER   0x04000000U
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/socket.h
@@ -1,25 +0,0 @@
-#define SO_DEBUG        1
-#define SO_REUSEADDR    2
-#define SO_TYPE         3
-#define SO_ERROR        4
-#define SO_DONTROUTE    5
-#define SO_BROADCAST    6
-#define SO_SNDBUF       7
-#define SO_RCVBUF       8
-#define SO_KEEPALIVE    9
-#define SO_OOBINLINE    10
-#define SO_NO_CHECK     11
-#define SO_PRIORITY     12
-#define SO_LINGER       13
-#define SO_BSDCOMPAT    14
-#define SO_REUSEPORT    15
-#define SO_RCVLOWAT     16
-#define SO_SNDLOWAT     17
-#define SO_PASSCRED     20
-#define SO_PEERCRED     21
-#define SO_ACCEPTCONN   30
-#define SO_PEERSEC      31
-#define SO_SNDBUFFORCE  32
-#define SO_RCVBUFFORCE  33
-#define SO_PROTOCOL     38
-#define SO_DOMAIN       39
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/stat.h
@@ -1,24 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	short __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	unsigned __unused[2];
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/syscall.h.in
@@ -1,422 +0,0 @@
-#define __NR_restart_syscall          0
-#define __NR_exit                     1
-#define __NR_fork                     2
-#define __NR_read                     3
-#define __NR_write                    4
-#define __NR_open                     5
-#define __NR_close                    6
-#define __NR_waitpid                  7
-#define __NR_creat                    8
-#define __NR_link                     9
-#define __NR_unlink                  10
-#define __NR_execve                  11
-#define __NR_chdir                   12
-#define __NR_time                    13
-#define __NR_mknod                   14
-#define __NR_chmod                   15
-#define __NR_lchown                  16
-#define __NR_break                   17
-#define __NR_oldstat                 18
-#define __NR_lseek                   19
-#define __NR_getpid                  20
-#define __NR_mount                   21
-#define __NR_umount                  22
-#define __NR_setuid                  23
-#define __NR_getuid                  24
-#define __NR_stime                   25
-#define __NR_ptrace                  26
-#define __NR_alarm                   27
-#define __NR_oldfstat                28
-#define __NR_pause                   29
-#define __NR_utime                   30
-#define __NR_stty                    31
-#define __NR_gtty                    32
-#define __NR_access                  33
-#define __NR_nice                    34
-#define __NR_ftime                   35
-#define __NR_sync                    36
-#define __NR_kill                    37
-#define __NR_rename                  38
-#define __NR_mkdir                   39
-#define __NR_rmdir                   40
-#define __NR_dup                     41
-#define __NR_pipe                    42
-#define __NR_times                   43
-#define __NR_prof                    44
-#define __NR_brk                     45
-#define __NR_setgid                  46
-#define __NR_getgid                  47
-#define __NR_signal                  48
-#define __NR_geteuid                 49
-#define __NR_getegid                 50
-#define __NR_acct                    51
-#define __NR_umount2                 52
-#define __NR_lock                    53
-#define __NR_ioctl                   54
-#define __NR_fcntl                   55
-#define __NR_mpx                     56
-#define __NR_setpgid                 57
-#define __NR_ulimit                  58
-#define __NR_oldolduname             59
-#define __NR_umask                   60
-#define __NR_chroot                  61
-#define __NR_ustat                   62
-#define __NR_dup2                    63
-#define __NR_getppid                 64
-#define __NR_getpgrp                 65
-#define __NR_setsid                  66
-#define __NR_sigaction               67
-#define __NR_sgetmask                68
-#define __NR_ssetmask                69
-#define __NR_setreuid                70
-#define __NR_setregid                71
-#define __NR_sigsuspend              72
-#define __NR_sigpending              73
-#define __NR_sethostname             74
-#define __NR_setrlimit               75
-#define __NR_getrlimit               76
-#define __NR_getrusage               77
-#define __NR_gettimeofday_time32            78
-#define __NR_settimeofday_time32            79
-#define __NR_getgroups               80
-#define __NR_setgroups               81
-#define __NR_select                  82
-#define __NR_symlink                 83
-#define __NR_oldlstat                84
-#define __NR_readlink                85
-#define __NR_uselib                  86
-#define __NR_swapon                  87
-#define __NR_reboot                  88
-#define __NR_readdir                 89
-#define __NR_mmap                    90
-#define __NR_munmap                  91
-#define __NR_truncate                92
-#define __NR_ftruncate               93
-#define __NR_fchmod                  94
-#define __NR_fchown                  95
-#define __NR_getpriority             96
-#define __NR_setpriority             97
-#define __NR_profil                  98
-#define __NR_statfs                  99
-#define __NR_fstatfs                100
-#define __NR_ioperm                 101
-#define __NR_socketcall             102
-#define __NR_syslog                 103
-#define __NR_setitimer              104
-#define __NR_getitimer              105
-#define __NR_stat                   106
-#define __NR_lstat                  107
-#define __NR_fstat                  108
-#define __NR_olduname               109
-#define __NR_iopl                   110
-#define __NR_vhangup                111
-#define __NR_idle                   112
-#define __NR_vm86                   113
-#define __NR_wait4                  114
-#define __NR_swapoff                115
-#define __NR_sysinfo                116
-#define __NR_ipc                    117
-#define __NR_fsync                  118
-#define __NR_sigreturn              119
-#define __NR_clone                  120
-#define __NR_setdomainname          121
-#define __NR_uname                  122
-#define __NR_modify_ldt             123
-#define __NR_adjtimex               124
-#define __NR_mprotect               125
-#define __NR_sigprocmask            126
-#define __NR_create_module          127
-#define __NR_init_module            128
-#define __NR_delete_module          129
-#define __NR_get_kernel_syms        130
-#define __NR_quotactl               131
-#define __NR_getpgid                132
-#define __NR_fchdir                 133
-#define __NR_bdflush                134
-#define __NR_sysfs                  135
-#define __NR_personality            136
-#define __NR_afs_syscall            137
-#define __NR_setfsuid               138
-#define __NR_setfsgid               139
-#define __NR__llseek                140
-#define __NR_getdents               141
-#define __NR__newselect             142
-#define __NR_flock                  143
-#define __NR_msync                  144
-#define __NR_readv                  145
-#define __NR_writev                 146
-#define __NR_getsid                 147
-#define __NR_fdatasync              148
-#define __NR__sysctl                149
-#define __NR_mlock                  150
-#define __NR_munlock                151
-#define __NR_mlockall               152
-#define __NR_munlockall             153
-#define __NR_sched_setparam         154
-#define __NR_sched_getparam         155
-#define __NR_sched_setscheduler     156
-#define __NR_sched_getscheduler     157
-#define __NR_sched_yield            158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval  161
-#define __NR_nanosleep              162
-#define __NR_mremap                 163
-#define __NR_setresuid              164
-#define __NR_getresuid              165
-#define __NR_query_module           166
-#define __NR_poll                   167
-#define __NR_nfsservctl             168
-#define __NR_setresgid              169
-#define __NR_getresgid              170
-#define __NR_prctl                  171
-#define __NR_rt_sigreturn           172
-#define __NR_rt_sigaction           173
-#define __NR_rt_sigprocmask         174
-#define __NR_rt_sigpending          175
-#define __NR_rt_sigtimedwait        176
-#define __NR_rt_sigqueueinfo        177
-#define __NR_rt_sigsuspend          178
-#define __NR_pread64                179
-#define __NR_pwrite64               180
-#define __NR_chown                  181
-#define __NR_getcwd                 182
-#define __NR_capget                 183
-#define __NR_capset                 184
-#define __NR_sigaltstack            185
-#define __NR_sendfile               186
-#define __NR_getpmsg                187
-#define __NR_putpmsg                188
-#define __NR_vfork                  189
-#define __NR_ugetrlimit             190
-#define __NR_readahead              191
-#define __NR_mmap2                  192
-#define __NR_truncate64             193
-#define __NR_ftruncate64            194
-#define __NR_stat64                 195
-#define __NR_lstat64                196
-#define __NR_fstat64                197
-#define __NR_pciconfig_read         198
-#define __NR_pciconfig_write        199
-#define __NR_pciconfig_iobase       200
-#define __NR_multiplexer            201
-#define __NR_getdents64             202
-#define __NR_pivot_root             203
-#define __NR_fcntl64                204
-#define __NR_madvise                205
-#define __NR_mincore                206
-#define __NR_gettid                 207
-#define __NR_tkill                  208
-#define __NR_setxattr               209
-#define __NR_lsetxattr              210
-#define __NR_fsetxattr              211
-#define __NR_getxattr               212
-#define __NR_lgetxattr              213
-#define __NR_fgetxattr              214
-#define __NR_listxattr              215
-#define __NR_llistxattr             216
-#define __NR_flistxattr             217
-#define __NR_removexattr            218
-#define __NR_lremovexattr           219
-#define __NR_fremovexattr           220
-#define __NR_futex                  221
-#define __NR_sched_setaffinity      222
-#define __NR_sched_getaffinity      223
-#define __NR_tuxcall                225
-#define __NR_sendfile64             226
-#define __NR_io_setup               227
-#define __NR_io_destroy             228
-#define __NR_io_getevents           229
-#define __NR_io_submit              230
-#define __NR_io_cancel              231
-#define __NR_set_tid_address        232
-#define __NR_fadvise64              233
-#define __NR_exit_group             234
-#define __NR_lookup_dcookie         235
-#define __NR_epoll_create           236
-#define __NR_epoll_ctl              237
-#define __NR_epoll_wait             238
-#define __NR_remap_file_pages       239
-#define __NR_timer_create           240
-#define __NR_timer_settime32          241
-#define __NR_timer_gettime32          242
-#define __NR_timer_getoverrun       243
-#define __NR_timer_delete           244
-#define __NR_clock_settime32          245
-#define __NR_clock_gettime32          246
-#define __NR_clock_getres_time32           247
-#define __NR_clock_nanosleep_time32        248
-#define __NR_swapcontext            249
-#define __NR_tgkill                 250
-#define __NR_utimes                 251
-#define __NR_statfs64               252
-#define __NR_fstatfs64              253
-#define __NR_fadvise64_64           254
-#define __NR_rtas		255
-#define __NR_sys_debug_setcontext 256
-#define __NR_migrate_pages	258
-#define __NR_mbind		259
-#define __NR_get_mempolicy	260
-#define __NR_set_mempolicy	261
-#define __NR_mq_open		262
-#define __NR_mq_unlink		263
-#define __NR_mq_timedsend	264
-#define __NR_mq_timedreceive	265
-#define __NR_mq_notify		266
-#define __NR_mq_getsetattr	267
-#define __NR_kexec_load		268
-#define __NR_add_key		269
-#define __NR_request_key	270
-#define __NR_keyctl		271
-#define __NR_waitid		272
-#define __NR_ioprio_set		273
-#define __NR_ioprio_get		274
-#define __NR_inotify_init	275
-#define __NR_inotify_add_watch	276
-#define __NR_inotify_rm_watch	277
-#define __NR_spu_run		278
-#define __NR_spu_create		279
-#define __NR_pselect6		280
-#define __NR_ppoll		281
-#define __NR_unshare		282
-#define __NR_splice		283
-#define __NR_tee		284
-#define __NR_vmsplice		285
-#define __NR_openat		286
-#define __NR_mkdirat		287
-#define __NR_mknodat		288
-#define __NR_fchownat		289
-#define __NR_futimesat		290
-#define __NR_fstatat64		291
-#define __NR_unlinkat		292
-#define __NR_renameat		293
-#define __NR_linkat		294
-#define __NR_symlinkat		295
-#define __NR_readlinkat		296
-#define __NR_fchmodat		297
-#define __NR_faccessat		298
-#define __NR_get_robust_list	299
-#define __NR_set_robust_list	300
-#define __NR_move_pages		301
-#define __NR_getcpu		302
-#define __NR_epoll_pwait	303
-#define __NR_utimensat		304
-#define __NR_signalfd		305
-#define __NR_timerfd_create     306
-#define __NR_eventfd		307
-#define __NR_sync_file_range2	308
-#define __NR_fallocate		309
-#define __NR_subpage_prot		310
-#define __NR_timerfd_settime32	311
-#define __NR_timerfd_gettime32	312
-#define __NR_signalfd4		313
-#define __NR_eventfd2		314
-#define __NR_epoll_create1	315
-#define __NR_dup3			316
-#define __NR_pipe2		317
-#define __NR_inotify_init1	318
-#define __NR_perf_event_open       319
-#define __NR_preadv                320
-#define __NR_pwritev               321
-#define __NR_rt_tgsigqueueinfo     322
-#define __NR_fanotify_init         323
-#define __NR_fanotify_mark         324
-#define __NR_prlimit64             325
-#define __NR_socket                326
-#define __NR_bind                  327
-#define __NR_connect               328
-#define __NR_listen                329
-#define __NR_accept                330
-#define __NR_getsockname           331
-#define __NR_getpeername           332
-#define __NR_socketpair            333
-#define __NR_send                  334
-#define __NR_sendto                335
-#define __NR_recv                  336
-#define __NR_recvfrom              337
-#define __NR_shutdown              338
-#define __NR_setsockopt            339
-#define __NR_getsockopt            340
-#define __NR_sendmsg               341
-#define __NR_recvmsg               342
-#define __NR_recvmmsg              343
-#define __NR_accept4               344
-#define __NR_name_to_handle_at     345
-#define __NR_open_by_handle_at     346
-#define __NR_clock_adjtime         347
-#define __NR_syncfs                348
-#define __NR_sendmmsg              349
-#define __NR_setns                 350
-#define __NR_process_vm_readv      351
-#define __NR_process_vm_writev     352
-#define __NR_finit_module          353
-#define __NR_kcmp                  354
-#define __NR_sched_setattr         355
-#define __NR_sched_getattr         356
-#define __NR_renameat2             357
-#define __NR_seccomp               358
-#define __NR_getrandom             359
-#define __NR_memfd_create          360
-#define __NR_bpf                   361
-#define __NR_execveat              362
-#define __NR_switch_endian         363
-#define __NR_userfaultfd           364
-#define __NR_membarrier            365
-#define __NR_mlock2                378
-#define __NR_copy_file_range       379
-#define __NR_preadv2               380
-#define __NR_pwritev2              381
-#define __NR_kexec_file_load       382
-#define __NR_statx                 383
-#define __NR_pkey_alloc            384
-#define __NR_pkey_free             385
-#define __NR_pkey_mprotect         386
-#define __NR_rseq                  387
-#define __NR_io_pgetevents         388
-#define __NR_semget                393
-#define __NR_semctl                394
-#define __NR_shmget                395
-#define __NR_shmctl                396
-#define __NR_shmat                 397
-#define __NR_shmdt                 398
-#define __NR_msgget                399
-#define __NR_msgsnd                400
-#define __NR_msgrcv                401
-#define __NR_msgctl                402
-#define __NR_clock_gettime64       403
-#define __NR_clock_settime64       404
-#define __NR_clock_adjtime64       405
-#define __NR_clock_getres_time64   406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64       408
-#define __NR_timer_settime64       409
-#define __NR_timerfd_gettime64     410
-#define __NR_timerfd_settime64     411
-#define __NR_utimensat_time64      412
-#define __NR_pselect6_time64       413
-#define __NR_ppoll_time64          414
-#define __NR_io_pgetevents_time64  416
-#define __NR_recvmmsg_time64       417
-#define __NR_mq_timedsend_time64   418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64     420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64          422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal     424
-#define __NR_io_uring_setup        425
-#define __NR_io_uring_enter        426
-#define __NR_io_uring_register     427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/termios.h
@@ -1,171 +0,0 @@
-#undef NCCS
-#define NCCS 19
-struct termios {
-	tcflag_t c_iflag;
-	tcflag_t c_oflag;
-	tcflag_t c_cflag;
-	tcflag_t c_lflag;
-	cc_t c_cc[NCCS];
-	cc_t c_line;
-	speed_t __c_ispeed;
-	speed_t __c_ospeed;
-};
-
-#define VINTR     0
-#define VQUIT     1
-#define VERASE    2
-#define VKILL     3
-#define VEOF      4
-#define VMIN      5
-#define VEOL      6
-#define VTIME     7
-#define VEOL2     8
-#define VSWTC     9
-#define VWERASE  10
-#define VREPRINT 11
-#define VSUSP    12
-#define VSTART   13
-#define VSTOP    14
-#define VLNEXT   15
-#define VDISCARD 16
-
-#define IGNBRK  0000001
-#define BRKINT  0000002
-#define IGNPAR  0000004
-#define PARMRK  0000010
-#define INPCK   0000020
-#define ISTRIP  0000040
-#define INLCR   0000100
-#define IGNCR   0000200
-#define ICRNL   0000400
-#define IXON    0001000
-#define IXOFF   0002000
-#define IXANY   0004000
-#define IUCLC   0010000
-#define IMAXBEL 0020000
-#define IUTF8   0040000
-
-#define OPOST  0000001
-#define ONLCR  0000002
-#define OLCUC  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
-#define NLDLY  0001400
-#define NL0    0000000
-#define NL1    0000400
-#define NL2    0001000
-#define NL3    0001400
-#define TABDLY 0006000
-#define TAB0   0000000
-#define TAB1   0002000
-#define TAB2   0004000
-#define TAB3   0006000
-#define CRDLY  0030000
-#define CR0    0000000
-#define CR1    0010000
-#define CR2    0020000
-#define CR3    0030000
-#define FFDLY  0040000
-#define FF0    0000000
-#define FF1    0040000
-#define BSDLY  0100000
-#define BS0    0000000
-#define BS1    0100000
-#endif
-
-#define VTDLY  0200000
-#define VT0    0000000
-#define VT1    0200000
-
-#define B0       0000000
-#define B50      0000001
-#define B75      0000002
-#define B110     0000003
-#define B134     0000004
-#define B150     0000005
-#define B200     0000006
-#define B300     0000007
-#define B600     0000010
-#define B1200    0000011
-#define B1800    0000012
-#define B2400    0000013
-#define B4800    0000014
-#define B9600    0000015
-#define B19200   0000016
-#define B38400   0000017
-
-#define B57600   00020
-#define B115200  00021
-#define B230400  00022
-#define B460800  00023
-#define B500000  00024
-#define B576000  00025
-#define B921600  00026
-#define B1000000 00027
-#define B1152000 00030
-#define B1500000 00031
-#define B2000000 00032
-#define B2500000 00033
-#define B3000000 00034
-#define B3500000 00035
-#define B4000000 00036
-
-#define CSIZE  00001400
-#define CS5    00000000
-#define CS6    00000400
-#define CS7    00001000
-#define CS8    00001400
-#define CSTOPB 00002000
-#define CREAD  00004000
-#define PARENB 00010000
-#define PARODD 00020000
-#define HUPCL  00040000
-#define CLOCAL 00100000
-
-#define ECHOE   0x00000002
-#define ECHOK   0x00000004
-#define ECHO    0x00000008
-#define ECHONL  0x00000010
-#define ISIG    0x00000080
-#define ICANON  0x00000100
-#define IEXTEN  0x00000400
-#define TOSTOP  0x00400000
-#define NOFLSH  0x80000000
-
-#define TCOOFF 0
-#define TCOON  1
-#define TCIOFF 2
-#define TCION  3
-
-#define TCIFLUSH  0
-#define TCOFLUSH  1
-#define TCIOFLUSH 2
-
-#define TCSANOW   0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define EXTA    0000016
-#define EXTB    0000017
-#define CBAUD   00377
-#define CBAUDEX 0000020
-#define CIBAUD  077600000
-#define CMSPAR  010000000000
-#define CRTSCTS 020000000000
-
-#define XCASE   0x00004000
-#define ECHOCTL 0x00000040
-#define ECHOPRT 0x00000020
-#define ECHOKE  0x00000001
-#define FLUSHO  0x00800000
-#define PENDIN  0x20000000
-#define EXTPROC 0x10000000
-
-#define XTABS   00006000
-#define TIOCSER_TEMT 1
-#endif
lib/libc/wasi/libc-top-half/musl/arch/powerpc/bits/user.h
@@ -1,23 +0,0 @@
-struct user {
-	struct {
-		unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, mq;
-		unsigned long trap, dar, dsisr, result;
-	} regs;
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long start_code, start_data, start_stack;
-	long signal;
-	void *u_ar0;
-	unsigned long magic;
-	char u_comm[32];
-};
-
-#define ELF_NGREG 48
-#define ELF_NFPREG 33
-#define ELF_NVRREG 33
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG];
-typedef struct { unsigned u[4]; }
-#ifdef __GNUC__
-__attribute__((__aligned__(16)))
-#endif
-	elf_vrreg_t, elf_vrregset_t[ELF_NVRREG];
lib/libc/wasi/libc-top-half/musl/arch/powerpc/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/powerpc/atomic_arch.h
@@ -1,38 +0,0 @@
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ ("lwarx %0, 0, %2" : "=r"(v) : "m"(*p), "r"(p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ (
-		"stwcx. %2, 0, %3 ; mfcr %0"
-		: "=r"(r), "=m"(*p) : "r"(v), "r"(p) : "memory", "cc");
-	return r & 0x20000000; /* "bit 2" of "cr0" (backwards bit order) */
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("sync" : : : "memory");
-}
-
-#define a_pre_llsc a_barrier
-
-#define a_post_llsc a_post_llsc
-static inline void a_post_llsc()
-{
-	__asm__ __volatile__ ("isync" : : : "memory");
-}
-
-#define a_clz_32 a_clz_32
-static inline int a_clz_32(uint32_t x)
-{
-	__asm__ ("cntlzw %0, %1" : "=r"(x) : "r"(x));
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/powerpc/crt_arch.h
@@ -1,20 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-".type   " START ", %function \n"
-START ": \n"
-"	bl 1f \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	.long _DYNAMIC-. \n"
-"1:	mflr 4 \n"
-"	lwz 3, 0(4) \n"
-"	add 4, 3, 4 \n"
-"	mr 3, 1 \n"
-"	clrrwi 1, 1, 4 \n"
-"	li 0, 0 \n"
-"	stwu 1, -16(1) \n"
-"	mtlr 0 \n"
-"	stw 0, 0(1) \n"
-"	bl " START "_c \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/powerpc/kstat.h
@@ -1,20 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	short __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc/pthread_arch.h
@@ -1,16 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	register uintptr_t tp __asm__("r2");
-	__asm__ ("" : "=r" (tp) );
-	return tp;
-}
-                        
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-// the kernel calls the ip "nip", it's the first saved value after the 32
-// GPRs.
-#define MC_PC gregs[32]
lib/libc/wasi/libc-top-half/musl/arch/powerpc/reloc.h
@@ -1,31 +0,0 @@
-#ifdef _SOFT_FLOAT
-#define FP_SUFFIX "-sf"
-#else
-#define FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "powerpc" FP_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYMBOLIC    R_PPC_ADDR32
-#define REL_USYMBOLIC   R_PPC_UADDR32
-#define REL_GOT         R_PPC_GLOB_DAT
-#define REL_PLT         R_PPC_JMP_SLOT
-#define REL_RELATIVE    R_PPC_RELATIVE
-#define REL_COPY        R_PPC_COPY
-#define REL_DTPMOD      R_PPC_DTPMOD32
-#define REL_DTPOFF      R_PPC_DTPREL32
-#define REL_TPOFF       R_PPC_TPREL32
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mr 1,%1 ; mtlr %0 ; blr" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym " \n" \
-	"	bl 1f \n" \
-	"	.long " #sym "-. \n" \
-	"1:	mflr %1 \n" \
-	"	lwz %0, 0(%1) \n" \
-	"	add %0, %0, %1 \n" \
-	: "=r"(*(fp)), "=r"((int){0}) : : "memory", "lr" )
lib/libc/wasi/libc-top-half/musl/arch/powerpc/syscall_arch.h
@@ -1,94 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
-
-static inline long __syscall0(long n)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3");
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "=r"(r3)
-	:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3)
-	:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4)
-	:: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5)
-	:: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6)
-	:: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	register long r7 __asm__("r7") = e;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7)
-	:: "memory", "cr0", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	register long r7 __asm__("r7") = e;
-	register long r8 __asm__("r8") = f;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7), "+r"(r8)
-	:: "memory", "cr0", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-#define SYSCALL_FADVISE_6_ARG
-
-#define SO_RCVTIMEO_OLD  18
-#define SO_SNDTIMEO_OLD  19
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/alltypes.h.in
@@ -1,20 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#if __BIG_ENDIAN__
-#define __BYTE_ORDER 4321
-#else
-#define __BYTE_ORDER 1234
-#endif
-
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/errno.h
@@ -1,134 +0,0 @@
-#define EPERM            1
-#define ENOENT           2
-#define ESRCH            3
-#define EINTR            4
-#define EIO              5
-#define ENXIO            6
-#define E2BIG            7
-#define ENOEXEC          8
-#define EBADF            9
-#define ECHILD          10
-#define EAGAIN          11
-#define ENOMEM          12
-#define EACCES          13
-#define EFAULT          14
-#define ENOTBLK         15
-#define EBUSY           16
-#define EEXIST          17
-#define EXDEV           18
-#define ENODEV          19
-#define ENOTDIR         20
-#define EISDIR          21
-#define EINVAL          22
-#define ENFILE          23
-#define EMFILE          24
-#define ENOTTY          25
-#define ETXTBSY         26
-#define EFBIG           27
-#define ENOSPC          28
-#define ESPIPE          29
-#define EROFS           30
-#define EMLINK          31
-#define EPIPE           32
-#define EDOM            33
-#define ERANGE          34
-#define EDEADLK         35
-#define ENAMETOOLONG    36
-#define ENOLCK          37
-#define ENOSYS          38
-#define ENOTEMPTY       39
-#define ELOOP           40
-#define EWOULDBLOCK     EAGAIN
-#define ENOMSG          42
-#define EIDRM           43
-#define ECHRNG          44
-#define EL2NSYNC        45
-#define EL3HLT          46
-#define EL3RST          47
-#define ELNRNG          48
-#define EUNATCH         49
-#define ENOCSI          50
-#define EL2HLT          51
-#define EBADE           52
-#define EBADR           53
-#define EXFULL          54
-#define ENOANO          55
-#define EBADRQC         56
-#define EBADSLT         57
-#define EDEADLOCK       58
-#define EBFONT          59
-#define ENOSTR          60
-#define ENODATA         61
-#define ETIME           62
-#define ENOSR           63
-#define ENONET          64
-#define ENOPKG          65
-#define EREMOTE         66
-#define ENOLINK         67
-#define EADV            68
-#define ESRMNT          69
-#define ECOMM           70
-#define EPROTO          71
-#define EMULTIHOP       72
-#define EDOTDOT         73
-#define EBADMSG         74
-#define EOVERFLOW       75
-#define ENOTUNIQ        76
-#define EBADFD          77
-#define EREMCHG         78
-#define ELIBACC         79
-#define ELIBBAD         80
-#define ELIBSCN         81
-#define ELIBMAX         82
-#define ELIBEXEC        83
-#define EILSEQ          84
-#define ERESTART        85
-#define ESTRPIPE        86
-#define EUSERS          87
-#define ENOTSOCK        88
-#define EDESTADDRREQ    89
-#define EMSGSIZE        90
-#define EPROTOTYPE      91
-#define ENOPROTOOPT     92
-#define EPROTONOSUPPORT 93
-#define ESOCKTNOSUPPORT 94
-#define EOPNOTSUPP      95
-#define ENOTSUP         EOPNOTSUPP
-#define EPFNOSUPPORT    96
-#define EAFNOSUPPORT    97
-#define EADDRINUSE      98
-#define EADDRNOTAVAIL   99
-#define ENETDOWN        100
-#define ENETUNREACH     101
-#define ENETRESET       102
-#define ECONNABORTED    103
-#define ECONNRESET      104
-#define ENOBUFS         105
-#define EISCONN         106
-#define ENOTCONN        107
-#define ESHUTDOWN       108
-#define ETOOMANYREFS    109
-#define ETIMEDOUT       110
-#define ECONNREFUSED    111
-#define EHOSTDOWN       112
-#define EHOSTUNREACH    113
-#define EALREADY        114
-#define EINPROGRESS     115
-#define ESTALE          116
-#define EUCLEAN         117
-#define ENOTNAM         118
-#define ENAVAIL         119
-#define EISNAM          120
-#define EREMOTEIO       121
-#define EDQUOT          122
-#define ENOMEDIUM       123
-#define EMEDIUMTYPE     124
-#define ECANCELED       125
-#define ENOKEY          126
-#define EKEYEXPIRED     127
-#define EKEYREVOKED     128
-#define EKEYREJECTED    129
-#define EOWNERDEAD      130
-#define ENOTRECOVERABLE 131
-#define ERFKILL         132
-#define EHWPOISON       133
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY  040000
-#define O_NOFOLLOW  0100000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT    0400000
-#define O_LARGEFILE 0200000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020040000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_GETLK  5
-#define F_SETLK  6
-#define F_SETLKW 7
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/fenv.h
@@ -1,31 +0,0 @@
-#define FE_TONEAREST	0
-#define FE_TOWARDZERO	1
-#define FE_UPWARD	2
-#define FE_DOWNWARD	3
-
-#define FE_INEXACT	0x02000000
-#define FE_DIVBYZERO	0x04000000
-#define FE_UNDERFLOW	0x08000000
-#define FE_OVERFLOW	0x10000000
-#define FE_INVALID	0x20000000
-
-#define FE_ALL_EXCEPT	0x3e000000
-
-#ifdef _GNU_SOURCE
-#define FE_INVALID_SNAN		0x01000000
-#define FE_INVALID_ISI		0x00800000
-#define FE_INVALID_IDI		0x00400000
-#define FE_INVALID_ZDZ		0x00200000
-#define FE_INVALID_IMZ		0x00100000
-#define FE_INVALID_COMPARE	0x00080000
-#define FE_INVALID_SOFTWARE	0x00000400
-#define FE_INVALID_SQRT		0x00000200
-#define FE_INVALID_INTEGER_CONVERSION	0x00000100
-
-#define FE_ALL_INVALID		0x01f80700
-#endif
-
-typedef unsigned fexcept_t;
-typedef double fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *)-1)
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/hwcap.h
@@ -1,43 +0,0 @@
-#define PPC_FEATURE_32			0x80000000
-#define PPC_FEATURE_64			0x40000000
-#define PPC_FEATURE_601_INSTR		0x20000000
-#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
-#define PPC_FEATURE_HAS_FPU		0x08000000
-#define PPC_FEATURE_HAS_MMU		0x04000000
-#define PPC_FEATURE_HAS_4xxMAC		0x02000000
-#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
-#define PPC_FEATURE_HAS_SPE		0x00800000
-#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
-#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
-#define PPC_FEATURE_NO_TB		0x00100000
-#define PPC_FEATURE_POWER4		0x00080000
-#define PPC_FEATURE_POWER5		0x00040000
-#define PPC_FEATURE_POWER5_PLUS		0x00020000
-#define PPC_FEATURE_CELL		0x00010000
-#define PPC_FEATURE_BOOKE		0x00008000
-#define PPC_FEATURE_SMT			0x00004000
-#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
-#define PPC_FEATURE_ARCH_2_05		0x00001000
-#define PPC_FEATURE_PA6T		0x00000800
-#define PPC_FEATURE_HAS_DFP		0x00000400
-#define PPC_FEATURE_POWER6_EXT		0x00000200
-#define PPC_FEATURE_ARCH_2_06		0x00000100
-#define PPC_FEATURE_HAS_VSX		0x00000080
-#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
-
-#define PPC_FEATURE_TRUE_LE		0x00000002
-#define PPC_FEATURE_PPC_LE		0x00000001
-
-#define PPC_FEATURE2_ARCH_2_07		0x80000000
-#define PPC_FEATURE2_HTM		0x40000000
-#define PPC_FEATURE2_DSCR		0x20000000
-#define PPC_FEATURE2_EBB		0x10000000
-#define PPC_FEATURE2_ISEL		0x08000000
-#define PPC_FEATURE2_TAR		0x04000000
-#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
-#define PPC_FEATURE2_HTM_NOSC		0x01000000
-#define PPC_FEATURE2_ARCH_3_00		0x00800000
-#define PPC_FEATURE2_HAS_IEEE128	0x00400000
-#define PPC_FEATURE2_DARN		0x00200000
-#define PPC_FEATURE2_SCV		0x00100000
-#define PPC_FEATURE2_HTM_NO_SUSPEND	0x00080000
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/ioctl.h
@@ -1,120 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<29) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  1U
-#define _IOC_WRITE 4U
-#define _IOC_READ  2U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define FIONCLEX	_IO('f', 2)
-#define FIOCLEX		_IO('f', 1)
-#define FIOASYNC	_IOW('f', 125, int)
-#define FIONBIO		_IOW('f', 126, int)
-#define FIONREAD	_IOR('f', 127, int)
-#define TIOCINQ		FIONREAD
-#define FIOQSIZE	_IOR('f', 128, char[8])
-#define TIOCGETP	_IOR('t', 8, char[6])
-#define TIOCSETP	_IOW('t', 9, char[6])
-#define TIOCSETN	_IOW('t', 10, char[6])
-
-#define TIOCSETC	_IOW('t', 17, char[6])
-#define TIOCGETC	_IOR('t', 18, char[6])
-#define TCGETS		_IOR('t', 19, char[44])
-#define TCSETS		_IOW('t', 20, char[44])
-#define TCSETSW		_IOW('t', 21, char[44])
-#define TCSETSF		_IOW('t', 22, char[44])
-
-#define TCGETA		_IOR('t', 23, char[20])
-#define TCSETA		_IOW('t', 24, char[20])
-#define TCSETAW		_IOW('t', 25, char[20])
-#define TCSETAF		_IOW('t', 28, char[20])
-
-#define TCSBRK		_IO('t', 29)
-#define TCXONC		_IO('t', 30)
-#define TCFLSH		_IO('t', 31)
-
-#define TIOCSWINSZ	_IOW('t', 103, char[8])
-#define TIOCGWINSZ	_IOR('t', 104, char[8])
-#define TIOCSTART	_IO('t', 110)
-#define TIOCSTOP	_IO('t', 111)
-
-#define TIOCOUTQ	_IOR('t', 115, int)
-
-#define TIOCGLTC	_IOR('t', 116, char[6])
-#define TIOCSLTC	_IOW('t', 117, char[6])
-#define TIOCSPGRP	_IOW('t', 118, int)
-#define TIOCGPGRP	_IOR('t', 119, int)
-
-#define TIOCEXCL	0x540C
-#define TIOCNXCL	0x540D
-#define TIOCSCTTY	0x540E
-
-#define TIOCSTI		0x5412
-#define TIOCMGET	0x5415
-#define TIOCMBIS	0x5416
-#define TIOCMBIC	0x5417
-#define TIOCMSET	0x5418
-#define TIOCM_LE	0x001
-#define TIOCM_DTR	0x002
-#define TIOCM_RTS	0x004
-#define TIOCM_ST	0x008
-#define TIOCM_SR	0x010
-#define TIOCM_CTS	0x020
-#define TIOCM_CAR	0x040
-#define TIOCM_RNG	0x080
-#define TIOCM_DSR	0x100
-#define TIOCM_CD	TIOCM_CAR
-#define TIOCM_RI	TIOCM_RNG
-#define TIOCM_OUT1	0x2000
-#define TIOCM_OUT2	0x4000
-#define TIOCM_LOOP	0x8000
-
-#define TIOCGSOFTCAR	0x5419
-#define TIOCSSOFTCAR	0x541A
-#define TIOCLINUX	0x541C
-#define TIOCCONS	0x541D
-#define TIOCGSERIAL	0x541E
-#define TIOCSSERIAL	0x541F
-#define TIOCPKT	0x5420
-
-#define TIOCNOTTY	0x5422
-#define TIOCSETD	0x5423
-#define TIOCGETD	0x5424
-#define TCSBRKP		0x5425
-#define TIOCSBRK	0x5427
-#define TIOCCBRK	0x5428
-#define TIOCGSID	0x5429
-#define TIOCGRS485	0x542e
-#define TIOCSRS485	0x542f
-#define TIOCGPTN	_IOR('T',0x30, unsigned int)
-#define TIOCSPTLCK	_IOW('T',0x31, int)
-#define TIOCGDEV	_IOR('T',0x32, unsigned int)
-#define TIOCSIG		_IOW('T',0x36, int)
-#define TIOCVHANGUP	0x5437
-#define TIOCGPKT	_IOR('T', 0x38, int)
-#define TIOCGPTLCK	_IOR('T', 0x39, int)
-#define TIOCGEXCL	_IOR('T', 0x40, int)
-#define TIOCGPTPEER	_IO('T', 0x41)
-
-#define TIOCSERCONFIG	0x5453
-#define TIOCSERGWILD	0x5454
-#define TIOCSERSWILD	0x5455
-#define TIOCGLCKTRMIOS	0x5456
-#define TIOCSLCKTRMIOS	0x5457
-#define TIOCSERGSTRUCT	0x5458
-#define TIOCSERGETLSR	0x5459
-#define TIOCSERGETMULTI	0x545A
-#define TIOCSERSETMULTI	0x545B
-
-#define TIOCMIWAIT	0x545C
-#define TIOCGICOUNT	0x545D
-
-#define FIOSETOWN       0x8901
-#define SIOCSPGRP       0x8902
-#define FIOGETOWN       0x8903
-#define SIOCGPGRP       0x8904
-#define SIOCATMARK      0x8905
-#define SIOCGSTAMP      0x8906
-#define SIOCGSTAMPNS    0x8907
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/ipc.h
@@ -1,12 +0,0 @@
-struct ipc_perm {
-	key_t __ipc_perm_key;
-	uid_t uid;
-	gid_t gid;
-	uid_t cuid;
-	gid_t cgid;
-	mode_t mode;
-	int __ipc_perm_seq;
-	int __pad1;
-	long long __pad2;
-	long long __pad3;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/mman.h
@@ -1,13 +0,0 @@
-#define PROT_SAO       0x10
-
-#undef MAP_NORESERVE
-#define MAP_NORESERVE   0x40
-#undef MAP_LOCKED
-#define MAP_LOCKED	0x80
-
-#undef MCL_CURRENT
-#define MCL_CURRENT     0x2000
-#undef MCL_FUTURE
-#define MCL_FUTURE      0x4000
-#undef MCL_ONFAULT
-#define MCL_ONFAULT     0x8000
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/ptrace.h
@@ -1,25 +0,0 @@
-#define PTRACE_GETVRREGS	0x12
-#define PTRACE_SETVRREGS	0x13
-#define PTRACE_GETEVRREGS	0x14
-#define PTRACE_SETEVRREGS	0x15
-#define PTRACE_GETREGS64	0x16
-#define PTRACE_SETREGS64	0x17
-#define PTRACE_GET_DEBUGREG	0x19
-#define PTRACE_SET_DEBUGREG	0x1a
-#define PTRACE_GETVSRREGS	0x1b
-#define PTRACE_SETVSRREGS	0x1c
-#define PTRACE_SYSEMU		0x1d
-#define PTRACE_SYSEMU_SINGLESTEP	0x1e
-#define PTRACE_SINGLEBLOCK	0x100
-
-#define PT_GETVRREGS PTRACE_GETVRREGS
-#define PT_SETVRREGS PTRACE_SETVRREGS
-#define PT_GETEVRREGS PTRACE_GETEVRREGS
-#define PT_SETEVRREGS PTRACE_SETEVRREGS
-#define PT_GETREGS64 PTRACE_GETREGS64
-#define PT_SETREGS64 PTRACE_SETREGS64
-#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG
-#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG
-#define PT_GETVSRREGS PTRACE_GETVSRREGS
-#define PT_SETVSRREGS PTRACE_SETVSRREGS
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/reg.h
@@ -1,3 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-/* FIXME */
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned __int128 __jmp_buf[32];
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/shm.h
@@ -1,23 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-	size_t shm_segsz;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __unused[2];
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/signal.h
@@ -1,110 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 4096
-#define SIGSTKSZ    10240
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-typedef unsigned long greg_t, gregset_t[48];
-typedef double fpregset_t[33];
-
-typedef struct {
-#ifdef __GNUC__
-	__attribute__((__aligned__(16)))
-#endif
-	unsigned vrregs[32][4];
-	struct {
-#if __BIG_ENDIAN__
-		unsigned _pad[3], vscr_word;
-#else
-		unsigned vscr_word, _pad[3];
-#endif
-	} vscr;
-	unsigned vrsave, _pad[3];
-} vrregset_t;
-
-typedef struct sigcontext {
-	unsigned long _unused[4];
-	int signal;
-	int _pad0;
-	unsigned long handler;
-	unsigned long oldmask;
-	struct pt_regs *regs;
-	gregset_t gp_regs;
-	fpregset_t fp_regs;
-	vrregset_t *v_regs;
-	long vmx_reserve[34+34+32+1];
-} mcontext_t;
-
-#else
-
-typedef struct {
-	long __regs[4+4+48+33+1+34+34+32+1];
-} mcontext_t;
-
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	sigset_t uc_sigmask;
-	mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1U
-#define SA_NOCLDWAIT  2U
-#define SA_SIGINFO    4U
-#define SA_ONSTACK    0x08000000U
-#define SA_RESTART    0x10000000U
-#define SA_NODEFER    0x40000000U
-#define SA_RESETHAND  0x80000000U
-#define SA_RESTORER   0x04000000U
-
-#endif
-
-#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   SIGIO
-#define SIGPWR    30
-#define SIGSYS    31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 65
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/socket.h
@@ -1,27 +0,0 @@
-#define SO_DEBUG        1
-#define SO_REUSEADDR    2
-#define SO_TYPE         3
-#define SO_ERROR        4
-#define SO_DONTROUTE    5
-#define SO_BROADCAST    6
-#define SO_SNDBUF       7
-#define SO_RCVBUF       8
-#define SO_KEEPALIVE    9
-#define SO_OOBINLINE    10
-#define SO_NO_CHECK     11
-#define SO_PRIORITY     12
-#define SO_LINGER       13
-#define SO_BSDCOMPAT    14
-#define SO_REUSEPORT    15
-#define SO_RCVLOWAT     16
-#define SO_SNDLOWAT     17
-#define SO_RCVTIMEO     18
-#define SO_SNDTIMEO     19
-#define SO_PASSCRED     20
-#define SO_PEERCRED     21
-#define SO_ACCEPTCONN   30
-#define SO_PEERSEC      31
-#define SO_SNDBUFFORCE  32
-#define SO_RCVBUFFORCE  33
-#define SO_PROTOCOL     38
-#define SO_DOMAIN       39
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/stat.h
@@ -1,16 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	unsigned long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/syscall.h.in
@@ -1,394 +0,0 @@
-#define __NR_restart_syscall          0
-#define __NR_exit                     1
-#define __NR_fork                     2
-#define __NR_read                     3
-#define __NR_write                    4
-#define __NR_open                     5
-#define __NR_close                    6
-#define __NR_waitpid                  7
-#define __NR_creat                    8
-#define __NR_link                     9
-#define __NR_unlink                  10
-#define __NR_execve                  11
-#define __NR_chdir                   12
-#define __NR_time                    13
-#define __NR_mknod                   14
-#define __NR_chmod                   15
-#define __NR_lchown                  16
-#define __NR_break                   17
-#define __NR_oldstat                 18
-#define __NR_lseek                   19
-#define __NR_getpid                  20
-#define __NR_mount                   21
-#define __NR_umount                  22
-#define __NR_setuid                  23
-#define __NR_getuid                  24
-#define __NR_stime                   25
-#define __NR_ptrace                  26
-#define __NR_alarm                   27
-#define __NR_oldfstat                28
-#define __NR_pause                   29
-#define __NR_utime                   30
-#define __NR_stty                    31
-#define __NR_gtty                    32
-#define __NR_access                  33
-#define __NR_nice                    34
-#define __NR_ftime                   35
-#define __NR_sync                    36
-#define __NR_kill                    37
-#define __NR_rename                  38
-#define __NR_mkdir                   39
-#define __NR_rmdir                   40
-#define __NR_dup                     41
-#define __NR_pipe                    42
-#define __NR_times                   43
-#define __NR_prof                    44
-#define __NR_brk                     45
-#define __NR_setgid                  46
-#define __NR_getgid                  47
-#define __NR_signal                  48
-#define __NR_geteuid                 49
-#define __NR_getegid                 50
-#define __NR_acct                    51
-#define __NR_umount2                 52
-#define __NR_lock                    53
-#define __NR_ioctl                   54
-#define __NR_fcntl                   55
-#define __NR_mpx                     56
-#define __NR_setpgid                 57
-#define __NR_ulimit                  58
-#define __NR_oldolduname             59
-#define __NR_umask                   60
-#define __NR_chroot                  61
-#define __NR_ustat                   62
-#define __NR_dup2                    63
-#define __NR_getppid                 64
-#define __NR_getpgrp                 65
-#define __NR_setsid                  66
-#define __NR_sigaction               67
-#define __NR_sgetmask                68
-#define __NR_ssetmask                69
-#define __NR_setreuid                70
-#define __NR_setregid                71
-#define __NR_sigsuspend              72
-#define __NR_sigpending              73
-#define __NR_sethostname             74
-#define __NR_setrlimit               75
-#define __NR_getrlimit               76
-#define __NR_getrusage               77
-#define __NR_gettimeofday            78
-#define __NR_settimeofday            79
-#define __NR_getgroups               80
-#define __NR_setgroups               81
-#define __NR_select                  82
-#define __NR_symlink                 83
-#define __NR_oldlstat                84
-#define __NR_readlink                85
-#define __NR_uselib                  86
-#define __NR_swapon                  87
-#define __NR_reboot                  88
-#define __NR_readdir                 89
-#define __NR_mmap                    90
-#define __NR_munmap                  91
-#define __NR_truncate                92
-#define __NR_ftruncate               93
-#define __NR_fchmod                  94
-#define __NR_fchown                  95
-#define __NR_getpriority             96
-#define __NR_setpriority             97
-#define __NR_profil                  98
-#define __NR_statfs                  99
-#define __NR_fstatfs                100
-#define __NR_ioperm                 101
-#define __NR_socketcall             102
-#define __NR_syslog                 103
-#define __NR_setitimer              104
-#define __NR_getitimer              105
-#define __NR_stat                   106
-#define __NR_lstat                  107
-#define __NR_fstat                  108
-#define __NR_olduname               109
-#define __NR_iopl                   110
-#define __NR_vhangup                111
-#define __NR_idle                   112
-#define __NR_vm86                   113
-#define __NR_wait4                  114
-#define __NR_swapoff                115
-#define __NR_sysinfo                116
-#define __NR_ipc                    117
-#define __NR_fsync                  118
-#define __NR_sigreturn              119
-#define __NR_clone                  120
-#define __NR_setdomainname          121
-#define __NR_uname                  122
-#define __NR_modify_ldt             123
-#define __NR_adjtimex               124
-#define __NR_mprotect               125
-#define __NR_sigprocmask            126
-#define __NR_create_module          127
-#define __NR_init_module            128
-#define __NR_delete_module          129
-#define __NR_get_kernel_syms        130
-#define __NR_quotactl               131
-#define __NR_getpgid                132
-#define __NR_fchdir                 133
-#define __NR_bdflush                134
-#define __NR_sysfs                  135
-#define __NR_personality            136
-#define __NR_afs_syscall            137
-#define __NR_setfsuid               138
-#define __NR_setfsgid               139
-#define __NR__llseek                140
-#define __NR_getdents               141
-#define __NR__newselect             142
-#define __NR_flock                  143
-#define __NR_msync                  144
-#define __NR_readv                  145
-#define __NR_writev                 146
-#define __NR_getsid                 147
-#define __NR_fdatasync              148
-#define __NR__sysctl                149
-#define __NR_mlock                  150
-#define __NR_munlock                151
-#define __NR_mlockall               152
-#define __NR_munlockall             153
-#define __NR_sched_setparam         154
-#define __NR_sched_getparam         155
-#define __NR_sched_setscheduler     156
-#define __NR_sched_getscheduler     157
-#define __NR_sched_yield            158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval  161
-#define __NR_nanosleep              162
-#define __NR_mremap                 163
-#define __NR_setresuid              164
-#define __NR_getresuid              165
-#define __NR_query_module           166
-#define __NR_poll                   167
-#define __NR_nfsservctl             168
-#define __NR_setresgid              169
-#define __NR_getresgid              170
-#define __NR_prctl                  171
-#define __NR_rt_sigreturn           172
-#define __NR_rt_sigaction           173
-#define __NR_rt_sigprocmask         174
-#define __NR_rt_sigpending          175
-#define __NR_rt_sigtimedwait        176
-#define __NR_rt_sigqueueinfo        177
-#define __NR_rt_sigsuspend          178
-#define __NR_pread64                179
-#define __NR_pwrite64               180
-#define __NR_chown                  181
-#define __NR_getcwd                 182
-#define __NR_capget                 183
-#define __NR_capset                 184
-#define __NR_sigaltstack            185
-#define __NR_sendfile               186
-#define __NR_getpmsg                187
-#define __NR_putpmsg                188
-#define __NR_vfork                  189
-#define __NR_ugetrlimit             190
-#define __NR_readahead              191
-#define __NR_pciconfig_read         198
-#define __NR_pciconfig_write        199
-#define __NR_pciconfig_iobase       200
-#define __NR_multiplexer            201
-#define __NR_getdents64             202
-#define __NR_pivot_root             203
-#define __NR_madvise                205
-#define __NR_mincore                206
-#define __NR_gettid                 207
-#define __NR_tkill                  208
-#define __NR_setxattr               209
-#define __NR_lsetxattr              210
-#define __NR_fsetxattr              211
-#define __NR_getxattr               212
-#define __NR_lgetxattr              213
-#define __NR_fgetxattr              214
-#define __NR_listxattr              215
-#define __NR_llistxattr             216
-#define __NR_flistxattr             217
-#define __NR_removexattr            218
-#define __NR_lremovexattr           219
-#define __NR_fremovexattr           220
-#define __NR_futex                  221
-#define __NR_sched_setaffinity      222
-#define __NR_sched_getaffinity      223
-#define __NR_tuxcall                225
-#define __NR_io_setup               227
-#define __NR_io_destroy             228
-#define __NR_io_getevents           229
-#define __NR_io_submit              230
-#define __NR_io_cancel              231
-#define __NR_set_tid_address        232
-#define __NR_fadvise64              233
-#define __NR_exit_group             234
-#define __NR_lookup_dcookie         235
-#define __NR_epoll_create           236
-#define __NR_epoll_ctl              237
-#define __NR_epoll_wait             238
-#define __NR_remap_file_pages       239
-#define __NR_timer_create           240
-#define __NR_timer_settime          241
-#define __NR_timer_gettime          242
-#define __NR_timer_getoverrun       243
-#define __NR_timer_delete           244
-#define __NR_clock_settime          245
-#define __NR_clock_gettime          246
-#define __NR_clock_getres           247
-#define __NR_clock_nanosleep        248
-#define __NR_swapcontext            249
-#define __NR_tgkill                 250
-#define __NR_utimes                 251
-#define __NR_statfs64               252
-#define __NR_fstatfs64              253
-#define __NR_rtas                   255
-#define __NR_sys_debug_setcontext   256
-#define __NR_migrate_pages          258
-#define __NR_mbind                  259
-#define __NR_get_mempolicy          260
-#define __NR_set_mempolicy          261
-#define __NR_mq_open                262
-#define __NR_mq_unlink              263
-#define __NR_mq_timedsend           264
-#define __NR_mq_timedreceive        265
-#define __NR_mq_notify              266
-#define __NR_mq_getsetattr          267
-#define __NR_kexec_load             268
-#define __NR_add_key                269
-#define __NR_request_key            270
-#define __NR_keyctl                 271
-#define __NR_waitid                 272
-#define __NR_ioprio_set             273
-#define __NR_ioprio_get             274
-#define __NR_inotify_init           275
-#define __NR_inotify_add_watch      276
-#define __NR_inotify_rm_watch       277
-#define __NR_spu_run                278
-#define __NR_spu_create             279
-#define __NR_pselect6               280
-#define __NR_ppoll                  281
-#define __NR_unshare                282
-#define __NR_splice                 283
-#define __NR_tee                    284
-#define __NR_vmsplice               285
-#define __NR_openat                 286
-#define __NR_mkdirat                287
-#define __NR_mknodat                288
-#define __NR_fchownat               289
-#define __NR_futimesat              290
-#define __NR_newfstatat             291
-#define __NR_unlinkat               292
-#define __NR_renameat               293
-#define __NR_linkat                 294
-#define __NR_symlinkat              295
-#define __NR_readlinkat             296
-#define __NR_fchmodat               297
-#define __NR_faccessat              298
-#define __NR_get_robust_list        299
-#define __NR_set_robust_list        300
-#define __NR_move_pages             301
-#define __NR_getcpu                 302
-#define __NR_epoll_pwait            303
-#define __NR_utimensat              304
-#define __NR_signalfd               305
-#define __NR_timerfd_create         306
-#define __NR_eventfd                307
-#define __NR_sync_file_range2       308
-#define __NR_fallocate              309
-#define __NR_subpage_prot           310
-#define __NR_timerfd_settime        311
-#define __NR_timerfd_gettime        312
-#define __NR_signalfd4              313
-#define __NR_eventfd2               314
-#define __NR_epoll_create1          315
-#define __NR_dup3                   316
-#define __NR_pipe2                  317
-#define __NR_inotify_init1          318
-#define __NR_perf_event_open        319
-#define __NR_preadv                 320
-#define __NR_pwritev                321
-#define __NR_rt_tgsigqueueinfo      322
-#define __NR_fanotify_init          323
-#define __NR_fanotify_mark          324
-#define __NR_prlimit64              325
-#define __NR_socket                 326
-#define __NR_bind                   327
-#define __NR_connect                328
-#define __NR_listen                 329
-#define __NR_accept                 330
-#define __NR_getsockname            331
-#define __NR_getpeername            332
-#define __NR_socketpair             333
-#define __NR_send                   334
-#define __NR_sendto                 335
-#define __NR_recv                   336
-#define __NR_recvfrom               337
-#define __NR_shutdown               338
-#define __NR_setsockopt             339
-#define __NR_getsockopt             340
-#define __NR_sendmsg                341
-#define __NR_recvmsg                342
-#define __NR_recvmmsg               343
-#define __NR_accept4                344
-#define __NR_name_to_handle_at      345
-#define __NR_open_by_handle_at      346
-#define __NR_clock_adjtime          347
-#define __NR_syncfs                 348
-#define __NR_sendmmsg               349
-#define __NR_setns                  350
-#define __NR_process_vm_readv       351
-#define __NR_process_vm_writev      352
-#define __NR_finit_module           353
-#define __NR_kcmp                   354
-#define __NR_sched_setattr          355
-#define __NR_sched_getattr          356
-#define __NR_renameat2              357
-#define __NR_seccomp                358
-#define __NR_getrandom              359
-#define __NR_memfd_create           360
-#define __NR_bpf                    361
-#define __NR_execveat               362
-#define __NR_switch_endian          363
-#define __NR_userfaultfd            364
-#define __NR_membarrier             365
-#define __NR_mlock2                 378
-#define __NR_copy_file_range        379
-#define __NR_preadv2                380
-#define __NR_pwritev2               381
-#define __NR_kexec_file_load        382
-#define __NR_statx                  383
-#define __NR_pkey_alloc             384
-#define __NR_pkey_free              385
-#define __NR_pkey_mprotect          386
-#define __NR_rseq                   387
-#define __NR_io_pgetevents          388
-#define __NR_semtimedop             392
-#define __NR_semget                 393
-#define __NR_semctl                 394
-#define __NR_shmget                 395
-#define __NR_shmctl                 396
-#define __NR_shmat                  397
-#define __NR_shmdt                  398
-#define __NR_msgget                 399
-#define __NR_msgsnd                 400
-#define __NR_msgrcv                 401
-#define __NR_msgctl                 402
-#define __NR_pidfd_send_signal      424
-#define __NR_io_uring_setup         425
-#define __NR_io_uring_enter         426
-#define __NR_io_uring_register      427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/termios.h
@@ -1,171 +0,0 @@
-#undef NCCS
-#define NCCS 19
-struct termios {
-	tcflag_t c_iflag;
-	tcflag_t c_oflag;
-	tcflag_t c_cflag;
-	tcflag_t c_lflag;
-	cc_t c_cc[NCCS];
-	cc_t c_line;
-	speed_t __c_ispeed;
-	speed_t __c_ospeed;
-};
-
-#define VINTR     0
-#define VQUIT     1
-#define VERASE    2
-#define VKILL     3
-#define VEOF      4
-#define VMIN      5
-#define VEOL      6
-#define VTIME     7
-#define VEOL2     8
-#define VSWTC     9
-#define VWERASE  10
-#define VREPRINT 11
-#define VSUSP    12
-#define VSTART   13
-#define VSTOP    14
-#define VLNEXT   15
-#define VDISCARD 16
-
-#define IGNBRK  0000001
-#define BRKINT  0000002
-#define IGNPAR  0000004
-#define PARMRK  0000010
-#define INPCK   0000020
-#define ISTRIP  0000040
-#define INLCR   0000100
-#define IGNCR   0000200
-#define ICRNL   0000400
-#define IXON    0001000
-#define IXOFF   0002000
-#define IXANY   0004000
-#define IUCLC   0010000
-#define IMAXBEL 0020000
-#define IUTF8   0040000
-
-#define OPOST  0000001
-#define ONLCR  0000002
-#define OLCUC  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
-#define NLDLY  0001400
-#define NL0    0000000
-#define NL1    0000400
-#define NL2    0001000
-#define NL3    0001400
-#define TABDLY 0006000
-#define TAB0   0000000
-#define TAB1   0002000
-#define TAB2   0004000
-#define TAB3   0006000
-#define CRDLY  0030000
-#define CR0    0000000
-#define CR1    0010000
-#define CR2    0020000
-#define CR3    0030000
-#define FFDLY  0040000
-#define FF0    0000000
-#define FF1    0040000
-#define BSDLY  0100000
-#define BS0    0000000
-#define BS1    0100000
-#endif
-
-#define VTDLY  0200000
-#define VT0    0000000
-#define VT1    0200000
-
-#define B0       0000000
-#define B50      0000001
-#define B75      0000002
-#define B110     0000003
-#define B134     0000004
-#define B150     0000005
-#define B200     0000006
-#define B300     0000007
-#define B600     0000010
-#define B1200    0000011
-#define B1800    0000012
-#define B2400    0000013
-#define B4800    0000014
-#define B9600    0000015
-#define B19200   0000016
-#define B38400   0000017
-
-#define B57600   00020
-#define B115200  00021
-#define B230400  00022
-#define B460800  00023
-#define B500000  00024
-#define B576000  00025
-#define B921600  00026
-#define B1000000 00027
-#define B1152000 00030
-#define B1500000 00031
-#define B2000000 00032
-#define B2500000 00033
-#define B3000000 00034
-#define B3500000 00035
-#define B4000000 00036
-
-#define CSIZE  00001400
-#define CS5    00000000
-#define CS6    00000400
-#define CS7    00001000
-#define CS8    00001400
-#define CSTOPB 00002000
-#define CREAD  00004000
-#define PARENB 00010000
-#define PARODD 00020000
-#define HUPCL  00040000
-#define CLOCAL 00100000
-
-#define ECHOE   0x00000002
-#define ECHOK   0x00000004
-#define ECHO    0x00000008
-#define ECHONL  0x00000010
-#define ISIG    0x00000080
-#define ICANON  0x00000100
-#define IEXTEN  0x00000400
-#define TOSTOP  0x00400000
-#define NOFLSH  0x80000000
-
-#define TCOOFF 0
-#define TCOON  1
-#define TCIOFF 2
-#define TCION  3
-
-#define TCIFLUSH  0
-#define TCOFLUSH  1
-#define TCIOFLUSH 2
-
-#define TCSANOW   0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define EXTA    0000016
-#define EXTB    0000017
-#define CBAUD   00377
-#define CBAUDEX 0000020
-#define CIBAUD  077600000
-#define CMSPAR  010000000000
-#define CRTSCTS 020000000000
-
-#define XCASE   0x00004000
-#define ECHOCTL 0x00000040
-#define ECHOPRT 0x00000020
-#define ECHOKE  0x00000001
-#define FLUSHO  0x00800000
-#define PENDIN  0x20000000
-#define EXTPROC 0x10000000
-
-#define XTABS   00006000
-#define TIOCSER_TEMT 1
-#endif
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/bits/user.h
@@ -1,23 +0,0 @@
-struct user {
-	struct {
-		unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, softe;
-		unsigned long trap, dar, dsisr, result;
-	} regs;
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long start_code, start_data, start_stack;
-	long signal;
-	void *u_ar0;
-	unsigned long magic;
-	char u_comm[32];
-};
-
-#define ELF_NGREG 48
-#define ELF_NFPREG 33
-#define ELF_NVRREG 34
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef double elf_fpreg_t, elf_fpregset_t[ELF_NFPREG];
-typedef struct { unsigned u[4]; }
-#ifdef __GNUC__
-__attribute__((__aligned__(16)))
-#endif
-	elf_vrreg_t, elf_vrregset_t[ELF_NVRREG];
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/atomic_arch.h
@@ -1,62 +0,0 @@
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ ("lwarx %0, 0, %2" : "=r"(v) : "m"(*p), "r"(p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ (
-		"stwcx. %2, 0, %3 ; mfcr %0"
-		: "=r"(r), "=m"(*p) : "r"(v), "r"(p) : "memory", "cc");
-	return r & 0x20000000; /* "bit 2" of "cr0" (backwards bit order) */
-}
-
-#define a_ll_p a_ll_p
-static inline void *a_ll_p(volatile void *p)
-{
-	void *v;
-	__asm__ __volatile__ ("ldarx %0, 0, %2" : "=r"(v) : "m"(*(void *volatile *)p), "r"(p));
-	return v;
-}
-
-#define a_sc_p a_sc_p
-static inline int a_sc_p(volatile void *p, void *v)
-{
-	int r;
-	__asm__ __volatile__ (
-		"stdcx. %2, 0, %3 ; mfcr %0"
-		: "=r"(r), "=m"(*(void *volatile *)p) : "r"(v), "r"(p) : "memory", "cc");
-	return r & 0x20000000; /* "bit 2" of "cr0" (backwards bit order) */
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("sync" : : : "memory");
-}
-
-#define a_pre_llsc a_barrier
-
-#define a_post_llsc a_post_llsc
-static inline void a_post_llsc()
-{
-	__asm__ __volatile__ ("isync" : : : "memory");
-}
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__ (".long 0");
-}
-
-#define a_clz_64 a_clz_64
-static inline int a_clz_64(uint64_t x)
-{
-	__asm__ ("cntlzd %0, %1" : "=r"(x) : "r"(x));
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/crt_arch.h
@@ -1,19 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-".type   " START ", %function \n"
-START ": \n"
-"	addis  2, 12, .TOC.-" START "@ha \n"
-"	addi   2,  2, .TOC.-" START "@l \n"
-"	lwz    4, 1f-" START "(12)\n"
-"	add    4, 4, 12 \n"
-"	mr     3, 1 \n"
-"	clrrdi 1, 1, 4 \n"
-"	li     0, 0 \n"
-"	stdu   0, -32(1) \n"
-"	mtlr   0 \n"
-"	bl " START "_c \n"
-".weak   _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"1:	.long _DYNAMIC-" START "\n"
-);
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/kstat.h
@@ -1,19 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/pthread_arch.h
@@ -1,16 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	register uintptr_t tp __asm__("r13");
-	__asm__ ("" : "=r" (tp) );
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define TP_OFFSET 0x7000
-#define DTP_OFFSET 0x8000
-
-// the kernel calls the ip "nip", it's the first saved value after the 32
-// GPRs.
-#define MC_PC gp_regs[32]
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/reloc.h
@@ -1,31 +0,0 @@
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ENDIAN_SUFFIX "le"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "powerpc64" ENDIAN_SUFFIX
-
-#define TPOFF_K (-0x7000)
-
-#define REL_SYMBOLIC    R_PPC64_ADDR64
-#define REL_USYMBOLIC   R_PPC64_UADDR64
-#define REL_GOT         R_PPC64_GLOB_DAT
-#define REL_PLT         R_PPC64_JMP_SLOT
-#define REL_RELATIVE    R_PPC64_RELATIVE
-#define REL_COPY        R_PPC64_COPY
-#define REL_DTPMOD      R_PPC64_DTPMOD64
-#define REL_DTPOFF      R_PPC64_DTPREL64
-#define REL_TPOFF       R_PPC64_TPREL64
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mr 1,%1; mr 12,%0; mtctr 12; bctrl" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym " \n" \
-	"	bl 1f \n" \
-	"	.long " #sym "-. \n" \
-	"1:	mflr %1 \n" \
-	"	lwa %0, 0(%1) \n" \
-	"	add %0, %0, %1 \n" \
-	: "=r"(*(fp)), "=r"((long){0}) : : "memory", "lr" )
lib/libc/wasi/libc-top-half/musl/arch/powerpc64/syscall_arch.h
@@ -1,90 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-static inline long __syscall0(long n)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3");
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "=r"(r3)
-	:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3)
-	:: "memory", "cr0", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4)
-	:: "memory", "cr0", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5)
-	:: "memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6)
-	:: "memory", "cr0", "r7", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	register long r7 __asm__("r7") = e;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7)
-	:: "memory", "cr0", "r8", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r0 __asm__("r0") = n;
-	register long r3 __asm__("r3") = a;
-	register long r4 __asm__("r4") = b;
-	register long r5 __asm__("r5") = c;
-	register long r6 __asm__("r6") = d;
-	register long r7 __asm__("r7") = e;
-	register long r8 __asm__("r8") = f;
-	__asm__ __volatile__("sc ; bns+ 1f ; neg %1, %1 ; 1:"
-	: "+r"(r0), "+r"(r3), "+r"(r4), "+r"(r5), "+r"(r6), "+r"(r7), "+r"(r8)
-	:: "memory", "cr0", "r9", "r10", "r11", "r12");
-	return r3;
-}
-
-#define SO_RCVTIMEO_OLD  18
-#define SO_SNDTIMEO_OLD  19
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/alltypes.h.in
@@ -1,18 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#define __BYTE_ORDER 1234
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-TYPEDEF int blksize_t;
-TYPEDEF unsigned int nlink_t;
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/fenv.h
@@ -1,17 +0,0 @@
-#define FE_INVALID      16
-#define FE_DIVBYZERO    8
-#define FE_OVERFLOW     4
-#define FE_UNDERFLOW    2
-#define FE_INEXACT      1
-
-#define FE_ALL_EXCEPT   31
-
-#define FE_TONEAREST    0
-#define FE_DOWNWARD     2
-#define FE_UPWARD       3
-#define FE_TOWARDZERO   1
-
-typedef unsigned int fexcept_t;
-typedef unsigned int fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/float.h
@@ -1,16 +0,0 @@
-#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
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64 1
-#define _POSIX_V7_LP64_OFF64 1
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/reg.h
@@ -1,2 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[26];
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/signal.h
@@ -1,118 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-# define MINSIGSTKSZ 2048
-# define SIGSTKSZ 8192
-#endif
-
-typedef unsigned long __riscv_mc_gp_state[32];
-
-struct __riscv_mc_f_ext_state {
-	unsigned int __f[32];
-	unsigned int __fcsr;
-};
-
-struct __riscv_mc_d_ext_state {
-	unsigned long long __f[32];
-	unsigned int __fcsr;
-};
-
-struct __riscv_mc_q_ext_state {
-	unsigned long long __f[64] __attribute__((aligned(16)));
-	unsigned int __fcsr;
-	unsigned int __reserved[3];
-};
-
-union __riscv_mc_fp_state {
-	struct __riscv_mc_f_ext_state __f;
-	struct __riscv_mc_d_ext_state __d;
-	struct __riscv_mc_q_ext_state __q;
-};
-
-typedef struct mcontext_t {
-	__riscv_mc_gp_state __gregs;
-	union __riscv_mc_fp_state __fpregs;
-} mcontext_t;
-
-#if defined(_GNU_SOURCE)
-#define REG_PC 0
-#define REG_RA 1
-#define REG_SP 2
-#define REG_TP 4
-#define REG_S0 8
-#define REG_A0 10
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef unsigned long greg_t;
-typedef unsigned long gregset_t[32];
-typedef union __riscv_mc_fp_state fpregset_t;
-struct sigcontext {
-	gregset_t gregs;
-	fpregset_t fpregs;
-};
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext
-{
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	sigset_t uc_sigmask;
-	mcontext_t uc_mcontext;
-} ucontext_t;
-
-#define SA_NOCLDSTOP 1
-#define SA_NOCLDWAIT 2
-#define SA_SIGINFO   4
-#define SA_ONSTACK   0x08000000
-#define SA_RESTART   0x10000000
-#define SA_NODEFER   0x40000000
-#define SA_RESETHAND 0x80000000
-#define SA_RESTORER  0x04000000
-
-#endif
-
-#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   SIGIO
-#define SIGPWR    30
-#define SIGSYS    31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG     65
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/stat.h
@@ -1,18 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	unsigned long __pad;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __pad2;
-	blkcnt_t st_blocks;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/syscall.h.in
@@ -1,298 +0,0 @@
-#define __NR_io_setup 0
-#define __NR_io_destroy 1
-#define __NR_io_submit 2
-#define __NR_io_cancel 3
-#define __NR_io_getevents 4
-#define __NR_setxattr 5
-#define __NR_lsetxattr 6
-#define __NR_fsetxattr 7
-#define __NR_getxattr 8
-#define __NR_lgetxattr 9
-#define __NR_fgetxattr 10
-#define __NR_listxattr 11
-#define __NR_llistxattr 12
-#define __NR_flistxattr 13
-#define __NR_removexattr 14
-#define __NR_lremovexattr 15
-#define __NR_fremovexattr 16
-#define __NR_getcwd 17
-#define __NR_lookup_dcookie 18
-#define __NR_eventfd2 19
-#define __NR_epoll_create1 20
-#define __NR_epoll_ctl 21
-#define __NR_epoll_pwait 22
-#define __NR_dup 23
-#define __NR_dup3 24
-#define __NR_fcntl 25
-#define __NR_inotify_init1 26
-#define __NR_inotify_add_watch 27
-#define __NR_inotify_rm_watch 28
-#define __NR_ioctl 29
-#define __NR_ioprio_set 30
-#define __NR_ioprio_get 31
-#define __NR_flock 32
-#define __NR_mknodat 33
-#define __NR_mkdirat 34
-#define __NR_unlinkat 35
-#define __NR_symlinkat 36
-#define __NR_linkat 37
-#define __NR_umount2 39
-#define __NR_mount 40
-#define __NR_pivot_root 41
-#define __NR_nfsservctl 42
-#define __NR_statfs 43
-#define __NR_fstatfs 44
-#define __NR_truncate 45
-#define __NR_ftruncate 46
-#define __NR_fallocate 47
-#define __NR_faccessat 48
-#define __NR_chdir 49
-#define __NR_fchdir 50
-#define __NR_chroot 51
-#define __NR_fchmod 52
-#define __NR_fchmodat 53
-#define __NR_fchownat 54
-#define __NR_fchown 55
-#define __NR_openat 56
-#define __NR_close 57
-#define __NR_vhangup 58
-#define __NR_pipe2 59
-#define __NR_quotactl 60
-#define __NR_getdents64 61
-#define __NR_lseek 62
-#define __NR_read 63
-#define __NR_write 64
-#define __NR_readv 65
-#define __NR_writev 66
-#define __NR_pread64 67
-#define __NR_pwrite64 68
-#define __NR_preadv 69
-#define __NR_pwritev 70
-#define __NR_sendfile 71
-#define __NR_pselect6 72
-#define __NR_ppoll 73
-#define __NR_signalfd4 74
-#define __NR_vmsplice 75
-#define __NR_splice 76
-#define __NR_tee 77
-#define __NR_readlinkat 78
-#define __NR_fstatat 79
-#define __NR_fstat 80
-#define __NR_sync 81
-#define __NR_fsync 82
-#define __NR_fdatasync 83
-#define __NR_sync_file_range 84
-#define __NR_timerfd_create 85
-#define __NR_timerfd_settime 86
-#define __NR_timerfd_gettime 87
-#define __NR_utimensat 88
-#define __NR_acct 89
-#define __NR_capget 90
-#define __NR_capset 91
-#define __NR_personality 92
-#define __NR_exit 93
-#define __NR_exit_group 94
-#define __NR_waitid 95
-#define __NR_set_tid_address 96
-#define __NR_unshare 97
-#define __NR_futex 98
-#define __NR_set_robust_list 99
-#define __NR_get_robust_list 100
-#define __NR_nanosleep 101
-#define __NR_getitimer 102
-#define __NR_setitimer 103
-#define __NR_kexec_load 104
-#define __NR_init_module 105
-#define __NR_delete_module 106
-#define __NR_timer_create 107
-#define __NR_timer_gettime 108
-#define __NR_timer_getoverrun 109
-#define __NR_timer_settime 110
-#define __NR_timer_delete 111
-#define __NR_clock_settime 112
-#define __NR_clock_gettime 113
-#define __NR_clock_getres 114
-#define __NR_clock_nanosleep 115
-#define __NR_syslog 116
-#define __NR_ptrace 117
-#define __NR_sched_setparam 118
-#define __NR_sched_setscheduler 119
-#define __NR_sched_getscheduler 120
-#define __NR_sched_getparam 121
-#define __NR_sched_setaffinity 122
-#define __NR_sched_getaffinity 123
-#define __NR_sched_yield 124
-#define __NR_sched_get_priority_max 125
-#define __NR_sched_get_priority_min 126
-#define __NR_sched_rr_get_interval 127
-#define __NR_restart_syscall 128
-#define __NR_kill 129
-#define __NR_tkill 130
-#define __NR_tgkill 131
-#define __NR_sigaltstack 132
-#define __NR_rt_sigsuspend 133
-#define __NR_rt_sigaction 134
-#define __NR_rt_sigprocmask 135
-#define __NR_rt_sigpending 136
-#define __NR_rt_sigtimedwait 137
-#define __NR_rt_sigqueueinfo 138
-#define __NR_rt_sigreturn 139
-#define __NR_setpriority 140
-#define __NR_getpriority 141
-#define __NR_reboot 142
-#define __NR_setregid 143
-#define __NR_setgid 144
-#define __NR_setreuid 145
-#define __NR_setuid 146
-#define __NR_setresuid 147
-#define __NR_getresuid 148
-#define __NR_setresgid 149
-#define __NR_getresgid 150
-#define __NR_setfsuid 151
-#define __NR_setfsgid 152
-#define __NR_times 153
-#define __NR_setpgid 154
-#define __NR_getpgid 155
-#define __NR_getsid 156
-#define __NR_setsid 157
-#define __NR_getgroups 158
-#define __NR_setgroups 159
-#define __NR_uname 160
-#define __NR_sethostname 161
-#define __NR_setdomainname 162
-#define __NR_getrlimit 163
-#define __NR_setrlimit 164
-#define __NR_getrusage 165
-#define __NR_umask 166
-#define __NR_prctl 167
-#define __NR_getcpu 168
-#define __NR_gettimeofday 169
-#define __NR_settimeofday 170
-#define __NR_adjtimex 171
-#define __NR_getpid 172
-#define __NR_getppid 173
-#define __NR_getuid 174
-#define __NR_geteuid 175
-#define __NR_getgid 176
-#define __NR_getegid 177
-#define __NR_gettid 178
-#define __NR_sysinfo 179
-#define __NR_mq_open 180
-#define __NR_mq_unlink 181
-#define __NR_mq_timedsend 182
-#define __NR_mq_timedreceive 183
-#define __NR_mq_notify 184
-#define __NR_mq_getsetattr 185
-#define __NR_msgget 186
-#define __NR_msgctl 187
-#define __NR_msgrcv 188
-#define __NR_msgsnd 189
-#define __NR_semget 190
-#define __NR_semctl 191
-#define __NR_semtimedop 192
-#define __NR_semop 193
-#define __NR_shmget 194
-#define __NR_shmctl 195
-#define __NR_shmat 196
-#define __NR_shmdt 197
-#define __NR_socket 198
-#define __NR_socketpair 199
-#define __NR_bind 200
-#define __NR_listen 201
-#define __NR_accept 202
-#define __NR_connect 203
-#define __NR_getsockname 204
-#define __NR_getpeername 205
-#define __NR_sendto 206
-#define __NR_recvfrom 207
-#define __NR_setsockopt 208
-#define __NR_getsockopt 209
-#define __NR_shutdown 210
-#define __NR_sendmsg 211
-#define __NR_recvmsg 212
-#define __NR_readahead 213
-#define __NR_brk 214
-#define __NR_munmap 215
-#define __NR_mremap 216
-#define __NR_add_key 217
-#define __NR_request_key 218
-#define __NR_keyctl 219
-#define __NR_clone 220
-#define __NR_execve 221
-#define __NR_mmap 222
-#define __NR_fadvise64 223
-#define __NR_swapon 224
-#define __NR_swapoff 225
-#define __NR_mprotect 226
-#define __NR_msync 227
-#define __NR_mlock 228
-#define __NR_munlock 229
-#define __NR_mlockall 230
-#define __NR_munlockall 231
-#define __NR_mincore 232
-#define __NR_madvise 233
-#define __NR_remap_file_pages 234
-#define __NR_mbind 235
-#define __NR_get_mempolicy 236
-#define __NR_set_mempolicy 237
-#define __NR_migrate_pages 238
-#define __NR_move_pages 239
-#define __NR_rt_tgsigqueueinfo 240
-#define __NR_perf_event_open 241
-#define __NR_accept4 242
-#define __NR_recvmmsg 243
-#define __NR_arch_specific_syscall 244
-#define __NR_wait4 260
-#define __NR_prlimit64 261
-#define __NR_fanotify_init 262
-#define __NR_fanotify_mark 263
-#define __NR_name_to_handle_at 264
-#define __NR_open_by_handle_at 265
-#define __NR_clock_adjtime 266
-#define __NR_syncfs 267
-#define __NR_setns 268
-#define __NR_sendmmsg 269
-#define __NR_process_vm_readv 270
-#define __NR_process_vm_writev 271
-#define __NR_kcmp 272
-#define __NR_finit_module 273
-#define __NR_sched_setattr 274
-#define __NR_sched_getattr 275
-#define __NR_renameat2 276
-#define __NR_seccomp 277
-#define __NR_getrandom 278
-#define __NR_memfd_create 279
-#define __NR_bpf 280
-#define __NR_execveat 281
-#define __NR_userfaultfd 282
-#define __NR_membarrier 283
-#define __NR_mlock2 284
-#define __NR_copy_file_range 285
-#define __NR_preadv2 286
-#define __NR_pwritev2 287
-#define __NR_pkey_mprotect 288
-#define __NR_pkey_alloc 289
-#define __NR_pkey_free 290
-#define __NR_statx 291
-#define __NR_io_pgetevents 292
-#define __NR_rseq 293
-#define __NR_kexec_file_load 294
-#define __NR_pidfd_send_signal 424
-#define __NR_io_uring_setup 425
-#define __NR_io_uring_enter 426
-#define __NR_io_uring_register 427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
-#define __NR_sysriscv __NR_arch_specific_syscall
-#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
lib/libc/wasi/libc-top-half/musl/arch/riscv64/bits/user.h
@@ -1,5 +0,0 @@
-#include <signal.h>
-
-#define ELF_NGREG 32
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-typedef union __riscv_mc_fp_state elf_fpregset_t;
lib/libc/wasi/libc-top-half/musl/arch/riscv64/atomic_arch.h
@@ -1,38 +0,0 @@
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("fence rw,rw" : : : "memory");
-}
-
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	int old, tmp;
-	__asm__ __volatile__ (
-		"\n1:	lr.w.aqrl %0, (%2)\n"
-		"	bne %0, %3, 1f\n"
-		"	sc.w.aqrl %1, %4, (%2)\n"
-		"	bnez %1, 1b\n"
-		"1:"
-		: "=&r"(old), "=&r"(tmp)
-		: "r"(p), "r"((long)t), "r"((long)s)
-		: "memory");
-	return old;
-}
-
-#define a_cas_p a_cas_p
-static inline void *a_cas_p(volatile void *p, void *t, void *s)
-{
-	void *old;
-	int tmp;
-	__asm__ __volatile__ (
-		"\n1:	lr.d.aqrl %0, (%2)\n"
-		"	bne %0, %3, 1f\n"
-		"	sc.d.aqrl %1, %4, (%2)\n"
-		"	bnez %1, 1b\n"
-		"1:"
-		: "=&r"(old), "=&r"(tmp)
-		: "r"(p), "r"(t), "r"(s)
-		: "memory");
-	return old;
-}
lib/libc/wasi/libc-top-half/musl/arch/riscv64/crt_arch.h
@@ -1,19 +0,0 @@
-__asm__(
-".section .sdata,\"aw\"\n"
-".text\n"
-".global " START "\n"
-".type " START ",%function\n"
-START ":\n"
-".weak __global_pointer$\n"
-".hidden __global_pointer$\n"
-".option push\n"
-".option norelax\n\t"
-"lla gp, __global_pointer$\n"
-".option pop\n\t"
-"mv a0, sp\n"
-".weak _DYNAMIC\n"
-".hidden _DYNAMIC\n\t"
-"lla a1, _DYNAMIC\n\t"
-"andi sp, sp, -16\n\t"
-"tail " START "_c"
-);
lib/libc/wasi/libc-top-half/musl/arch/riscv64/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	unsigned long __pad;
-	off_t st_size;
-	blksize_t st_blksize;
-	int __pad2;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	unsigned __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/riscv64/pthread_arch.h
@@ -1,13 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ __volatile__("mv %0, tp" : "=r"(tp));
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 0
-
-#define DTP_OFFSET 0x800
-
-#define MC_PC __gregs[0]
lib/libc/wasi/libc-top-half/musl/arch/riscv64/reloc.h
@@ -1,22 +0,0 @@
-#if defined __riscv_float_abi_soft
-#define RISCV_FP_SUFFIX "-sf"
-#elif defined __riscv_float_abi_single
-#define RISCV_FP_SUFFIX "-sp"
-#elif defined __riscv_float_abi_double
-#define RISCV_FP_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "riscv64" RISCV_FP_SUFFIX
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_RISCV_64
-#define REL_PLT         R_RISCV_JUMP_SLOT
-#define REL_RELATIVE    R_RISCV_RELATIVE
-#define REL_COPY        R_RISCV_COPY
-#define REL_DTPMOD      R_RISCV_TLS_DTPMOD64
-#define REL_DTPOFF      R_RISCV_TLS_DTPREL64
-#define REL_TPOFF       R_RISCV_TLS_TPREL64
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mv sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/riscv64/syscall_arch.h
@@ -1,78 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define __asm_syscall(...) \
-	__asm__ __volatile__ ("ecall\n\t" \
-	: "=r"(a0) : __VA_ARGS__ : "memory"); \
-	return a0; \
-
-static inline long __syscall0(long n)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0");
-	__asm_syscall("r"(a7))
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	__asm_syscall("r"(a7), "0"(a0))
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	register long a1 __asm__("a1") = b;
-	__asm_syscall("r"(a7), "0"(a0), "r"(a1))
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	register long a1 __asm__("a1") = b;
-	register long a2 __asm__("a2") = c;
-	__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	register long a1 __asm__("a1") = b;
-	register long a2 __asm__("a2") = c;
-	register long a3 __asm__("a3") = d;
-	__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	register long a1 __asm__("a1") = b;
-	register long a2 __asm__("a2") = c;
-	register long a3 __asm__("a3") = d;
-	register long a4 __asm__("a4") = e;
-	__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long a7 __asm__("a7") = n;
-	register long a0 __asm__("a0") = a;
-	register long a1 __asm__("a1") = b;
-	register long a2 __asm__("a2") = c;
-	register long a3 __asm__("a3") = d;
-	register long a4 __asm__("a4") = e;
-	register long a5 __asm__("a5") = f;
-	__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5))
-}
-
-#define VDSO_USEFUL
-/* We don't have a clock_gettime function.
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6" */
-
-#define IPC_64 0
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/alltypes.h.in
@@ -1,19 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#define __BYTE_ORDER 4321
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 1
-TYPEDEF double float_t;
-#else
-TYPEDEF float float_t;
-#endif
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/fcntl.h
@@ -1,43 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY 0200000
-#define O_NOFOLLOW  0400000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT     040000
-#define O_LARGEFILE 0100000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_GETLK  5
-#define F_SETLK  6
-#define F_SETLKW 7
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
-
-#define POSIX_FADV_DONTNEED   6
-#define POSIX_FADV_NOREUSE    7
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/fenv.h
@@ -1,17 +0,0 @@
-#define FE_TONEAREST	0
-#define FE_TOWARDZERO	1
-#define FE_UPWARD	2
-#define FE_DOWNWARD	3
-
-#define FE_INEXACT	0x00080000
-#define FE_UNDERFLOW	0x00100000
-#define FE_OVERFLOW	0x00200000
-#define FE_DIVBYZERO	0x00400000
-#define FE_INVALID	0x00800000
-
-#define FE_ALL_EXCEPT	0x00f80000
-
-typedef unsigned fexcept_t;
-typedef unsigned fenv_t;
-
-#define FE_DFL_ENV ((const fenv_t *)-1)
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/float.h
@@ -1,20 +0,0 @@
-#ifdef __FLT_EVAL_METHOD__
-#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-#else
-#define FLT_EVAL_METHOD 0
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/hwcap.h
@@ -1,15 +0,0 @@
-#define HWCAP_S390_ESAN3	1
-#define HWCAP_S390_ZARCH	2
-#define HWCAP_S390_STFLE	4
-#define HWCAP_S390_MSA		8
-#define HWCAP_S390_LDISP	16
-#define HWCAP_S390_EIMM		32
-#define HWCAP_S390_DFP		64
-#define HWCAP_S390_HPAGE	128
-#define HWCAP_S390_ETF3EH	256
-#define HWCAP_S390_HIGH_GPRS	512
-#define HWCAP_S390_TE		1024
-#define HWCAP_S390_VXRS		2048
-#define HWCAP_S390_VXRS_BCD	4096
-#define HWCAP_S390_VXRS_EXT	8192
-#define HWCAP_S390_GS		16384
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/ioctl_fix.h
@@ -1,2 +0,0 @@
-#undef FIOQSIZE
-#define FIOQSIZE 0x545e
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 4096
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/link.h
@@ -1,1 +0,0 @@
-typedef uint64_t Elf_Symndx;
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/ptrace.h
@@ -1,9 +0,0 @@
-#define PTRACE_SINGLEBLOCK		12
-#define PTRACE_PEEKUSR_AREA		0x5000
-#define PTRACE_POKEUSR_AREA		0x5001
-#define PTRACE_GET_LAST_BREAK		0x5006
-#define PTRACE_ENABLE_TE		0x5009
-#define PTRACE_DISABLE_TE		0x5010
-#define PTRACE_TE_ABORT_RAND		0x5011
-
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/reg.h
@@ -1,2 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[18];
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/signal.h
@@ -1,121 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 4096
-#define SIGSTKSZ    10240
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-typedef unsigned long greg_t, gregset_t[27];
-
-typedef struct {
-	unsigned long mask;
-	unsigned long addr;
-} __psw_t;
-
-typedef union {
-	double d;
-	float f;
-} fpreg_t;
-
-typedef struct {
-	unsigned fpc;
-	fpreg_t fprs[16];
-} fpregset_t;
-
-typedef struct
-{
-	__psw_t psw;
-	unsigned long gregs[16];
-	unsigned aregs[16];
-	fpregset_t fpregs;
-} mcontext_t;
-
-struct sigcontext {
-	unsigned long oldmask[1];
-	struct {
-		struct {
-			__psw_t psw;
-			unsigned long gprs[16];
-			unsigned acrs[16];
-		} regs;
-		struct {
-			unsigned fpc;
-			double fprs[16];
-		} fpregs;
-	} *sregs;
-};
-
-#else
-
-typedef struct {
-	unsigned long __regs1[18];
-	unsigned __regs2[18];
-	double __regs3[16];
-} mcontext_t;
-
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1U
-#define SA_NOCLDWAIT  2U
-#define SA_SIGINFO    4U
-#define SA_ONSTACK    0x08000000U
-#define SA_RESTART    0x10000000U
-#define SA_NODEFER    0x40000000U
-#define SA_RESETHAND  0x80000000U
-#define SA_RESTORER   0x04000000U
-
-#endif
-
-#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   SIGIO
-#define SIGPWR    30
-#define SIGSYS    31
-#define SIGUNUSED SIGSYS
-
-#define _NSIG 65
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/stat.h
@@ -1,16 +0,0 @@
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	off_t st_size;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	unsigned long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/statfs.h
@@ -1,7 +0,0 @@
-struct statfs {
-	unsigned f_type, f_bsize;
-	fsblkcnt_t f_blocks, f_bfree, f_bavail;
-	fsfilcnt_t f_files, f_ffree;
-	fsid_t f_fsid;
-	unsigned f_namelen, f_frsize, f_flags, f_spare[4];
-};
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/syscall.h.in
@@ -1,359 +0,0 @@
-#define __NR_exit                         1
-#define __NR_fork                         2
-#define __NR_read                         3
-#define __NR_write                        4
-#define __NR_open                         5
-#define __NR_close                        6
-#define __NR_restart_syscall              7
-#define __NR_creat                        8
-#define __NR_link                         9
-#define __NR_unlink                      10
-#define __NR_execve                      11
-#define __NR_chdir                       12
-#define __NR_mknod                       14
-#define __NR_chmod                       15
-#define __NR_lseek                       19
-#define __NR_getpid                      20
-#define __NR_mount                       21
-#define __NR_umount                      22
-#define __NR_ptrace                      26
-#define __NR_alarm                       27
-#define __NR_pause                       29
-#define __NR_utime                       30
-#define __NR_access                      33
-#define __NR_nice                        34
-#define __NR_sync                        36
-#define __NR_kill                        37
-#define __NR_rename                      38
-#define __NR_mkdir                       39
-#define __NR_rmdir                       40
-#define __NR_dup                         41
-#define __NR_pipe                        42
-#define __NR_times                       43
-#define __NR_brk                         45
-#define __NR_signal                      48
-#define __NR_acct                        51
-#define __NR_umount2                     52
-#define __NR_ioctl                       54
-#define __NR_fcntl                       55
-#define __NR_setpgid                     57
-#define __NR_umask                       60
-#define __NR_chroot                      61
-#define __NR_ustat                       62
-#define __NR_dup2                        63
-#define __NR_getppid                     64
-#define __NR_getpgrp                     65
-#define __NR_setsid                      66
-#define __NR_sigaction                   67
-#define __NR_sigsuspend                  72
-#define __NR_sigpending                  73
-#define __NR_sethostname                 74
-#define __NR_setrlimit                   75
-#define __NR_getrusage                   77
-#define __NR_gettimeofday                78
-#define __NR_settimeofday                79
-#define __NR_symlink                     83
-#define __NR_readlink                    85
-#define __NR_uselib                      86
-#define __NR_swapon                      87
-#define __NR_reboot                      88
-#define __NR_readdir                     89
-#define __NR_mmap                        90
-#define __NR_munmap                      91
-#define __NR_truncate                    92
-#define __NR_ftruncate                   93
-#define __NR_fchmod                      94
-#define __NR_getpriority                 96
-#define __NR_setpriority                 97
-#define __NR_statfs                      99
-#define __NR_fstatfs                    100
-#define __NR_socketcall                 102
-#define __NR_syslog                     103
-#define __NR_setitimer                  104
-#define __NR_getitimer                  105
-#define __NR_stat                       106
-#define __NR_lstat                      107
-#define __NR_fstat                      108
-#define __NR_lookup_dcookie             110
-#define __NR_vhangup                    111
-#define __NR_idle                       112
-#define __NR_wait4                      114
-#define __NR_swapoff                    115
-#define __NR_sysinfo                    116
-#define __NR_ipc                        117
-#define __NR_fsync                      118
-#define __NR_sigreturn                  119
-#define __NR_clone                      120
-#define __NR_setdomainname              121
-#define __NR_uname                      122
-#define __NR_adjtimex                   124
-#define __NR_mprotect                   125
-#define __NR_sigprocmask                126
-#define __NR_create_module              127
-#define __NR_init_module                128
-#define __NR_delete_module              129
-#define __NR_get_kernel_syms            130
-#define __NR_quotactl                   131
-#define __NR_getpgid                    132
-#define __NR_fchdir                     133
-#define __NR_bdflush                    134
-#define __NR_sysfs                      135
-#define __NR_personality                136
-#define __NR_afs_syscall                137
-#define __NR_getdents                   141
-#define __NR_select                     142
-#define __NR_flock                      143
-#define __NR_msync                      144
-#define __NR_readv                      145
-#define __NR_writev                     146
-#define __NR_getsid                     147
-#define __NR_fdatasync                  148
-#define __NR__sysctl                    149
-#define __NR_mlock                      150
-#define __NR_munlock                    151
-#define __NR_mlockall                   152
-#define __NR_munlockall                 153
-#define __NR_sched_setparam             154
-#define __NR_sched_getparam             155
-#define __NR_sched_setscheduler         156
-#define __NR_sched_getscheduler         157
-#define __NR_sched_yield                158
-#define __NR_sched_get_priority_max     159
-#define __NR_sched_get_priority_min     160
-#define __NR_sched_rr_get_interval      161
-#define __NR_nanosleep                  162
-#define __NR_mremap                     163
-#define __NR_query_module               167
-#define __NR_poll                       168
-#define __NR_nfsservctl                 169
-#define __NR_prctl                      172
-#define __NR_rt_sigreturn               173
-#define __NR_rt_sigaction               174
-#define __NR_rt_sigprocmask             175
-#define __NR_rt_sigpending              176
-#define __NR_rt_sigtimedwait            177
-#define __NR_rt_sigqueueinfo            178
-#define __NR_rt_sigsuspend              179
-#define __NR_pread64                    180
-#define __NR_pwrite64                   181
-#define __NR_getcwd                     183
-#define __NR_capget                     184
-#define __NR_capset                     185
-#define __NR_sigaltstack                186
-#define __NR_sendfile                   187
-#define __NR_getpmsg                    188
-#define __NR_putpmsg                    189
-#define __NR_vfork                      190
-#define __NR_getrlimit                  191
-#define __NR_lchown                     198
-#define __NR_getuid                     199
-#define __NR_getgid                     200
-#define __NR_geteuid                    201
-#define __NR_getegid                    202
-#define __NR_setreuid                   203
-#define __NR_setregid                   204
-#define __NR_getgroups                  205
-#define __NR_setgroups                  206
-#define __NR_fchown                     207
-#define __NR_setresuid                  208
-#define __NR_getresuid                  209
-#define __NR_setresgid                  210
-#define __NR_getresgid                  211
-#define __NR_chown                      212
-#define __NR_setuid                     213
-#define __NR_setgid                     214
-#define __NR_setfsuid                   215
-#define __NR_setfsgid                   216
-#define __NR_pivot_root                 217
-#define __NR_mincore                    218
-#define __NR_madvise                    219
-#define __NR_getdents64                 220
-#define __NR_readahead                  222
-#define __NR_setxattr                   224
-#define __NR_lsetxattr                  225
-#define __NR_fsetxattr                  226
-#define __NR_getxattr                   227
-#define __NR_lgetxattr                  228
-#define __NR_fgetxattr                  229
-#define __NR_listxattr                  230
-#define __NR_llistxattr                 231
-#define __NR_flistxattr                 232
-#define __NR_removexattr                233
-#define __NR_lremovexattr               234
-#define __NR_fremovexattr               235
-#define __NR_gettid                     236
-#define __NR_tkill                      237
-#define __NR_futex                      238
-#define __NR_sched_setaffinity          239
-#define __NR_sched_getaffinity          240
-#define __NR_tgkill                     241
-#define __NR_io_setup                   243
-#define __NR_io_destroy                 244
-#define __NR_io_getevents               245
-#define __NR_io_submit                  246
-#define __NR_io_cancel                  247
-#define __NR_exit_group                 248
-#define __NR_epoll_create               249
-#define __NR_epoll_ctl                  250
-#define __NR_epoll_wait                 251
-#define __NR_set_tid_address            252
-#define __NR_fadvise64                  253
-#define __NR_timer_create               254
-#define __NR_timer_settime              255
-#define __NR_timer_gettime              256
-#define __NR_timer_getoverrun           257
-#define __NR_timer_delete               258
-#define __NR_clock_settime              259
-#define __NR_clock_gettime              260
-#define __NR_clock_getres               261
-#define __NR_clock_nanosleep            262
-#define __NR_statfs64                   265
-#define __NR_fstatfs64                  266
-#define __NR_remap_file_pages           267
-#define __NR_mbind                      268
-#define __NR_get_mempolicy              269
-#define __NR_set_mempolicy              270
-#define __NR_mq_open                    271
-#define __NR_mq_unlink                  272
-#define __NR_mq_timedsend               273
-#define __NR_mq_timedreceive            274
-#define __NR_mq_notify                  275
-#define __NR_mq_getsetattr              276
-#define __NR_kexec_load                 277
-#define __NR_add_key                    278
-#define __NR_request_key                279
-#define __NR_keyctl                     280
-#define __NR_waitid                     281
-#define __NR_ioprio_set                 282
-#define __NR_ioprio_get                 283
-#define __NR_inotify_init               284
-#define __NR_inotify_add_watch          285
-#define __NR_inotify_rm_watch           286
-#define __NR_migrate_pages              287
-#define __NR_openat                     288
-#define __NR_mkdirat                    289
-#define __NR_mknodat                    290
-#define __NR_fchownat                   291
-#define __NR_futimesat                  292
-#define __NR_newfstatat                 293
-#define __NR_unlinkat                   294
-#define __NR_renameat                   295
-#define __NR_linkat                     296
-#define __NR_symlinkat                  297
-#define __NR_readlinkat                 298
-#define __NR_fchmodat                   299
-#define __NR_faccessat                  300
-#define __NR_pselect6                   301
-#define __NR_ppoll                      302
-#define __NR_unshare                    303
-#define __NR_set_robust_list            304
-#define __NR_get_robust_list            305
-#define __NR_splice                     306
-#define __NR_sync_file_range            307
-#define __NR_tee                        308
-#define __NR_vmsplice                   309
-#define __NR_move_pages                 310
-#define __NR_getcpu                     311
-#define __NR_epoll_pwait                312
-#define __NR_utimes                     313
-#define __NR_fallocate                  314
-#define __NR_utimensat                  315
-#define __NR_signalfd                   316
-#define __NR_timerfd                    317
-#define __NR_eventfd                    318
-#define __NR_timerfd_create             319
-#define __NR_timerfd_settime            320
-#define __NR_timerfd_gettime            321
-#define __NR_signalfd4                  322
-#define __NR_eventfd2                   323
-#define __NR_inotify_init1              324
-#define __NR_pipe2                      325
-#define __NR_dup3                       326
-#define __NR_epoll_create1              327
-#define __NR_preadv                     328
-#define __NR_pwritev                    329
-#define __NR_rt_tgsigqueueinfo          330
-#define __NR_perf_event_open            331
-#define __NR_fanotify_init              332
-#define __NR_fanotify_mark              333
-#define __NR_prlimit64                  334
-#define __NR_name_to_handle_at          335
-#define __NR_open_by_handle_at          336
-#define __NR_clock_adjtime              337
-#define __NR_syncfs                     338
-#define __NR_setns                      339
-#define __NR_process_vm_readv           340
-#define __NR_process_vm_writev          341
-#define __NR_s390_runtime_instr         342
-#define __NR_kcmp                       343
-#define __NR_finit_module               344
-#define __NR_sched_setattr              345
-#define __NR_sched_getattr              346
-#define __NR_renameat2                  347
-#define __NR_seccomp                    348
-#define __NR_getrandom                  349
-#define __NR_memfd_create               350
-#define __NR_bpf                        351
-#define __NR_s390_pci_mmio_write        352
-#define __NR_s390_pci_mmio_read         353
-#define __NR_execveat                   354
-#define __NR_userfaultfd                355
-#define __NR_membarrier                 356
-#define __NR_recvmmsg                   357
-#define __NR_sendmmsg                   358
-#define __NR_socket                     359
-#define __NR_socketpair                 360
-#define __NR_bind                       361
-#define __NR_connect                    362
-#define __NR_listen                     363
-#define __NR_accept4                    364
-#define __NR_getsockopt                 365
-#define __NR_setsockopt                 366
-#define __NR_getsockname                367
-#define __NR_getpeername                368
-#define __NR_sendto                     369
-#define __NR_sendmsg                    370
-#define __NR_recvfrom                   371
-#define __NR_recvmsg                    372
-#define __NR_shutdown                   373
-#define __NR_mlock2                     374
-#define __NR_copy_file_range            375
-#define __NR_preadv2                    376
-#define __NR_pwritev2                   377
-#define __NR_s390_guarded_storage       378
-#define __NR_statx                      379
-#define __NR_s390_sthyi                 380
-#define __NR_kexec_file_load            381
-#define __NR_io_pgetevents              382
-#define __NR_rseq                       383
-#define __NR_pkey_mprotect              384
-#define __NR_pkey_alloc                 385
-#define __NR_pkey_free                  386
-#define __NR_semtimedop                 392
-#define __NR_semget                     393
-#define __NR_semctl                     394
-#define __NR_shmget                     395
-#define __NR_shmctl                     396
-#define __NR_shmat                      397
-#define __NR_shmdt                      398
-#define __NR_msgget                     399
-#define __NR_msgsnd                     400
-#define __NR_msgrcv                     401
-#define __NR_msgctl                     402
-#define __NR_pidfd_send_signal          424
-#define __NR_io_uring_setup             425
-#define __NR_io_uring_enter             426
-#define __NR_io_uring_register          427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/s390x/bits/user.h
@@ -1,62 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-
-typedef union {
-	double d;
-	float f;
-} elf_fpreg_t;
-
-typedef struct {
-	unsigned fpc;
-	elf_fpreg_t fprs[16];
-} elf_fpregset_t;
-
-#define ELF_NGREG 27
-typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct _user_psw_struct {
-	unsigned long mask, addr;
-};
-
-struct _user_fpregs_struct {
-	unsigned fpc;
-	double fprs[16];
-};
-
-struct _user_per_struct {
-	unsigned long control_regs[3];
-	unsigned single_step       : 1;
-	unsigned instruction_fetch : 1;
-	unsigned                   : 30;
-	unsigned long starting_addr, ending_addr;
-	unsigned short perc_atmid;
-	unsigned long address;
-	unsigned char access_id;
-};
-
-struct _user_regs_struct {
-	struct _user_psw_struct psw;
-	unsigned long gprs[16];
-	unsigned acrs[16];
-	unsigned long orig_gpr2;
-	struct _user_fpregs_struct fp_regs;
-	struct _user_per_struct per_info;
-	unsigned long ieee_instruction_pointer;
-};
-
-struct user {
-	struct _user_regs_struct regs;
-	unsigned long u_tsize, u_dsize, u_ssize;
-	unsigned long start_code, start_stack;
-	long signal;
-	struct _user_regs_struct *u_ar0;
-	unsigned long magic;
-	char u_comm[32];
-};
-
-#define PAGE_MASK            (~(PAGESIZE-1))
-#define NBPG                 PAGESIZE
-#define UPAGES               1
-#define HOST_TEXT_START_ADDR (u.start_code)
-#define HOST_STACK_END_ADDR  (u.start_stack + u.u_ssize * NBPG)
-
lib/libc/wasi/libc-top-half/musl/arch/s390x/atomic_arch.h
@@ -1,30 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__ __volatile__ (
-		"cs %0, %2, %1"
-		: "+d"(t), "+Q"(*p) : "d"(s) : "memory", "cc");
-	return t;
-}
-
-#define a_cas_p a_cas_p
-static inline void *a_cas_p(volatile void *p, void *t, void *s)
-{
-	__asm__ __volatile__ (
-		"csg %0, %2, %1"
-		: "+d"(t), "+Q"(*(void *volatile *)p) : "d"(s)
-		: "memory", "cc");
-	return t;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("bcr 15,0" : : : "memory");
-}
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__ (".insn e,0");
-}
lib/libc/wasi/libc-top-half/musl/arch/s390x/crt_arch.h
@@ -1,17 +0,0 @@
-__asm__(
-".text\n"
-".global " START "\n"
-".type   " START ", %function\n"
-START ":\n"
-"	lgr  %r2, %r15\n"
-"	larl %r3, 1f\n"
-"	agf  %r3, 0(%r3)\n"
-"	aghi %r15, -160\n"
-"	lghi %r0, 0\n"
-"	stg  %r0, 0(%r15)\n"
-"	jg " START "_c\n"
-"	.align 8\n"
-".weak   _DYNAMIC\n"
-".hidden _DYNAMIC\n"
-"1:	.long _DYNAMIC-.\n"
-);
lib/libc/wasi/libc-top-half/musl/arch/s390x/kstat.h
@@ -1,19 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	off_t st_size;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	unsigned long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/s390x/pthread_arch.h
@@ -1,12 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ (
-		"ear  %0, %%a0\n"
-		"sllg %0, %0, 32\n"
-		"ear  %0, %%a1\n"
-		: "=r"(tp));
-	return tp;
-}
-
-#define MC_PC psw.addr
lib/libc/wasi/libc-top-half/musl/arch/s390x/reloc.h
@@ -1,13 +0,0 @@
-#define LDSO_ARCH "s390x"
-
-#define REL_SYMBOLIC    R_390_64
-#define REL_GOT         R_390_GLOB_DAT
-#define REL_PLT         R_390_JMP_SLOT
-#define REL_RELATIVE    R_390_RELATIVE
-#define REL_COPY        R_390_COPY
-#define REL_DTPMOD      R_390_TLS_DTPMOD
-#define REL_DTPOFF      R_390_TLS_DTPOFF
-#define REL_TPOFF       R_390_TLS_TPOFF
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"lgr %%r15,%1; br %0" : : "r"(pc), "r"(sp) : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/s390x/syscall_arch.h
@@ -1,74 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define __asm_syscall(ret, ...) do { \
-	__asm__ __volatile__ ("svc 0\n" \
-	: ret : __VA_ARGS__ : "memory"); \
-	return r2; \
-	} while (0)
-
-static inline long __syscall0(long n)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2");
-	__asm_syscall("=r"(r2), "r"(r1));
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	__asm_syscall("+r"(r2), "r"(r1));
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	register long r3 __asm__("r3") = b;
-	__asm_syscall("+r"(r2), "r"(r1), "r"(r3));
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	register long r3 __asm__("r3") = b;
-	register long r4 __asm__("r4") = c;
-	__asm_syscall("+r"(r2), "r"(r1), "r"(r3), "r"(r4));
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	register long r3 __asm__("r3") = b;
-	register long r4 __asm__("r4") = c;
-	register long r5 __asm__("r5") = d;
-	__asm_syscall("+r"(r2), "r"(r1), "r"(r3), "r"(r4), "r"(r5));
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	register long r3 __asm__("r3") = b;
-	register long r4 __asm__("r4") = c;
-	register long r5 __asm__("r5") = d;
-	register long r6 __asm__("r6") = e;
-	__asm_syscall("+r"(r2), "r"(r1), "r"(r3), "r"(r4), "r"(r5), "r"(r6));
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	if (n == SYS_mmap) return __syscall1(n, (long)(long[]){a,b,c,d,e,f});
-
-	register long r1 __asm__("r1") = n;
-	register long r2 __asm__("r2") = a;
-	register long r3 __asm__("r3") = b;
-	register long r4 __asm__("r4") = c;
-	register long r5 __asm__("r5") = d;
-	register long r6 __asm__("r6") = e;
-	register long r7 __asm__("r7") = f;
-	__asm_syscall("+r"(r2), "r"(r1), "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7));
-}
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/alltypes.h.in
@@ -1,25 +0,0 @@
-#define _REDIR_TIME64 1
-#define _Addr int
-#define _Int64 long long
-#define _Reg int
-
-#if __BIG_ENDIAN__
-#define __BYTE_ORDER 4321
-#else
-#define __BYTE_ORDER 1234
-#endif
-
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-#ifdef __WCHAR_TYPE__
-TYPEDEF __WCHAR_TYPE__ wchar_t;
-#else
-TYPEDEF long wchar_t;
-#endif
-#endif
-
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/fenv.h
@@ -1,26 +0,0 @@
-#ifndef __SH_FPU_ANY__
-
-#define FE_ALL_EXCEPT 0
-#define FE_TONEAREST  0
-
-#else
-
-#define FE_TONEAREST  0
-#define FE_TOWARDZERO 1
-
-#define FE_INEXACT    0x04
-#define FE_UNDERFLOW  0x08
-#define FE_OVERFLOW   0x10
-#define FE_DIVBYZERO  0x20
-#define FE_INVALID    0x40
-#define FE_ALL_EXCEPT 0x7c
-
-#endif
-
-typedef unsigned long fexcept_t;
-
-typedef struct {
-	unsigned long __cw;
-} fenv_t;
-
-#define FE_DFL_ENV    ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/float.h
@@ -1,16 +0,0 @@
-#define FLT_EVAL_METHOD 0
-
-#define LDBL_TRUE_MIN 4.94065645841246544177e-324L
-#define LDBL_MIN 2.22507385850720138309e-308L
-#define LDBL_MAX 1.79769313486231570815e+308L
-#define LDBL_EPSILON 2.22044604925031308085e-16L
-
-#define LDBL_MANT_DIG 53
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MAX_EXP 1024
-
-#define LDBL_DIG 15
-#define LDBL_MIN_10_EXP (-307)
-#define LDBL_MAX_10_EXP 308
-
-#define DECIMAL_DIG 17
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/hwcap.h
@@ -1,11 +0,0 @@
-#define CPU_HAS_FPU		0x0001
-#define CPU_HAS_P2_FLUSH_BUG	0x0002
-#define CPU_HAS_MMU_PAGE_ASSOC	0x0004
-#define CPU_HAS_DSP		0x0008
-#define CPU_HAS_PERF_COUNTER	0x0010
-#define CPU_HAS_PTEA		0x0020
-#define CPU_HAS_LLSC		0x0040
-#define CPU_HAS_L2_CACHE	0x0080
-#define CPU_HAS_OP32		0x0100
-#define CPU_HAS_PTEAEX		0x0200
-#define CPU_HAS_CAS_L		0x0400
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/ioctl.h
@@ -1,112 +0,0 @@
-#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) )
-#define _IOC_NONE  0U
-#define _IOC_WRITE 1U
-#define _IOC_READ  2U
-
-#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
-#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
-#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
-#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
-
-#define FIOCLEX             _IO('f',  1)
-#define FIONCLEX            _IO('f',  2)
-#define FIOASYNC            _IOW('f', 125, int)
-#define FIONBIO             _IOW('f', 126, int)
-#define FIONREAD            _IOR('f', 127, int)
-#define TIOCINQ             FIONREAD
-#define FIOQSIZE            _IOR('f', 128, char[8])
-
-#define TCGETA              _IOR('t', 23, char[18])
-#define TCSETA              _IOW('t', 24, char[18])
-#define TCSETAW             _IOW('t', 25, char[18])
-#define TCSETAF             _IOW('t', 28, char[18])
-
-#define TCSBRK              _IO('t', 29)
-#define TCXONC              _IO('t', 30)
-#define TCFLSH              _IO('t', 31)
-
-#define TIOCSWINSZ          _IOW('t', 103, char[8])
-#define TIOCGWINSZ          _IOR('t', 104, char[8])
-#define TIOCSTART           _IO('t',  110)
-#define TIOCSTOP            _IO('t',  111)
-#define TIOCOUTQ            _IOR('t', 115, int)
-
-#define TIOCSPGRP           _IOW('t', 118, int)
-#define TIOCGPGRP           _IOR('t', 119, int)
-
-#define TIOCEXCL            _IO('T', 12)
-#define TIOCNXCL            _IO('T', 13)
-#define TIOCSCTTY           _IO('T', 14)
-
-#define TIOCSTI             _IOW('T', 18, char)
-#define TIOCMGET            _IOR('T', 21, unsigned int)
-#define TIOCMBIS            _IOW('T', 22, unsigned int)
-#define TIOCMBIC            _IOW('T', 23, unsigned int)
-#define TIOCMSET            _IOW('T', 24, unsigned int)
-#define TIOCM_LE            0x001
-#define TIOCM_DTR           0x002
-#define TIOCM_RTS           0x004
-#define TIOCM_ST            0x008
-#define TIOCM_SR            0x010
-#define TIOCM_CTS           0x020
-#define TIOCM_CAR           0x040
-#define TIOCM_RNG           0x080
-#define TIOCM_DSR           0x100
-#define TIOCM_CD            TIOCM_CAR
-#define TIOCM_RI            TIOCM_RNG
-#define TIOCM_OUT1          0x2000
-#define TIOCM_OUT2          0x4000
-#define TIOCM_LOOP          0x8000
-
-#define TIOCGSOFTCAR        _IOR('T', 25, unsigned int)
-#define TIOCSSOFTCAR        _IOW('T', 26, unsigned int)
-#define TIOCLINUX           _IOW('T', 28, char)
-#define TIOCCONS            _IO('T',  29)
-#define TIOCGSERIAL         _IOR('T', 30, char[60])
-#define TIOCSSERIAL         _IOW('T', 31, char[60])
-#define TIOCPKT             _IOW('T', 32, int)
-
-#define TIOCNOTTY           _IO('T',  34)
-#define TIOCSETD            _IOW('T', 35, int)
-#define TIOCGETD            _IOR('T', 36, int)
-#define TCSBRKP             _IOW('T', 37, int)
-#define TIOCSBRK            _IO('T',  39)
-#define TIOCCBRK            _IO('T',  40)
-#define TIOCGSID            _IOR('T', 41, int)
-#define TCGETS              _IO('T', 1)
-#define TCSETS              _IO('T', 2)
-#define TCSETSW             _IO('T', 3)
-#define TCSETSF             _IO('T', 4)
-#define TIOCGRS485          _IOR('T', 46, char[32])
-#define TIOCSRS485          _IOWR('T', 47, char[32])
-#define TIOCGPTN            _IOR('T', 48, unsigned int)
-#define TIOCSPTLCK          _IOW('T', 49, int)
-#define TIOCGDEV            _IOR('T', 50, unsigned int)
-#define TIOCSIG             _IOW('T', 54, int)
-#define TIOCVHANGUP         _IO('T',  55)
-#define TIOCGPKT            _IOR('T', 56, int)
-#define TIOCGPTLCK          _IOR('T', 57, int)
-#define TIOCGEXCL           _IOR('T', 64, int)
-#define TIOCGPTPEER         _IO('T', 0x41)
-
-#define TIOCSERCONFIG       _IO('T',  83)
-#define TIOCSERGWILD        _IOR('T', 84, int)
-#define TIOCSERSWILD        _IOW('T', 85, int)
-#define TIOCGLCKTRMIOS      _IO('T',  86)
-#define TIOCSLCKTRMIOS      _IO('T',  87)
-#define TIOCSERGSTRUCT      _IOR('T', 88, char[216])
-#define TIOCSERGETLSR       _IOR('T', 89, unsigned int)
-#define TIOCSERGETMULTI     _IOR('T', 90, char[168])
-#define TIOCSERSETMULTI     _IOW('T', 91, char[168])
-
-#define TIOCMIWAIT          _IO('T', 92)
-#define TIOCGICOUNT         _IO('T', 93)
-
-#define FIOGETOWN       _IOR('f', 123, int)
-#define FIOSETOWN       _IOW('f', 124, int)
-
-#define SIOCATMARK      _IOR('s', 7, int)
-#define SIOCSPGRP       _IOW('s', 8, int)
-#define SIOCGPGRP       _IOW('s', 9, int)
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/ipcstat.h
@@ -1,1 +0,0 @@
-#define IPC_STAT 0x102
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 4096
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/msg.h
@@ -1,18 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	unsigned long __msg_stime_lo;
-	unsigned long __msg_stime_hi;
-	unsigned long __msg_rtime_lo;
-	unsigned long __msg_rtime_hi;
-	unsigned long __msg_ctime_lo;
-	unsigned long __msg_ctime_hi;
-	unsigned long msg_cbytes;
-	msgqnum_t msg_qnum;
-	msglen_t msg_qbytes;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long __unused[2];
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/ptrace.h
@@ -1,5 +0,0 @@
-#define PTRACE_GETFDPIC		31
-#define PTRACE_GETFDPIC_EXEC	0
-#define PTRACE_GETFDPIC_INTERP	1
-#define PTRACE_GETDSPREGS	55
-#define PTRACE_SETDSPREGS	56
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/sem.h
@@ -1,18 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	unsigned long __sem_otime_lo;
-	unsigned long __sem_otime_hi;
-	unsigned long __sem_ctime_lo;
-	unsigned long __sem_ctime_hi;
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-#else
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	unsigned short sem_nsems;
-#endif
-	long __unused3;
-	long __unused4;
-	time_t sem_otime;
-	time_t sem_ctime;
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[15];
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/shm.h
@@ -1,31 +0,0 @@
-#define SHMLBA 16384
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	unsigned long __shm_atime_lo;
-	unsigned long __shm_atime_hi;
-	unsigned long __shm_dtime_lo;
-	unsigned long __shm_dtime_hi;
-	unsigned long __shm_ctime_lo;
-	unsigned long __shm_ctime_hi;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad1;
-	unsigned long __pad2;
-	unsigned long __pad3;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-};
-
-struct shminfo {
-	unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	unsigned long shm_tot, shm_rss, shm_swp;
-	unsigned long __swap_attempts, __swap_successes;
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/signal.h
@@ -1,96 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef int greg_t, gregset_t[16];
-typedef int freg_t, fpregset_t[16];
-typedef struct {
-	unsigned long oldmask;
-	unsigned long gregs[16];
-	unsigned long pc, pr, sr;
-	unsigned long gbr, mach, macl;
-	unsigned long fpregs[16];
-	unsigned long xfpregs[16];
-	unsigned int fpscr, fpul, ownedfp;
-} mcontext_t;
-struct sigcontext {
-	unsigned long oldmask;
-	unsigned long sc_regs[16];
-	unsigned long sc_pc, sc_pr, sc_sr;
-	unsigned long sc_gbr, sc_mach, sc_macl;
-	unsigned long sc_fpregs[16];
-	unsigned long sc_xfpregs[16];
-	unsigned int sc_fpscr, sc_fpul, sc_ownedfp;
-};
-#else
-typedef struct {
-	unsigned long __regs[58];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/stat.h
@@ -1,25 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	struct {
-		long tv_sec;
-		long tv_nsec;
-	} __st_atim32, __st_mtim32, __st_ctim32;
-	ino_t st_ino;
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/syscall.h.in
@@ -1,406 +0,0 @@
-#define __NR_restart_syscall        0
-#define __NR_exit                   1
-#define __NR_fork                   2
-#define __NR_read                   3
-#define __NR_write                  4
-#define __NR_open                   5
-#define __NR_close                  6
-#define __NR_waitpid                7
-#define __NR_creat                  8
-#define __NR_link                   9
-#define __NR_unlink                 10
-#define __NR_execve                 11
-#define __NR_chdir                  12
-#define __NR_time                   13
-#define __NR_mknod                  14
-#define __NR_chmod                  15
-#define __NR_lchown                 16
-#define __NR_oldstat                18
-#define __NR_lseek                  19
-#define __NR_getpid                 20
-#define __NR_mount                  21
-#define __NR_umount                 22
-#define __NR_setuid                 23
-#define __NR_getuid                 24
-#define __NR_stime                  25
-#define __NR_ptrace                 26
-#define __NR_alarm                  27
-#define __NR_oldfstat               28
-#define __NR_pause                  29
-#define __NR_utime                  30
-#define __NR_access                 33
-#define __NR_nice                   34
-#define __NR_sync                   36
-#define __NR_kill                   37
-#define __NR_rename                 38
-#define __NR_mkdir                  39
-#define __NR_rmdir                  40
-#define __NR_dup                    41
-#define __NR_pipe                   42
-#define __NR_times                  43
-#define __NR_brk                    45
-#define __NR_setgid                 46
-#define __NR_getgid                 47
-#define __NR_signal                 48
-#define __NR_geteuid                49
-#define __NR_getegid                50
-#define __NR_acct                   51
-#define __NR_umount2                52
-#define __NR_ioctl                  54
-#define __NR_fcntl                  55
-#define __NR_setpgid                57
-#define __NR_umask                  60
-#define __NR_chroot                 61
-#define __NR_ustat                  62
-#define __NR_dup2                   63
-#define __NR_getppid                64
-#define __NR_getpgrp                65
-#define __NR_setsid                 66
-#define __NR_sigaction              67
-#define __NR_sgetmask               68
-#define __NR_ssetmask               69
-#define __NR_setreuid               70
-#define __NR_setregid               71
-#define __NR_sigsuspend             72
-#define __NR_sigpending             73
-#define __NR_sethostname            74
-#define __NR_setrlimit              75
-#define __NR_getrlimit              76
-#define __NR_getrusage              77
-#define __NR_gettimeofday_time32           78
-#define __NR_settimeofday_time32           79
-#define __NR_getgroups              80
-#define __NR_setgroups              81
-#define __NR_symlink                83
-#define __NR_oldlstat               84
-#define __NR_readlink               85
-#define __NR_uselib                 86
-#define __NR_swapon                 87
-#define __NR_reboot                 88
-#define __NR_readdir                89
-#define __NR_mmap                   90
-#define __NR_munmap                 91
-#define __NR_truncate               92
-#define __NR_ftruncate              93
-#define __NR_fchmod                 94
-#define __NR_fchown                 95
-#define __NR_getpriority            96
-#define __NR_setpriority            97
-#define __NR_statfs                 99
-#define __NR_fstatfs                100
-#define __NR_socketcall             102
-#define __NR_syslog                 103
-#define __NR_setitimer              104
-#define __NR_getitimer              105
-#define __NR_stat                   106
-#define __NR_lstat                  107
-#define __NR_fstat                  108
-#define __NR_olduname               109
-#define __NR_vhangup                111
-#define __NR_wait4                  114
-#define __NR_swapoff                115
-#define __NR_sysinfo                116
-#define __NR_ipc                    117
-#define __NR_fsync                  118
-#define __NR_sigreturn              119
-#define __NR_clone                  120
-#define __NR_setdomainname          121
-#define __NR_uname                  122
-#define __NR_cacheflush             123
-#define __NR_adjtimex               124
-#define __NR_mprotect               125
-#define __NR_sigprocmask            126
-#define __NR_init_module            128
-#define __NR_delete_module          129
-#define __NR_quotactl               131
-#define __NR_getpgid                132
-#define __NR_fchdir                 133
-#define __NR_bdflush                134
-#define __NR_sysfs                  135
-#define __NR_personality            136
-#define __NR_setfsuid               138
-#define __NR_setfsgid               139
-#define __NR__llseek                140
-#define __NR_getdents               141
-#define __NR__newselect             142
-#define __NR_flock                  143
-#define __NR_msync                  144
-#define __NR_readv                  145
-#define __NR_writev                 146
-#define __NR_getsid                 147
-#define __NR_fdatasync              148
-#define __NR__sysctl                149
-#define __NR_mlock                  150
-#define __NR_munlock                151
-#define __NR_mlockall               152
-#define __NR_munlockall             153
-#define __NR_sched_setparam         154
-#define __NR_sched_getparam         155
-#define __NR_sched_setscheduler     156
-#define __NR_sched_getscheduler     157
-#define __NR_sched_yield            158
-#define __NR_sched_get_priority_max 159
-#define __NR_sched_get_priority_min 160
-#define __NR_sched_rr_get_interval  161
-#define __NR_nanosleep              162
-#define __NR_mremap                 163
-#define __NR_setresuid              164
-#define __NR_getresuid              165
-#define __NR_poll                   168
-#define __NR_nfsservctl             169
-#define __NR_setresgid              170
-#define __NR_getresgid              171
-#define __NR_prctl                  172
-#define __NR_rt_sigreturn           173
-#define __NR_rt_sigaction           174
-#define __NR_rt_sigprocmask         175
-#define __NR_rt_sigpending          176
-#define __NR_rt_sigtimedwait        177
-#define __NR_rt_sigqueueinfo        178
-#define __NR_rt_sigsuspend          179
-#define __NR_pread64                180
-#define __NR_pwrite64               181
-#define __NR_chown                  182
-#define __NR_getcwd                 183
-#define __NR_capget                 184
-#define __NR_capset                 185
-#define __NR_sigaltstack            186
-#define __NR_sendfile               187
-#define __NR_vfork                  190
-#define __NR_ugetrlimit             191
-#define __NR_mmap2                  192
-#define __NR_truncate64             193
-#define __NR_ftruncate64            194
-#define __NR_stat64                 195
-#define __NR_lstat64                196
-#define __NR_fstat64                197
-#define __NR_lchown32               198
-#define __NR_getuid32               199
-#define __NR_getgid32               200
-#define __NR_geteuid32              201
-#define __NR_getegid32              202
-#define __NR_setreuid32             203
-#define __NR_setregid32             204
-#define __NR_getgroups32            205
-#define __NR_setgroups32            206
-#define __NR_fchown32               207
-#define __NR_setresuid32            208
-#define __NR_getresuid32            209
-#define __NR_setresgid32            210
-#define __NR_getresgid32            211
-#define __NR_chown32                212
-#define __NR_setuid32               213
-#define __NR_setgid32               214
-#define __NR_setfsuid32             215
-#define __NR_setfsgid32             216
-#define __NR_pivot_root             217
-#define __NR_mincore                218
-#define __NR_madvise                219
-#define __NR_getdents64             220
-#define __NR_fcntl64                221
-#define __NR_gettid                 224
-#define __NR_readahead              225
-#define __NR_setxattr               226
-#define __NR_lsetxattr              227
-#define __NR_fsetxattr              228
-#define __NR_getxattr               229
-#define __NR_lgetxattr              230
-#define __NR_fgetxattr              231
-#define __NR_listxattr              232
-#define __NR_llistxattr             233
-#define __NR_flistxattr             234
-#define __NR_removexattr            235
-#define __NR_lremovexattr           236
-#define __NR_fremovexattr           237
-#define __NR_tkill                  238
-#define __NR_sendfile64             239
-#define __NR_futex                  240
-#define __NR_sched_setaffinity      241
-#define __NR_sched_getaffinity      242
-#define __NR_io_setup               245
-#define __NR_io_destroy             246
-#define __NR_io_getevents           247
-#define __NR_io_submit              248
-#define __NR_io_cancel              249
-#define __NR_fadvise64              250
-#define __NR_exit_group             252
-#define __NR_lookup_dcookie         253
-#define __NR_epoll_create           254
-#define __NR_epoll_ctl              255
-#define __NR_epoll_wait             256
-#define __NR_remap_file_pages       257
-#define __NR_set_tid_address        258
-#define __NR_timer_create           259
-#define __NR_timer_settime32          260
-#define __NR_timer_gettime32          261
-#define __NR_timer_getoverrun       262
-#define __NR_timer_delete           263
-#define __NR_clock_settime32          264
-#define __NR_clock_gettime32          265
-#define __NR_clock_getres_time32           266
-#define __NR_clock_nanosleep_time32        267
-#define __NR_statfs64               268
-#define __NR_fstatfs64              269
-#define __NR_tgkill                 270
-#define __NR_utimes                 271
-#define __NR_fadvise64_64           272
-#define __NR_mbind                  274
-#define __NR_get_mempolicy          275
-#define __NR_set_mempolicy          276
-#define __NR_mq_open                277
-#define __NR_mq_unlink              278
-#define __NR_mq_timedsend           279
-#define __NR_mq_timedreceive        280
-#define __NR_mq_notify              281
-#define __NR_mq_getsetattr          282
-#define __NR_kexec_load             283
-#define __NR_waitid                 284
-#define __NR_add_key                285
-#define __NR_request_key            286
-#define __NR_keyctl                 287
-#define __NR_ioprio_set             288
-#define __NR_ioprio_get             289
-#define __NR_inotify_init           290
-#define __NR_inotify_add_watch      291
-#define __NR_inotify_rm_watch       292
-#define __NR_migrate_pages          294
-#define __NR_openat                 295
-#define __NR_mkdirat                296
-#define __NR_mknodat                297
-#define __NR_fchownat               298
-#define __NR_futimesat              299
-#define __NR_fstatat64              300
-#define __NR_unlinkat               301
-#define __NR_renameat               302
-#define __NR_linkat                 303
-#define __NR_symlinkat              304
-#define __NR_readlinkat             305
-#define __NR_fchmodat               306
-#define __NR_faccessat              307
-#define __NR_pselect6               308
-#define __NR_ppoll                  309
-#define __NR_unshare                310
-#define __NR_set_robust_list        311
-#define __NR_get_robust_list        312
-#define __NR_splice                 313
-#define __NR_sync_file_range        314
-#define __NR_tee                    315
-#define __NR_vmsplice               316
-#define __NR_move_pages             317
-#define __NR_getcpu                 318
-#define __NR_epoll_pwait            319
-#define __NR_utimensat              320
-#define __NR_signalfd               321
-#define __NR_timerfd_create         322
-#define __NR_eventfd                323
-#define __NR_fallocate              324
-#define __NR_timerfd_settime32        325
-#define __NR_timerfd_gettime32        326
-#define __NR_signalfd4              327
-#define __NR_eventfd2               328
-#define __NR_epoll_create1          329
-#define __NR_dup3                   330
-#define __NR_pipe2                  331
-#define __NR_inotify_init1          332
-#define __NR_preadv                 333
-#define __NR_pwritev                334
-#define __NR_rt_tgsigqueueinfo      335
-#define __NR_perf_event_open        336
-#define __NR_fanotify_init          337
-#define __NR_fanotify_mark          338
-#define __NR_prlimit64              339
-#define __NR_socket                 340
-#define __NR_bind                   341
-#define __NR_connect                342
-#define __NR_listen                 343
-#define __NR_accept                 344
-#define __NR_getsockname            345
-#define __NR_getpeername            346
-#define __NR_socketpair             347
-#define __NR_send                   348
-#define __NR_sendto                 349
-#define __NR_recv                   350
-#define __NR_recvfrom               351
-#define __NR_shutdown               352
-#define __NR_setsockopt             353
-#define __NR_getsockopt             354
-#define __NR_sendmsg                355
-#define __NR_recvmsg                356
-#define __NR_recvmmsg               357
-#define __NR_accept4                358
-#define __NR_name_to_handle_at      359
-#define __NR_open_by_handle_at      360
-#define __NR_clock_adjtime          361
-#define __NR_syncfs                 362
-#define __NR_sendmmsg               363
-#define __NR_setns                  364
-#define __NR_process_vm_readv       365
-#define __NR_process_vm_writev      366
-#define __NR_kcmp                   367
-#define __NR_finit_module           368
-#define __NR_sched_getattr          369
-#define __NR_sched_setattr          370
-#define __NR_renameat2              371
-#define __NR_seccomp                372
-#define __NR_getrandom              373
-#define __NR_memfd_create           374
-#define __NR_bpf                    375
-#define __NR_execveat               376
-#define __NR_userfaultfd            377
-#define __NR_membarrier             378
-#define __NR_mlock2                 379
-#define __NR_copy_file_range        380
-#define __NR_preadv2                381
-#define __NR_pwritev2               382
-#define __NR_statx                  383
-#define __NR_pkey_mprotect          384
-#define __NR_pkey_alloc             385
-#define __NR_pkey_free              386
-#define __NR_rseq                   387
-#define __NR_semget                 393
-#define __NR_semctl                 394
-#define __NR_shmget                 395
-#define __NR_shmctl                 396
-#define __NR_shmat                  397
-#define __NR_shmdt                  398
-#define __NR_msgget                 399
-#define __NR_msgsnd                 400
-#define __NR_msgrcv                 401
-#define __NR_msgctl                 402
-#define __NR_clock_gettime64        403
-#define __NR_clock_settime64        404
-#define __NR_clock_adjtime64        405
-#define __NR_clock_getres_time64    406
-#define __NR_clock_nanosleep_time64 407
-#define __NR_timer_gettime64        408
-#define __NR_timer_settime64        409
-#define __NR_timerfd_gettime64      410
-#define __NR_timerfd_settime64      411
-#define __NR_utimensat_time64       412
-#define __NR_pselect6_time64        413
-#define __NR_ppoll_time64           414
-#define __NR_io_pgetevents_time64   416
-#define __NR_recvmmsg_time64        417
-#define __NR_mq_timedsend_time64    418
-#define __NR_mq_timedreceive_time64 419
-#define __NR_semtimedop_time64      420
-#define __NR_rt_sigtimedwait_time64 421
-#define __NR_futex_time64           422
-#define __NR_sched_rr_get_interval_time64 423
-#define __NR_pidfd_send_signal      424
-#define __NR_io_uring_setup         425
-#define __NR_io_uring_enter         426
-#define __NR_io_uring_register      427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/sh/bits/user.h
@@ -1,51 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-
-#define REG_REG0	 0
-#define REG_REG15	15
-#define REG_PC		16
-#define REG_PR		17
-#define REG_SR		18
-#define REG_GBR		19
-#define REG_MACH	20
-#define REG_MACL	21
-#define REG_SYSCALL	22
-#define REG_FPREG0	23
-#define REG_FPREG15	38
-#define REG_XFREG0	39
-#define REG_XFREG15	54
-#define REG_FPSCR	55
-#define REG_FPUL	56
-
-struct user_fpu_struct {
-	unsigned long fp_regs[16];
-	unsigned long xfp_regs[16];
-	unsigned long fpscr;
-	unsigned long fpul;
-};
-
-#define ELF_NGREG 23
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-typedef struct user_fpu_struct elf_fpregset_t;
-
-struct user {
-	struct {
-		unsigned long regs[16];
-		unsigned long pc, pr, sr, gbr, mach, macl;
-		long tra;
-	} regs;
-	struct user_fpu_struct fpu;
-	int u_fpvalid;
-	unsigned long u_tsize;
-	unsigned long u_dsize;
-	unsigned long u_ssize;
-	unsigned long start_code;
-	unsigned long start_data;
-	unsigned long start_stack;
-	long int signal;
-	unsigned long u_ar0;
-	struct user_fpu_struct *u_fpstate;
-	unsigned long magic;
-	char u_comm[32];
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/arch.mak
@@ -1,1 +0,0 @@
-COMPAT_SRC_DIRS = compat/time32
lib/libc/wasi/libc-top-half/musl/arch/sh/atomic_arch.h
@@ -1,48 +0,0 @@
-#include "libc.h"
-
-#if defined(__SH4A__)
-
-#define a_ll a_ll
-static inline int a_ll(volatile int *p)
-{
-	int v;
-	__asm__ __volatile__ ("movli.l @%1, %0" : "=z"(v) : "r"(p), "m"(*p));
-	return v;
-}
-
-#define a_sc a_sc
-static inline int a_sc(volatile int *p, int v)
-{
-	int r;
-	__asm__ __volatile__ (
-		"movco.l %2, @%3 ; movt %0"
-		: "=r"(r), "=m"(*p) : "z"(v), "r"(p) : "memory", "cc");
-	return r;
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__ ("synco" ::: "memory");
-}
-
-#define a_pre_llsc a_barrier
-#define a_post_llsc a_barrier
-
-#else
-
-#define a_cas a_cas
-extern hidden const void *__sh_cas_ptr;
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	register int r1 __asm__("r1");
-	register int r2 __asm__("r2") = t;
-	register int r3 __asm__("r3") = s;
-	__asm__ __volatile__ (
-		"jsr @%4 ; nop"
-		: "=r"(r1), "+r"(r3) : "z"(p), "r"(r2), "r"(__sh_cas_ptr)
-		: "memory", "pr", "cc");
-	return r3;
-}
-
-#endif
lib/libc/wasi/libc-top-half/musl/arch/sh/crt_arch.h
@@ -1,78 +0,0 @@
-#ifdef __SH_FDPIC__
-
-__asm__(
-".text \n"
-".global " START " \n"
-START ": \n"
-"	tst r8, r8 \n"
-"	bf 1f \n"
-"	mov #68, r3 \n"
-"	add r3, r3 \n"
-"	mov #8, r4 \n"
-"	swap.w r4, r4 \n"
-"	trapa #31 \n"
-"	nop \n"
-"	nop \n"
-"	nop \n"
-"	nop \n"
-"1:	nop \n"
-#ifndef SHARED
-"	mov r8, r4 \n"
-"	mova 1f, r0 \n"
-"	mov.l 1f, r5 \n"
-"	mov.l 1f+4, r6 \n"
-"	add r0, r5 \n"
-"	mov.l 4f, r1 \n"
-"5:	bsrf r1 \n"
-"	 add r0, r6 \n"
-"	mov r0, r12 \n"
-#endif
-"	mov r10, r5 \n"
-"	mov r15, r4 \n"
-"	mov.l r9, @-r15 \n"
-"	mov.l r8, @-r15 \n"
-"	mov #-16, r0 \n"
-"	mov.l 2f, r1 \n"
-"3:	bsrf r1 \n"
-"	 and r0, r15 \n"
-".align 2 \n"
-"1:	.long __ROFIXUP_LIST__@PCREL \n"
-"	.long __ROFIXUP_END__@PCREL + 4 \n"
-"2:	.long " START "_c@PCREL - (3b+4-.) \n"
-#ifndef SHARED
-"4:	.long __fdpic_fixup@PCREL - (5b+4-.) \n"
-#endif
-);
-
-#ifndef SHARED
-#include "fdpic_crt.h"
-#endif
-
-#else
-
-__asm__(
-".text \n"
-".global " START " \n"
-START ": \n"
-"	mova 1f, r0 \n"
-"	mov.l 1f, r5 \n"
-"	add r0, r5 \n"
-"	mov r15, r4 \n"
-"	mov #-16, r0 \n"
-"	mov.l 2f, r1 \n"
-"3:	bsrf r1 \n"
-"	 and r0, r15 \n"
-".align 2 \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"1:	.long _DYNAMIC-. \n"
-"2:	.long " START "_c@PCREL - (3b+4-.) \n"
-);
-
-#endif
-
-/* used by gcc for switching the FPU between single and double precision */
-#ifdef SHARED
-__attribute__((__visibility__("hidden")))
-#endif
-const unsigned long __fpscr_values[2] = { 0, 0x80000 };
lib/libc/wasi/libc-top-half/musl/arch/sh/ksigaction.h
@@ -1,10 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	void (*handler)(int);
-	unsigned long flags;
-	void *restorer;
-	unsigned mask[2];
-};
-
-extern hidden unsigned char __restore[], __restore_rt[];
lib/libc/wasi/libc-top-half/musl/arch/sh/kstat.h
@@ -1,21 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	int __st_dev_padding;
-	long __st_ino_truncated;
-	mode_t st_mode;
-	nlink_t st_nlink;
-	uid_t st_uid;
-	gid_t st_gid;
-	dev_t st_rdev;
-	int __st_rdev_padding;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	ino_t st_ino;
-};
lib/libc/wasi/libc-top-half/musl/arch/sh/pthread_arch.h
@@ -1,16 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("stc gbr,%0" : "=r" (tp) );
-	return tp;
-}
-
-#define TLS_ABOVE_TP
-#define GAP_ABOVE_TP 8
-
-#define MC_PC pc
-
-#ifdef __FDPIC__
-#define MC_GOT gregs[12]
-#define CANCEL_GOT (*(uintptr_t *)((char *)__syscall_cp_asm+sizeof(uintptr_t)))
-#endif
lib/libc/wasi/libc-top-half/musl/arch/sh/reloc.h
@@ -1,52 +0,0 @@
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define ENDIAN_SUFFIX "eb"
-#else
-#define ENDIAN_SUFFIX ""
-#endif
-
-#if __SH_FPU_ANY__ || __SH4__
-#define FP_SUFFIX ""
-#else
-#define FP_SUFFIX "-nofpu"
-#endif
-
-#if __SH_FDPIC__
-#define ABI_SUFFIX "-fdpic"
-#else
-#define ABI_SUFFIX ""
-#endif
-
-#define LDSO_ARCH "sh" ENDIAN_SUFFIX FP_SUFFIX ABI_SUFFIX
-
-#define TPOFF_K 0
-
-#define REL_SYMBOLIC    R_SH_DIR32
-#define REL_OFFSET      R_SH_REL32
-#define REL_GOT         R_SH_GLOB_DAT
-#define REL_PLT         R_SH_JMP_SLOT
-#define REL_RELATIVE    R_SH_RELATIVE
-#define REL_COPY        R_SH_COPY
-#define REL_DTPMOD      R_SH_TLS_DTPMOD32
-#define REL_DTPOFF      R_SH_TLS_DTPOFF32
-#define REL_TPOFF       R_SH_TLS_TPOFF32
-
-#define DL_NOMMU_SUPPORT 1
-
-#if __SH_FDPIC__
-#define REL_FUNCDESC    R_SH_FUNCDESC
-#define REL_FUNCDESC_VAL R_SH_FUNCDESC_VALUE
-#undef  REL_RELATIVE
-#define DL_FDPIC 1
-#define FDPIC_CONSTDISP_FLAG 0x100
-#define CRTJMP(pc,sp) do { \
-	register size_t r8 __asm__("r8") = ((size_t *)(sp))[-2]; \
-	__asm__ __volatile__( "jmp @%0 ; mov %1,r15" \
-	: : "r"(pc), "r"(sp), "r"(r8) : "memory" ); } while(0)
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	"mov.l 1f,%0 ; add %1,%0 ; bra 2f ; nop ; .align 2 \n" \
-	"1:	.long " #sym "@GOTOFFFUNCDESC \n2:" \
-	: "=&r"(*fp) : "r"(got) : "memory" )
-#else
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"jmp @%0 ; mov %1,r15" : : "r"(pc), "r"(sp) : "memory" )
-#endif
lib/libc/wasi/libc-top-half/musl/arch/sh/syscall_arch.h
@@ -1,93 +0,0 @@
-#define __SYSCALL_LL_E(x) \
-((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
-((union { long long ll; long l[2]; }){ .ll = x }).l[1]
-#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-#define __SYSCALL_LL_PRW(x) 0, __SYSCALL_LL_E((x))
-
-/* The extra OR instructions are to work around a hardware bug:
- * http://documentation.renesas.com/doc/products/mpumcu/tu/tnsh7456ae.pdf
- */
-#define __asm_syscall(trapno, ...) do {   \
-	__asm__ __volatile__ (                \
-		"trapa #31\n"            \
-		"or r0, r0\n"                     \
-		"or r0, r0\n"                     \
-		"or r0, r0\n"                     \
-		"or r0, r0\n"                     \
-		"or r0, r0\n"                     \
-	: "=r"(r0) : __VA_ARGS__ : "memory"); \
-	return r0;                            \
-	} while (0)
-
-static inline long __syscall0(long n)
-{
-	register long r3 __asm__("r3") = n;
-	register long r0 __asm__("r0");
-	__asm_syscall(16, "r"(r3));
-}
-
-static inline long __syscall1(long n, long a)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r0 __asm__("r0");
-	__asm_syscall(17, "r"(r3), "r"(r4));
-}
-
-static inline long __syscall2(long n, long a, long b)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r5 __asm__("r5") = b;
-	register long r0 __asm__("r0");
-	__asm_syscall(18, "r"(r3), "r"(r4), "r"(r5));
-}
-
-static inline long __syscall3(long n, long a, long b, long c)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r5 __asm__("r5") = b;
-	register long r6 __asm__("r6") = c;
-	register long r0 __asm__("r0");
-	__asm_syscall(19, "r"(r3), "r"(r4), "r"(r5), "r"(r6));
-}
-
-static inline long __syscall4(long n, long a, long b, long c, long d)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r5 __asm__("r5") = b;
-	register long r6 __asm__("r6") = c;
-	register long r7 __asm__("r7") = d;
-	register long r0 __asm__("r0");
-	__asm_syscall(20, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7));
-}
-
-static inline long __syscall5(long n, long a, long b, long c, long d, long e)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r5 __asm__("r5") = b;
-	register long r6 __asm__("r6") = c;
-	register long r7 __asm__("r7") = d;
-	register long r0 __asm__("r0") = e;
-	__asm_syscall(21, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "0"(r0));
-}
-
-static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
-{
-	register long r3 __asm__("r3") = n;
-	register long r4 __asm__("r4") = a;
-	register long r5 __asm__("r5") = b;
-	register long r6 __asm__("r6") = c;
-	register long r7 __asm__("r7") = d;
-	register long r0 __asm__("r0") = e;
-	register long r1 __asm__("r1") = f;
-	__asm_syscall(22, "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "0"(r0), "r"(r1));
-}
-
-#define SYSCALL_IPC_BROKEN_MODE
-
-#define SIOCGSTAMP_OLD   (2U<<30 | 's'<<8 | 100 | 8<<16)
-#define SIOCGSTAMPNS_OLD (2U<<30 | 's'<<8 | 101 | 8<<16)
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/alltypes.h.in
@@ -1,24 +0,0 @@
-#define _Addr int
-#define _Int64 long long
-#define _Reg long long
-
-#define __BYTE_ORDER 1234
-#define __LONG_MAX 0x7fffffffL
-
-#ifndef __cplusplus
-#ifdef __WCHAR_TYPE__
-TYPEDEF __WCHAR_TYPE__ wchar_t;
-#else
-TYPEDEF long wchar_t;
-#endif
-#endif
-
-#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
-TYPEDEF long double float_t;
-TYPEDEF long double double_t;
-#else
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-#endif
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/fcntl.h
@@ -1,40 +0,0 @@
-#define O_CREAT        0100
-#define O_EXCL         0200
-#define O_NOCTTY       0400
-#define O_TRUNC       01000
-#define O_APPEND      02000
-#define O_NONBLOCK    04000
-#define O_DSYNC      010000
-#define O_SYNC     04010000
-#define O_RSYNC    04010000
-#define O_DIRECTORY 0200000
-#define O_NOFOLLOW  0400000
-#define O_CLOEXEC  02000000
-
-#define O_ASYNC      020000
-#define O_DIRECT     040000
-#define O_LARGEFILE 0100000
-#define O_NOATIME  01000000
-#define O_PATH    010000000
-#define O_TMPFILE 020200000
-#define O_NDELAY O_NONBLOCK
-
-#define F_DUPFD  0
-#define F_GETFD  1
-#define F_SETFD  2
-#define F_GETFL  3
-#define F_SETFL  4
-
-#define F_SETOWN 8
-#define F_GETOWN 9
-#define F_SETSIG 10
-#define F_GETSIG 11
-
-#define F_GETLK 5
-#define F_SETLK 6
-#define F_SETLKW 7
-
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-
-#define F_GETOWNER_UIDS 17
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/fenv.h
@@ -1,34 +0,0 @@
-#define FE_INVALID    1
-#define __FE_DENORM   2
-#define FE_DIVBYZERO  4
-#define FE_OVERFLOW   8
-#define FE_UNDERFLOW  16
-#define FE_INEXACT    32
-
-#define FE_ALL_EXCEPT 63
-
-#define FE_TONEAREST  0
-#define FE_DOWNWARD   0x400
-#define FE_UPWARD     0x800
-#define FE_TOWARDZERO 0xc00
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned short __control_word;
-	unsigned short __unused1;
-	unsigned short __status_word;
-	unsigned short __unused2;
-	unsigned short __tags;
-	unsigned short __unused3;
-	unsigned int __eip;
-	unsigned short __cs_selector;
-	unsigned int __opcode:11;
-	unsigned int __unused4:5;
-	unsigned int __data_offset;
-	unsigned short __data_selector;
-	unsigned short __unused5;
-	unsigned int __mxcsr;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/float.h
@@ -1,20 +0,0 @@
-#ifdef __FLT_EVAL_METHOD__
-#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-#else
-#define FLT_EVAL_METHOD 0
-#endif
-
-#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L
-#define LDBL_MIN     3.3621031431120935063e-4932L
-#define LDBL_MAX     1.1897314953572317650e+4932L
-#define LDBL_EPSILON 1.0842021724855044340e-19L
-
-#define LDBL_MANT_DIG 64
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 18
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 21
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/io.h
@@ -1,77 +0,0 @@
-static __inline void outb(unsigned char __val, unsigned short __port)
-{
-	__asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outw(unsigned short __val, unsigned short __port)
-{
-	__asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outl(unsigned int __val, unsigned short __port)
-{
-	__asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline unsigned char inb(unsigned short __port)
-{
-	unsigned char __val;
-	__asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned short inw(unsigned short __port)
-{
-	unsigned short __val;
-	__asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned int inl(unsigned short __port)
-{
-	unsigned int __val;
-	__asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsb"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsw"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsl"
-		      : "+S" (__buf), "+c"(__n)
-		      : "d" (__port));
-}
-
-static __inline void insb(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insb"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insw(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insw"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insl(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insl"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/ioctl_fix.h
@@ -1,4 +0,0 @@
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      0x8906
-#define SIOCGSTAMPNS    0x8907
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/ipc.h
@@ -1,11 +0,0 @@
-struct ipc_perm {
-	key_t __ipc_perm_key;
-	uid_t uid;
-	gid_t gid;
-	uid_t cuid;
-	gid_t cgid;
-	mode_t mode;
-	int __ipc_perm_seq;
-	long long __pad1;
-	long long __pad2;
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 4096
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/mman.h
@@ -1,1 +0,0 @@
-#define MAP_32BIT      0x40
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/msg.h
@@ -1,15 +0,0 @@
-struct msqid_ds {
-	struct ipc_perm msg_perm;
-	time_t msg_stime;
-	time_t msg_rtime;
-	time_t msg_ctime;
-	unsigned long msg_cbytes;
-	long __unused1;
-	msgqnum_t msg_qnum;
-	long __unused2;
-	msglen_t msg_qbytes;
-	long __unused3;
-	pid_t msg_lspid;
-	pid_t msg_lrpid;
-	unsigned long long __unused[2];
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/ptrace.h
@@ -1,13 +0,0 @@
-#define PTRACE_GET_THREAD_AREA		25
-#define PTRACE_SET_THREAD_AREA		26
-#define PTRACE_ARCH_PRCTL		30
-#define PTRACE_SYSEMU			31
-#define PTRACE_SYSEMU_SINGLESTEP	32
-#define PTRACE_SINGLEBLOCK		33
-
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
-#define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
-#define PT_SYSEMU PTRACE_SYSEMU
-#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/reg.h
@@ -1,29 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 32
-#define R15    0
-#define R14    1
-#define R13    2
-#define R12    3
-#define RBP    4
-#define RBX    5
-#define R11    6
-#define R10    7
-#define R9     8
-#define R8     9
-#define RAX    10
-#define RCX    11
-#define RDX    12
-#define RSI    13
-#define RDI    14
-#define ORIG_RAX 15
-#define RIP    16
-#define CS     17
-#define EFLAGS 18
-#define RSP    19
-#define SS     20
-#define FS_BASE 21
-#define GS_BASE 22
-#define DS     23
-#define ES     24
-#define FS     25
-#define GS     26
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/sem.h
@@ -1,11 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	time_t sem_otime;
-	long long __unused1;
-	time_t sem_ctime;
-	long long __unused2;
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long long)-sizeof(short)];
-	long long __unused3;
-	long long __unused4;
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long long __jmp_buf[8];
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/shm.h
@@ -1,32 +0,0 @@
-#define SHMLBA 4096
-
-struct shmid_ds {
-	struct ipc_perm shm_perm;
-	size_t shm_segsz;
-	time_t shm_atime;
-	time_t shm_dtime;
-	time_t shm_ctime;
-	pid_t shm_cpid;
-	pid_t shm_lpid;
-	unsigned long shm_nattch;
-	unsigned long __pad0;
-	unsigned long long __pad1;
-	unsigned long long __pad2;
-};
-
-struct shminfo {
-	unsigned long shmmax, __pad0, shmmin, __pad1, shmmni, __pad2,
-	              shmseg, __pad3, shmall, __pad4;
-	unsigned long long __unused[4];
-};
-
-struct shm_info {
-	int __used_ids;
-	int __pad_ids;
-	unsigned long shm_tot, __pad0, shm_rss, __pad1, shm_swp, __pad2;
-	unsigned long __swap_attempts, __pad3, __swap_successes, __pad4;
-}
-#ifdef __GNUC__
-__attribute__((__aligned__(8)))
-#endif
-;
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/signal.h
@@ -1,153 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#ifdef _GNU_SOURCE
-enum { REG_R8 = 0 };
-#define REG_R8 REG_R8
-enum { REG_R9 = 1 };
-#define REG_R9 REG_R9
-enum { REG_R10 = 2 };
-#define REG_R10 REG_R10
-enum { REG_R11 = 3 };
-#define REG_R11 REG_R11
-enum { REG_R12 = 4 };
-#define REG_R12 REG_R12
-enum { REG_R13 = 5 };
-#define REG_R13 REG_R13
-enum { REG_R14 = 6 };
-#define REG_R14 REG_R14
-enum { REG_R15 = 7 };
-#define REG_R15 REG_R15
-enum { REG_RDI = 8 };
-#define REG_RDI REG_RDI
-enum { REG_RSI = 9 };
-#define REG_RSI REG_RSI
-enum { REG_RBP = 10 };
-#define REG_RBP REG_RBP
-enum { REG_RBX = 11 };
-#define REG_RBX REG_RBX
-enum { REG_RDX = 12 };
-#define REG_RDX REG_RDX
-enum { REG_RAX = 13 };
-#define REG_RAX REG_RAX
-enum { REG_RCX = 14 };
-#define REG_RCX REG_RCX
-enum { REG_RSP = 15 };
-#define REG_RSP REG_RSP
-enum { REG_RIP = 16 };
-#define REG_RIP REG_RIP
-enum { REG_EFL = 17 };
-#define REG_EFL REG_EFL
-enum { REG_CSGSFS = 18 };
-#define REG_CSGSFS REG_CSGSFS
-enum { REG_ERR = 19 };
-#define REG_ERR REG_ERR
-enum { REG_TRAPNO = 20 };
-#define REG_TRAPNO REG_TRAPNO
-enum { REG_OLDMASK = 21 };
-#define REG_OLDMASK REG_OLDMASK
-enum { REG_CR2 = 22 };
-#define REG_CR2 REG_CR2
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef long long greg_t, gregset_t[23];
-typedef struct _fpstate {
-	unsigned short cwd, swd, ftw, fop;
-	unsigned long long rip, rdp;
-	unsigned mxcsr, mxcr_mask;
-	struct {
-		unsigned short significand[4], exponent, padding[3];
-	} _st[8];
-	struct {
-		unsigned element[4];
-	} _xmm[16];
-	unsigned padding[24];
-} *fpregset_t;
-struct sigcontext {
-	unsigned long long r8, r9, r10, r11, r12, r13, r14, r15;
-	unsigned long long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags;
-	unsigned short cs, gs, fs, __pad0;
-	unsigned long long err, trapno, oldmask, cr2;
-	struct _fpstate *fpstate;
-	unsigned long long __reserved1[8];
-};
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	unsigned long long __reserved1[8];
-} mcontext_t;
-#else
-typedef struct {
-	unsigned long long __space[32];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-	unsigned long long __fpregs_mem[64];
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
-
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/socket.h
@@ -1,5 +0,0 @@
-#define SO_RCVTIMEO     20
-#define SO_SNDTIMEO     21
-#define SO_TIMESTAMP    29
-#define SO_TIMESTAMPNS  35
-#define SO_TIMESTAMPING 37
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/stat.h
@@ -1,22 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned int    __pad0;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	long long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/statfs.h
@@ -1,9 +0,0 @@
-struct statfs {
-	unsigned long f_type, __pad0, f_bsize, __pad1;
-	fsblkcnt_t f_blocks, f_bfree, f_bavail;
-	fsfilcnt_t f_files, f_ffree;
-	fsid_t f_fsid;
-	unsigned long f_namelen, __pad2, f_frsize, __pad3;
-	unsigned long f_flags, __pad4;
-	unsigned long long f_spare[4];
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_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
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/syscall.h.in
@@ -1,343 +0,0 @@
-#define __NR_read (0x40000000 + 0)
-#define __NR_write (0x40000000 + 1)
-#define __NR_open (0x40000000 + 2)
-#define __NR_close (0x40000000 + 3)
-#define __NR_stat (0x40000000 + 4)
-#define __NR_fstat (0x40000000 + 5)
-#define __NR_lstat (0x40000000 + 6)
-#define __NR_poll (0x40000000 + 7)
-#define __NR_lseek (0x40000000 + 8)
-#define __NR_mmap (0x40000000 + 9)
-#define __NR_mprotect (0x40000000 + 10)
-#define __NR_munmap (0x40000000 + 11)
-#define __NR_brk (0x40000000 + 12)
-#define __NR_rt_sigprocmask (0x40000000 + 14)
-#define __NR_pread64 (0x40000000 + 17)
-#define __NR_pwrite64 (0x40000000 + 18)
-#define __NR_access (0x40000000 + 21)
-#define __NR_pipe (0x40000000 + 22)
-#define __NR_select (0x40000000 + 23)
-#define __NR_sched_yield (0x40000000 + 24)
-#define __NR_mremap (0x40000000 + 25)
-#define __NR_msync (0x40000000 + 26)
-#define __NR_mincore (0x40000000 + 27)
-#define __NR_madvise (0x40000000 + 28)
-#define __NR_shmget (0x40000000 + 29)
-#define __NR_shmat (0x40000000 + 30)
-#define __NR_shmctl (0x40000000 + 31)
-#define __NR_dup (0x40000000 + 32)
-#define __NR_dup2 (0x40000000 + 33)
-#define __NR_pause (0x40000000 + 34)
-#define __NR_nanosleep (0x40000000 + 35)
-#define __NR_getitimer (0x40000000 + 36)
-#define __NR_alarm (0x40000000 + 37)
-#define __NR_setitimer (0x40000000 + 38)
-#define __NR_getpid (0x40000000 + 39)
-#define __NR_sendfile (0x40000000 + 40)
-#define __NR_socket (0x40000000 + 41)
-#define __NR_connect (0x40000000 + 42)
-#define __NR_accept (0x40000000 + 43)
-#define __NR_sendto (0x40000000 + 44)
-#define __NR_shutdown (0x40000000 + 48)
-#define __NR_bind (0x40000000 + 49)
-#define __NR_listen (0x40000000 + 50)
-#define __NR_getsockname (0x40000000 + 51)
-#define __NR_getpeername (0x40000000 + 52)
-#define __NR_socketpair (0x40000000 + 53)
-#define __NR_clone (0x40000000 + 56)
-#define __NR_fork (0x40000000 + 57)
-#define __NR_vfork (0x40000000 + 58)
-#define __NR_exit (0x40000000 + 60)
-#define __NR_wait4 (0x40000000 + 61)
-#define __NR_kill (0x40000000 + 62)
-#define __NR_uname (0x40000000 + 63)
-#define __NR_semget (0x40000000 + 64)
-#define __NR_semop (0x40000000 + 65)
-#define __NR_semctl (0x40000000 + 66)
-#define __NR_shmdt (0x40000000 + 67)
-#define __NR_msgget (0x40000000 + 68)
-#define __NR_msgsnd (0x40000000 + 69)
-#define __NR_msgrcv (0x40000000 + 70)
-#define __NR_msgctl (0x40000000 + 71)
-#define __NR_fcntl (0x40000000 + 72)
-#define __NR_flock (0x40000000 + 73)
-#define __NR_fsync (0x40000000 + 74)
-#define __NR_fdatasync (0x40000000 + 75)
-#define __NR_truncate (0x40000000 + 76)
-#define __NR_ftruncate (0x40000000 + 77)
-#define __NR_getdents (0x40000000 + 78)
-#define __NR_getcwd (0x40000000 + 79)
-#define __NR_chdir (0x40000000 + 80)
-#define __NR_fchdir (0x40000000 + 81)
-#define __NR_rename (0x40000000 + 82)
-#define __NR_mkdir (0x40000000 + 83)
-#define __NR_rmdir (0x40000000 + 84)
-#define __NR_creat (0x40000000 + 85)
-#define __NR_link (0x40000000 + 86)
-#define __NR_unlink (0x40000000 + 87)
-#define __NR_symlink (0x40000000 + 88)
-#define __NR_readlink (0x40000000 + 89)
-#define __NR_chmod (0x40000000 + 90)
-#define __NR_fchmod (0x40000000 + 91)
-#define __NR_chown (0x40000000 + 92)
-#define __NR_fchown (0x40000000 + 93)
-#define __NR_lchown (0x40000000 + 94)
-#define __NR_umask (0x40000000 + 95)
-#define __NR_gettimeofday (0x40000000 + 96)
-#define __NR_getrlimit (0x40000000 + 97)
-#define __NR_getrusage (0x40000000 + 98)
-#define __NR_sysinfo (0x40000000 + 99)
-#define __NR_times (0x40000000 + 100)
-#define __NR_getuid (0x40000000 + 102)
-#define __NR_syslog (0x40000000 + 103)
-#define __NR_getgid (0x40000000 + 104)
-#define __NR_setuid (0x40000000 + 105)
-#define __NR_setgid (0x40000000 + 106)
-#define __NR_geteuid (0x40000000 + 107)
-#define __NR_getegid (0x40000000 + 108)
-#define __NR_setpgid (0x40000000 + 109)
-#define __NR_getppid (0x40000000 + 110)
-#define __NR_getpgrp (0x40000000 + 111)
-#define __NR_setsid (0x40000000 + 112)
-#define __NR_setreuid (0x40000000 + 113)
-#define __NR_setregid (0x40000000 + 114)
-#define __NR_getgroups (0x40000000 + 115)
-#define __NR_setgroups (0x40000000 + 116)
-#define __NR_setresuid (0x40000000 + 117)
-#define __NR_getresuid (0x40000000 + 118)
-#define __NR_setresgid (0x40000000 + 119)
-#define __NR_getresgid (0x40000000 + 120)
-#define __NR_getpgid (0x40000000 + 121)
-#define __NR_setfsuid (0x40000000 + 122)
-#define __NR_setfsgid (0x40000000 + 123)
-#define __NR_getsid (0x40000000 + 124)
-#define __NR_capget (0x40000000 + 125)
-#define __NR_capset (0x40000000 + 126)
-#define __NR_rt_sigsuspend (0x40000000 + 130)
-#define __NR_utime (0x40000000 + 132)
-#define __NR_mknod (0x40000000 + 133)
-#define __NR_personality (0x40000000 + 135)
-#define __NR_ustat (0x40000000 + 136)
-#define __NR_statfs (0x40000000 + 137)
-#define __NR_fstatfs (0x40000000 + 138)
-#define __NR_sysfs (0x40000000 + 139)
-#define __NR_getpriority (0x40000000 + 140)
-#define __NR_setpriority (0x40000000 + 141)
-#define __NR_sched_setparam (0x40000000 + 142)
-#define __NR_sched_getparam (0x40000000 + 143)
-#define __NR_sched_setscheduler (0x40000000 + 144)
-#define __NR_sched_getscheduler (0x40000000 + 145)
-#define __NR_sched_get_priority_max (0x40000000 + 146)
-#define __NR_sched_get_priority_min (0x40000000 + 147)
-#define __NR_sched_rr_get_interval (0x40000000 + 148)
-#define __NR_mlock (0x40000000 + 149)
-#define __NR_munlock (0x40000000 + 150)
-#define __NR_mlockall (0x40000000 + 151)
-#define __NR_munlockall (0x40000000 + 152)
-#define __NR_vhangup (0x40000000 + 153)
-#define __NR_modify_ldt (0x40000000 + 154)
-#define __NR_pivot_root (0x40000000 + 155)
-#define __NR_prctl (0x40000000 + 157)
-#define __NR_arch_prctl (0x40000000 + 158)
-#define __NR_adjtimex (0x40000000 + 159)
-#define __NR_setrlimit (0x40000000 + 160)
-#define __NR_chroot (0x40000000 + 161)
-#define __NR_sync (0x40000000 + 162)
-#define __NR_acct (0x40000000 + 163)
-#define __NR_settimeofday (0x40000000 + 164)
-#define __NR_mount (0x40000000 + 165)
-#define __NR_umount2 (0x40000000 + 166)
-#define __NR_swapon (0x40000000 + 167)
-#define __NR_swapoff (0x40000000 + 168)
-#define __NR_reboot (0x40000000 + 169)
-#define __NR_sethostname (0x40000000 + 170)
-#define __NR_setdomainname (0x40000000 + 171)
-#define __NR_iopl (0x40000000 + 172)
-#define __NR_ioperm (0x40000000 + 173)
-#define __NR_init_module (0x40000000 + 175)
-#define __NR_delete_module (0x40000000 + 176)
-#define __NR_quotactl (0x40000000 + 179)
-#define __NR_getpmsg (0x40000000 + 181)
-#define __NR_putpmsg (0x40000000 + 182)
-#define __NR_afs_syscall (0x40000000 + 183)
-#define __NR_tuxcall (0x40000000 + 184)
-#define __NR_security (0x40000000 + 185)
-#define __NR_gettid (0x40000000 + 186)
-#define __NR_readahead (0x40000000 + 187)
-#define __NR_setxattr (0x40000000 + 188)
-#define __NR_lsetxattr (0x40000000 + 189)
-#define __NR_fsetxattr (0x40000000 + 190)
-#define __NR_getxattr (0x40000000 + 191)
-#define __NR_lgetxattr (0x40000000 + 192)
-#define __NR_fgetxattr (0x40000000 + 193)
-#define __NR_listxattr (0x40000000 + 194)
-#define __NR_llistxattr (0x40000000 + 195)
-#define __NR_flistxattr (0x40000000 + 196)
-#define __NR_removexattr (0x40000000 + 197)
-#define __NR_lremovexattr (0x40000000 + 198)
-#define __NR_fremovexattr (0x40000000 + 199)
-#define __NR_tkill (0x40000000 + 200)
-#define __NR_time (0x40000000 + 201)
-#define __NR_futex (0x40000000 + 202)
-#define __NR_sched_setaffinity (0x40000000 + 203)
-#define __NR_sched_getaffinity (0x40000000 + 204)
-#define __NR_io_destroy (0x40000000 + 207)
-#define __NR_io_getevents (0x40000000 + 208)
-#define __NR_io_cancel (0x40000000 + 210)
-#define __NR_lookup_dcookie (0x40000000 + 212)
-#define __NR_epoll_create (0x40000000 + 213)
-#define __NR_remap_file_pages (0x40000000 + 216)
-#define __NR_getdents64 (0x40000000 + 217)
-#define __NR_set_tid_address (0x40000000 + 218)
-#define __NR_restart_syscall (0x40000000 + 219)
-#define __NR_semtimedop (0x40000000 + 220)
-#define __NR_fadvise64 (0x40000000 + 221)
-#define __NR_timer_settime (0x40000000 + 223)
-#define __NR_timer_gettime (0x40000000 + 224)
-#define __NR_timer_getoverrun (0x40000000 + 225)
-#define __NR_timer_delete (0x40000000 + 226)
-#define __NR_clock_settime (0x40000000 + 227)
-#define __NR_clock_gettime (0x40000000 + 228)
-#define __NR_clock_getres (0x40000000 + 229)
-#define __NR_clock_nanosleep (0x40000000 + 230)
-#define __NR_exit_group (0x40000000 + 231)
-#define __NR_epoll_wait (0x40000000 + 232)
-#define __NR_epoll_ctl (0x40000000 + 233)
-#define __NR_tgkill (0x40000000 + 234)
-#define __NR_utimes (0x40000000 + 235)
-#define __NR_mbind (0x40000000 + 237)
-#define __NR_set_mempolicy (0x40000000 + 238)
-#define __NR_get_mempolicy (0x40000000 + 239)
-#define __NR_mq_open (0x40000000 + 240)
-#define __NR_mq_unlink (0x40000000 + 241)
-#define __NR_mq_timedsend (0x40000000 + 242)
-#define __NR_mq_timedreceive (0x40000000 + 243)
-#define __NR_mq_getsetattr (0x40000000 + 245)
-#define __NR_add_key (0x40000000 + 248)
-#define __NR_request_key (0x40000000 + 249)
-#define __NR_keyctl (0x40000000 + 250)
-#define __NR_ioprio_set (0x40000000 + 251)
-#define __NR_ioprio_get (0x40000000 + 252)
-#define __NR_inotify_init (0x40000000 + 253)
-#define __NR_inotify_add_watch (0x40000000 + 254)
-#define __NR_inotify_rm_watch (0x40000000 + 255)
-#define __NR_migrate_pages (0x40000000 + 256)
-#define __NR_openat (0x40000000 + 257)
-#define __NR_mkdirat (0x40000000 + 258)
-#define __NR_mknodat (0x40000000 + 259)
-#define __NR_fchownat (0x40000000 + 260)
-#define __NR_futimesat (0x40000000 + 261)
-#define __NR_newfstatat (0x40000000 + 262)
-#define __NR_unlinkat (0x40000000 + 263)
-#define __NR_renameat (0x40000000 + 264)
-#define __NR_linkat (0x40000000 + 265)
-#define __NR_symlinkat (0x40000000 + 266)
-#define __NR_readlinkat (0x40000000 + 267)
-#define __NR_fchmodat (0x40000000 + 268)
-#define __NR_faccessat (0x40000000 + 269)
-#define __NR_pselect6 (0x40000000 + 270)
-#define __NR_ppoll (0x40000000 + 271)
-#define __NR_unshare (0x40000000 + 272)
-#define __NR_splice (0x40000000 + 275)
-#define __NR_tee (0x40000000 + 276)
-#define __NR_sync_file_range (0x40000000 + 277)
-#define __NR_utimensat (0x40000000 + 280)
-#define __NR_epoll_pwait (0x40000000 + 281)
-#define __NR_signalfd (0x40000000 + 282)
-#define __NR_timerfd_create (0x40000000 + 283)
-#define __NR_eventfd (0x40000000 + 284)
-#define __NR_fallocate (0x40000000 + 285)
-#define __NR_timerfd_settime (0x40000000 + 286)
-#define __NR_timerfd_gettime (0x40000000 + 287)
-#define __NR_accept4 (0x40000000 + 288)
-#define __NR_signalfd4 (0x40000000 + 289)
-#define __NR_eventfd2 (0x40000000 + 290)
-#define __NR_epoll_create1 (0x40000000 + 291)
-#define __NR_dup3 (0x40000000 + 292)
-#define __NR_pipe2 (0x40000000 + 293)
-#define __NR_inotify_init1 (0x40000000 + 294)
-#define __NR_perf_event_open (0x40000000 + 298)
-#define __NR_fanotify_init (0x40000000 + 300)
-#define __NR_fanotify_mark (0x40000000 + 301)
-#define __NR_prlimit64 (0x40000000 + 302)
-#define __NR_name_to_handle_at (0x40000000 + 303)
-#define __NR_open_by_handle_at (0x40000000 + 304)
-#define __NR_clock_adjtime (0x40000000 + 305)
-#define __NR_syncfs (0x40000000 + 306)
-#define __NR_setns (0x40000000 + 308)
-#define __NR_getcpu (0x40000000 + 309)
-#define __NR_kcmp (0x40000000 + 312)
-#define __NR_finit_module (0x40000000 + 313)
-#define __NR_sched_setattr (0x40000000 + 314)
-#define __NR_sched_getattr (0x40000000 + 315)
-#define __NR_renameat2 (0x40000000 + 316)
-#define __NR_seccomp (0x40000000 + 317)
-#define __NR_getrandom (0x40000000 + 318)
-#define __NR_memfd_create (0x40000000 + 319)
-#define __NR_kexec_file_load (0x40000000 + 320)
-#define __NR_bpf (0x40000000 + 321)
-#define __NR_userfaultfd (0x40000000 + 323)
-#define __NR_membarrier (0x40000000 + 324)
-#define __NR_mlock2 (0x40000000 + 325)
-#define __NR_copy_file_range (0x40000000 + 326)
-#define __NR_pkey_mprotect (0x40000000 + 329)
-#define __NR_pkey_alloc (0x40000000 + 330)
-#define __NR_pkey_free (0x40000000 + 331)
-#define __NR_statx (0x40000000 + 332)
-#define __NR_io_pgetevents (0x40000000 + 333)
-#define __NR_rseq (0x40000000 + 334)
-#define __NR_pidfd_send_signal (0x40000000 + 424)
-#define __NR_io_uring_setup (0x40000000 + 425)
-#define __NR_io_uring_enter (0x40000000 + 426)
-#define __NR_io_uring_register (0x40000000 + 427)
-#define __NR_open_tree		(0x40000000 + 428)
-#define __NR_move_mount		(0x40000000 + 429)
-#define __NR_fsopen		(0x40000000 + 430)
-#define __NR_fsconfig		(0x40000000 + 431)
-#define __NR_fsmount		(0x40000000 + 432)
-#define __NR_fspick		(0x40000000 + 433)
-#define __NR_pidfd_open		(0x40000000 + 434)
-#define __NR_clone3		(0x40000000 + 435)
-#define __NR_close_range	(0x40000000 + 436)
-#define __NR_openat2		(0x40000000 + 437)
-#define __NR_pidfd_getfd	(0x40000000 + 438)
-#define __NR_faccessat2		(0x40000000 + 439)
-
-
-#define __NR_rt_sigaction (0x40000000 + 512)
-#define __NR_rt_sigreturn (0x40000000 + 513)
-#define __NR_ioctl (0x40000000 + 514)
-#define __NR_readv (0x40000000 + 515)
-#define __NR_writev (0x40000000 + 516)
-#define __NR_recvfrom (0x40000000 + 517)
-#define __NR_sendmsg (0x40000000 + 518)
-#define __NR_recvmsg (0x40000000 + 519)
-#define __NR_execve (0x40000000 + 520)
-#define __NR_ptrace (0x40000000 + 521)
-#define __NR_rt_sigpending (0x40000000 + 522)
-#define __NR_rt_sigtimedwait (0x40000000 + 523)
-#define __NR_rt_sigqueueinfo (0x40000000 + 524)
-#define __NR_sigaltstack (0x40000000 + 525)
-#define __NR_timer_create (0x40000000 + 526)
-#define __NR_mq_notify (0x40000000 + 527)
-#define __NR_kexec_load (0x40000000 + 528)
-#define __NR_waitid (0x40000000 + 529)
-#define __NR_set_robust_list (0x40000000 + 530)
-#define __NR_get_robust_list (0x40000000 + 531)
-#define __NR_vmsplice (0x40000000 + 532)
-#define __NR_move_pages (0x40000000 + 533)
-#define __NR_preadv (0x40000000 + 534)
-#define __NR_pwritev (0x40000000 + 535)
-#define __NR_rt_tgsigqueueinfo (0x40000000 + 536)
-#define __NR_recvmmsg (0x40000000 + 537)
-#define __NR_sendmmsg (0x40000000 + 538)
-#define __NR_process_vm_readv (0x40000000 + 539)
-#define __NR_process_vm_writev (0x40000000 + 540)
-#define __NR_setsockopt (0x40000000 + 541)
-#define __NR_getsockopt (0x40000000 + 542)
-#define __NR_io_setup (0x40000000 + 543)
-#define __NR_io_submit (0x40000000 + 544)
-#define __NR_execveat (0x40000000 + 545)
-#define __NR_preadv2 (0x40000000 + 546)
-#define __NR_pwritev2 (0x40000000 + 547)
-
lib/libc/wasi/libc-top-half/musl/arch/x32/bits/user.h
@@ -1,41 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-
-typedef struct user_fpregs_struct {
-	uint16_t cwd, swd, ftw, fop;
-	uint64_t rip, rdp;
-	uint32_t mxcsr, mxcr_mask;
-	uint32_t st_space[32], xmm_space[64], padding[24];
-} elf_fpregset_t;
-
-struct user_regs_struct {
-	unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
-	unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
-	unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
-};
-#define ELF_NGREG 27
-typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct user {
-	struct user_regs_struct		regs;
-	int				u_fpvalid;
-	struct user_fpregs_struct	i387;
-	unsigned long			u_tsize;
-	unsigned long			u_dsize;
-	unsigned long			u_ssize;
-	unsigned long			start_code;
-	unsigned long			start_stack;
-	long				signal;
-	int				reserved;
-	struct user_regs_struct		*u_ar0;
-	struct user_fpregs_struct	*u_fpstate;
-	unsigned long			magic;
-	char				u_comm[32];
-	unsigned long			u_debugreg[8];
-};
-
-#define PAGE_MASK		(~(PAGESIZE-1))
-#define NBPG			PAGESIZE
-#define UPAGES			1
-#define HOST_TEXT_START_ADDR	(u.start_code)
-#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
lib/libc/wasi/libc-top-half/musl/arch/x32/atomic_arch.h
@@ -1,121 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__ __volatile__ (
-		"lock ; cmpxchg %3, %1"
-		: "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" );
-	return t;
-}
-
-#define a_swap a_swap
-static inline int a_swap(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"xchg %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_fetch_add a_fetch_add
-static inline int a_fetch_add(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; xadd %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_and a_and
-static inline void a_and(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; and %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_or a_or
-static inline void a_or(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; or %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_and_64 a_and_64
-static inline void a_and_64(volatile uint64_t *p, uint64_t v)
-{
-	__asm__ __volatile(
-		"lock ; and %1, %0"
-		 : "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_or_64 a_or_64
-static inline void a_or_64(volatile uint64_t *p, uint64_t v)
-{
-	__asm__ __volatile__(
-		"lock ; or %1, %0"
-		 : "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_inc a_inc
-static inline void a_inc(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; incl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_dec a_dec
-static inline void a_dec(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; decl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_store a_store
-static inline void a_store(volatile int *p, int x)
-{
-	__asm__ __volatile__(
-		"mov %1, %0 ; lock ; orl $0,(%%rsp)"
-		: "=m"(*p) : "r"(x) : "memory" );
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__( "" : : : "memory" );
-}
-
-#define a_spin a_spin
-static inline void a_spin()
-{
-	__asm__ __volatile__( "pause" : : : "memory" );
-}
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__( "hlt" : : : "memory" );
-}
-
-#define a_ctz_64 a_ctz_64
-static inline int a_ctz_64(uint64_t x)
-{
-	__asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
-
-#define a_ctz_32 a_ctz_32
-static inline int a_ctz_32(uint32_t x)
-{
-	__asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
-
-#define a_clz_64 a_clz_64
-static inline int a_clz_64(uint64_t x)
-{
-	__asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/x32/crt_arch.h
@@ -1,12 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-START ": \n"
-"	xor %rbp,%rbp \n"
-"	mov %rsp,%rdi \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	lea _DYNAMIC(%rip),%rsi \n"
-"	andq $-16,%rsp \n"
-"	call " START "_c \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/x32/ksigaction.h
@@ -1,11 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	void (*handler)(int);
-	unsigned long flags;
-	void (*restorer)(void);
-	unsigned mask[2];
-};
-
-hidden void __restore_rt();
-#define __restore __restore_rt
lib/libc/wasi/libc-top-half/musl/arch/x32/kstat.h
@@ -1,22 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned int    __pad0;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-
-	long long st_atime_sec;
-	long st_atime_nsec;
-	long long st_mtime_sec;
-	long st_mtime_nsec;
-	long long st_ctime_sec;
-	long st_ctime_nsec;
-	long long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/x32/pthread_arch.h
@@ -1,12 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("mov %%fs:0,%0" : "=r" (tp) );
-	return tp;
-}
-
-#define MC_PC gregs[REG_RIP]
-
-#define CANARY_PAD
-
-#define tls_mod_off_t unsigned long long
lib/libc/wasi/libc-top-half/musl/arch/x32/reloc.h
@@ -1,31 +0,0 @@
-#define LDSO_ARCH "x32"
-
-/* FIXME: x32 is very strange in its use of 64-bit relocation types in
- * a 32-bit environment. As long as the memory at reloc_addr is
- * zero-filled prior to relocations, just treating 64-bit relocations
- * as operating on 32-bit slots should be fine, but this should be
- * checked. In particular, R_X86_64_64, R_X86_64_DTPOFF64, and
- * R_X86_64_TPOFF64 may need checking. */
-
-/* The R_X86_64_64, R_X86_64_DTPOFF32, and R_X86_64_TPOFF32 reloc types
- * were previously mapped in the switch table form of this file; however,
- * they do not seem to be used/usable for anything. If needed, new
- * mappings will have to be added. */
-
-#define REL_SYMBOLIC    R_X86_64_32
-#define REL_OFFSET      R_X86_64_PC32
-#define REL_GOT         R_X86_64_GLOB_DAT
-#define REL_PLT         R_X86_64_JUMP_SLOT
-#define REL_RELATIVE    R_X86_64_RELATIVE
-#define REL_COPY        R_X86_64_COPY
-#define REL_DTPMOD      R_X86_64_DTPMOD64
-#define REL_DTPOFF      R_X86_64_DTPOFF64
-#define REL_TPOFF       R_X86_64_TPOFF64
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mov %1,%%esp ; jmp *%0" : : "r"((uint64_t)(uintptr_t)pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	"	lea " #sym "(%%rip),%0\n" \
-	: "=r"(*fp) : : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/x32/syscall_arch.h
@@ -1,93 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-#define __scc(X) sizeof(1?(X):0ULL) < 8 ? (unsigned long) (X) : (long long) (X)
-typedef long long syscall_arg_t;
-
-static __inline long __syscall0(long long n)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall1(long long n, long long a1)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall2(long long n, long long a1, long long a2)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2)
-					: "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall3(long long n, long long a1, long long a2, long long a3)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-						  "d"(a3) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall4(long long n, long long a1, long long a2, long long a3,
-                                     long long a4_)
-{
-	unsigned long ret;
-	register long long a4 __asm__("r10") = a4_;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-					  "d"(a3), "r"(a4): "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall5(long long n, long long a1, long long a2, long long a3,
-                                     long long a4_, long long a5_)
-{
-	unsigned long ret;
-	register long long a4 __asm__("r10") = a4_;
-	register long long a5 __asm__("r8") = a5_;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-					  "d"(a3), "r"(a4), "r"(a5) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall6(long long n, long long a1, long long a2, long long a3,
-                                     long long a4_, long long a5_, long long a6_)
-{
-	unsigned long ret;
-	register long long a4 __asm__("r10") = a4_;
-	register long long a5 __asm__("r8") = a5_;
-	register long long a6 __asm__("r9") = a6_;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-					  "d"(a3), "r"(a4), "r"(a5), "r"(a6) : "rcx", "r11", "memory");
-	return ret;
-}
-
-#undef SYS_futimesat
-
-#define SYS_clock_gettime64 SYS_clock_gettime
-#define SYS_clock_settime64 SYS_clock_settime
-#define SYS_clock_adjtime64 SYS_clock_adjtime
-#define SYS_clock_nanosleep_time64 SYS_clock_nanosleep
-#define SYS_timer_gettime64 SYS_timer_gettime
-#define SYS_timer_settime64 SYS_timer_settime
-#define SYS_timerfd_gettime64 SYS_timerfd_gettime
-#define SYS_timerfd_settime64 SYS_timerfd_settime
-#define SYS_utimensat_time64 SYS_utimensat
-#define SYS_pselect6_time64 SYS_pselect6
-#define SYS_ppoll_time64 SYS_ppoll
-#define SYS_recvmmsg_time64 SYS_recvmmsg
-#define SYS_mq_timedsend_time64 SYS_mq_timedsend
-#define SYS_mq_timedreceive_time64 SYS_mq_timedreceive
-#define SYS_semtimedop_time64 SYS_semtimedop
-#define SYS_rt_sigtimedwait_time64 SYS_rt_sigtimedwait
-#define SYS_futex_time64 SYS_futex
-#define SYS_sched_rr_get_interval_time64 SYS_sched_rr_get_interval
-#define SYS_getrusage_time64 SYS_getrusage
-#define SYS_wait4_time64 SYS_wait4
-
-#define IPC_64 0
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/alltypes.h.in
@@ -1,20 +0,0 @@
-#define _Addr long
-#define _Int64 long
-#define _Reg long
-
-#define __BYTE_ORDER 1234
-#define __LONG_MAX 0x7fffffffffffffffL
-
-#ifndef __cplusplus
-TYPEDEF int wchar_t;
-#endif
-
-#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
-TYPEDEF long double float_t;
-TYPEDEF long double double_t;
-#else
-TYPEDEF float float_t;
-TYPEDEF double double_t;
-#endif
-
-TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/fenv.h
@@ -1,34 +0,0 @@
-#define FE_INVALID    1
-#define __FE_DENORM   2
-#define FE_DIVBYZERO  4
-#define FE_OVERFLOW   8
-#define FE_UNDERFLOW  16
-#define FE_INEXACT    32
-
-#define FE_ALL_EXCEPT 63
-
-#define FE_TONEAREST  0
-#define FE_DOWNWARD   0x400
-#define FE_UPWARD     0x800
-#define FE_TOWARDZERO 0xc00
-
-typedef unsigned short fexcept_t;
-
-typedef struct {
-	unsigned short __control_word;
-	unsigned short __unused1;
-	unsigned short __status_word;
-	unsigned short __unused2;
-	unsigned short __tags;
-	unsigned short __unused3;
-	unsigned int __eip;
-	unsigned short __cs_selector;
-	unsigned int __opcode:11;
-	unsigned int __unused4:5;
-	unsigned int __data_offset;
-	unsigned short __data_selector;
-	unsigned short __unused5;
-	unsigned int __mxcsr;
-} fenv_t;
-
-#define FE_DFL_ENV      ((const fenv_t *) -1)
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/float.h
@@ -1,20 +0,0 @@
-#ifdef __FLT_EVAL_METHOD__
-#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
-#else
-#define FLT_EVAL_METHOD 0
-#endif
-
-#define LDBL_TRUE_MIN 3.6451995318824746025e-4951L
-#define LDBL_MIN     3.3621031431120935063e-4932L
-#define LDBL_MAX     1.1897314953572317650e+4932L
-#define LDBL_EPSILON 1.0842021724855044340e-19L
-
-#define LDBL_MANT_DIG 64
-#define LDBL_MIN_EXP (-16381)
-#define LDBL_MAX_EXP 16384
-
-#define LDBL_DIG 18
-#define LDBL_MIN_10_EXP (-4931)
-#define LDBL_MAX_10_EXP 4932
-
-#define DECIMAL_DIG 21
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/io.h
@@ -1,77 +0,0 @@
-static __inline void outb(unsigned char __val, unsigned short __port)
-{
-	__asm__ volatile ("outb %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outw(unsigned short __val, unsigned short __port)
-{
-	__asm__ volatile ("outw %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline void outl(unsigned int __val, unsigned short __port)
-{
-	__asm__ volatile ("outl %0,%1" : : "a" (__val), "dN" (__port));
-}
-
-static __inline unsigned char inb(unsigned short __port)
-{
-	unsigned char __val;
-	__asm__ volatile ("inb %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned short inw(unsigned short __port)
-{
-	unsigned short __val;
-	__asm__ volatile ("inw %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline unsigned int inl(unsigned short __port)
-{
-	unsigned int __val;
-	__asm__ volatile ("inl %1,%0" : "=a" (__val) : "dN" (__port));
-	return __val;
-}
-
-static __inline void outsb(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsb"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsw(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsw"
-		      : "+S" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void outsl(unsigned short __port, const void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; outsl"
-		      : "+S" (__buf), "+c"(__n)
-		      : "d" (__port));
-}
-
-static __inline void insb(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insb"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insw(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insw"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
-
-static __inline void insl(unsigned short __port, void *__buf, unsigned long __n)
-{
-	__asm__ volatile ("cld; rep; insl"
-		      : "+D" (__buf), "+c" (__n)
-		      : "d" (__port));
-}
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/limits.h
@@ -1,1 +0,0 @@
-#define PAGESIZE 4096
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/mman.h
@@ -1,1 +0,0 @@
-#define MAP_32BIT      0x40
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/posix.h
@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/ptrace.h
@@ -1,13 +0,0 @@
-#define PTRACE_GET_THREAD_AREA		25
-#define PTRACE_SET_THREAD_AREA		26
-#define PTRACE_ARCH_PRCTL		30
-#define PTRACE_SYSEMU			31
-#define PTRACE_SYSEMU_SINGLESTEP	32
-#define PTRACE_SINGLEBLOCK		33
-
-#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
-#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
-#define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
-#define PT_SYSEMU PTRACE_SYSEMU
-#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
-#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/reg.h
@@ -1,29 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-#define R15    0
-#define R14    1
-#define R13    2
-#define R12    3
-#define RBP    4
-#define RBX    5
-#define R11    6
-#define R10    7
-#define R9     8
-#define R8     9
-#define RAX    10
-#define RCX    11
-#define RDX    12
-#define RSI    13
-#define RDI    14
-#define ORIG_RAX 15
-#define RIP    16
-#define CS     17
-#define EFLAGS 18
-#define RSP    19
-#define SS     20
-#define FS_BASE 21
-#define GS_BASE 22
-#define DS     23
-#define ES     24
-#define FS     25
-#define GS     26
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/sem.h
@@ -1,11 +0,0 @@
-struct semid_ds {
-	struct ipc_perm sem_perm;
-	time_t sem_otime;
-	long __unused1;
-	time_t sem_ctime;
-	long __unused2;
-	unsigned short sem_nsems;
-	char __sem_nsems_pad[sizeof(long)-sizeof(short)];
-	long __unused3;
-	long __unused4;
-};
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/setjmp.h
@@ -1,1 +0,0 @@
-typedef unsigned long __jmp_buf[8];
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/signal.h
@@ -1,153 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-#endif
-
-#ifdef _GNU_SOURCE
-enum { REG_R8 = 0 };
-#define REG_R8 REG_R8
-enum { REG_R9 = 1 };
-#define REG_R9 REG_R9
-enum { REG_R10 = 2 };
-#define REG_R10 REG_R10
-enum { REG_R11 = 3 };
-#define REG_R11 REG_R11
-enum { REG_R12 = 4 };
-#define REG_R12 REG_R12
-enum { REG_R13 = 5 };
-#define REG_R13 REG_R13
-enum { REG_R14 = 6 };
-#define REG_R14 REG_R14
-enum { REG_R15 = 7 };
-#define REG_R15 REG_R15
-enum { REG_RDI = 8 };
-#define REG_RDI REG_RDI
-enum { REG_RSI = 9 };
-#define REG_RSI REG_RSI
-enum { REG_RBP = 10 };
-#define REG_RBP REG_RBP
-enum { REG_RBX = 11 };
-#define REG_RBX REG_RBX
-enum { REG_RDX = 12 };
-#define REG_RDX REG_RDX
-enum { REG_RAX = 13 };
-#define REG_RAX REG_RAX
-enum { REG_RCX = 14 };
-#define REG_RCX REG_RCX
-enum { REG_RSP = 15 };
-#define REG_RSP REG_RSP
-enum { REG_RIP = 16 };
-#define REG_RIP REG_RIP
-enum { REG_EFL = 17 };
-#define REG_EFL REG_EFL
-enum { REG_CSGSFS = 18 };
-#define REG_CSGSFS REG_CSGSFS
-enum { REG_ERR = 19 };
-#define REG_ERR REG_ERR
-enum { REG_TRAPNO = 20 };
-#define REG_TRAPNO REG_TRAPNO
-enum { REG_OLDMASK = 21 };
-#define REG_OLDMASK REG_OLDMASK
-enum { REG_CR2 = 22 };
-#define REG_CR2 REG_CR2
-#endif
-
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-typedef long long greg_t, gregset_t[23];
-typedef struct _fpstate {
-	unsigned short cwd, swd, ftw, fop;
-	unsigned long long rip, rdp;
-	unsigned mxcsr, mxcr_mask;
-	struct {
-		unsigned short significand[4], exponent, padding[3];
-	} _st[8];
-	struct {
-		unsigned element[4];
-	} _xmm[16];
-	unsigned padding[24];
-} *fpregset_t;
-struct sigcontext {
-	unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
-	unsigned long rdi, rsi, rbp, rbx, rdx, rax, rcx, rsp, rip, eflags;
-	unsigned short cs, gs, fs, __pad0;
-	unsigned long err, trapno, oldmask, cr2;
-	struct _fpstate *fpstate;
-	unsigned long __reserved1[8];
-};
-typedef struct {
-	gregset_t gregs;
-	fpregset_t fpregs;
-	unsigned long long __reserved1[8];
-} mcontext_t;
-#else
-typedef struct {
-	unsigned long __space[32];
-} mcontext_t;
-#endif
-
-struct sigaltstack {
-	void *ss_sp;
-	int ss_flags;
-	size_t ss_size;
-};
-
-typedef struct __ucontext {
-	unsigned long uc_flags;
-	struct __ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-	unsigned long __fpregs_mem[64];
-} ucontext_t;
-
-#define SA_NOCLDSTOP  1
-#define SA_NOCLDWAIT  2
-#define SA_SIGINFO    4
-#define SA_ONSTACK    0x08000000
-#define SA_RESTART    0x10000000
-#define SA_NODEFER    0x40000000
-#define SA_RESETHAND  0x80000000
-#define SA_RESTORER   0x04000000
-
-#endif
-
-#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
-
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/stat.h
@@ -1,22 +0,0 @@
-/* copied from kernel definition, but with padding replaced
- * by the corresponding correctly-sized userspace types. */
-
-struct stat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned int    __pad0;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-
-	struct timespec st_atim;
-	struct timespec st_mtim;
-	struct timespec st_ctim;
-	long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/stdint.h
@@ -1,20 +0,0 @@
-typedef int32_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef uint32_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-
-#define INT_FAST16_MIN  INT32_MIN
-#define INT_FAST32_MIN  INT32_MIN
-
-#define INT_FAST16_MAX  INT32_MAX
-#define INT_FAST32_MAX  INT32_MAX
-
-#define UINT_FAST16_MAX UINT32_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-
-#define INTPTR_MIN      INT64_MIN
-#define INTPTR_MAX      INT64_MAX
-#define UINTPTR_MAX     UINT64_MAX
-#define PTRDIFF_MIN     INT64_MIN
-#define PTRDIFF_MAX     INT64_MAX
-#define SIZE_MAX        UINT64_MAX
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/syscall.h.in
@@ -1,352 +0,0 @@
-#define __NR_read				0
-#define __NR_write				1
-#define __NR_open				2
-#define __NR_close				3
-#define __NR_stat				4
-#define __NR_fstat				5
-#define __NR_lstat				6
-#define __NR_poll				7
-#define __NR_lseek				8
-#define __NR_mmap				9
-#define __NR_mprotect			10
-#define __NR_munmap				11
-#define __NR_brk				12
-#define __NR_rt_sigaction		13
-#define __NR_rt_sigprocmask		14
-#define __NR_rt_sigreturn		15
-#define __NR_ioctl				16
-#define __NR_pread64			17
-#define __NR_pwrite64			18
-#define __NR_readv				19
-#define __NR_writev				20
-#define __NR_access				21
-#define __NR_pipe				22
-#define __NR_select				23
-#define __NR_sched_yield		24
-#define __NR_mremap				25
-#define __NR_msync				26
-#define __NR_mincore			27
-#define __NR_madvise			28
-#define __NR_shmget				29
-#define __NR_shmat				30
-#define __NR_shmctl				31
-#define __NR_dup				32
-#define __NR_dup2				33
-#define __NR_pause				34
-#define __NR_nanosleep			35
-#define __NR_getitimer			36
-#define __NR_alarm				37
-#define __NR_setitimer			38
-#define __NR_getpid				39
-#define __NR_sendfile			40
-#define __NR_socket				41
-#define __NR_connect			42
-#define __NR_accept				43
-#define __NR_sendto				44
-#define __NR_recvfrom			45
-#define __NR_sendmsg			46
-#define __NR_recvmsg			47
-#define __NR_shutdown			48
-#define __NR_bind				49
-#define __NR_listen				50
-#define __NR_getsockname		51
-#define __NR_getpeername		52
-#define __NR_socketpair			53
-#define __NR_setsockopt			54
-#define __NR_getsockopt			55
-#define __NR_clone				56
-#define __NR_fork				57
-#define __NR_vfork				58
-#define __NR_execve				59
-#define __NR_exit				60
-#define __NR_wait4				61
-#define __NR_kill				62
-#define __NR_uname				63
-#define __NR_semget				64
-#define __NR_semop				65
-#define __NR_semctl				66
-#define __NR_shmdt				67
-#define __NR_msgget				68
-#define __NR_msgsnd				69
-#define __NR_msgrcv				70
-#define __NR_msgctl				71
-#define __NR_fcntl				72
-#define __NR_flock				73
-#define __NR_fsync				74
-#define __NR_fdatasync			75
-#define __NR_truncate			76
-#define __NR_ftruncate			77
-#define __NR_getdents			78
-#define __NR_getcwd				79
-#define __NR_chdir				80
-#define __NR_fchdir				81
-#define __NR_rename				82
-#define __NR_mkdir				83
-#define __NR_rmdir				84
-#define __NR_creat				85
-#define __NR_link				86
-#define __NR_unlink				87
-#define __NR_symlink			88
-#define __NR_readlink			89
-#define __NR_chmod				90
-#define __NR_fchmod				91
-#define __NR_chown				92
-#define __NR_fchown				93
-#define __NR_lchown				94
-#define __NR_umask				95
-#define __NR_gettimeofday		96
-#define __NR_getrlimit			97
-#define __NR_getrusage			98
-#define __NR_sysinfo			99
-#define __NR_times				100
-#define __NR_ptrace				101
-#define __NR_getuid				102
-#define __NR_syslog				103
-#define __NR_getgid				104
-#define __NR_setuid				105
-#define __NR_setgid				106
-#define __NR_geteuid			107
-#define __NR_getegid			108
-#define __NR_setpgid			109
-#define __NR_getppid			110
-#define __NR_getpgrp			111
-#define __NR_setsid				112
-#define __NR_setreuid			113
-#define __NR_setregid			114
-#define __NR_getgroups			115
-#define __NR_setgroups			116
-#define __NR_setresuid			117
-#define __NR_getresuid			118
-#define __NR_setresgid			119
-#define __NR_getresgid			120
-#define __NR_getpgid			121
-#define __NR_setfsuid			122
-#define __NR_setfsgid			123
-#define __NR_getsid				124
-#define __NR_capget				125
-#define __NR_capset				126
-#define __NR_rt_sigpending		127
-#define __NR_rt_sigtimedwait	128
-#define __NR_rt_sigqueueinfo	129
-#define __NR_rt_sigsuspend		130
-#define __NR_sigaltstack		131
-#define __NR_utime				132
-#define __NR_mknod				133
-#define __NR_uselib				134
-#define __NR_personality		135
-#define __NR_ustat				136
-#define __NR_statfs				137
-#define __NR_fstatfs			138
-#define __NR_sysfs				139
-#define __NR_getpriority			140
-#define __NR_setpriority			141
-#define __NR_sched_setparam			142
-#define __NR_sched_getparam			143
-#define __NR_sched_setscheduler		144
-#define __NR_sched_getscheduler		145
-#define __NR_sched_get_priority_max	146
-#define __NR_sched_get_priority_min	147
-#define __NR_sched_rr_get_interval	148
-#define __NR_mlock					149
-#define __NR_munlock				150
-#define __NR_mlockall				151
-#define __NR_munlockall				152
-#define __NR_vhangup				153
-#define __NR_modify_ldt				154
-#define __NR_pivot_root				155
-#define __NR__sysctl				156
-#define __NR_prctl					157
-#define __NR_arch_prctl				158
-#define __NR_adjtimex				159
-#define __NR_setrlimit				160
-#define __NR_chroot					161
-#define __NR_sync					162
-#define __NR_acct					163
-#define __NR_settimeofday			164
-#define __NR_mount					165
-#define __NR_umount2				166
-#define __NR_swapon					167
-#define __NR_swapoff				168
-#define __NR_reboot					169
-#define __NR_sethostname			170
-#define __NR_setdomainname			171
-#define __NR_iopl					172
-#define __NR_ioperm					173
-#define __NR_create_module			174
-#define __NR_init_module			175
-#define __NR_delete_module			176
-#define __NR_get_kernel_syms		177
-#define __NR_query_module			178
-#define __NR_quotactl				179
-#define __NR_nfsservctl				180
-#define __NR_getpmsg				181
-#define __NR_putpmsg				182
-#define __NR_afs_syscall			183
-#define __NR_tuxcall				184
-#define __NR_security				185
-#define __NR_gettid					186
-#define __NR_readahead				187
-#define __NR_setxattr				188
-#define __NR_lsetxattr				189
-#define __NR_fsetxattr				190
-#define __NR_getxattr				191
-#define __NR_lgetxattr				192
-#define __NR_fgetxattr				193
-#define __NR_listxattr				194
-#define __NR_llistxattr				195
-#define __NR_flistxattr				196
-#define __NR_removexattr			197
-#define __NR_lremovexattr			198
-#define __NR_fremovexattr			199
-#define __NR_tkill					200
-#define __NR_time					201
-#define __NR_futex					202
-#define __NR_sched_setaffinity		203
-#define __NR_sched_getaffinity		204
-#define __NR_set_thread_area		205
-#define __NR_io_setup				206
-#define __NR_io_destroy				207
-#define __NR_io_getevents			208
-#define __NR_io_submit				209
-#define __NR_io_cancel				210
-#define __NR_get_thread_area		211
-#define __NR_lookup_dcookie			212
-#define __NR_epoll_create			213
-#define __NR_epoll_ctl_old			214
-#define __NR_epoll_wait_old			215
-#define __NR_remap_file_pages		216
-#define __NR_getdents64				217
-#define __NR_set_tid_address		218
-#define __NR_restart_syscall		219
-#define __NR_semtimedop				220
-#define __NR_fadvise64				221
-#define __NR_timer_create			222
-#define __NR_timer_settime			223
-#define __NR_timer_gettime			224
-#define __NR_timer_getoverrun		225
-#define __NR_timer_delete			226
-#define __NR_clock_settime			227
-#define __NR_clock_gettime			228
-#define __NR_clock_getres			229
-#define __NR_clock_nanosleep		230
-#define __NR_exit_group				231
-#define __NR_epoll_wait				232
-#define __NR_epoll_ctl				233
-#define __NR_tgkill					234
-#define __NR_utimes					235
-#define __NR_vserver				236
-#define __NR_mbind					237
-#define __NR_set_mempolicy			238
-#define __NR_get_mempolicy			239
-#define __NR_mq_open				240
-#define __NR_mq_unlink				241
-#define __NR_mq_timedsend			242
-#define __NR_mq_timedreceive		243
-#define __NR_mq_notify				244
-#define __NR_mq_getsetattr			245
-#define __NR_kexec_load				246
-#define __NR_waitid					247
-#define __NR_add_key				248
-#define __NR_request_key			249
-#define __NR_keyctl					250
-#define __NR_ioprio_set				251
-#define __NR_ioprio_get				252
-#define __NR_inotify_init			253
-#define __NR_inotify_add_watch		254
-#define __NR_inotify_rm_watch		255
-#define __NR_migrate_pages			256
-#define __NR_openat					257
-#define __NR_mkdirat				258
-#define __NR_mknodat				259
-#define __NR_fchownat				260
-#define __NR_futimesat				261
-#define __NR_newfstatat				262
-#define __NR_unlinkat				263
-#define __NR_renameat				264
-#define __NR_linkat					265
-#define __NR_symlinkat				266
-#define __NR_readlinkat				267
-#define __NR_fchmodat				268
-#define __NR_faccessat				269
-#define __NR_pselect6				270
-#define __NR_ppoll					271
-#define __NR_unshare				272
-#define __NR_set_robust_list		273
-#define __NR_get_robust_list		274
-#define __NR_splice					275
-#define __NR_tee					276
-#define __NR_sync_file_range		277
-#define __NR_vmsplice				278
-#define __NR_move_pages				279
-#define __NR_utimensat				280
-#define __NR_epoll_pwait			281
-#define __NR_signalfd				282
-#define __NR_timerfd_create			283
-#define __NR_eventfd				284
-#define __NR_fallocate				285
-#define __NR_timerfd_settime		286
-#define __NR_timerfd_gettime		287
-#define __NR_accept4				288
-#define __NR_signalfd4				289
-#define __NR_eventfd2				290
-#define __NR_epoll_create1			291
-#define __NR_dup3					292
-#define __NR_pipe2					293
-#define __NR_inotify_init1			294
-#define __NR_preadv					295
-#define __NR_pwritev				296
-#define __NR_rt_tgsigqueueinfo		297
-#define __NR_perf_event_open		298
-#define __NR_recvmmsg				299
-#define __NR_fanotify_init			300
-#define __NR_fanotify_mark			301
-#define __NR_prlimit64				302
-#define __NR_name_to_handle_at			303
-#define __NR_open_by_handle_at			304
-#define __NR_clock_adjtime			305
-#define __NR_syncfs				306
-#define __NR_sendmmsg				307
-#define __NR_setns				308
-#define __NR_getcpu				309
-#define __NR_process_vm_readv			310
-#define __NR_process_vm_writev			311
-#define __NR_kcmp				312
-#define __NR_finit_module			313
-#define __NR_sched_setattr			314
-#define __NR_sched_getattr			315
-#define __NR_renameat2				316
-#define __NR_seccomp				317
-#define __NR_getrandom				318
-#define __NR_memfd_create			319
-#define __NR_kexec_file_load			320
-#define __NR_bpf				321
-#define __NR_execveat				322
-#define __NR_userfaultfd			323
-#define __NR_membarrier				324
-#define __NR_mlock2				325
-#define __NR_copy_file_range			326
-#define __NR_preadv2				327
-#define __NR_pwritev2				328
-#define __NR_pkey_mprotect			329
-#define __NR_pkey_alloc				330
-#define __NR_pkey_free				331
-#define __NR_statx				332
-#define __NR_io_pgetevents			333
-#define __NR_rseq				334
-#define __NR_pidfd_send_signal			424
-#define __NR_io_uring_setup			425
-#define __NR_io_uring_enter			426
-#define __NR_io_uring_register			427
-#define __NR_open_tree		428
-#define __NR_move_mount		429
-#define __NR_fsopen		430
-#define __NR_fsconfig		431
-#define __NR_fsmount		432
-#define __NR_fspick		433
-#define __NR_pidfd_open		434
-#define __NR_clone3		435
-#define __NR_close_range	436
-#define __NR_openat2		437
-#define __NR_pidfd_getfd	438
-#define __NR_faccessat2		439
-
lib/libc/wasi/libc-top-half/musl/arch/x86_64/bits/user.h
@@ -1,41 +0,0 @@
-#undef __WORDSIZE
-#define __WORDSIZE 64
-
-typedef struct user_fpregs_struct {
-	uint16_t cwd, swd, ftw, fop;
-	uint64_t rip, rdp;
-	uint32_t mxcsr, mxcr_mask;
-	uint32_t st_space[32], xmm_space[64], padding[24];
-} elf_fpregset_t;
-
-struct user_regs_struct {
-	unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
-	unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
-	unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
-};
-#define ELF_NGREG 27
-typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
-
-struct user {
-	struct user_regs_struct		regs;
-	int				u_fpvalid;
-	struct user_fpregs_struct	i387;
-	unsigned long			u_tsize;
-	unsigned long			u_dsize;
-	unsigned long			u_ssize;
-	unsigned long			start_code;
-	unsigned long			start_stack;
-	long				signal;
-	int				reserved;
-	struct user_regs_struct		*u_ar0;
-	struct user_fpregs_struct	*u_fpstate;
-	unsigned long			magic;
-	char				u_comm[32];
-	unsigned long			u_debugreg[8];
-};
-
-#define PAGE_MASK		(~(PAGESIZE-1))
-#define NBPG			PAGESIZE
-#define UPAGES			1
-#define HOST_TEXT_START_ADDR	(u.start_code)
-#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
lib/libc/wasi/libc-top-half/musl/arch/x86_64/atomic_arch.h
@@ -1,123 +0,0 @@
-#define a_cas a_cas
-static inline int a_cas(volatile int *p, int t, int s)
-{
-	__asm__ __volatile__ (
-		"lock ; cmpxchg %3, %1"
-		: "=a"(t), "=m"(*p) : "a"(t), "r"(s) : "memory" );
-	return t;
-}
-
-#define a_cas_p a_cas_p
-static inline void *a_cas_p(volatile void *p, void *t, void *s)
-{
-	__asm__( "lock ; cmpxchg %3, %1"
-		: "=a"(t), "=m"(*(void *volatile *)p)
-		: "a"(t), "r"(s) : "memory" );
-	return t;
-}
-
-#define a_swap a_swap
-static inline int a_swap(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"xchg %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_fetch_add a_fetch_add
-static inline int a_fetch_add(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; xadd %0, %1"
-		: "=r"(v), "=m"(*p) : "0"(v) : "memory" );
-	return v;
-}
-
-#define a_and a_and
-static inline void a_and(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; and %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_or a_or
-static inline void a_or(volatile int *p, int v)
-{
-	__asm__ __volatile__(
-		"lock ; or %1, %0"
-		: "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_and_64 a_and_64
-static inline void a_and_64(volatile uint64_t *p, uint64_t v)
-{
-	__asm__ __volatile(
-		"lock ; and %1, %0"
-		 : "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_or_64 a_or_64
-static inline void a_or_64(volatile uint64_t *p, uint64_t v)
-{
-	__asm__ __volatile__(
-		"lock ; or %1, %0"
-		 : "=m"(*p) : "r"(v) : "memory" );
-}
-
-#define a_inc a_inc
-static inline void a_inc(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; incl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_dec a_dec
-static inline void a_dec(volatile int *p)
-{
-	__asm__ __volatile__(
-		"lock ; decl %0"
-		: "=m"(*p) : "m"(*p) : "memory" );
-}
-
-#define a_store a_store
-static inline void a_store(volatile int *p, int x)
-{
-	__asm__ __volatile__(
-		"mov %1, %0 ; lock ; orl $0,(%%rsp)"
-		: "=m"(*p) : "r"(x) : "memory" );
-}
-
-#define a_barrier a_barrier
-static inline void a_barrier()
-{
-	__asm__ __volatile__( "" : : : "memory" );
-}
-
-#define a_spin a_spin
-static inline void a_spin()
-{
-	__asm__ __volatile__( "pause" : : : "memory" );
-}
-
-#define a_crash a_crash
-static inline void a_crash()
-{
-	__asm__ __volatile__( "hlt" : : : "memory" );
-}
-
-#define a_ctz_64 a_ctz_64
-static inline int a_ctz_64(uint64_t x)
-{
-	__asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
-
-#define a_clz_64 a_clz_64
-static inline int a_clz_64(uint64_t x)
-{
-	__asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) );
-	return x;
-}
lib/libc/wasi/libc-top-half/musl/arch/x86_64/crt_arch.h
@@ -1,12 +0,0 @@
-__asm__(
-".text \n"
-".global " START " \n"
-START ": \n"
-"	xor %rbp,%rbp \n"
-"	mov %rsp,%rdi \n"
-".weak _DYNAMIC \n"
-".hidden _DYNAMIC \n"
-"	lea _DYNAMIC(%rip),%rsi \n"
-"	andq $-16,%rsp \n"
-"	call " START "_c \n"
-);
lib/libc/wasi/libc-top-half/musl/arch/x86_64/ksigaction.h
@@ -1,11 +0,0 @@
-#include <features.h>
-
-struct k_sigaction {
-	void (*handler)(int);
-	unsigned long flags;
-	void (*restorer)(void);
-	unsigned mask[2];
-};
-
-hidden void __restore_rt();
-#define __restore __restore_rt
lib/libc/wasi/libc-top-half/musl/arch/x86_64/kstat.h
@@ -1,22 +0,0 @@
-struct kstat {
-	dev_t st_dev;
-	ino_t st_ino;
-	nlink_t st_nlink;
-
-	mode_t st_mode;
-	uid_t st_uid;
-	gid_t st_gid;
-	unsigned int    __pad0;
-	dev_t st_rdev;
-	off_t st_size;
-	blksize_t st_blksize;
-	blkcnt_t st_blocks;
-
-	long st_atime_sec;
-	long st_atime_nsec;
-	long st_mtime_sec;
-	long st_mtime_nsec;
-	long st_ctime_sec;
-	long st_ctime_nsec;
-	long __unused[3];
-};
lib/libc/wasi/libc-top-half/musl/arch/x86_64/pthread_arch.h
@@ -1,8 +0,0 @@
-static inline uintptr_t __get_tp()
-{
-	uintptr_t tp;
-	__asm__ ("mov %%fs:0,%0" : "=r" (tp) );
-	return tp;
-}
-
-#define MC_PC gregs[REG_RIP]
lib/libc/wasi/libc-top-half/musl/arch/x86_64/reloc.h
@@ -1,20 +0,0 @@
-#define LDSO_ARCH "x86_64"
-
-#define REL_SYMBOLIC    R_X86_64_64
-#define REL_OFFSET32    R_X86_64_PC32
-#define REL_GOT         R_X86_64_GLOB_DAT
-#define REL_PLT         R_X86_64_JUMP_SLOT
-#define REL_RELATIVE    R_X86_64_RELATIVE
-#define REL_COPY        R_X86_64_COPY
-#define REL_DTPMOD      R_X86_64_DTPMOD64
-#define REL_DTPOFF      R_X86_64_DTPOFF64
-#define REL_TPOFF       R_X86_64_TPOFF64
-#define REL_TLSDESC     R_X86_64_TLSDESC
-
-#define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"mov %1,%%rsp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" )
-
-#define GETFUNCSYM(fp, sym, got) __asm__ ( \
-	".hidden " #sym "\n" \
-	"	lea " #sym "(%%rip),%0\n" \
-	: "=r"(*fp) : : "memory" )
lib/libc/wasi/libc-top-half/musl/arch/x86_64/syscall_arch.h
@@ -1,70 +0,0 @@
-#define __SYSCALL_LL_E(x) (x)
-#define __SYSCALL_LL_O(x) (x)
-
-static __inline long __syscall0(long n)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall1(long n, long a1)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall2(long n, long a1, long a2)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2)
-						  : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall3(long n, long a1, long a2, long a3)
-{
-	unsigned long ret;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-						  "d"(a3) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall4(long n, long a1, long a2, long a3, long a4)
-{
-	unsigned long ret;
-	register long r10 __asm__("r10") = a4;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-						  "d"(a3), "r"(r10): "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
-{
-	unsigned long ret;
-	register long r10 __asm__("r10") = a4;
-	register long r8 __asm__("r8") = a5;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-						  "d"(a3), "r"(r10), "r"(r8) : "rcx", "r11", "memory");
-	return ret;
-}
-
-static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
-{
-	unsigned long ret;
-	register long r10 __asm__("r10") = a4;
-	register long r8 __asm__("r8") = a5;
-	register long r9 __asm__("r9") = a6;
-	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
-						  "d"(a3), "r"(r10), "r"(r8), "r"(r9) : "rcx", "r11", "memory");
-	return ret;
-}
-
-#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6"
-#define VDSO_GETCPU_SYM "__vdso_getcpu"
-#define VDSO_GETCPU_VER "LINUX_2.6"
-
-#define IPC_64 0
lib/libc/wasi/libc-top-half/musl/compat/time32/__xstat.c
@@ -1,24 +0,0 @@
-#include "time32.h"
-#include <sys/stat.h>
-
-struct stat32;
-
-int __fxstat64(int ver, int fd, struct stat32 *buf)
-{
-	return __fstat_time32(fd, buf);
-}
-
-int __fxstatat64(int ver, int fd, const char *path, struct stat32 *buf, int flag)
-{
-	return __fstatat_time32(fd, path, buf, flag);
-}
-
-int __lxstat64(int ver, const char *path, struct stat32 *buf)
-{
-	return __lstat_time32(path, buf);
-}
-
-int __xstat64(int ver, const char *path, struct stat32 *buf)
-{
-	return __stat_time32(path, buf);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/adjtime32.c
@@ -1,21 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/timex.h>
-
-int __adjtime32(const struct timeval32 *in32, struct timeval32 *out32)
-{
-	struct timeval out;
-	int r = adjtime((&(struct timeval){
-		.tv_sec = in32->tv_sec,
-		.tv_usec = in32->tv_usec}), &out);
-	if (r) return r;
-	/* We can't range-check the result because success was already
-	 * committed by the above call. */
-	if (out32) {
-		out32->tv_sec = out.tv_sec;
-		out32->tv_usec = out.tv_usec;
-	}
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/adjtimex_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/timex.h>
-
-struct timex32;
-
-int __adjtimex_time32(struct timex32 *tx32)
-{
-	return __clock_adjtime32(CLOCK_REALTIME, tx32);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/aio_suspend_time32.c
@@ -1,11 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <aio.h>
-
-int __aio_suspend_time32(const struct aiocb *const cbs[], int cnt, const struct timespec32 *ts32)
-{
-	return aio_suspend(cbs, cnt, ts32 ? (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
-}
-
-weak_alias(aio_suspend, aio_suspend64);
lib/libc/wasi/libc-top-half/musl/compat/time32/clock_adjtime32.c
@@ -1,70 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/timex.h>
-#include <string.h>
-#include <stddef.h>
-
-struct timex32 {
-	unsigned modes;
-	long offset, freq, maxerror, esterror;
-	int status;
-	long constant, precision, tolerance;
-	struct timeval32 time;
-	long tick, ppsfreq, jitter;
-	int shift;
-	long stabil, jitcnt, calcnt, errcnt, stbcnt;
-	int tai;
-	int __padding[11];
-};
-
-int __clock_adjtime32(clockid_t clock_id, struct timex32 *tx32)
-{
-	struct timex utx = {
-		.modes = tx32->modes,
-		.offset = tx32->offset,
-		.freq = tx32->freq,
-		.maxerror = tx32->maxerror,
-		.esterror = tx32->esterror,
-		.status = tx32->status,
-		.constant = tx32->constant,
-		.precision = tx32->precision,
-		.tolerance = tx32->tolerance,
-		.time.tv_sec = tx32->time.tv_sec,
-		.time.tv_usec = tx32->time.tv_usec,
-		.tick = tx32->tick,
-		.ppsfreq = tx32->ppsfreq,
-		.jitter = tx32->jitter,
-		.shift = tx32->shift,
-		.stabil = tx32->stabil,
-		.jitcnt = tx32->jitcnt,
-		.calcnt = tx32->calcnt,
-		.errcnt = tx32->errcnt,
-		.stbcnt = tx32->stbcnt,
-		.tai = tx32->tai,
-	};
-	int r = clock_adjtime(clock_id, &utx);
-	if (r<0) return r;
-	tx32->modes = utx.modes;
-	tx32->offset = utx.offset;
-	tx32->freq = utx.freq;
-	tx32->maxerror = utx.maxerror;
-	tx32->esterror = utx.esterror;
-	tx32->status = utx.status;
-	tx32->constant = utx.constant;
-	tx32->precision = utx.precision;
-	tx32->tolerance = utx.tolerance;
-	tx32->time.tv_sec = utx.time.tv_sec;
-	tx32->time.tv_usec = utx.time.tv_usec;
-	tx32->tick = utx.tick;
-	tx32->ppsfreq = utx.ppsfreq;
-	tx32->jitter = utx.jitter;
-	tx32->shift = utx.shift;
-	tx32->stabil = utx.stabil;
-	tx32->jitcnt = utx.jitcnt;
-	tx32->calcnt = utx.calcnt;
-	tx32->errcnt = utx.errcnt;
-	tx32->stbcnt = utx.stbcnt;
-	tx32->tai = utx.tai;
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/clock_getres_time32.c
@@ -1,13 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-int __clock_getres_time32(clockid_t clk, struct timespec32 *ts32)
-{
-	struct timespec ts;
-	int r = clock_getres(clk, &ts);
-	if (!r && ts32) {
-		ts32->tv_sec = ts.tv_sec;
-		ts32->tv_nsec = ts.tv_nsec;
-	}
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/clock_gettime32.c
@@ -1,18 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-#include <stdint.h>
-
-int __clock_gettime32(clockid_t clk, struct timespec32 *ts32)
-{
-	struct timespec ts;
-	int r = clock_gettime(clk, &ts);
-	if (r) return r;
-	if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	ts32->tv_sec = ts.tv_sec;
-	ts32->tv_nsec = ts.tv_nsec;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/clock_nanosleep_time32.c
@@ -1,15 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-
-int __clock_nanosleep_time32(clockid_t clk, int flags, const struct timespec32 *req32, struct timespec32 *rem32)
-{
-	struct timespec rem;
-	int ret = clock_nanosleep(clk, flags, (&(struct timespec){
-		.tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
-	if (ret==EINTR && rem32 && !(flags & TIMER_ABSTIME)) {
-		rem32->tv_sec = rem.tv_sec;
-		rem32->tv_nsec = rem.tv_nsec;
-	}
-	return ret;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/clock_settime32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-int __clock_settime32(clockid_t clk, const struct timespec32 *ts32)
-{
-	return clock_settime(clk, (&(struct timespec){
-		.tv_sec = ts32->tv_sec,
-		.tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/cnd_timedwait_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <threads.h>
-
-int __cnd_timedwait_time32(cnd_t *restrict c, mtx_t *restrict m, const struct timespec32 *restrict ts32)
-{
-	return cnd_timedwait(c, m, ts32 ? (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/ctime32.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-char *__ctime32(time32_t *t)
-{
-	return ctime(&(time_t){*t});
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/ctime32_r.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-char *__ctime32_r(time32_t *t, char *buf)
-{
-	return ctime_r(&(time_t){*t}, buf);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/difftime32.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-double __difftime32(time32_t t1, time32_t t2)
-{
-	return difftime(t1, t2);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/fstat_time32.c
@@ -1,17 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <stddef.h>
-
-struct stat32;
-
-int __fstat_time32(int fd, struct stat32 *restrict st32)
-{
-	struct stat st;
-	int r = fstat(fd, &st);
-	if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
-	return r;
-}
-
-weak_alias(fstat, fstat64);
lib/libc/wasi/libc-top-half/musl/compat/time32/fstatat_time32.c
@@ -1,17 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <stddef.h>
-
-struct stat32;
-
-int __fstatat_time32(int fd, const char *restrict path, struct stat32 *restrict st32, int flag)
-{
-	struct stat st;
-	int r = fstatat(fd, path, &st, flag);
-	if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
-	return r;
-}
-
-weak_alias(fstatat, fstatat64);
lib/libc/wasi/libc-top-half/musl/compat/time32/ftime32.c
@@ -1,25 +0,0 @@
-#include "time32.h"
-#include <sys/timeb.h>
-#include <errno.h>
-#include <stdint.h>
-
-struct timeb32 {
-	int32_t time;
-	unsigned short millitm;
-	short timezone, dstflag;
-};
-
-int __ftime32(struct timeb32 *tp)
-{
-	struct timeb tb;
-	if (ftime(&tb) < 0) return -1;
-	if (tb.time < INT32_MIN || tb.time > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	tp->time = tb.time;
-	tp->millitm = tb.millitm;
-	tp->timezone = tb.timezone;
-	tp->dstflag = tb.dstflag;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/futimens_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/stat.h>
-
-int __futimens_time32(int fd, const struct timespec32 *times32)
-{
-	return futimens(fd, !times32 ? 0 : ((struct timespec[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec},
-		{.tv_sec = times32[1].tv_sec,.tv_nsec = times32[1].tv_nsec}}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/futimes_time32.c
@@ -1,12 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-int __futimes_time32(int fd, const struct timeval32 times32[2])
-{
-	return futimes(fd, !times32 ? 0 : ((struct timeval[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
-		{.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/futimesat_time32.c
@@ -1,12 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-int __futimesat_time32(int dirfd, const char *pathname, const struct timeval32 times32[2])
-{
-	return futimesat(dirfd, pathname, !times32 ? 0 : ((struct timeval[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
-		{.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/getitimer_time32.c
@@ -1,15 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-
-int __getitimer_time32(int which, struct itimerval32 *old32)
-{
-	struct itimerval old;
-	int r = getitimer(which, &old);
-	if (r) return r;
-	old32->it_interval.tv_sec = old.it_interval.tv_sec;
-	old32->it_interval.tv_usec = old.it_interval.tv_usec;
-	old32->it_value.tv_sec = old.it_value.tv_sec;
-	old32->it_value.tv_usec = old.it_value.tv_usec;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/getrusage_time32.c
@@ -1,39 +0,0 @@
-#include "time32.h"
-#include <string.h>
-#include <stddef.h>
-#include <sys/resource.h>
-
-struct compat_rusage {
-	struct timeval32 ru_utime;
-	struct timeval32 ru_stime;
-	long	ru_maxrss;
-	long	ru_ixrss;
-	long	ru_idrss;
-	long	ru_isrss;
-	long	ru_minflt;
-	long	ru_majflt;
-	long	ru_nswap;
-	long	ru_inblock;
-	long	ru_oublock;
-	long	ru_msgsnd;
-	long	ru_msgrcv;
-	long	ru_nsignals;
-	long	ru_nvcsw;
-	long	ru_nivcsw;
-};
-
-int __getrusage_time32(int who, struct compat_rusage *usage)
-{
-	struct rusage ru;
-	int r = getrusage(who, &ru);
-	if (!r) {
-		usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
-		usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
-		usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
-		usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
-		memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
-			sizeof(struct compat_rusage) -
-			offsetof(struct compat_rusage, ru_maxrss));
-	}
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/gettimeofday_time32.c
@@ -1,19 +0,0 @@
-#include "time32.h"
-#include <sys/time.h>
-#include <errno.h>
-#include <stdint.h>
-
-int __gettimeofday_time32(struct timeval32 *tv32, void *tz)
-{
-	struct timeval tv;
-	if (!tv32) return 0;
-	int r = gettimeofday(&tv, 0);
-	if (r) return r;
-	if (tv.tv_sec < INT32_MIN || tv.tv_sec > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	tv32->tv_sec = tv.tv_sec;
-	tv32->tv_usec = tv.tv_usec;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/gmtime32.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-struct tm *__gmtime32(time32_t *t)
-{
-	return gmtime(&(time_t){*t});
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/gmtime32_r.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-struct tm *__gmtime32_r(time32_t *t, struct tm *tm)
-{
-	return gmtime_r(&(time_t){*t}, tm);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/localtime32.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-struct tm *__localtime32(time32_t *t)
-{
-	return localtime(&(time_t){*t});
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/localtime32_r.c
@@ -1,7 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-struct tm *__localtime32_r(time32_t *t, struct tm *tm)
-{
-	return localtime_r(&(time_t){*t}, tm);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/lstat_time32.c
@@ -1,17 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <stddef.h>
-
-struct stat32;
-
-int __lstat_time32(const char *restrict path, struct stat32 *restrict st32)
-{
-	struct stat st;
-	int r = lstat(path, &st);
-	if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
-	return r;
-}
-
-weak_alias(lstat, lstat64);
lib/libc/wasi/libc-top-half/musl/compat/time32/lutimes_time32.c
@@ -1,12 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-int __lutimes_time32(const char *path, const struct timeval32 times32[2])
-{
-	return lutimes(path, !times32 ? 0 : ((struct timeval[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
-		{.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/mktime32.c
@@ -1,16 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-#include <stdint.h>
-
-time32_t __mktime32(struct tm *tm)
-{
-	struct tm tmp = *tm;
-	time_t t = mktime(&tmp);
-	if (t < INT32_MIN || t > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	*tm = tmp;
-	return t;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/mq_timedreceive_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <mqueue.h>
-#include <time.h>
-
-ssize_t __mq_timedreceive_time32(mqd_t mqd, char *restrict msg, size_t len, unsigned *restrict prio, const struct timespec32 *restrict ts32)
-{
-	return mq_timedreceive(mqd, msg, len, prio, ts32 ? (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/mq_timedsend_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <mqueue.h>
-#include <time.h>
-
-int __mq_timedsend_time32(mqd_t mqd, const char *msg, size_t len, unsigned prio, const struct timespec32 *ts32)
-{
-	return mq_timedsend(mqd, msg, len, prio, ts32 ? (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/mtx_timedlock_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <threads.h>
-
-int __mtx_timedlock_time32(mtx_t *restrict m, const struct timespec32 *restrict ts32)
-{
-	return mtx_timedlock(m, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/nanosleep_time32.c
@@ -1,15 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-
-int __nanosleep_time32(const struct timespec32 *req32, struct timespec32 *rem32)
-{
-	struct timespec rem;
-	int ret = nanosleep((&(struct timespec){
-		.tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
-	if (ret<0 && errno==EINTR && rem32) {
-		rem32->tv_sec = rem.tv_sec;
-		rem32->tv_nsec = rem.tv_nsec;
-	}
-	return ret;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/ppoll_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#define _GNU_SOURCE
-#include <time.h>
-#include <poll.h>
-
-int __ppoll_time32(struct pollfd *fds, nfds_t n, const struct timespec32 *ts32, const sigset_t *mask)
-{
-	return ppoll(fds, n, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pselect_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/select.h>
-
-int __pselect_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, const struct timespec32 *restrict ts32, const sigset_t *restrict mask)
-{
-	return pselect(n, rfds, wfds, efds, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pthread_cond_timedwait_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <pthread.h>
-
-int __pthread_cond_timedwait_time32(pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32)
-{
-	return pthread_cond_timedwait(c, m, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pthread_mutex_timedlock_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <pthread.h>
-
-int __pthread_mutex_timedlock_time32(pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32)
-{
-	return pthread_mutex_timedlock(m, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pthread_rwlock_timedrdlock_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <pthread.h>
-
-int __pthread_rwlock_timedrdlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32)
-{
-	return pthread_rwlock_timedrdlock(rw, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pthread_rwlock_timedwrlock_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <pthread.h>
-
-int __pthread_rwlock_timedwrlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32)
-{
-	return pthread_rwlock_timedwrlock(rw, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/pthread_timedjoin_np_time32.c
@@ -1,10 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <pthread.h>
-
-int __pthread_timedjoin_np_time32(pthread_t t, void **res, const struct timespec32 *at32)
-{
-	return pthread_timedjoin_np(t, res, !at32 ? 0 : (&(struct timespec){
-		.tv_sec = at32->tv_sec, .tv_nsec = at32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/recvmmsg_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#define _GNU_SOURCE
-#include <time.h>
-#include <sys/socket.h>
-
-int __recvmmsg_time32(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec32 *ts32)
-{
-	return recvmmsg(fd, msgvec, vlen, flags, ts32 ? (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/sched_rr_get_interval_time32.c
@@ -1,13 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sched.h>
-
-int __sched_rr_get_interval_time32(pid_t pid, struct timespec32 *ts32)
-{
-	struct timespec ts;
-	int r = sched_rr_get_interval(pid, &ts);
-	if (r) return r;
-	ts32->tv_sec = ts.tv_sec;
-	ts32->tv_nsec = ts.tv_nsec;
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/select_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/select.h>
-
-int __select_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, struct timeval32 *restrict tv32)
-{
-	return select(n, rfds, wfds, efds, !tv32 ? 0 : (&(struct timeval){
-		.tv_sec = tv32->tv_sec, .tv_usec = tv32->tv_usec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/sem_timedwait_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <semaphore.h>
-
-int __sem_timedwait_time32(sem_t *sem, const struct timespec32 *restrict ts32)
-{
-	return sem_timedwait(sem, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/semtimedop_time32.c
@@ -1,10 +0,0 @@
-#include "time32.h"
-#define _GNU_SOURCE
-#include <sys/sem.h>
-#include <time.h>
-
-int __semtimedop_time32(int id, struct sembuf *buf, size_t n, const struct timespec32 *ts32)
-{
-	return semtimedop(id, buf, n, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/setitimer_time32.c
@@ -1,25 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-
-int __setitimer_time32(int which, const struct itimerval32 *restrict new32, struct itimerval32 *restrict old32)
-{
-	struct itimerval old;
-	int r = setitimer(which, (&(struct itimerval){
-		.it_interval.tv_sec = new32->it_interval.tv_sec,
-		.it_interval.tv_usec = new32->it_interval.tv_usec,
-		.it_value.tv_sec = new32->it_value.tv_sec,
-		.it_value.tv_usec = new32->it_value.tv_usec}), &old);
-	if (r) return r;
-	/* The above call has already committed to success by changing the
-	 * timer setting, so we can't fail on out-of-range old value.
-	 * Since these are relative times, values large enough to overflow
-	 * don't make sense anyway. */
-	if (old32) {
-		old32->it_interval.tv_sec = old.it_interval.tv_sec;
-		old32->it_interval.tv_usec = old.it_interval.tv_usec;
-		old32->it_value.tv_sec = old.it_value.tv_sec;
-		old32->it_value.tv_usec = old.it_value.tv_usec;
-	}
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/settimeofday_time32.c
@@ -1,10 +0,0 @@
-#define _BSD_SOURCE
-#include "time32.h"
-#include <sys/time.h>
-
-int __settimeofday_time32(const struct timeval32 *tv32, const void *tz)
-{
-	return settimeofday(!tv32 ? 0 : (&(struct timeval){
-		.tv_sec = tv32->tv_sec,
-		.tv_usec = tv32->tv_usec}), 0);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/sigtimedwait_time32.c
@@ -1,9 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <signal.h>
-
-int __sigtimedwait_time32(const sigset_t *restrict set, siginfo_t *restrict si, const struct timespec32 *restrict ts32)
-{
-	return sigtimedwait(set, si, !ts32 ? 0 : (&(struct timespec){
-		.tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/stat_time32.c
@@ -1,17 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <stddef.h>
-
-struct stat32;
-
-int __stat_time32(const char *restrict path, struct stat32 *restrict st32)
-{
-	struct stat st;
-	int r = stat(path, &st);
-	if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
-	return r;
-}
-
-weak_alias(stat, stat64);
lib/libc/wasi/libc-top-half/musl/compat/time32/stime32.c
@@ -1,8 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-
-int __stime32(const time32_t *t)
-{
-	return stime(&(time_t){*t});
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/thrd_sleep_time32.c
@@ -1,16 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <threads.h>
-#include <errno.h>
-
-int __thrd_sleep_time32(const struct timespec32 *req32, struct timespec32 *rem32)
-{
-	struct timespec rem;
-	int ret = thrd_sleep((&(struct timespec){
-		.tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
-	if (ret<0 && errno==EINTR && rem32) {
-		rem32->tv_sec = rem.tv_sec;
-		rem32->tv_nsec = rem.tv_nsec;
-	}
-	return ret;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/time32.c
@@ -1,15 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-#include <stdint.h>
-
-time32_t __time32(time32_t *p)
-{
-	time_t t = time(0);
-	if (t < INT32_MIN || t > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	if (p) *p = t;
-	return t;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/time32.h
@@ -1,91 +0,0 @@
-#ifndef TIME32_H
-#define TIME32_H
-
-#include <sys/types.h>
-
-typedef long time32_t;
-
-struct timeval32 {
-	long tv_sec;
-	long tv_usec;
-};
-
-struct itimerval32 {
-	struct timeval32 it_interval;
-	struct timeval32 it_value;
-};
-
-struct timespec32 {
-	long tv_sec;
-	long tv_nsec;
-};
-
-struct itimerspec32 {
-	struct timespec32 it_interval;
-	struct timespec32 it_value;
-};
-
-int __adjtime32() __asm__("adjtime");
-int __adjtimex_time32() __asm__("adjtimex");
-int __aio_suspend_time32() __asm__("aio_suspend");
-int __clock_adjtime32() __asm__("clock_adjtime");
-int __clock_getres_time32() __asm__("clock_getres");
-int __clock_gettime32() __asm__("clock_gettime");
-int __clock_nanosleep_time32() __asm__("clock_nanosleep");
-int __clock_settime32() __asm__("clock_settime");
-int __cnd_timedwait_time32() __asm__("cnd_timedwait");
-char *__ctime32() __asm__("ctime");
-char *__ctime32_r() __asm__("ctime_r");
-double __difftime32() __asm__("difftime");
-int __fstat_time32() __asm__("fstat");
-int __fstatat_time32() __asm__("fstatat");
-int __ftime32() __asm__("ftime");
-int __futimens_time32() __asm__("futimens");
-int __futimes_time32() __asm__("futimes");
-int __futimesat_time32() __asm__("futimesat");
-int __getitimer_time32() __asm__("getitimer");
-int __getrusage_time32() __asm__("getrusage");
-int __gettimeofday_time32() __asm__("gettimeofday");
-struct tm *__gmtime32() __asm__("gmtime");
-struct tm *__gmtime32_r() __asm__("gmtime_r");
-struct tm *__localtime32() __asm__("localtime");
-struct tm *__localtime32_r() __asm__("localtime_r");
-int __lstat_time32() __asm__("lstat");
-int __lutimes_time32() __asm__("lutimes");
-time32_t __mktime32() __asm__("mktime");
-ssize_t __mq_timedreceive_time32() __asm__("mq_timedreceive");
-int __mq_timedsend_time32() __asm__("mq_timedsend");
-int __mtx_timedlock_time32() __asm__("mtx_timedlock");
-int __nanosleep_time32() __asm__("nanosleep");
-int __ppoll_time32() __asm__("ppoll");
-int __pselect_time32() __asm__("pselect");
-int __pthread_cond_timedwait_time32() __asm__("pthread_cond_timedwait");
-int __pthread_mutex_timedlock_time32() __asm__("pthread_mutex_timedlock");
-int __pthread_rwlock_timedrdlock_time32() __asm__("pthread_rwlock_timedrdlock");
-int __pthread_rwlock_timedwrlock_time32() __asm__("pthread_rwlock_timedwrlock");
-int __pthread_timedjoin_np_time32() __asm__("pthread_timedjoin_np");
-int __recvmmsg_time32() __asm__("recvmmsg");
-int __sched_rr_get_interval_time32() __asm__("sched_rr_get_interval");
-int __select_time32() __asm__("select");
-int __sem_timedwait_time32() __asm__("sem_timedwait");
-int __semtimedop_time32() __asm__("semtimedop");
-int __setitimer_time32() __asm__("setitimer");
-int __settimeofday_time32() __asm__("settimeofday");
-int __sigtimedwait_time32() __asm__("sigtimedwait");
-int __stat_time32() __asm__("stat");
-int __stime32() __asm__("stime");
-int __thrd_sleep_time32() __asm__("thrd_sleep");
-time32_t __time32() __asm__("time");
-time32_t __time32gm() __asm__("timegm");
-int __timer_gettime32() __asm__("timer_gettime");
-int __timer_settime32() __asm__("timer_settime");
-int __timerfd_gettime32() __asm__("timerfd_gettime");
-int __timerfd_settime32() __asm__("timerfd_settime");
-int __timespec_get_time32() __asm__("timespec_get");
-int __utime_time32() __asm__("utime");
-int __utimensat_time32() __asm__("utimensat");
-int __utimes_time32() __asm__("utimes");
-pid_t __wait3_time32() __asm__("wait3");
-pid_t __wait4_time32() __asm__("wait4");
-
-#endif
lib/libc/wasi/libc-top-half/musl/compat/time32/time32gm.c
@@ -1,15 +0,0 @@
-#define _GNU_SOURCE
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-#include <stdint.h>
-
-time32_t __time32gm(struct tm *tm)
-{
-	time_t t = timegm(tm);
-	if (t < INT32_MIN || t > INT32_MAX) {
-		errno = EOVERFLOW;
-		return -1;
-	}
-	return t;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/timer_gettime32.c
@@ -1,15 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-int __timer_gettime32(timer_t t, struct itimerspec32 *val32)
-{
-	struct itimerspec old;
-	int r = timer_gettime(t, &old);
-	if (r) return r;
-	/* No range checking for consistency with settime */
-	val32->it_interval.tv_sec = old.it_interval.tv_sec;
-	val32->it_interval.tv_nsec = old.it_interval.tv_nsec;
-	val32->it_value.tv_sec = old.it_value.tv_sec;
-	val32->it_value.tv_nsec = old.it_value.tv_nsec;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/timer_settime32.c
@@ -1,25 +0,0 @@
-#include "time32.h"
-#include <time.h>
-
-int __timer_settime32(timer_t t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32)
-{
-	struct itimerspec old;
-	int r = timer_settime(t, flags, (&(struct itimerspec){
-		.it_interval.tv_sec = val32->it_interval.tv_sec,
-		.it_interval.tv_nsec = val32->it_interval.tv_nsec,
-		.it_value.tv_sec = val32->it_value.tv_sec,
-		.it_value.tv_nsec = val32->it_value.tv_nsec}),
-		old32 ? &old : 0);
-	if (r) return r;
-	/* The above call has already committed to success by changing the
-	 * timer setting, so we can't fail on out-of-range old value.
-	 * Since these are relative times, values large enough to overflow
-	 * don't make sense anyway. */
-	if (old32) {
-		old32->it_interval.tv_sec = old.it_interval.tv_sec;
-		old32->it_interval.tv_nsec = old.it_interval.tv_nsec;
-		old32->it_value.tv_sec = old.it_value.tv_sec;
-		old32->it_value.tv_nsec = old.it_value.tv_nsec;
-	}
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/timerfd_gettime32.c
@@ -1,16 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/timerfd.h>
-
-int __timerfd_gettime32(int t, struct itimerspec32 *val32)
-{
-	struct itimerspec old;
-	int r = timerfd_gettime(t, &old);
-	if (r) return r;
-	/* No range checking for consistency with settime */
-	val32->it_interval.tv_sec = old.it_interval.tv_sec;
-	val32->it_interval.tv_nsec = old.it_interval.tv_nsec;
-	val32->it_value.tv_sec = old.it_value.tv_sec;
-	val32->it_value.tv_nsec = old.it_value.tv_nsec;
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/timerfd_settime32.c
@@ -1,26 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/timerfd.h>
-
-int __timerfd_settime32(int t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32)
-{
-	struct itimerspec old;
-	int r = timerfd_settime(t, flags, (&(struct itimerspec){
-		.it_interval.tv_sec = val32->it_interval.tv_sec,
-		.it_interval.tv_nsec = val32->it_interval.tv_nsec,
-		.it_value.tv_sec = val32->it_value.tv_sec,
-		.it_value.tv_nsec = val32->it_value.tv_nsec}),
-		old32 ? &old : 0);
-	if (r) return r;
-	/* The above call has already committed to success by changing the
-	 * timer setting, so we can't fail on out-of-range old value.
-	 * Since these are relative times, values large enough to overflow
-	 * don't make sense anyway. */
-	if (old32) {
-		old32->it_interval.tv_sec = old.it_interval.tv_sec;
-		old32->it_interval.tv_nsec = old.it_interval.tv_nsec;
-		old32->it_value.tv_sec = old.it_value.tv_sec;
-		old32->it_value.tv_nsec = old.it_value.tv_nsec;
-	}
-	return 0;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/timespec_get_time32.c
@@ -1,18 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <errno.h>
-#include <stdint.h>
-
-int __timespec_get_time32(struct timespec32 *ts32, int base)
-{
-	struct timespec ts;
-	int r = timespec_get(&ts, base);
-	if (!r) return r;
-	if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) {
-		errno = EOVERFLOW;
-		return 0;
-	}
-	ts32->tv_sec = ts.tv_sec;
-	ts32->tv_nsec = ts.tv_nsec;
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/utime_time32.c
@@ -1,14 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <utime.h>
-
-struct utimbuf32 {
-	time32_t actime;
-	time32_t modtime;
-};
-
-int __utime_time32(const char *path, const struct utimbuf32 *times32)
-{
-	return utime(path, !times32 ? 0 : (&(struct utimbuf){
-		.actime = times32->actime, .modtime = times32->modtime}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/utimensat_time32.c
@@ -1,11 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/stat.h>
-
-int __utimensat_time32(int fd, const char *path, const struct timespec32 times32[2], int flags)
-{
-	return utimensat(fd, path, !times32 ? 0 : ((struct timespec[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec},
-		{.tv_sec = times32[1].tv_sec,.tv_nsec = times32[1].tv_nsec}}),
-		flags);
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/utimes_time32.c
@@ -1,11 +0,0 @@
-#include "time32.h"
-#include <time.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-int __utimes_time32(const char *path, const struct timeval32 times32[2])
-{
-	return utimes(path, !times32 ? 0 : ((struct timeval[2]){
-		{.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
-		{.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/wait3_time32.c
@@ -1,40 +0,0 @@
-#define _BSD_SOURCE
-#include "time32.h"
-#include <string.h>
-#include <stddef.h>
-#include <sys/wait.h>
-
-struct compat_rusage {
-	struct timeval32 ru_utime;
-	struct timeval32 ru_stime;
-	long	ru_maxrss;
-	long	ru_ixrss;
-	long	ru_idrss;
-	long	ru_isrss;
-	long	ru_minflt;
-	long	ru_majflt;
-	long	ru_nswap;
-	long	ru_inblock;
-	long	ru_oublock;
-	long	ru_msgsnd;
-	long	ru_msgrcv;
-	long	ru_nsignals;
-	long	ru_nvcsw;
-	long	ru_nivcsw;
-};
-
-pid_t __wait3_time32(int *status, int options, struct compat_rusage *usage)
-{
-	struct rusage ru;
-	int r = wait3(status, options, usage ? &ru : 0);
-	if (!r && usage) {
-		usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
-		usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
-		usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
-		usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
-		memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
-			sizeof(struct compat_rusage) -
-			offsetof(struct compat_rusage, ru_maxrss));
-	}
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/compat/time32/wait4_time32.c
@@ -1,40 +0,0 @@
-#define _BSD_SOURCE
-#include "time32.h"
-#include <string.h>
-#include <stddef.h>
-#include <sys/wait.h>
-
-struct compat_rusage {
-	struct timeval32 ru_utime;
-	struct timeval32 ru_stime;
-	long	ru_maxrss;
-	long	ru_ixrss;
-	long	ru_idrss;
-	long	ru_isrss;
-	long	ru_minflt;
-	long	ru_majflt;
-	long	ru_nswap;
-	long	ru_inblock;
-	long	ru_oublock;
-	long	ru_msgsnd;
-	long	ru_msgrcv;
-	long	ru_nsignals;
-	long	ru_nvcsw;
-	long	ru_nivcsw;
-};
-
-pid_t __wait4_time32(pid_t pid, int *status, int options, struct compat_rusage *usage)
-{
-	struct rusage ru;
-	int r = wait4(pid, status, options, usage ? &ru : 0);
-	if (!r && usage) {
-		usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
-		usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
-		usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
-		usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
-		memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
-			sizeof(struct compat_rusage) -
-			offsetof(struct compat_rusage, ru_maxrss));
-	}
-	return r;
-}
lib/libc/wasi/libc-top-half/musl/crt/aarch64/crti.s
@@ -1,13 +0,0 @@
-.section .init
-.global _init
-.type _init,%function
-_init:
-	stp x29,x30,[sp,-16]!
-	mov x29,sp
-
-.section .fini
-.global _fini
-.type _fini,%function
-_fini:
-	stp x29,x30,[sp,-16]!
-	mov x29,sp
lib/libc/wasi/libc-top-half/musl/crt/aarch64/crtn.s
@@ -1,7 +0,0 @@
-.section .init
-	ldp x29,x30,[sp],#16
-	ret
-
-.section .fini
-	ldp x29,x30,[sp],#16
-	ret
lib/libc/wasi/libc-top-half/musl/crt/arm/crti.s
@@ -1,13 +0,0 @@
-.syntax unified
-
-.section .init
-.global _init
-.type _init,%function
-_init:
-	push {r0,lr}
-
-.section .fini
-.global _fini
-.type _fini,%function
-_fini:
-	push {r0,lr}
lib/libc/wasi/libc-top-half/musl/crt/arm/crtn.s
@@ -1,9 +0,0 @@
-.syntax unified
-
-.section .init
-	pop {r0,lr}
-	bx lr
-
-.section .fini
-	pop {r0,lr}
-	bx lr
lib/libc/wasi/libc-top-half/musl/crt/i386/crti.s
@@ -1,9 +0,0 @@
-.section .init
-.global _init
-_init:
-	sub $12,%esp
-
-.section .fini
-.global _fini
-_fini:
-	sub $12,%esp
lib/libc/wasi/libc-top-half/musl/crt/i386/crtn.s
@@ -1,7 +0,0 @@
-.section .init
-	add $12,%esp
-	ret
-
-.section .fini
-	add $12,%esp
-	ret
lib/libc/wasi/libc-top-half/musl/crt/microblaze/crti.s
@@ -1,13 +0,0 @@
-.section .init
-.global _init
-.align 2
-_init:
-	addi r1, r1, -32
-	swi r15, r1, 0
-
-.section .fini
-.global _fini
-.align 2
-_fini:
-	addi r1, r1, -32
-	swi r15, r1, 0
lib/libc/wasi/libc-top-half/musl/crt/microblaze/crtn.s
@@ -1,9 +0,0 @@
-.section .init
-	lwi r15, r1, 0
-	rtsd r15, 8
-	addi r1, r1, 32
-
-.section .fini
-	lwi r15, r1, 0
-	rtsd r15, 8
-	addi r1, r1, 32
lib/libc/wasi/libc-top-half/musl/crt/mips/crti.s
@@ -1,19 +0,0 @@
-.set noreorder
-
-.section .init
-.global _init
-.type _init,@function
-.align 2
-_init:
-	subu $sp,$sp,32
-	sw $gp,24($sp)
-	sw $ra,28($sp)
-
-.section .fini
-.global _fini
-.type _fini,@function
-.align 2
-_fini:
-	subu $sp,$sp,32
-	sw $gp,24($sp)
-	sw $ra,28($sp)
lib/libc/wasi/libc-top-half/musl/crt/mips/crtn.s
@@ -1,13 +0,0 @@
-.set noreorder
-
-.section .init
-	lw $gp,24($sp)
-	lw $ra,28($sp)
-	j $ra
-	addu $sp,$sp,32
-
-.section .fini
-	lw $gp,24($sp)
-	lw $ra,28($sp)
-	j $ra
-	addu $sp,$sp,32
lib/libc/wasi/libc-top-half/musl/crt/mips64/crti.s
@@ -1,17 +0,0 @@
-.set noreorder
-
-.section .init
-.global _init
-.align 3
-_init:
-	dsubu	$sp, $sp, 32
-	sd	$gp, 16($sp)
-	sd	$ra, 24($sp)
-
-.section .fini
-.global _fini
-.align 3
-_fini:
-	dsubu	$sp, $sp, 32
-	sd	$gp, 16($sp)
-	sd	$ra, 24($sp)
lib/libc/wasi/libc-top-half/musl/crt/mips64/crtn.s
@@ -1,13 +0,0 @@
-.set noreorder
-
-.section .init
-	ld $gp,16($sp)
-	ld $ra,24($sp)
-	j $ra
-	daddu $sp,$sp,32
-
-.section .fini
-	ld $gp,16($sp)
-	ld $ra,24($sp)
-	j $ra
-	daddu $sp,$sp,32
lib/libc/wasi/libc-top-half/musl/crt/mipsn32/crti.s
@@ -1,18 +0,0 @@
-.set	noreorder
-.section	.init
-.global	_init
-.type	_init,@function
-.align	2
-_init:
-	subu	$sp, $sp, 32
-	sd	$gp, 16($sp)
-	sd	$ra, 24($sp)
-
-.section	.fini
-.global	_fini
-.type	_fini,@function
-.align	2
-_fini:
-	subu	$sp, $sp, 32
-	sd	$gp, 16($sp)
-	sd	$ra, 24($sp)
lib/libc/wasi/libc-top-half/musl/crt/mipsn32/crtn.s
@@ -1,12 +0,0 @@
-.set	noreorder
-.section	.init
-	ld	$gp, 16($sp)
-	ld	$ra, 24($sp)
-	j	$ra
-	addu	$sp, $sp, 32
-
-.section	.fini
-	ld	$gp, 16($sp)
-	ld	$ra, 24($sp)
-	j	$ra
-	addu	$sp, $sp, 32
lib/libc/wasi/libc-top-half/musl/crt/or1k/crti.s
@@ -1,11 +0,0 @@
-.section .init
-.global _init
-_init:
-	l.addi	r1,r1,-4
-	l.sw	0(r1),r9
-
-.section .fini
-.global _fini
-_fini:
-	l.addi  r1,r1,-4
-	l.sw    0(r1),r9
lib/libc/wasi/libc-top-half/musl/crt/or1k/crtn.s
@@ -1,9 +0,0 @@
-.section .init
-	l.lwz	r9,0(r1)
-	l.jr	r9
-	 l.addi	r1,r1,4
-
-.section .fini
-	l.lwz	r9,0(r1)
-	l.jr	r9
-	 l.addi	r1,r1,4
lib/libc/wasi/libc-top-half/musl/crt/powerpc/crti.s
@@ -1,15 +0,0 @@
-.section .init
-.align 2
-.global _init
-_init:
-	stwu 1,-32(1)
-	mflr 0
-	stw 0,36(1)
-
-.section .fini
-.align 2
-.global _fini
-_fini:
-	stwu 1,-32(1)
-	mflr 0
-	stw 0,36(1)
lib/libc/wasi/libc-top-half/musl/crt/powerpc/crtn.s
@@ -1,13 +0,0 @@
-.section .init
-.align 2
-	lwz 0,36(1)
-	addi 1,1,32
-	mtlr 0
-	blr
-
-.section .fini
-.align 2
-	lwz 0,36(1)
-	addi 1,1,32
-	mtlr 0
-	blr
lib/libc/wasi/libc-top-half/musl/crt/powerpc64/crti.s
@@ -1,21 +0,0 @@
-.section .init
-.align 2
-.global _init
-_init:
-	addis 2, 12, .TOC.-_init@ha
-	addi  2,  2, .TOC.-_init@l
-	.localentry _init,.-_init
-	mflr 0
-	std  0, 16(1)
-	stdu 1,-32(1)
-
-.section .fini
-.align 2
-.global _fini
-_fini:
-	addis 2, 12, .TOC.-_fini@ha
-	addi  2,  2, .TOC.-_fini@l
-	.localentry _fini,.-_fini
-	mflr 0
-	std  0, 16(1)
-	stdu 1,-32(1)
lib/libc/wasi/libc-top-half/musl/crt/powerpc64/crtn.s
@@ -1,13 +0,0 @@
-.section .init
-.align 2
-	addi 1, 1, 32
-	ld   0, 16(1)
-	mtlr 0
-	blr
-
-.section .fini
-.align 2
-	addi 1, 1, 32
-	ld   0, 16(1)
-	mtlr 0
-	blr
lib/libc/wasi/libc-top-half/musl/crt/s390x/crti.s
@@ -1,17 +0,0 @@
-.section .init
-.align 2
-.global _init
-_init:
-	stmg %r14, %r15, 112(%r15)
-	lgr  %r0,  %r15
-	aghi %r15, -160
-	stg  %r0,  0(%r15)
-
-.section .fini
-.align 2
-.global _fini
-_fini:
-	stmg %r14, %r15, 112(%r15)
-	lgr  %r0,  %r15
-	aghi %r15, -160
-	stg  %r0,  0(%r15)
lib/libc/wasi/libc-top-half/musl/crt/s390x/crtn.s
@@ -1,9 +0,0 @@
-.section .init
-.align 2
-	lmg  %r14, %r15, 272(%r15)
-	br   %r14
-
-.section .fini
-.align 2
-	lmg  %r14, %r15, 272(%r15)
-	br   %r14
lib/libc/wasi/libc-top-half/musl/crt/sh/crti.s
@@ -1,21 +0,0 @@
-.section .init
-.global  _init
-.type    _init, @function
-_init:
-	add #-4, r15
-	mov.l r12, @-r15
-	mov.l r14, @-r15
-	sts.l pr, @-r15
-	mov r15, r14
-	nop
-
-.section .fini
-.global  _fini
-.type    _fini, @function
-_fini:
-	add #-4, r15
-	mov.l r12, @-r15
-	mov.l r14, @-r15
-	sts.l pr, @-r15
-	mov r15, r14
-	nop
lib/libc/wasi/libc-top-half/musl/crt/sh/crtn.s
@@ -1,13 +0,0 @@
-.section .init
-	lds.l @r15+, pr
-	mov.l @r15+, r14
-	mov.l @r15+, r12
-	rts
-	 add #4, r15
-
-.section .fini
-	lds.l @r15+, pr
-	mov.l @r15+, r14
-	mov.l @r15+, r12
-	rts
-	 add #4, r15
lib/libc/wasi/libc-top-half/musl/crt/x32/crti.s
@@ -1,9 +0,0 @@
-.section .init
-.global _init
-_init:
-	push %rax
-
-.section .fini
-.global _fini
-_fini:
-	push %rax
lib/libc/wasi/libc-top-half/musl/crt/x32/crtn.s
@@ -1,7 +0,0 @@
-.section .init
-	pop %rax
-	ret
-
-.section .fini
-	pop %rax
-	ret
lib/libc/wasi/libc-top-half/musl/crt/x86_64/crti.s
@@ -1,9 +0,0 @@
-.section .init
-.global _init
-_init:
-	push %rax
-
-.section .fini
-.global _fini
-_fini:
-	push %rax
lib/libc/wasi/libc-top-half/musl/crt/x86_64/crtn.s
@@ -1,7 +0,0 @@
-.section .init
-	pop %rax
-	ret
-
-.section .fini
-	pop %rax
-	ret
lib/libc/wasi/libc-top-half/musl/crt/crt1.c
@@ -1,19 +0,0 @@
-#include <features.h>
-#include "libc.h"
-
-#define START "_start"
-
-#include "crt_arch.h"
-
-int main();
-weak void _init();
-weak void _fini();
-int __libc_start_main(int (*)(), int, char **,
-	void (*)(), void(*)(), void(*)());
-
-void _start_c(long *p)
-{
-	int argc = p[0];
-	char **argv = (void *)(p+1);
-	__libc_start_main(main, argc, argv, _init, _fini, 0);
-}
lib/libc/wasi/libc-top-half/musl/crt/crti.c
lib/libc/wasi/libc-top-half/musl/crt/crtn.c
lib/libc/wasi/libc-top-half/musl/crt/rcrt1.c
@@ -1,14 +0,0 @@
-#define START "_start"
-#define _dlstart_c _start_c
-#include "../ldso/dlstart.c"
-
-int main();
-weak void _init();
-weak void _fini();
-int __libc_start_main(int (*)(), int, char **,
-	void (*)(), void(*)(), void(*)());
-
-hidden void __dls2(unsigned char *base, size_t *sp)
-{
-	__libc_start_main(main, *sp, (void *)(sp+1), _init, _fini, 0);
-}
lib/libc/wasi/libc-top-half/musl/crt/Scrt1.c
@@ -1,1 +0,0 @@
-#include "crt1.c"
lib/libc/wasi/libc-top-half/musl/dist/config.mak
@@ -1,36 +0,0 @@
-#
-# musl config.mak template (original in dist/config.mak)
-#
-
-# Target CPU architecture. Supported values: i386, x86_64
-ARCH = i386
-
-# Installation prefix. DO NOT use /, /usr, or /usr/local !
-prefix = /usr/local/musl
-
-# Installation prefix for musl-gcc compiler wrapper.
-exec_prefix = /usr/local
-
-# Location for the dynamic linker ld-musl-$(ARCH).so.1
-syslibdir = /lib
-
-# Uncomment if you want to build i386 musl on a 64-bit host
-#CFLAGS += -m32
-
-# Uncomment to fix broken distro-patched toolchains where hash-style=gnu(only)
-#LDFLAGS += -Wl,--hash-style,both
-
-# Uncomment to fix broken distro-patched toolchains where stack-protector=on
-#CFLAGS += -fno-stack-protector
-
-# Uncomment for smaller code size.
-#CFLAGS += -fomit-frame-pointer -mno-accumulate-outgoing-args
-
-# Uncomment to omit massive GCC4 DWARF2 bloat (only useful for debugging)
-#CFLAGS += -fno-asynchronous-unwind-tables
-
-# Uncomment for warnings (as errors). Might need tuning to your gcc version.
-#CFLAGS += -Werror -Wall -Wpointer-arith -Wcast-align -Wno-parentheses -Wno-char-subscripts -Wno-uninitialized -Wno-sequence-point -Wno-missing-braces -Wno-unused-value -Wno-overflow -Wno-int-to-pointer-cast
-
-# Uncomment if you want to disable building the shared library.
-#SHARED_LIBS = 
lib/libc/wasi/libc-top-half/musl/ldso/dlstart.c
@@ -1,148 +0,0 @@
-#include <stddef.h>
-#include "dynlink.h"
-#include "libc.h"
-
-#ifndef START
-#define START "_dlstart"
-#endif
-
-#define SHARED
-
-#include "crt_arch.h"
-
-#ifndef GETFUNCSYM
-#define GETFUNCSYM(fp, sym, got) do { \
-	hidden void sym(); \
-	static void (*static_func_ptr)() = sym; \
-	__asm__ __volatile__ ( "" : "+m"(static_func_ptr) : : "memory"); \
-	*(fp) = static_func_ptr; } while(0)
-#endif
-
-hidden void _dlstart_c(size_t *sp, size_t *dynv)
-{
-	size_t i, aux[AUX_CNT], dyn[DYN_CNT];
-	size_t *rel, rel_size, base;
-
-	int argc = *sp;
-	char **argv = (void *)(sp+1);
-
-	for (i=argc+1; argv[i]; i++);
-	size_t *auxv = (void *)(argv+i+1);
-
-	for (i=0; i<AUX_CNT; i++) aux[i] = 0;
-	for (i=0; auxv[i]; i+=2) if (auxv[i]<AUX_CNT)
-		aux[auxv[i]] = auxv[i+1];
-
-#if DL_FDPIC
-	struct fdpic_loadseg *segs, fakeseg;
-	size_t j;
-	if (dynv) {
-		/* crt_arch.h entry point asm is responsible for reserving
-		 * space and moving the extra fdpic arguments to the stack
-		 * vector where they are easily accessible from C. */
-		segs = ((struct fdpic_loadmap *)(sp[-1] ? sp[-1] : sp[-2]))->segs;
-	} else {
-		/* If dynv is null, the entry point was started from loader
-		 * that is not fdpic-aware. We can assume normal fixed-
-		 * displacement ELF loading was performed, but when ldso was
-		 * run as a command, finding the Ehdr is a heursitic: we
-		 * have to assume Phdrs start in the first 4k of the file. */
-		base = aux[AT_BASE];
-		if (!base) base = aux[AT_PHDR] & -4096;
-		segs = &fakeseg;
-		segs[0].addr = base;
-		segs[0].p_vaddr = 0;
-		segs[0].p_memsz = -1;
-		Ehdr *eh = (void *)base;
-		Phdr *ph = (void *)(base + eh->e_phoff);
-		size_t phnum = eh->e_phnum;
-		size_t phent = eh->e_phentsize;
-		while (phnum-- && ph->p_type != PT_DYNAMIC)
-			ph = (void *)((size_t)ph + phent);
-		dynv = (void *)(base + ph->p_vaddr);
-	}
-#endif
-
-	for (i=0; i<DYN_CNT; i++) dyn[i] = 0;
-	for (i=0; dynv[i]; i+=2) if (dynv[i]<DYN_CNT)
-		dyn[dynv[i]] = dynv[i+1];
-
-#if DL_FDPIC
-	for (i=0; i<DYN_CNT; i++) {
-		if (i==DT_RELASZ || i==DT_RELSZ) continue;
-		if (!dyn[i]) continue;
-		for (j=0; dyn[i]-segs[j].p_vaddr >= segs[j].p_memsz; j++);
-		dyn[i] += segs[j].addr - segs[j].p_vaddr;
-	}
-	base = 0;
-
-	const Sym *syms = (void *)dyn[DT_SYMTAB];
-
-	rel = (void *)dyn[DT_RELA];
-	rel_size = dyn[DT_RELASZ];
-	for (; rel_size; rel+=3, rel_size-=3*sizeof(size_t)) {
-		if (!IS_RELATIVE(rel[1], syms)) continue;
-		for (j=0; rel[0]-segs[j].p_vaddr >= segs[j].p_memsz; j++);
-		size_t *rel_addr = (void *)
-			(rel[0] + segs[j].addr - segs[j].p_vaddr);
-		if (R_TYPE(rel[1]) == REL_FUNCDESC_VAL) {
-			*rel_addr += segs[rel_addr[1]].addr
-				- segs[rel_addr[1]].p_vaddr
-				+ syms[R_SYM(rel[1])].st_value;
-			rel_addr[1] = dyn[DT_PLTGOT];
-		} else {
-			size_t val = syms[R_SYM(rel[1])].st_value;
-			for (j=0; val-segs[j].p_vaddr >= segs[j].p_memsz; j++);
-			*rel_addr = rel[2] + segs[j].addr - segs[j].p_vaddr + val;
-		}
-	}
-#else
-	/* If the dynamic linker is invoked as a command, its load
-	 * address is not available in the aux vector. Instead, compute
-	 * the load address as the difference between &_DYNAMIC and the
-	 * virtual address in the PT_DYNAMIC program header. */
-	base = aux[AT_BASE];
-	if (!base) {
-		size_t phnum = aux[AT_PHNUM];
-		size_t phentsize = aux[AT_PHENT];
-		Phdr *ph = (void *)aux[AT_PHDR];
-		for (i=phnum; i--; ph = (void *)((char *)ph + phentsize)) {
-			if (ph->p_type == PT_DYNAMIC) {
-				base = (size_t)dynv - ph->p_vaddr;
-				break;
-			}
-		}
-	}
-
-	/* MIPS uses an ugly packed form for GOT relocations. Since we
-	 * can't make function calls yet and the code is tiny anyway,
-	 * it's simply inlined here. */
-	if (NEED_MIPS_GOT_RELOCS) {
-		size_t local_cnt = 0;
-		size_t *got = (void *)(base + dyn[DT_PLTGOT]);
-		for (i=0; dynv[i]; i+=2) if (dynv[i]==DT_MIPS_LOCAL_GOTNO)
-			local_cnt = dynv[i+1];
-		for (i=0; i<local_cnt; i++) got[i] += base;
-	}
-
-	rel = (void *)(base+dyn[DT_REL]);
-	rel_size = dyn[DT_RELSZ];
-	for (; rel_size; rel+=2, rel_size-=2*sizeof(size_t)) {
-		if (!IS_RELATIVE(rel[1], 0)) continue;
-		size_t *rel_addr = (void *)(base + rel[0]);
-		*rel_addr += base;
-	}
-
-	rel = (void *)(base+dyn[DT_RELA]);
-	rel_size = dyn[DT_RELASZ];
-	for (; rel_size; rel+=3, rel_size-=3*sizeof(size_t)) {
-		if (!IS_RELATIVE(rel[1], 0)) continue;
-		size_t *rel_addr = (void *)(base + rel[0]);
-		*rel_addr = base + rel[2];
-	}
-#endif
-
-	stage2_func dls2;
-	GETFUNCSYM(&dls2, __dls2, base+dyn[DT_PLTGOT]);
-	dls2((void *)base, sp);
-}
lib/libc/wasi/libc-top-half/musl/ldso/dynlink.c
@@ -1,2359 +0,0 @@
-#define _GNU_SOURCE
-#define SYSCALL_NO_TLS 1
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <elf.h>
-#include <sys/mman.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <link.h>
-#include <setjmp.h>
-#include <pthread.h>
-#include <ctype.h>
-#include <dlfcn.h>
-#include <semaphore.h>
-#include <sys/membarrier.h>
-#include "pthread_impl.h"
-#include "fork_impl.h"
-#include "libc.h"
-#include "dynlink.h"
-
-#define malloc __libc_malloc
-#define calloc __libc_calloc
-#define realloc __libc_realloc
-#define free __libc_free
-
-static void error(const char *, ...);
-
-#define MAXP2(a,b) (-(-(a)&-(b)))
-#define ALIGN(x,y) ((x)+(y)-1 & -(y))
-
-#define container_of(p,t,m) ((t*)((char *)(p)-offsetof(t,m)))
-#define countof(a) ((sizeof (a))/(sizeof (a)[0]))
-
-struct debug {
-	int ver;
-	void *head;
-	void (*bp)(void);
-	int state;
-	void *base;
-};
-
-struct td_index {
-	size_t args[2];
-	struct td_index *next;
-};
-
-struct dso {
-#if DL_FDPIC
-	struct fdpic_loadmap *loadmap;
-#else
-	unsigned char *base;
-#endif
-	char *name;
-	size_t *dynv;
-	struct dso *next, *prev;
-
-	Phdr *phdr;
-	int phnum;
-	size_t phentsize;
-	Sym *syms;
-	Elf_Symndx *hashtab;
-	uint32_t *ghashtab;
-	int16_t *versym;
-	char *strings;
-	struct dso *syms_next, *lazy_next;
-	size_t *lazy, lazy_cnt;
-	unsigned char *map;
-	size_t map_len;
-	dev_t dev;
-	ino_t ino;
-	char relocated;
-	char constructed;
-	char kernel_mapped;
-	char mark;
-	char bfs_built;
-	char runtime_loaded;
-	struct dso **deps, *needed_by;
-	size_t ndeps_direct;
-	size_t next_dep;
-	pthread_t ctor_visitor;
-	char *rpath_orig, *rpath;
-	struct tls_module tls;
-	size_t tls_id;
-	size_t relro_start, relro_end;
-	uintptr_t *new_dtv;
-	unsigned char *new_tls;
-	struct td_index *td_index;
-	struct dso *fini_next;
-	char *shortname;
-#if DL_FDPIC
-	unsigned char *base;
-#else
-	struct fdpic_loadmap *loadmap;
-#endif
-	struct funcdesc {
-		void *addr;
-		size_t *got;
-	} *funcdescs;
-	size_t *got;
-	char buf[];
-};
-
-struct symdef {
-	Sym *sym;
-	struct dso *dso;
-};
-
-typedef void (*stage3_func)(size_t *, size_t *);
-
-static struct builtin_tls {
-	char c;
-	struct pthread pt;
-	void *space[16];
-} builtin_tls[1];
-#define MIN_TLS_ALIGN offsetof(struct builtin_tls, pt)
-
-#define ADDEND_LIMIT 4096
-static size_t *saved_addends, *apply_addends_to;
-
-static struct dso ldso;
-static struct dso *head, *tail, *fini_head, *syms_tail, *lazy_head;
-static char *env_path, *sys_path;
-static unsigned long long gencnt;
-static int runtime;
-static int ldd_mode;
-static int ldso_fail;
-static int noload;
-static int shutting_down;
-static jmp_buf *rtld_fail;
-static pthread_rwlock_t lock;
-static struct debug debug;
-static struct tls_module *tls_tail;
-static size_t tls_cnt, tls_offset, tls_align = MIN_TLS_ALIGN;
-static size_t static_tls_cnt;
-static pthread_mutex_t init_fini_lock;
-static pthread_cond_t ctor_cond;
-static struct dso *builtin_deps[2];
-static struct dso *const no_deps[1];
-static struct dso *builtin_ctor_queue[4];
-static struct dso **main_ctor_queue;
-static struct fdpic_loadmap *app_loadmap;
-static struct fdpic_dummy_loadmap app_dummy_loadmap;
-
-struct debug *_dl_debug_addr = &debug;
-
-extern hidden int __malloc_replaced;
-
-hidden void (*const __init_array_start)(void)=0, (*const __fini_array_start)(void)=0;
-
-extern hidden void (*const __init_array_end)(void), (*const __fini_array_end)(void);
-
-weak_alias(__init_array_start, __init_array_end);
-weak_alias(__fini_array_start, __fini_array_end);
-
-static int dl_strcmp(const char *l, const char *r)
-{
-	for (; *l==*r && *l; l++, r++);
-	return *(unsigned char *)l - *(unsigned char *)r;
-}
-#define strcmp(l,r) dl_strcmp(l,r)
-
-/* Compute load address for a virtual address in a given dso. */
-#if DL_FDPIC
-static void *laddr(const struct dso *p, size_t v)
-{
-	size_t j=0;
-	if (!p->loadmap) return p->base + v;
-	for (j=0; v-p->loadmap->segs[j].p_vaddr >= p->loadmap->segs[j].p_memsz; j++);
-	return (void *)(v - p->loadmap->segs[j].p_vaddr + p->loadmap->segs[j].addr);
-}
-static void *laddr_pg(const struct dso *p, size_t v)
-{
-	size_t j=0;
-	size_t pgsz = PAGE_SIZE;
-	if (!p->loadmap) return p->base + v;
-	for (j=0; ; j++) {
-		size_t a = p->loadmap->segs[j].p_vaddr;
-		size_t b = a + p->loadmap->segs[j].p_memsz;
-		a &= -pgsz;
-		b += pgsz-1;
-		b &= -pgsz;
-		if (v-a<b-a) break;
-	}
-	return (void *)(v - p->loadmap->segs[j].p_vaddr + p->loadmap->segs[j].addr);
-}
-static void (*fdbarrier(void *p))()
-{
-	void (*fd)();
-	__asm__("" : "=r"(fd) : "0"(p));
-	return fd;
-}
-#define fpaddr(p, v) fdbarrier((&(struct funcdesc){ \
-	laddr(p, v), (p)->got }))
-#else
-#define laddr(p, v) (void *)((p)->base + (v))
-#define laddr_pg(p, v) laddr(p, v)
-#define fpaddr(p, v) ((void (*)())laddr(p, v))
-#endif
-
-static void decode_vec(size_t *v, size_t *a, size_t cnt)
-{
-	size_t i;
-	for (i=0; i<cnt; i++) a[i] = 0;
-	for (; v[0]; v+=2) if (v[0]-1<cnt-1) {
-		a[0] |= 1UL<<v[0];
-		a[v[0]] = v[1];
-	}
-}
-
-static int search_vec(size_t *v, size_t *r, size_t key)
-{
-	for (; v[0]!=key; v+=2)
-		if (!v[0]) return 0;
-	*r = v[1];
-	return 1;
-}
-
-static uint32_t sysv_hash(const char *s0)
-{
-	const unsigned char *s = (void *)s0;
-	uint_fast32_t h = 0;
-	while (*s) {
-		h = 16*h + *s++;
-		h ^= h>>24 & 0xf0;
-	}
-	return h & 0xfffffff;
-}
-
-static uint32_t gnu_hash(const char *s0)
-{
-	const unsigned char *s = (void *)s0;
-	uint_fast32_t h = 5381;
-	for (; *s; s++)
-		h += h*32 + *s;
-	return h;
-}
-
-static Sym *sysv_lookup(const char *s, uint32_t h, struct dso *dso)
-{
-	size_t i;
-	Sym *syms = dso->syms;
-	Elf_Symndx *hashtab = dso->hashtab;
-	char *strings = dso->strings;
-	for (i=hashtab[2+h%hashtab[0]]; i; i=hashtab[2+hashtab[0]+i]) {
-		if ((!dso->versym || dso->versym[i] >= 0)
-		    && (!strcmp(s, strings+syms[i].st_name)))
-			return syms+i;
-	}
-	return 0;
-}
-
-static Sym *gnu_lookup(uint32_t h1, uint32_t *hashtab, struct dso *dso, const char *s)
-{
-	uint32_t nbuckets = hashtab[0];
-	uint32_t *buckets = hashtab + 4 + hashtab[2]*(sizeof(size_t)/4);
-	uint32_t i = buckets[h1 % nbuckets];
-
-	if (!i) return 0;
-
-	uint32_t *hashval = buckets + nbuckets + (i - hashtab[1]);
-
-	for (h1 |= 1; ; i++) {
-		uint32_t h2 = *hashval++;
-		if ((h1 == (h2|1)) && (!dso->versym || dso->versym[i] >= 0)
-		    && !strcmp(s, dso->strings + dso->syms[i].st_name))
-			return dso->syms+i;
-		if (h2 & 1) break;
-	}
-
-	return 0;
-}
-
-static Sym *gnu_lookup_filtered(uint32_t h1, uint32_t *hashtab, struct dso *dso, const char *s, uint32_t fofs, size_t fmask)
-{
-	const size_t *bloomwords = (const void *)(hashtab+4);
-	size_t f = bloomwords[fofs & (hashtab[2]-1)];
-	if (!(f & fmask)) return 0;
-
-	f >>= (h1 >> hashtab[3]) % (8 * sizeof f);
-	if (!(f & 1)) return 0;
-
-	return gnu_lookup(h1, hashtab, dso, s);
-}
-
-#define OK_TYPES (1<<STT_NOTYPE | 1<<STT_OBJECT | 1<<STT_FUNC | 1<<STT_COMMON | 1<<STT_TLS)
-#define OK_BINDS (1<<STB_GLOBAL | 1<<STB_WEAK | 1<<STB_GNU_UNIQUE)
-
-#ifndef ARCH_SYM_REJECT_UND
-#define ARCH_SYM_REJECT_UND(s) 0
-#endif
-
-#if defined(__GNUC__)
-__attribute__((always_inline))
-#endif
-static inline struct symdef find_sym2(struct dso *dso, const char *s, int need_def, int use_deps)
-{
-	uint32_t h = 0, gh = gnu_hash(s), gho = gh / (8*sizeof(size_t)), *ght;
-	size_t ghm = 1ul << gh % (8*sizeof(size_t));
-	struct symdef def = {0};
-	struct dso **deps = use_deps ? dso->deps : 0;
-	for (; dso; dso=use_deps ? *deps++ : dso->syms_next) {
-		Sym *sym;
-		if ((ght = dso->ghashtab)) {
-			sym = gnu_lookup_filtered(gh, ght, dso, s, gho, ghm);
-		} else {
-			if (!h) h = sysv_hash(s);
-			sym = sysv_lookup(s, h, dso);
-		}
-		if (!sym) continue;
-		if (!sym->st_shndx)
-			if (need_def || (sym->st_info&0xf) == STT_TLS
-			    || ARCH_SYM_REJECT_UND(sym))
-				continue;
-		if (!sym->st_value)
-			if ((sym->st_info&0xf) != STT_TLS)
-				continue;
-		if (!(1<<(sym->st_info&0xf) & OK_TYPES)) continue;
-		if (!(1<<(sym->st_info>>4) & OK_BINDS)) continue;
-		def.sym = sym;
-		def.dso = dso;
-		break;
-	}
-	return def;
-}
-
-static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
-{
-	return find_sym2(dso, s, need_def, 0);
-}
-
-static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stride)
-{
-	unsigned char *base = dso->base;
-	Sym *syms = dso->syms;
-	char *strings = dso->strings;
-	Sym *sym;
-	const char *name;
-	void *ctx;
-	int type;
-	int sym_index;
-	struct symdef def;
-	size_t *reloc_addr;
-	size_t sym_val;
-	size_t tls_val;
-	size_t addend;
-	int skip_relative = 0, reuse_addends = 0, save_slot = 0;
-
-	if (dso == &ldso) {
-		/* Only ldso's REL table needs addend saving/reuse. */
-		if (rel == apply_addends_to)
-			reuse_addends = 1;
-		skip_relative = 1;
-	}
-
-	for (; rel_size; rel+=stride, rel_size-=stride*sizeof(size_t)) {
-		if (skip_relative && IS_RELATIVE(rel[1], dso->syms)) continue;
-		type = R_TYPE(rel[1]);
-		if (type == REL_NONE) continue;
-		reloc_addr = laddr(dso, rel[0]);
-
-		if (stride > 2) {
-			addend = rel[2];
-		} else if (type==REL_GOT || type==REL_PLT|| type==REL_COPY) {
-			addend = 0;
-		} else if (reuse_addends) {
-			/* Save original addend in stage 2 where the dso
-			 * chain consists of just ldso; otherwise read back
-			 * saved addend since the inline one was clobbered. */
-			if (head==&ldso)
-				saved_addends[save_slot] = *reloc_addr;
-			addend = saved_addends[save_slot++];
-		} else {
-			addend = *reloc_addr;
-		}
-
-		sym_index = R_SYM(rel[1]);
-		if (sym_index) {
-			sym = syms + sym_index;
-			name = strings + sym->st_name;
-			ctx = type==REL_COPY ? head->syms_next : head;
-			def = (sym->st_info>>4) == STB_LOCAL
-				? (struct symdef){ .dso = dso, .sym = sym }
-				: find_sym(ctx, name, type==REL_PLT);
-			if (!def.sym && (sym->st_shndx != SHN_UNDEF
-			    || sym->st_info>>4 != STB_WEAK)) {
-				if (dso->lazy && (type==REL_PLT || type==REL_GOT)) {
-					dso->lazy[3*dso->lazy_cnt+0] = rel[0];
-					dso->lazy[3*dso->lazy_cnt+1] = rel[1];
-					dso->lazy[3*dso->lazy_cnt+2] = addend;
-					dso->lazy_cnt++;
-					continue;
-				}
-				error("Error relocating %s: %s: symbol not found",
-					dso->name, name);
-				if (runtime) longjmp(*rtld_fail, 1);
-				continue;
-			}
-		} else {
-			sym = 0;
-			def.sym = 0;
-			def.dso = dso;
-		}
-
-		sym_val = def.sym ? (size_t)laddr(def.dso, def.sym->st_value) : 0;
-		tls_val = def.sym ? def.sym->st_value : 0;
-
-		if ((type == REL_TPOFF || type == REL_TPOFF_NEG)
-		    && def.dso->tls_id > static_tls_cnt) {
-			error("Error relocating %s: %s: initial-exec TLS "
-				"resolves to dynamic definition in %s",
-				dso->name, name, def.dso->name);
-			longjmp(*rtld_fail, 1);
-		}
-
-		switch(type) {
-		case REL_OFFSET:
-			addend -= (size_t)reloc_addr;
-		case REL_SYMBOLIC:
-		case REL_GOT:
-		case REL_PLT:
-			*reloc_addr = sym_val + addend;
-			break;
-		case REL_USYMBOLIC:
-			memcpy(reloc_addr, &(size_t){sym_val + addend}, sizeof(size_t));
-			break;
-		case REL_RELATIVE:
-			*reloc_addr = (size_t)base + addend;
-			break;
-		case REL_SYM_OR_REL:
-			if (sym) *reloc_addr = sym_val + addend;
-			else *reloc_addr = (size_t)base + addend;
-			break;
-		case REL_COPY:
-			memcpy(reloc_addr, (void *)sym_val, sym->st_size);
-			break;
-		case REL_OFFSET32:
-			*(uint32_t *)reloc_addr = sym_val + addend
-				- (size_t)reloc_addr;
-			break;
-		case REL_FUNCDESC:
-			*reloc_addr = def.sym ? (size_t)(def.dso->funcdescs
-				+ (def.sym - def.dso->syms)) : 0;
-			break;
-		case REL_FUNCDESC_VAL:
-			if ((sym->st_info&0xf) == STT_SECTION) *reloc_addr += sym_val;
-			else *reloc_addr = sym_val;
-			reloc_addr[1] = def.sym ? (size_t)def.dso->got : 0;
-			break;
-		case REL_DTPMOD:
-			*reloc_addr = def.dso->tls_id;
-			break;
-		case REL_DTPOFF:
-			*reloc_addr = tls_val + addend - DTP_OFFSET;
-			break;
-#ifdef TLS_ABOVE_TP
-		case REL_TPOFF:
-			*reloc_addr = tls_val + def.dso->tls.offset + TPOFF_K + addend;
-			break;
-#else
-		case REL_TPOFF:
-			*reloc_addr = tls_val - def.dso->tls.offset + addend;
-			break;
-		case REL_TPOFF_NEG:
-			*reloc_addr = def.dso->tls.offset - tls_val + addend;
-			break;
-#endif
-		case REL_TLSDESC:
-			if (stride<3) addend = reloc_addr[1];
-			if (def.dso->tls_id > static_tls_cnt) {
-				struct td_index *new = malloc(sizeof *new);
-				if (!new) {
-					error(
-					"Error relocating %s: cannot allocate TLSDESC for %s",
-					dso->name, sym ? name : "(local)" );
-					longjmp(*rtld_fail, 1);
-				}
-				new->next = dso->td_index;
-				dso->td_index = new;
-				new->args[0] = def.dso->tls_id;
-				new->args[1] = tls_val + addend - DTP_OFFSET;
-				reloc_addr[0] = (size_t)__tlsdesc_dynamic;
-				reloc_addr[1] = (size_t)new;
-			} else {
-				reloc_addr[0] = (size_t)__tlsdesc_static;
-#ifdef TLS_ABOVE_TP
-				reloc_addr[1] = tls_val + def.dso->tls.offset
-					+ TPOFF_K + addend;
-#else
-				reloc_addr[1] = tls_val - def.dso->tls.offset
-					+ addend;
-#endif
-			}
-#ifdef TLSDESC_BACKWARDS
-			/* Some archs (32-bit ARM at least) invert the order of
-			 * the descriptor members. Fix them up here. */
-			size_t tmp = reloc_addr[0];
-			reloc_addr[0] = reloc_addr[1];
-			reloc_addr[1] = tmp;
-#endif
-			break;
-		default:
-			error("Error relocating %s: unsupported relocation type %d",
-				dso->name, type);
-			if (runtime) longjmp(*rtld_fail, 1);
-			continue;
-		}
-	}
-}
-
-static void redo_lazy_relocs()
-{
-	struct dso *p = lazy_head, *next;
-	lazy_head = 0;
-	for (; p; p=next) {
-		next = p->lazy_next;
-		size_t size = p->lazy_cnt*3*sizeof(size_t);
-		p->lazy_cnt = 0;
-		do_relocs(p, p->lazy, size, 3);
-		if (p->lazy_cnt) {
-			p->lazy_next = lazy_head;
-			lazy_head = p;
-		} else {
-			free(p->lazy);
-			p->lazy = 0;
-			p->lazy_next = 0;
-		}
-	}
-}
-
-/* A huge hack: to make up for the wastefulness of shared libraries
- * needing at least a page of dirty memory even if they have no global
- * data, we reclaim the gaps at the beginning and end of writable maps
- * and "donate" them to the heap. */
-
-static void reclaim(struct dso *dso, size_t start, size_t end)
-{
-	if (start >= dso->relro_start && start < dso->relro_end) start = dso->relro_end;
-	if (end   >= dso->relro_start && end   < dso->relro_end) end = dso->relro_start;
-	if (start >= end) return;
-	char *base = laddr_pg(dso, start);
-	__malloc_donate(base, base+(end-start));
-}
-
-static void reclaim_gaps(struct dso *dso)
-{
-	Phdr *ph = dso->phdr;
-	size_t phcnt = dso->phnum;
-
-	for (; phcnt--; ph=(void *)((char *)ph+dso->phentsize)) {
-		if (ph->p_type!=PT_LOAD) continue;
-		if ((ph->p_flags&(PF_R|PF_W))!=(PF_R|PF_W)) continue;
-		reclaim(dso, ph->p_vaddr & -PAGE_SIZE, ph->p_vaddr);
-		reclaim(dso, ph->p_vaddr+ph->p_memsz,
-			ph->p_vaddr+ph->p_memsz+PAGE_SIZE-1 & -PAGE_SIZE);
-	}
-}
-
-static ssize_t read_loop(int fd, void *p, size_t n)
-{
-	for (size_t i=0; i<n; ) {
-		ssize_t l = read(fd, (char *)p+i, n-i);
-		if (l<0) {
-			if (errno==EINTR) continue;
-			else return -1;
-		}
-		if (l==0) return i;
-		i += l;
-	}
-	return n;
-}
-
-static void *mmap_fixed(void *p, size_t n, int prot, int flags, int fd, off_t off)
-{
-	static int no_map_fixed;
-	char *q;
-	if (!no_map_fixed) {
-		q = mmap(p, n, prot, flags|MAP_FIXED, fd, off);
-		if (!DL_NOMMU_SUPPORT || q != MAP_FAILED || errno != EINVAL)
-			return q;
-		no_map_fixed = 1;
-	}
-	/* Fallbacks for MAP_FIXED failure on NOMMU kernels. */
-	if (flags & MAP_ANONYMOUS) {
-		memset(p, 0, n);
-		return p;
-	}
-	ssize_t r;
-	if (lseek(fd, off, SEEK_SET) < 0) return MAP_FAILED;
-	for (q=p; n; q+=r, off+=r, n-=r) {
-		r = read(fd, q, n);
-		if (r < 0 && errno != EINTR) return MAP_FAILED;
-		if (!r) {
-			memset(q, 0, n);
-			break;
-		}
-	}
-	return p;
-}
-
-static void unmap_library(struct dso *dso)
-{
-	if (dso->loadmap) {
-		size_t i;
-		for (i=0; i<dso->loadmap->nsegs; i++) {
-			if (!dso->loadmap->segs[i].p_memsz)
-				continue;
-			munmap((void *)dso->loadmap->segs[i].addr,
-				dso->loadmap->segs[i].p_memsz);
-		}
-		free(dso->loadmap);
-	} else if (dso->map && dso->map_len) {
-		munmap(dso->map, dso->map_len);
-	}
-}
-
-static void *map_library(int fd, struct dso *dso)
-{
-	Ehdr buf[(896+sizeof(Ehdr))/sizeof(Ehdr)];
-	void *allocated_buf=0;
-	size_t phsize;
-	size_t addr_min=SIZE_MAX, addr_max=0, map_len;
-	size_t this_min, this_max;
-	size_t nsegs = 0;
-	off_t off_start;
-	Ehdr *eh;
-	Phdr *ph, *ph0;
-	unsigned prot;
-	unsigned char *map=MAP_FAILED, *base;
-	size_t dyn=0;
-	size_t tls_image=0;
-	size_t i;
-
-	ssize_t l = read(fd, buf, sizeof buf);
-	eh = buf;
-	if (l<0) return 0;
-	if (l<sizeof *eh || (eh->e_type != ET_DYN && eh->e_type != ET_EXEC))
-		goto noexec;
-	phsize = eh->e_phentsize * eh->e_phnum;
-	if (phsize > sizeof buf - sizeof *eh) {
-		allocated_buf = malloc(phsize);
-		if (!allocated_buf) return 0;
-		l = pread(fd, allocated_buf, phsize, eh->e_phoff);
-		if (l < 0) goto error;
-		if (l != phsize) goto noexec;
-		ph = ph0 = allocated_buf;
-	} else if (eh->e_phoff + phsize > l) {
-		l = pread(fd, buf+1, phsize, eh->e_phoff);
-		if (l < 0) goto error;
-		if (l != phsize) goto noexec;
-		ph = ph0 = (void *)(buf + 1);
-	} else {
-		ph = ph0 = (void *)((char *)buf + eh->e_phoff);
-	}
-	for (i=eh->e_phnum; i; i--, ph=(void *)((char *)ph+eh->e_phentsize)) {
-		if (ph->p_type == PT_DYNAMIC) {
-			dyn = ph->p_vaddr;
-		} else if (ph->p_type == PT_TLS) {
-			tls_image = ph->p_vaddr;
-			dso->tls.align = ph->p_align;
-			dso->tls.len = ph->p_filesz;
-			dso->tls.size = ph->p_memsz;
-		} else if (ph->p_type == PT_GNU_RELRO) {
-			dso->relro_start = ph->p_vaddr & -PAGE_SIZE;
-			dso->relro_end = (ph->p_vaddr + ph->p_memsz) & -PAGE_SIZE;
-		} else if (ph->p_type == PT_GNU_STACK) {
-			if (!runtime && ph->p_memsz > __default_stacksize) {
-				__default_stacksize =
-					ph->p_memsz < DEFAULT_STACK_MAX ?
-					ph->p_memsz : DEFAULT_STACK_MAX;
-			}
-		}
-		if (ph->p_type != PT_LOAD) continue;
-		nsegs++;
-		if (ph->p_vaddr < addr_min) {
-			addr_min = ph->p_vaddr;
-			off_start = ph->p_offset;
-			prot = (((ph->p_flags&PF_R) ? PROT_READ : 0) |
-				((ph->p_flags&PF_W) ? PROT_WRITE: 0) |
-				((ph->p_flags&PF_X) ? PROT_EXEC : 0));
-		}
-		if (ph->p_vaddr+ph->p_memsz > addr_max) {
-			addr_max = ph->p_vaddr+ph->p_memsz;
-		}
-	}
-	if (!dyn) goto noexec;
-	if (DL_FDPIC && !(eh->e_flags & FDPIC_CONSTDISP_FLAG)) {
-		dso->loadmap = calloc(1, sizeof *dso->loadmap
-			+ nsegs * sizeof *dso->loadmap->segs);
-		if (!dso->loadmap) goto error;
-		dso->loadmap->nsegs = nsegs;
-		for (ph=ph0, i=0; i<nsegs; ph=(void *)((char *)ph+eh->e_phentsize)) {
-			if (ph->p_type != PT_LOAD) continue;
-			prot = (((ph->p_flags&PF_R) ? PROT_READ : 0) |
-				((ph->p_flags&PF_W) ? PROT_WRITE: 0) |
-				((ph->p_flags&PF_X) ? PROT_EXEC : 0));
-			map = mmap(0, ph->p_memsz + (ph->p_vaddr & PAGE_SIZE-1),
-				prot, MAP_PRIVATE,
-				fd, ph->p_offset & -PAGE_SIZE);
-			if (map == MAP_FAILED) {
-				unmap_library(dso);
-				goto error;
-			}
-			dso->loadmap->segs[i].addr = (size_t)map +
-				(ph->p_vaddr & PAGE_SIZE-1);
-			dso->loadmap->segs[i].p_vaddr = ph->p_vaddr;
-			dso->loadmap->segs[i].p_memsz = ph->p_memsz;
-			i++;
-			if (prot & PROT_WRITE) {
-				size_t brk = (ph->p_vaddr & PAGE_SIZE-1)
-					+ ph->p_filesz;
-				size_t pgbrk = brk + PAGE_SIZE-1 & -PAGE_SIZE;
-				size_t pgend = brk + ph->p_memsz - ph->p_filesz
-					+ PAGE_SIZE-1 & -PAGE_SIZE;
-				if (pgend > pgbrk && mmap_fixed(map+pgbrk,
-					pgend-pgbrk, prot,
-					MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,
-					-1, off_start) == MAP_FAILED)
-					goto error;
-				memset(map + brk, 0, pgbrk-brk);
-			}
-		}
-		map = (void *)dso->loadmap->segs[0].addr;
-		map_len = 0;
-		goto done_mapping;
-	}
-	addr_max += PAGE_SIZE-1;
-	addr_max &= -PAGE_SIZE;
-	addr_min &= -PAGE_SIZE;
-	off_start &= -PAGE_SIZE;
-	map_len = addr_max - addr_min + off_start;
-	/* The first time, we map too much, possibly even more than
-	 * the length of the file. This is okay because we will not
-	 * use the invalid part; we just need to reserve the right
-	 * amount of virtual address space to map over later. */
-	map = DL_NOMMU_SUPPORT
-		? mmap((void *)addr_min, map_len, PROT_READ|PROT_WRITE|PROT_EXEC,
-			MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
-		: mmap((void *)addr_min, map_len, prot,
-			MAP_PRIVATE, fd, off_start);
-	if (map==MAP_FAILED) goto error;
-	dso->map = map;
-	dso->map_len = map_len;
-	/* If the loaded file is not relocatable and the requested address is
-	 * not available, then the load operation must fail. */
-	if (eh->e_type != ET_DYN && addr_min && map!=(void *)addr_min) {
-		errno = EBUSY;
-		goto error;
-	}
-	base = map - addr_min;
-	dso->phdr = 0;
-	dso->phnum = 0;
-	for (ph=ph0, i=eh->e_phnum; i; i--, ph=(void *)((char *)ph+eh->e_phentsize)) {
-		if (ph->p_type != PT_LOAD) continue;
-		/* Check if the programs headers are in this load segment, and
-		 * if so, record the address for use by dl_iterate_phdr. */
-		if (!dso->phdr && eh->e_phoff >= ph->p_offset
-		    && eh->e_phoff+phsize <= ph->p_offset+ph->p_filesz) {
-			dso->phdr = (void *)(base + ph->p_vaddr
-				+ (eh->e_phoff-ph->p_offset));
-			dso->phnum = eh->e_phnum;
-			dso->phentsize = eh->e_phentsize;
-		}
-		this_min = ph->p_vaddr & -PAGE_SIZE;
-		this_max = ph->p_vaddr+ph->p_memsz+PAGE_SIZE-1 & -PAGE_SIZE;
-		off_start = ph->p_offset & -PAGE_SIZE;
-		prot = (((ph->p_flags&PF_R) ? PROT_READ : 0) |
-			((ph->p_flags&PF_W) ? PROT_WRITE: 0) |
-			((ph->p_flags&PF_X) ? PROT_EXEC : 0));
-		/* Reuse the existing mapping for the lowest-address LOAD */
-		if ((ph->p_vaddr & -PAGE_SIZE) != addr_min || DL_NOMMU_SUPPORT)
-			if (mmap_fixed(base+this_min, this_max-this_min, prot, MAP_PRIVATE|MAP_FIXED, fd, off_start) == MAP_FAILED)
-				goto error;
-		if (ph->p_memsz > ph->p_filesz && (ph->p_flags&PF_W)) {
-			size_t brk = (size_t)base+ph->p_vaddr+ph->p_filesz;
-			size_t pgbrk = brk+PAGE_SIZE-1 & -PAGE_SIZE;
-			memset((void *)brk, 0, pgbrk-brk & PAGE_SIZE-1);
-			if (pgbrk-(size_t)base < this_max && mmap_fixed((void *)pgbrk, (size_t)base+this_max-pgbrk, prot, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) == MAP_FAILED)
-				goto error;
-		}
-	}
-	for (i=0; ((size_t *)(base+dyn))[i]; i+=2)
-		if (((size_t *)(base+dyn))[i]==DT_TEXTREL) {
-			if (mprotect(map, map_len, PROT_READ|PROT_WRITE|PROT_EXEC)
-			    && errno != ENOSYS)
-				goto error;
-			break;
-		}
-done_mapping:
-	dso->base = base;
-	dso->dynv = laddr(dso, dyn);
-	if (dso->tls.size) dso->tls.image = laddr(dso, tls_image);
-	free(allocated_buf);
-	return map;
-noexec:
-	errno = ENOEXEC;
-error:
-	if (map!=MAP_FAILED) unmap_library(dso);
-	free(allocated_buf);
-	return 0;
-}
-
-static int path_open(const char *name, const char *s, char *buf, size_t buf_size)
-{
-	size_t l;
-	int fd;
-	for (;;) {
-		s += strspn(s, ":\n");
-		l = strcspn(s, ":\n");
-		if (l-1 >= INT_MAX) return -1;
-		if (snprintf(buf, buf_size, "%.*s/%s", (int)l, s, name) < buf_size) {
-			if ((fd = open(buf, O_RDONLY|O_CLOEXEC))>=0) return fd;
-			switch (errno) {
-			case ENOENT:
-			case ENOTDIR:
-			case EACCES:
-			case ENAMETOOLONG:
-				break;
-			default:
-				/* Any negative value but -1 will inhibit
-				 * futher path search. */
-				return -2;
-			}
-		}
-		s += l;
-	}
-}
-
-static int fixup_rpath(struct dso *p, char *buf, size_t buf_size)
-{
-	size_t n, l;
-	const char *s, *t, *origin;
-	char *d;
-	if (p->rpath || !p->rpath_orig) return 0;
-	if (!strchr(p->rpath_orig, '$')) {
-		p->rpath = p->rpath_orig;
-		return 0;
-	}
-	n = 0;
-	s = p->rpath_orig;
-	while ((t=strchr(s, '$'))) {
-		if (strncmp(t, "$ORIGIN", 7) && strncmp(t, "${ORIGIN}", 9))
-			return 0;
-		s = t+1;
-		n++;
-	}
-	if (n > SSIZE_MAX/PATH_MAX) return 0;
-
-	if (p->kernel_mapped) {
-		/* $ORIGIN searches cannot be performed for the main program
-		 * when it is suid/sgid/AT_SECURE. This is because the
-		 * pathname is under the control of the caller of execve.
-		 * For libraries, however, $ORIGIN can be processed safely
-		 * since the library's pathname came from a trusted source
-		 * (either system paths or a call to dlopen). */
-		if (libc.secure)
-			return 0;
-		l = readlink("/proc/self/exe", buf, buf_size);
-		if (l == -1) switch (errno) {
-		case ENOENT:
-		case ENOTDIR:
-		case EACCES:
-			break;
-		default:
-			return -1;
-		}
-		if (l >= buf_size)
-			return 0;
-		buf[l] = 0;
-		origin = buf;
-	} else {
-		origin = p->name;
-	}
-	t = strrchr(origin, '/');
-	if (t) {
-		l = t-origin;
-	} else {
-		/* Normally p->name will always be an absolute or relative
-		 * pathname containing at least one '/' character, but in the
-		 * case where ldso was invoked as a command to execute a
-		 * program in the working directory, app.name may not. Fix. */
-		origin = ".";
-		l = 1;
-	}
-	/* Disallow non-absolute origins for suid/sgid/AT_SECURE. */
-	if (libc.secure && *origin != '/')
-		return 0;
-	p->rpath = malloc(strlen(p->rpath_orig) + n*l + 1);
-	if (!p->rpath) return -1;
-
-	d = p->rpath;
-	s = p->rpath_orig;
-	while ((t=strchr(s, '$'))) {
-		memcpy(d, s, t-s);
-		d += t-s;
-		memcpy(d, origin, l);
-		d += l;
-		/* It was determined previously that the '$' is followed
-		 * either by "ORIGIN" or "{ORIGIN}". */
-		s = t + 7 + 2*(t[1]=='{');
-	}
-	strcpy(d, s);
-	return 0;
-}
-
-static void decode_dyn(struct dso *p)
-{
-	size_t dyn[DYN_CNT];
-	decode_vec(p->dynv, dyn, DYN_CNT);
-	p->syms = laddr(p, dyn[DT_SYMTAB]);
-	p->strings = laddr(p, dyn[DT_STRTAB]);
-	if (dyn[0]&(1<<DT_HASH))
-		p->hashtab = laddr(p, dyn[DT_HASH]);
-	if (dyn[0]&(1<<DT_RPATH))
-		p->rpath_orig = p->strings + dyn[DT_RPATH];
-	if (dyn[0]&(1<<DT_RUNPATH))
-		p->rpath_orig = p->strings + dyn[DT_RUNPATH];
-	if (dyn[0]&(1<<DT_PLTGOT))
-		p->got = laddr(p, dyn[DT_PLTGOT]);
-	if (search_vec(p->dynv, dyn, DT_GNU_HASH))
-		p->ghashtab = laddr(p, *dyn);
-	if (search_vec(p->dynv, dyn, DT_VERSYM))
-		p->versym = laddr(p, *dyn);
-}
-
-static size_t count_syms(struct dso *p)
-{
-	if (p->hashtab) return p->hashtab[1];
-
-	size_t nsym, i;
-	uint32_t *buckets = p->ghashtab + 4 + (p->ghashtab[2]*sizeof(size_t)/4);
-	uint32_t *hashval;
-	for (i = nsym = 0; i < p->ghashtab[0]; i++) {
-		if (buckets[i] > nsym)
-			nsym = buckets[i];
-	}
-	if (nsym) {
-		hashval = buckets + p->ghashtab[0] + (nsym - p->ghashtab[1]);
-		do nsym++;
-		while (!(*hashval++ & 1));
-	}
-	return nsym;
-}
-
-static void *dl_mmap(size_t n)
-{
-	void *p;
-	int prot = PROT_READ|PROT_WRITE, flags = MAP_ANONYMOUS|MAP_PRIVATE;
-#ifdef SYS_mmap2
-	p = (void *)__syscall(SYS_mmap2, 0, n, prot, flags, -1, 0);
-#else
-	p = (void *)__syscall(SYS_mmap, 0, n, prot, flags, -1, 0);
-#endif
-	return (unsigned long)p > -4096UL ? 0 : p;
-}
-
-static void makefuncdescs(struct dso *p)
-{
-	static int self_done;
-	size_t nsym = count_syms(p);
-	size_t i, size = nsym * sizeof(*p->funcdescs);
-
-	if (!self_done) {
-		p->funcdescs = dl_mmap(size);
-		self_done = 1;
-	} else {
-		p->funcdescs = malloc(size);
-	}
-	if (!p->funcdescs) {
-		if (!runtime) a_crash();
-		error("Error allocating function descriptors for %s", p->name);
-		longjmp(*rtld_fail, 1);
-	}
-	for (i=0; i<nsym; i++) {
-		if ((p->syms[i].st_info&0xf)==STT_FUNC && p->syms[i].st_shndx) {
-			p->funcdescs[i].addr = laddr(p, p->syms[i].st_value);
-			p->funcdescs[i].got = p->got;
-		} else {
-			p->funcdescs[i].addr = 0;
-			p->funcdescs[i].got = 0;
-		}
-	}
-}
-
-static struct dso *load_library(const char *name, struct dso *needed_by)
-{
-	char buf[2*NAME_MAX+2];
-	const char *pathname;
-	unsigned char *map;
-	struct dso *p, temp_dso = {0};
-	int fd;
-	struct stat st;
-	size_t alloc_size;
-	int n_th = 0;
-	int is_self = 0;
-
-	if (!*name) {
-		errno = EINVAL;
-		return 0;
-	}
-
-	/* Catch and block attempts to reload the implementation itself */
-	if (name[0]=='l' && name[1]=='i' && name[2]=='b') {
-		static const char reserved[] =
-			"c.pthread.rt.m.dl.util.xnet.";
-		const char *rp, *next;
-		for (rp=reserved; *rp; rp=next) {
-			next = strchr(rp, '.') + 1;
-			if (strncmp(name+3, rp, next-rp) == 0)
-				break;
-		}
-		if (*rp) {
-			if (ldd_mode) {
-				/* Track which names have been resolved
-				 * and only report each one once. */
-				static unsigned reported;
-				unsigned mask = 1U<<(rp-reserved);
-				if (!(reported & mask)) {
-					reported |= mask;
-					dprintf(1, "\t%s => %s (%p)\n",
-						name, ldso.name,
-						ldso.base);
-				}
-			}
-			is_self = 1;
-		}
-	}
-	if (!strcmp(name, ldso.name)) is_self = 1;
-	if (is_self) {
-		if (!ldso.prev) {
-			tail->next = &ldso;
-			ldso.prev = tail;
-			tail = &ldso;
-		}
-		return &ldso;
-	}
-	if (strchr(name, '/')) {
-		pathname = name;
-		fd = open(name, O_RDONLY|O_CLOEXEC);
-	} else {
-		/* Search for the name to see if it's already loaded */
-		for (p=head->next; p; p=p->next) {
-			if (p->shortname && !strcmp(p->shortname, name)) {
-				return p;
-			}
-		}
-		if (strlen(name) > NAME_MAX) return 0;
-		fd = -1;
-		if (env_path) fd = path_open(name, env_path, buf, sizeof buf);
-		for (p=needed_by; fd == -1 && p; p=p->needed_by) {
-			if (fixup_rpath(p, buf, sizeof buf) < 0)
-				fd = -2; /* Inhibit further search. */
-			if (p->rpath)
-				fd = path_open(name, p->rpath, buf, sizeof buf);
-		}
-		if (fd == -1) {
-			if (!sys_path) {
-				char *prefix = 0;
-				size_t prefix_len;
-				if (ldso.name[0]=='/') {
-					char *s, *t, *z;
-					for (s=t=z=ldso.name; *s; s++)
-						if (*s=='/') z=t, t=s;
-					prefix_len = z-ldso.name;
-					if (prefix_len < PATH_MAX)
-						prefix = ldso.name;
-				}
-				if (!prefix) {
-					prefix = "";
-					prefix_len = 0;
-				}
-				char etc_ldso_path[prefix_len + 1
-					+ sizeof "/etc/ld-musl-" LDSO_ARCH ".path"];
-				snprintf(etc_ldso_path, sizeof etc_ldso_path,
-					"%.*s/etc/ld-musl-" LDSO_ARCH ".path",
-					(int)prefix_len, prefix);
-				fd = open(etc_ldso_path, O_RDONLY|O_CLOEXEC);
-				if (fd>=0) {
-					size_t n = 0;
-					if (!fstat(fd, &st)) n = st.st_size;
-					if ((sys_path = malloc(n+1)))
-						sys_path[n] = 0;
-					if (!sys_path || read_loop(fd, sys_path, n)<0) {
-						free(sys_path);
-						sys_path = "";
-					}
-					close(fd);
-				} else if (errno != ENOENT) {
-					sys_path = "";
-				}
-			}
-			if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib";
-			fd = path_open(name, sys_path, buf, sizeof buf);
-		}
-		pathname = buf;
-	}
-	if (fd < 0) return 0;
-	if (fstat(fd, &st) < 0) {
-		close(fd);
-		return 0;
-	}
-	for (p=head->next; p; p=p->next) {
-		if (p->dev == st.st_dev && p->ino == st.st_ino) {
-			/* If this library was previously loaded with a
-			 * pathname but a search found the same inode,
-			 * setup its shortname so it can be found by name. */
-			if (!p->shortname && pathname != name)
-				p->shortname = strrchr(p->name, '/')+1;
-			close(fd);
-			return p;
-		}
-	}
-	map = noload ? 0 : map_library(fd, &temp_dso);
-	close(fd);
-	if (!map) return 0;
-
-	/* Avoid the danger of getting two versions of libc mapped into the
-	 * same process when an absolute pathname was used. The symbols
-	 * checked are chosen to catch both musl and glibc, and to avoid
-	 * false positives from interposition-hack libraries. */
-	decode_dyn(&temp_dso);
-	if (find_sym(&temp_dso, "__libc_start_main", 1).sym &&
-	    find_sym(&temp_dso, "stdin", 1).sym) {
-		unmap_library(&temp_dso);
-		return load_library("libc.so", needed_by);
-	}
-	/* Past this point, if we haven't reached runtime yet, ldso has
-	 * committed either to use the mapped library or to abort execution.
-	 * Unmapping is not possible, so we can safely reclaim gaps. */
-	if (!runtime) reclaim_gaps(&temp_dso);
-
-	/* Allocate storage for the new DSO. When there is TLS, this
-	 * storage must include a reservation for all pre-existing
-	 * threads to obtain copies of both the new TLS, and an
-	 * extended DTV capable of storing an additional slot for
-	 * the newly-loaded DSO. */
-	alloc_size = sizeof *p + strlen(pathname) + 1;
-	if (runtime && temp_dso.tls.image) {
-		size_t per_th = temp_dso.tls.size + temp_dso.tls.align
-			+ sizeof(void *) * (tls_cnt+3);
-		n_th = libc.threads_minus_1 + 1;
-		if (n_th > SSIZE_MAX / per_th) alloc_size = SIZE_MAX;
-		else alloc_size += n_th * per_th;
-	}
-	p = calloc(1, alloc_size);
-	if (!p) {
-		unmap_library(&temp_dso);
-		return 0;
-	}
-	memcpy(p, &temp_dso, sizeof temp_dso);
-	p->dev = st.st_dev;
-	p->ino = st.st_ino;
-	p->needed_by = needed_by;
-	p->name = p->buf;
-	p->runtime_loaded = runtime;
-	strcpy(p->name, pathname);
-	/* Add a shortname only if name arg was not an explicit pathname. */
-	if (pathname != name) p->shortname = strrchr(p->name, '/')+1;
-	if (p->tls.image) {
-		p->tls_id = ++tls_cnt;
-		tls_align = MAXP2(tls_align, p->tls.align);
-#ifdef TLS_ABOVE_TP
-		p->tls.offset = tls_offset + ( (p->tls.align-1) &
-			(-tls_offset + (uintptr_t)p->tls.image) );
-		tls_offset = p->tls.offset + p->tls.size;
-#else
-		tls_offset += p->tls.size + p->tls.align - 1;
-		tls_offset -= (tls_offset + (uintptr_t)p->tls.image)
-			& (p->tls.align-1);
-		p->tls.offset = tls_offset;
-#endif
-		p->new_dtv = (void *)(-sizeof(size_t) &
-			(uintptr_t)(p->name+strlen(p->name)+sizeof(size_t)));
-		p->new_tls = (void *)(p->new_dtv + n_th*(tls_cnt+1));
-		if (tls_tail) tls_tail->next = &p->tls;
-		else libc.tls_head = &p->tls;
-		tls_tail = &p->tls;
-	}
-
-	tail->next = p;
-	p->prev = tail;
-	tail = p;
-
-	if (DL_FDPIC) makefuncdescs(p);
-
-	if (ldd_mode) dprintf(1, "\t%s => %s (%p)\n", name, pathname, p->base);
-
-	return p;
-}
-
-static void load_direct_deps(struct dso *p)
-{
-	size_t i, cnt=0;
-
-	if (p->deps) return;
-	/* For head, all preloads are direct pseudo-dependencies.
-	 * Count and include them now to avoid realloc later. */
-	if (p==head) for (struct dso *q=p->next; q; q=q->next)
-		cnt++;
-	for (i=0; p->dynv[i]; i+=2)
-		if (p->dynv[i] == DT_NEEDED) cnt++;
-	/* Use builtin buffer for apps with no external deps, to
-	 * preserve property of no runtime failure paths. */
-	p->deps = (p==head && cnt<2) ? builtin_deps :
-		calloc(cnt+1, sizeof *p->deps);
-	if (!p->deps) {
-		error("Error loading dependencies for %s", p->name);
-		if (runtime) longjmp(*rtld_fail, 1);
-	}
-	cnt=0;
-	if (p==head) for (struct dso *q=p->next; q; q=q->next)
-		p->deps[cnt++] = q;
-	for (i=0; p->dynv[i]; i+=2) {
-		if (p->dynv[i] != DT_NEEDED) continue;
-		struct dso *dep = load_library(p->strings + p->dynv[i+1], p);
-		if (!dep) {
-			error("Error loading shared library %s: %m (needed by %s)",
-				p->strings + p->dynv[i+1], p->name);
-			if (runtime) longjmp(*rtld_fail, 1);
-			continue;
-		}
-		p->deps[cnt++] = dep;
-	}
-	p->deps[cnt] = 0;
-	p->ndeps_direct = cnt;
-}
-
-static void load_deps(struct dso *p)
-{
-	if (p->deps) return;
-	for (; p; p=p->next)
-		load_direct_deps(p);
-}
-
-static void extend_bfs_deps(struct dso *p)
-{
-	size_t i, j, cnt, ndeps_all;
-	struct dso **tmp;
-
-	/* Can't use realloc if the original p->deps was allocated at
-	 * program entry and malloc has been replaced, or if it's
-	 * the builtin non-allocated trivial main program deps array. */
-	int no_realloc = (__malloc_replaced && !p->runtime_loaded)
-		|| p->deps == builtin_deps;
-
-	if (p->bfs_built) return;
-	ndeps_all = p->ndeps_direct;
-
-	/* Mark existing (direct) deps so they won't be duplicated. */
-	for (i=0; p->deps[i]; i++)
-		p->deps[i]->mark = 1;
-
-	/* For each dependency already in the list, copy its list of direct
-	 * dependencies to the list, excluding any items already in the
-	 * list. Note that the list this loop iterates over will grow during
-	 * the loop, but since duplicates are excluded, growth is bounded. */
-	for (i=0; p->deps[i]; i++) {
-		struct dso *dep = p->deps[i];
-		for (j=cnt=0; j<dep->ndeps_direct; j++)
-			if (!dep->deps[j]->mark) cnt++;
-		tmp = no_realloc ? 
-			malloc(sizeof(*tmp) * (ndeps_all+cnt+1)) :
-			realloc(p->deps, sizeof(*tmp) * (ndeps_all+cnt+1));
-		if (!tmp) {
-			error("Error recording dependencies for %s", p->name);
-			if (runtime) longjmp(*rtld_fail, 1);
-			continue;
-		}
-		if (no_realloc) {
-			memcpy(tmp, p->deps, sizeof(*tmp) * (ndeps_all+1));
-			no_realloc = 0;
-		}
-		p->deps = tmp;
-		for (j=0; j<dep->ndeps_direct; j++) {
-			if (dep->deps[j]->mark) continue;
-			dep->deps[j]->mark = 1;
-			p->deps[ndeps_all++] = dep->deps[j];
-		}
-		p->deps[ndeps_all] = 0;
-	}
-	p->bfs_built = 1;
-	for (p=head; p; p=p->next)
-		p->mark = 0;
-}
-
-static void load_preload(char *s)
-{
-	int tmp;
-	char *z;
-	for (z=s; *z; s=z) {
-		for (   ; *s && (isspace(*s) || *s==':'); s++);
-		for (z=s; *z && !isspace(*z) && *z!=':'; z++);
-		tmp = *z;
-		*z = 0;
-		load_library(s, 0);
-		*z = tmp;
-	}
-}
-
-static void add_syms(struct dso *p)
-{
-	if (!p->syms_next && syms_tail != p) {
-		syms_tail->syms_next = p;
-		syms_tail = p;
-	}
-}
-
-static void revert_syms(struct dso *old_tail)
-{
-	struct dso *p, *next;
-	/* Chop off the tail of the list of dsos that participate in
-	 * the global symbol table, reverting them to RTLD_LOCAL. */
-	for (p=old_tail; p; p=next) {
-		next = p->syms_next;
-		p->syms_next = 0;
-	}
-	syms_tail = old_tail;
-}
-
-static void do_mips_relocs(struct dso *p, size_t *got)
-{
-	size_t i, j, rel[2];
-	unsigned char *base = p->base;
-	i=0; search_vec(p->dynv, &i, DT_MIPS_LOCAL_GOTNO);
-	if (p==&ldso) {
-		got += i;
-	} else {
-		while (i--) *got++ += (size_t)base;
-	}
-	j=0; search_vec(p->dynv, &j, DT_MIPS_GOTSYM);
-	i=0; search_vec(p->dynv, &i, DT_MIPS_SYMTABNO);
-	Sym *sym = p->syms + j;
-	rel[0] = (unsigned char *)got - base;
-	for (i-=j; i; i--, sym++, rel[0]+=sizeof(size_t)) {
-		rel[1] = R_INFO(sym-p->syms, R_MIPS_JUMP_SLOT);
-		do_relocs(p, rel, sizeof rel, 2);
-	}
-}
-
-static void reloc_all(struct dso *p)
-{
-	size_t dyn[DYN_CNT];
-	for (; p; p=p->next) {
-		if (p->relocated) continue;
-		decode_vec(p->dynv, dyn, DYN_CNT);
-		if (NEED_MIPS_GOT_RELOCS)
-			do_mips_relocs(p, laddr(p, dyn[DT_PLTGOT]));
-		do_relocs(p, laddr(p, dyn[DT_JMPREL]), dyn[DT_PLTRELSZ],
-			2+(dyn[DT_PLTREL]==DT_RELA));
-		do_relocs(p, laddr(p, dyn[DT_REL]), dyn[DT_RELSZ], 2);
-		do_relocs(p, laddr(p, dyn[DT_RELA]), dyn[DT_RELASZ], 3);
-
-		if (head != &ldso && p->relro_start != p->relro_end &&
-		    mprotect(laddr(p, p->relro_start), p->relro_end-p->relro_start, PROT_READ)
-		    && errno != ENOSYS) {
-			error("Error relocating %s: RELRO protection failed: %m",
-				p->name);
-			if (runtime) longjmp(*rtld_fail, 1);
-		}
-
-		p->relocated = 1;
-	}
-}
-
-static void kernel_mapped_dso(struct dso *p)
-{
-	size_t min_addr = -1, max_addr = 0, cnt;
-	Phdr *ph = p->phdr;
-	for (cnt = p->phnum; cnt--; ph = (void *)((char *)ph + p->phentsize)) {
-		if (ph->p_type == PT_DYNAMIC) {
-			p->dynv = laddr(p, ph->p_vaddr);
-		} else if (ph->p_type == PT_GNU_RELRO) {
-			p->relro_start = ph->p_vaddr & -PAGE_SIZE;
-			p->relro_end = (ph->p_vaddr + ph->p_memsz) & -PAGE_SIZE;
-		} else if (ph->p_type == PT_GNU_STACK) {
-			if (!runtime && ph->p_memsz > __default_stacksize) {
-				__default_stacksize =
-					ph->p_memsz < DEFAULT_STACK_MAX ?
-					ph->p_memsz : DEFAULT_STACK_MAX;
-			}
-		}
-		if (ph->p_type != PT_LOAD) continue;
-		if (ph->p_vaddr < min_addr)
-			min_addr = ph->p_vaddr;
-		if (ph->p_vaddr+ph->p_memsz > max_addr)
-			max_addr = ph->p_vaddr+ph->p_memsz;
-	}
-	min_addr &= -PAGE_SIZE;
-	max_addr = (max_addr + PAGE_SIZE-1) & -PAGE_SIZE;
-	p->map = p->base + min_addr;
-	p->map_len = max_addr - min_addr;
-	p->kernel_mapped = 1;
-}
-
-void __libc_exit_fini()
-{
-	struct dso *p;
-	size_t dyn[DYN_CNT];
-	pthread_t self = __pthread_self();
-
-	/* Take both locks before setting shutting_down, so that
-	 * either lock is sufficient to read its value. The lock
-	 * order matches that in dlopen to avoid deadlock. */
-	pthread_rwlock_wrlock(&lock);
-	pthread_mutex_lock(&init_fini_lock);
-	shutting_down = 1;
-	pthread_rwlock_unlock(&lock);
-	for (p=fini_head; p; p=p->fini_next) {
-		while (p->ctor_visitor && p->ctor_visitor!=self)
-			pthread_cond_wait(&ctor_cond, &init_fini_lock);
-		if (!p->constructed) continue;
-		decode_vec(p->dynv, dyn, DYN_CNT);
-		if (dyn[0] & (1<<DT_FINI_ARRAY)) {
-			size_t n = dyn[DT_FINI_ARRAYSZ]/sizeof(size_t);
-			size_t *fn = (size_t *)laddr(p, dyn[DT_FINI_ARRAY])+n;
-			while (n--) ((void (*)(void))*--fn)();
-		}
-#ifndef NO_LEGACY_INITFINI
-		if ((dyn[0] & (1<<DT_FINI)) && dyn[DT_FINI])
-			fpaddr(p, dyn[DT_FINI])();
-#endif
-	}
-}
-
-void __ldso_atfork(int who)
-{
-	if (who<0) {
-		pthread_rwlock_wrlock(&lock);
-		pthread_mutex_lock(&init_fini_lock);
-	} else {
-		pthread_mutex_unlock(&init_fini_lock);
-		pthread_rwlock_unlock(&lock);
-	}
-}
-
-static struct dso **queue_ctors(struct dso *dso)
-{
-	size_t cnt, qpos, spos, i;
-	struct dso *p, **queue, **stack;
-
-	if (ldd_mode) return 0;
-
-	/* Bound on queue size is the total number of indirect deps.
-	 * If a bfs deps list was built, we can use it. Otherwise,
-	 * bound by the total number of DSOs, which is always safe and
-	 * is reasonable we use it (for main app at startup). */
-	if (dso->bfs_built) {
-		for (cnt=0; dso->deps[cnt]; cnt++)
-			dso->deps[cnt]->mark = 0;
-		cnt++; /* self, not included in deps */
-	} else {
-		for (cnt=0, p=head; p; cnt++, p=p->next)
-			p->mark = 0;
-	}
-	cnt++; /* termination slot */
-	if (dso==head && cnt <= countof(builtin_ctor_queue))
-		queue = builtin_ctor_queue;
-	else
-		queue = calloc(cnt, sizeof *queue);
-
-	if (!queue) {
-		error("Error allocating constructor queue: %m\n");
-		if (runtime) longjmp(*rtld_fail, 1);
-		return 0;
-	}
-
-	/* Opposite ends of the allocated buffer serve as an output queue
-	 * and a working stack. Setup initial stack with just the argument
-	 * dso and initial queue empty... */
-	stack = queue;
-	qpos = 0;
-	spos = cnt;
-	stack[--spos] = dso;
-	dso->next_dep = 0;
-	dso->mark = 1;
-
-	/* Then perform pseudo-DFS sort, but ignoring circular deps. */
-	while (spos<cnt) {
-		p = stack[spos++];
-		while (p->next_dep < p->ndeps_direct) {
-			if (p->deps[p->next_dep]->mark) {
-				p->next_dep++;
-			} else {
-				stack[--spos] = p;
-				p = p->deps[p->next_dep];
-				p->next_dep = 0;
-				p->mark = 1;
-			}
-		}
-		queue[qpos++] = p;
-	}
-	queue[qpos] = 0;
-	for (i=0; i<qpos; i++) queue[i]->mark = 0;
-	for (i=0; i<qpos; i++)
-		if (queue[i]->ctor_visitor && queue[i]->ctor_visitor->tid < 0) {
-			error("State of %s is inconsistent due to multithreaded fork\n",
-				queue[i]->name);
-			free(queue);
-			if (runtime) longjmp(*rtld_fail, 1);
-		}
-
-	return queue;
-}
-
-static void do_init_fini(struct dso **queue)
-{
-	struct dso *p;
-	size_t dyn[DYN_CNT], i;
-	pthread_t self = __pthread_self();
-
-	pthread_mutex_lock(&init_fini_lock);
-	for (i=0; (p=queue[i]); i++) {
-		while ((p->ctor_visitor && p->ctor_visitor!=self) || shutting_down)
-			pthread_cond_wait(&ctor_cond, &init_fini_lock);
-		if (p->ctor_visitor || p->constructed)
-			continue;
-		p->ctor_visitor = self;
-		
-		decode_vec(p->dynv, dyn, DYN_CNT);
-		if (dyn[0] & ((1<<DT_FINI) | (1<<DT_FINI_ARRAY))) {
-			p->fini_next = fini_head;
-			fini_head = p;
-		}
-
-		pthread_mutex_unlock(&init_fini_lock);
-
-#ifndef NO_LEGACY_INITFINI
-		if ((dyn[0] & (1<<DT_INIT)) && dyn[DT_INIT])
-			fpaddr(p, dyn[DT_INIT])();
-#endif
-		if (dyn[0] & (1<<DT_INIT_ARRAY)) {
-			size_t n = dyn[DT_INIT_ARRAYSZ]/sizeof(size_t);
-			size_t *fn = laddr(p, dyn[DT_INIT_ARRAY]);
-			while (n--) ((void (*)(void))*fn++)();
-		}
-
-		pthread_mutex_lock(&init_fini_lock);
-		p->ctor_visitor = 0;
-		p->constructed = 1;
-		pthread_cond_broadcast(&ctor_cond);
-	}
-	pthread_mutex_unlock(&init_fini_lock);
-}
-
-void __libc_start_init(void)
-{
-	do_init_fini(main_ctor_queue);
-	if (!__malloc_replaced && main_ctor_queue != builtin_ctor_queue)
-		free(main_ctor_queue);
-	main_ctor_queue = 0;
-}
-
-static void dl_debug_state(void)
-{
-}
-
-weak_alias(dl_debug_state, _dl_debug_state);
-
-void __init_tls(size_t *auxv)
-{
-}
-
-static void update_tls_size()
-{
-	libc.tls_cnt = tls_cnt;
-	libc.tls_align = tls_align;
-	libc.tls_size = ALIGN(
-		(1+tls_cnt) * sizeof(void *) +
-		tls_offset +
-		sizeof(struct pthread) +
-		tls_align * 2,
-	tls_align);
-}
-
-static void install_new_tls(void)
-{
-	sigset_t set;
-	pthread_t self = __pthread_self(), td;
-	struct dso *dtv_provider = container_of(tls_tail, struct dso, tls);
-	uintptr_t (*newdtv)[tls_cnt+1] = (void *)dtv_provider->new_dtv;
-	struct dso *p;
-	size_t i, j;
-	size_t old_cnt = self->dtv[0];
-
-	__block_app_sigs(&set);
-	__tl_lock();
-	/* Copy existing dtv contents from all existing threads. */
-	for (i=0, td=self; !i || td!=self; i++, td=td->next) {
-		memcpy(newdtv+i, td->dtv,
-			(old_cnt+1)*sizeof(uintptr_t));
-		newdtv[i][0] = tls_cnt;
-	}
-	/* Install new dtls into the enlarged, uninstalled dtv copies. */
-	for (p=head; ; p=p->next) {
-		if (p->tls_id <= old_cnt) continue;
-		unsigned char *mem = p->new_tls;
-		for (j=0; j<i; j++) {
-			unsigned char *new = mem;
-			new += ((uintptr_t)p->tls.image - (uintptr_t)mem)
-				& (p->tls.align-1);
-			memcpy(new, p->tls.image, p->tls.len);
-			newdtv[j][p->tls_id] =
-				(uintptr_t)new + DTP_OFFSET;
-			mem += p->tls.size + p->tls.align;
-		}
-		if (p->tls_id == tls_cnt) break;
-	}
-
-	/* Broadcast barrier to ensure contents of new dtv is visible
-	 * if the new dtv pointer is. The __membarrier function has a
-	 * fallback emulation using signals for kernels that lack the
-	 * feature at the syscall level. */
-
-	__membarrier(MEMBARRIER_CMD_PRIVATE_EXPEDITED, 0);
-
-	/* Install new dtv for each thread. */
-	for (j=0, td=self; !j || td!=self; j++, td=td->next) {
-		td->dtv = newdtv[j];
-	}
-
-	__tl_unlock();
-	__restore_sigs(&set);
-}
-
-/* Stage 1 of the dynamic linker is defined in dlstart.c. It calls the
- * following stage 2 and stage 3 functions via primitive symbolic lookup
- * since it does not have access to their addresses to begin with. */
-
-/* Stage 2 of the dynamic linker is called after relative relocations 
- * have been processed. It can make function calls to static functions
- * and access string literals and static data, but cannot use extern
- * symbols. Its job is to perform symbolic relocations on the dynamic
- * linker itself, but some of the relocations performed may need to be
- * replaced later due to copy relocations in the main program. */
-
-hidden void __dls2(unsigned char *base, size_t *sp)
-{
-	size_t *auxv;
-	for (auxv=sp+1+*sp+1; *auxv; auxv++);
-	auxv++;
-	if (DL_FDPIC) {
-		void *p1 = (void *)sp[-2];
-		void *p2 = (void *)sp[-1];
-		if (!p1) {
-			size_t aux[AUX_CNT];
-			decode_vec(auxv, aux, AUX_CNT);
-			if (aux[AT_BASE]) ldso.base = (void *)aux[AT_BASE];
-			else ldso.base = (void *)(aux[AT_PHDR] & -4096);
-		}
-		app_loadmap = p2 ? p1 : 0;
-		ldso.loadmap = p2 ? p2 : p1;
-		ldso.base = laddr(&ldso, 0);
-	} else {
-		ldso.base = base;
-	}
-	Ehdr *ehdr = (void *)ldso.base;
-	ldso.name = ldso.shortname = "libc.so";
-	ldso.phnum = ehdr->e_phnum;
-	ldso.phdr = laddr(&ldso, ehdr->e_phoff);
-	ldso.phentsize = ehdr->e_phentsize;
-	kernel_mapped_dso(&ldso);
-	decode_dyn(&ldso);
-
-	if (DL_FDPIC) makefuncdescs(&ldso);
-
-	/* Prepare storage for to save clobbered REL addends so they
-	 * can be reused in stage 3. There should be very few. If
-	 * something goes wrong and there are a huge number, abort
-	 * instead of risking stack overflow. */
-	size_t dyn[DYN_CNT];
-	decode_vec(ldso.dynv, dyn, DYN_CNT);
-	size_t *rel = laddr(&ldso, dyn[DT_REL]);
-	size_t rel_size = dyn[DT_RELSZ];
-	size_t symbolic_rel_cnt = 0;
-	apply_addends_to = rel;
-	for (; rel_size; rel+=2, rel_size-=2*sizeof(size_t))
-		if (!IS_RELATIVE(rel[1], ldso.syms)) symbolic_rel_cnt++;
-	if (symbolic_rel_cnt >= ADDEND_LIMIT) a_crash();
-	size_t addends[symbolic_rel_cnt+1];
-	saved_addends = addends;
-
-	head = &ldso;
-	reloc_all(&ldso);
-
-	ldso.relocated = 0;
-
-	/* Call dynamic linker stage-2b, __dls2b, looking it up
-	 * symbolically as a barrier against moving the address
-	 * load across the above relocation processing. */
-	struct symdef dls2b_def = find_sym(&ldso, "__dls2b", 0);
-	if (DL_FDPIC) ((stage3_func)&ldso.funcdescs[dls2b_def.sym-ldso.syms])(sp, auxv);
-	else ((stage3_func)laddr(&ldso, dls2b_def.sym->st_value))(sp, auxv);
-}
-
-/* Stage 2b sets up a valid thread pointer, which requires relocations
- * completed in stage 2, and on which stage 3 is permitted to depend.
- * This is done as a separate stage, with symbolic lookup as a barrier,
- * so that loads of the thread pointer and &errno can be pure/const and
- * thereby hoistable. */
-
-void __dls2b(size_t *sp, size_t *auxv)
-{
-	/* Setup early thread pointer in builtin_tls for ldso/libc itself to
-	 * use during dynamic linking. If possible it will also serve as the
-	 * thread pointer at runtime. */
-	search_vec(auxv, &__hwcap, AT_HWCAP);
-	libc.auxv = auxv;
-	libc.tls_size = sizeof builtin_tls;
-	libc.tls_align = tls_align;
-	if (__init_tp(__copy_tls((void *)builtin_tls)) < 0) {
-		a_crash();
-	}
-
-	struct symdef dls3_def = find_sym(&ldso, "__dls3", 0);
-	if (DL_FDPIC) ((stage3_func)&ldso.funcdescs[dls3_def.sym-ldso.syms])(sp, auxv);
-	else ((stage3_func)laddr(&ldso, dls3_def.sym->st_value))(sp, auxv);
-}
-
-/* Stage 3 of the dynamic linker is called with the dynamic linker/libc
- * fully functional. Its job is to load (if not already loaded) and
- * process dependencies and relocations for the main application and
- * transfer control to its entry point. */
-
-void __dls3(size_t *sp, size_t *auxv)
-{
-	static struct dso app, vdso;
-	size_t aux[AUX_CNT];
-	size_t i;
-	char *env_preload=0;
-	char *replace_argv0=0;
-	size_t vdso_base;
-	int argc = *sp;
-	char **argv = (void *)(sp+1);
-	char **argv_orig = argv;
-	char **envp = argv+argc+1;
-
-	/* Find aux vector just past environ[] and use it to initialize
-	 * global data that may be needed before we can make syscalls. */
-	__environ = envp;
-	decode_vec(auxv, aux, AUX_CNT);
-	search_vec(auxv, &__sysinfo, AT_SYSINFO);
-	__pthread_self()->sysinfo = __sysinfo;
-	libc.page_size = aux[AT_PAGESZ];
-	libc.secure = ((aux[0]&0x7800)!=0x7800 || aux[AT_UID]!=aux[AT_EUID]
-		|| aux[AT_GID]!=aux[AT_EGID] || aux[AT_SECURE]);
-
-	/* Only trust user/env if kernel says we're not suid/sgid */
-	if (!libc.secure) {
-		env_path = getenv("LD_LIBRARY_PATH");
-		env_preload = getenv("LD_PRELOAD");
-	}
-
-	/* If the main program was already loaded by the kernel,
-	 * AT_PHDR will point to some location other than the dynamic
-	 * linker's program headers. */
-	if (aux[AT_PHDR] != (size_t)ldso.phdr) {
-		size_t interp_off = 0;
-		size_t tls_image = 0;
-		/* Find load address of the main program, via AT_PHDR vs PT_PHDR. */
-		Phdr *phdr = app.phdr = (void *)aux[AT_PHDR];
-		app.phnum = aux[AT_PHNUM];
-		app.phentsize = aux[AT_PHENT];
-		for (i=aux[AT_PHNUM]; i; i--, phdr=(void *)((char *)phdr + aux[AT_PHENT])) {
-			if (phdr->p_type == PT_PHDR)
-				app.base = (void *)(aux[AT_PHDR] - phdr->p_vaddr);
-			else if (phdr->p_type == PT_INTERP)
-				interp_off = (size_t)phdr->p_vaddr;
-			else if (phdr->p_type == PT_TLS) {
-				tls_image = phdr->p_vaddr;
-				app.tls.len = phdr->p_filesz;
-				app.tls.size = phdr->p_memsz;
-				app.tls.align = phdr->p_align;
-			}
-		}
-		if (DL_FDPIC) app.loadmap = app_loadmap;
-		if (app.tls.size) app.tls.image = laddr(&app, tls_image);
-		if (interp_off) ldso.name = laddr(&app, interp_off);
-		if ((aux[0] & (1UL<<AT_EXECFN))
-		    && strncmp((char *)aux[AT_EXECFN], "/proc/", 6))
-			app.name = (char *)aux[AT_EXECFN];
-		else
-			app.name = argv[0];
-		kernel_mapped_dso(&app);
-	} else {
-		int fd;
-		char *ldname = argv[0];
-		size_t l = strlen(ldname);
-		if (l >= 3 && !strcmp(ldname+l-3, "ldd")) ldd_mode = 1;
-		argv++;
-		while (argv[0] && argv[0][0]=='-' && argv[0][1]=='-') {
-			char *opt = argv[0]+2;
-			*argv++ = (void *)-1;
-			if (!*opt) {
-				break;
-			} else if (!memcmp(opt, "list", 5)) {
-				ldd_mode = 1;
-			} else if (!memcmp(opt, "library-path", 12)) {
-				if (opt[12]=='=') env_path = opt+13;
-				else if (opt[12]) *argv = 0;
-				else if (*argv) env_path = *argv++;
-			} else if (!memcmp(opt, "preload", 7)) {
-				if (opt[7]=='=') env_preload = opt+8;
-				else if (opt[7]) *argv = 0;
-				else if (*argv) env_preload = *argv++;
-			} else if (!memcmp(opt, "argv0", 5)) {
-				if (opt[5]=='=') replace_argv0 = opt+6;
-				else if (opt[5]) *argv = 0;
-				else if (*argv) replace_argv0 = *argv++;
-			} else {
-				argv[0] = 0;
-			}
-		}
-		argv[-1] = (void *)(argc - (argv-argv_orig));
-		if (!argv[0]) {
-			dprintf(2, "musl libc (" LDSO_ARCH ")\n"
-				"Version %s\n"
-				"Dynamic Program Loader\n"
-				"Usage: %s [options] [--] pathname%s\n",
-				__libc_version, ldname,
-				ldd_mode ? "" : " [args]");
-			_exit(1);
-		}
-		fd = open(argv[0], O_RDONLY);
-		if (fd < 0) {
-			dprintf(2, "%s: cannot load %s: %s\n", ldname, argv[0], strerror(errno));
-			_exit(1);
-		}
-		Ehdr *ehdr = (void *)map_library(fd, &app);
-		if (!ehdr) {
-			dprintf(2, "%s: %s: Not a valid dynamic program\n", ldname, argv[0]);
-			_exit(1);
-		}
-		close(fd);
-		ldso.name = ldname;
-		app.name = argv[0];
-		aux[AT_ENTRY] = (size_t)laddr(&app, ehdr->e_entry);
-		/* Find the name that would have been used for the dynamic
-		 * linker had ldd not taken its place. */
-		if (ldd_mode) {
-			for (i=0; i<app.phnum; i++) {
-				if (app.phdr[i].p_type == PT_INTERP)
-					ldso.name = laddr(&app, app.phdr[i].p_vaddr);
-			}
-			dprintf(1, "\t%s (%p)\n", ldso.name, ldso.base);
-		}
-	}
-	if (app.tls.size) {
-		libc.tls_head = tls_tail = &app.tls;
-		app.tls_id = tls_cnt = 1;
-#ifdef TLS_ABOVE_TP
-		app.tls.offset = GAP_ABOVE_TP;
-		app.tls.offset += (-GAP_ABOVE_TP + (uintptr_t)app.tls.image)
-			& (app.tls.align-1);
-		tls_offset = app.tls.offset + app.tls.size;
-#else
-		tls_offset = app.tls.offset = app.tls.size
-			+ ( -((uintptr_t)app.tls.image + app.tls.size)
-			& (app.tls.align-1) );
-#endif
-		tls_align = MAXP2(tls_align, app.tls.align);
-	}
-	decode_dyn(&app);
-	if (DL_FDPIC) {
-		makefuncdescs(&app);
-		if (!app.loadmap) {
-			app.loadmap = (void *)&app_dummy_loadmap;
-			app.loadmap->nsegs = 1;
-			app.loadmap->segs[0].addr = (size_t)app.map;
-			app.loadmap->segs[0].p_vaddr = (size_t)app.map
-				- (size_t)app.base;
-			app.loadmap->segs[0].p_memsz = app.map_len;
-		}
-		argv[-3] = (void *)app.loadmap;
-	}
-
-	/* Initial dso chain consists only of the app. */
-	head = tail = syms_tail = &app;
-
-	/* Donate unused parts of app and library mapping to malloc */
-	reclaim_gaps(&app);
-	reclaim_gaps(&ldso);
-
-	/* Load preload/needed libraries, add symbols to global namespace. */
-	ldso.deps = (struct dso **)no_deps;
-	if (env_preload) load_preload(env_preload);
- 	load_deps(&app);
-	for (struct dso *p=head; p; p=p->next)
-		add_syms(p);
-
-	/* Attach to vdso, if provided by the kernel, last so that it does
-	 * not become part of the global namespace.  */
-	if (search_vec(auxv, &vdso_base, AT_SYSINFO_EHDR) && vdso_base) {
-		Ehdr *ehdr = (void *)vdso_base;
-		Phdr *phdr = vdso.phdr = (void *)(vdso_base + ehdr->e_phoff);
-		vdso.phnum = ehdr->e_phnum;
-		vdso.phentsize = ehdr->e_phentsize;
-		for (i=ehdr->e_phnum; i; i--, phdr=(void *)((char *)phdr + ehdr->e_phentsize)) {
-			if (phdr->p_type == PT_DYNAMIC)
-				vdso.dynv = (void *)(vdso_base + phdr->p_offset);
-			if (phdr->p_type == PT_LOAD)
-				vdso.base = (void *)(vdso_base - phdr->p_vaddr + phdr->p_offset);
-		}
-		vdso.name = "";
-		vdso.shortname = "linux-gate.so.1";
-		vdso.relocated = 1;
-		vdso.deps = (struct dso **)no_deps;
-		decode_dyn(&vdso);
-		vdso.prev = tail;
-		tail->next = &vdso;
-		tail = &vdso;
-	}
-
-	for (i=0; app.dynv[i]; i+=2) {
-		if (!DT_DEBUG_INDIRECT && app.dynv[i]==DT_DEBUG)
-			app.dynv[i+1] = (size_t)&debug;
-		if (DT_DEBUG_INDIRECT && app.dynv[i]==DT_DEBUG_INDIRECT) {
-			size_t *ptr = (size_t *) app.dynv[i+1];
-			*ptr = (size_t)&debug;
-		}
-	}
-
-	/* This must be done before final relocations, since it calls
-	 * malloc, which may be provided by the application. Calling any
-	 * application code prior to the jump to its entry point is not
-	 * valid in our model and does not work with FDPIC, where there
-	 * are additional relocation-like fixups that only the entry point
-	 * code can see to perform. */
-	main_ctor_queue = queue_ctors(&app);
-
-	/* Initial TLS must also be allocated before final relocations
-	 * might result in calloc being a call to application code. */
-	update_tls_size();
-	void *initial_tls = builtin_tls;
-	if (libc.tls_size > sizeof builtin_tls || tls_align > MIN_TLS_ALIGN) {
-		initial_tls = calloc(libc.tls_size, 1);
-		if (!initial_tls) {
-			dprintf(2, "%s: Error getting %zu bytes thread-local storage: %m\n",
-				argv[0], libc.tls_size);
-			_exit(127);
-		}
-	}
-	static_tls_cnt = tls_cnt;
-
-	/* The main program must be relocated LAST since it may contain
-	 * copy relocations which depend on libraries' relocations. */
-	reloc_all(app.next);
-	reloc_all(&app);
-
-	/* Actual copying to new TLS needs to happen after relocations,
-	 * since the TLS images might have contained relocated addresses. */
-	if (initial_tls != builtin_tls) {
-		if (__init_tp(__copy_tls(initial_tls)) < 0) {
-			a_crash();
-		}
-	} else {
-		size_t tmp_tls_size = libc.tls_size;
-		pthread_t self = __pthread_self();
-		/* Temporarily set the tls size to the full size of
-		 * builtin_tls so that __copy_tls will use the same layout
-		 * as it did for before. Then check, just to be safe. */
-		libc.tls_size = sizeof builtin_tls;
-		if (__copy_tls((void*)builtin_tls) != self) a_crash();
-		libc.tls_size = tmp_tls_size;
-	}
-
-	if (ldso_fail) _exit(127);
-	if (ldd_mode) _exit(0);
-
-	/* Determine if malloc was interposed by a replacement implementation
-	 * so that calloc and the memalign family can harden against the
-	 * possibility of incomplete replacement. */
-	if (find_sym(head, "malloc", 1).dso != &ldso)
-		__malloc_replaced = 1;
-	if (find_sym(head, "aligned_alloc", 1).dso != &ldso)
-		__aligned_alloc_replaced = 1;
-
-	/* Switch to runtime mode: any further failures in the dynamic
-	 * linker are a reportable failure rather than a fatal startup
-	 * error. */
-	runtime = 1;
-
-	debug.ver = 1;
-	debug.bp = dl_debug_state;
-	debug.head = head;
-	debug.base = ldso.base;
-	debug.state = RT_CONSISTENT;
-	_dl_debug_state();
-
-	if (replace_argv0) argv[0] = replace_argv0;
-
-	errno = 0;
-
-	CRTJMP((void *)aux[AT_ENTRY], argv-1);
-	for(;;);
-}
-
-static void prepare_lazy(struct dso *p)
-{
-	size_t dyn[DYN_CNT], n, flags1=0;
-	decode_vec(p->dynv, dyn, DYN_CNT);
-	search_vec(p->dynv, &flags1, DT_FLAGS_1);
-	if (dyn[DT_BIND_NOW] || (dyn[DT_FLAGS] & DF_BIND_NOW) || (flags1 & DF_1_NOW))
-		return;
-	n = dyn[DT_RELSZ]/2 + dyn[DT_RELASZ]/3 + dyn[DT_PLTRELSZ]/2 + 1;
-	if (NEED_MIPS_GOT_RELOCS) {
-		size_t j=0; search_vec(p->dynv, &j, DT_MIPS_GOTSYM);
-		size_t i=0; search_vec(p->dynv, &i, DT_MIPS_SYMTABNO);
-		n += i-j;
-	}
-	p->lazy = calloc(n, 3*sizeof(size_t));
-	if (!p->lazy) {
-		error("Error preparing lazy relocation for %s: %m", p->name);
-		longjmp(*rtld_fail, 1);
-	}
-	p->lazy_next = lazy_head;
-	lazy_head = p;
-}
-
-void *dlopen(const char *file, int mode)
-{
-	struct dso *volatile p, *orig_tail, *orig_syms_tail, *orig_lazy_head, *next;
-	struct tls_module *orig_tls_tail;
-	size_t orig_tls_cnt, orig_tls_offset, orig_tls_align;
-	size_t i;
-	int cs;
-	jmp_buf jb;
-	struct dso **volatile ctor_queue = 0;
-
-	if (!file) return head;
-
-	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
-	pthread_rwlock_wrlock(&lock);
-	__inhibit_ptc();
-
-	debug.state = RT_ADD;
-	_dl_debug_state();
-
-	p = 0;
-	if (shutting_down) {
-		error("Cannot dlopen while program is exiting.");
-		goto end;
-	}
-	orig_tls_tail = tls_tail;
-	orig_tls_cnt = tls_cnt;
-	orig_tls_offset = tls_offset;
-	orig_tls_align = tls_align;
-	orig_lazy_head = lazy_head;
-	orig_syms_tail = syms_tail;
-	orig_tail = tail;
-	noload = mode & RTLD_NOLOAD;
-
-	rtld_fail = &jb;
-	if (setjmp(*rtld_fail)) {
-		/* Clean up anything new that was (partially) loaded */
-		revert_syms(orig_syms_tail);
-		for (p=orig_tail->next; p; p=next) {
-			next = p->next;
-			while (p->td_index) {
-				void *tmp = p->td_index->next;
-				free(p->td_index);
-				p->td_index = tmp;
-			}
-			free(p->funcdescs);
-			if (p->rpath != p->rpath_orig)
-				free(p->rpath);
-			free(p->deps);
-			unmap_library(p);
-			free(p);
-		}
-		free(ctor_queue);
-		ctor_queue = 0;
-		if (!orig_tls_tail) libc.tls_head = 0;
-		tls_tail = orig_tls_tail;
-		if (tls_tail) tls_tail->next = 0;
-		tls_cnt = orig_tls_cnt;
-		tls_offset = orig_tls_offset;
-		tls_align = orig_tls_align;
-		lazy_head = orig_lazy_head;
-		tail = orig_tail;
-		tail->next = 0;
-		p = 0;
-		goto end;
-	} else p = load_library(file, head);
-
-	if (!p) {
-		error(noload ?
-			"Library %s is not already loaded" :
-			"Error loading shared library %s: %m",
-			file);
-		goto end;
-	}
-
-	/* First load handling */
-	load_deps(p);
-	extend_bfs_deps(p);
-	pthread_mutex_lock(&init_fini_lock);
-	int constructed = p->constructed;
-	pthread_mutex_unlock(&init_fini_lock);
-	if (!constructed) ctor_queue = queue_ctors(p);
-	if (!p->relocated && (mode & RTLD_LAZY)) {
-		prepare_lazy(p);
-		for (i=0; p->deps[i]; i++)
-			if (!p->deps[i]->relocated)
-				prepare_lazy(p->deps[i]);
-	}
-	if (!p->relocated || (mode & RTLD_GLOBAL)) {
-		/* Make new symbols global, at least temporarily, so we can do
-		 * relocations. If not RTLD_GLOBAL, this is reverted below. */
-		add_syms(p);
-		for (i=0; p->deps[i]; i++)
-			add_syms(p->deps[i]);
-	}
-	if (!p->relocated) {
-		reloc_all(p);
-	}
-
-	/* If RTLD_GLOBAL was not specified, undo any new additions
-	 * to the global symbol table. This is a nop if the library was
-	 * previously loaded and already global. */
-	if (!(mode & RTLD_GLOBAL))
-		revert_syms(orig_syms_tail);
-
-	/* Processing of deferred lazy relocations must not happen until
-	 * the new libraries are committed; otherwise we could end up with
-	 * relocations resolved to symbol definitions that get removed. */
-	redo_lazy_relocs();
-
-	update_tls_size();
-	if (tls_cnt != orig_tls_cnt)
-		install_new_tls();
-	orig_tail = tail;
-end:
-	debug.state = RT_CONSISTENT;
-	_dl_debug_state();
-	__release_ptc();
-	if (p) gencnt++;
-	pthread_rwlock_unlock(&lock);
-	if (ctor_queue) {
-		do_init_fini(ctor_queue);
-		free(ctor_queue);
-	}
-	pthread_setcancelstate(cs, 0);
-	return p;
-}
-
-hidden int __dl_invalid_handle(void *h)
-{
-	struct dso *p;
-	for (p=head; p; p=p->next) if (h==p) return 0;
-	error("Invalid library handle %p", (void *)h);
-	return 1;
-}
-
-static void *addr2dso(size_t a)
-{
-	struct dso *p;
-	size_t i;
-	if (DL_FDPIC) for (p=head; p; p=p->next) {
-		i = count_syms(p);
-		if (a-(size_t)p->funcdescs < i*sizeof(*p->funcdescs))
-			return p;
-	}
-	for (p=head; p; p=p->next) {
-		if (DL_FDPIC && p->loadmap) {
-			for (i=0; i<p->loadmap->nsegs; i++) {
-				if (a-p->loadmap->segs[i].p_vaddr
-				    < p->loadmap->segs[i].p_memsz)
-					return p;
-			}
-		} else {
-			Phdr *ph = p->phdr;
-			size_t phcnt = p->phnum;
-			size_t entsz = p->phentsize;
-			size_t base = (size_t)p->base;
-			for (; phcnt--; ph=(void *)((char *)ph+entsz)) {
-				if (ph->p_type != PT_LOAD) continue;
-				if (a-base-ph->p_vaddr < ph->p_memsz)
-					return p;
-			}
-			if (a-(size_t)p->map < p->map_len)
-				return 0;
-		}
-	}
-	return 0;
-}
-
-static void *do_dlsym(struct dso *p, const char *s, void *ra)
-{
-	int use_deps = 0;
-	if (p == head || p == RTLD_DEFAULT) {
-		p = head;
-	} else if (p == RTLD_NEXT) {
-		p = addr2dso((size_t)ra);
-		if (!p) p=head;
-		p = p->next;
-	} else if (__dl_invalid_handle(p)) {
-		return 0;
-	} else
-		use_deps = 1;
-	struct symdef def = find_sym2(p, s, 0, use_deps);
-	if (!def.sym) {
-		error("Symbol not found: %s", s);
-		return 0;
-	}
-	if ((def.sym->st_info&0xf) == STT_TLS)
-		return __tls_get_addr((tls_mod_off_t []){def.dso->tls_id, def.sym->st_value-DTP_OFFSET});
-	if (DL_FDPIC && (def.sym->st_info&0xf) == STT_FUNC)
-		return def.dso->funcdescs + (def.sym - def.dso->syms);
-	return laddr(def.dso, def.sym->st_value);
-}
-
-int dladdr(const void *addr_arg, Dl_info *info)
-{
-	size_t addr = (size_t)addr_arg;
-	struct dso *p;
-	Sym *sym, *bestsym;
-	uint32_t nsym;
-	char *strings;
-	size_t best = 0;
-	size_t besterr = -1;
-
-	pthread_rwlock_rdlock(&lock);
-	p = addr2dso(addr);
-	pthread_rwlock_unlock(&lock);
-
-	if (!p) return 0;
-
-	sym = p->syms;
-	strings = p->strings;
-	nsym = count_syms(p);
-
-	if (DL_FDPIC) {
-		size_t idx = (addr-(size_t)p->funcdescs)
-			/ sizeof(*p->funcdescs);
-		if (idx < nsym && (sym[idx].st_info&0xf) == STT_FUNC) {
-			best = (size_t)(p->funcdescs + idx);
-			bestsym = sym + idx;
-			besterr = 0;
-		}
-	}
-
-	if (!best) for (; nsym; nsym--, sym++) {
-		if (sym->st_value
-		 && (1<<(sym->st_info&0xf) & OK_TYPES)
-		 && (1<<(sym->st_info>>4) & OK_BINDS)) {
-			size_t symaddr = (size_t)laddr(p, sym->st_value);
-			if (symaddr > addr || symaddr <= best)
-				continue;
-			best = symaddr;
-			bestsym = sym;
-			besterr = addr - symaddr;
-			if (addr == symaddr)
-				break;
-		}
-	}
-
-	if (best && besterr > bestsym->st_size-1) {
-		best = 0;
-		bestsym = 0;
-	}
-
-	info->dli_fname = p->name;
-	info->dli_fbase = p->map;
-
-	if (!best) {
-		info->dli_sname = 0;
-		info->dli_saddr = 0;
-		return 1;
-	}
-
-	if (DL_FDPIC && (bestsym->st_info&0xf) == STT_FUNC)
-		best = (size_t)(p->funcdescs + (bestsym - p->syms));
-	info->dli_sname = strings + bestsym->st_name;
-	info->dli_saddr = (void *)best;
-
-	return 1;
-}
-
-hidden void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
-{
-	void *res;
-	pthread_rwlock_rdlock(&lock);
-	res = do_dlsym(p, s, ra);
-	pthread_rwlock_unlock(&lock);
-	return res;
-}
-
-hidden void *__dlsym_redir_time64(void *restrict p, const char *restrict s, void *restrict ra)
-{
-#if _REDIR_TIME64
-	const char *suffix, *suffix2 = "";
-	char redir[36];
-
-	/* Map the symbol name to a time64 version of itself according to the
-	 * pattern used for naming the redirected time64 symbols. */
-	size_t l = strnlen(s, sizeof redir);
-	if (l<4 || l==sizeof redir) goto no_redir;
-	if (s[l-2]=='_' && s[l-1]=='r') {
-		l -= 2;
-		suffix2 = s+l;
-	}
-	if (l<4) goto no_redir;
-	if (!strcmp(s+l-4, "time")) suffix = "64";
-	else suffix = "_time64";
-
-	/* Use the presence of the remapped symbol name in libc to determine
-	 * whether it's one that requires time64 redirection; replace if so. */
-	snprintf(redir, sizeof redir, "__%.*s%s%s", (int)l, s, suffix, suffix2);
-	if (find_sym(&ldso, redir, 1).sym) s = redir;
-no_redir:
-#endif
-	return __dlsym(p, s, ra);
-}
-
-int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data)
-{
-	struct dso *current;
-	struct dl_phdr_info info;
-	int ret = 0;
-	for(current = head; current;) {
-		info.dlpi_addr      = (uintptr_t)current->base;
-		info.dlpi_name      = current->name;
-		info.dlpi_phdr      = current->phdr;
-		info.dlpi_phnum     = current->phnum;
-		info.dlpi_adds      = gencnt;
-		info.dlpi_subs      = 0;
-		info.dlpi_tls_modid = current->tls_id;
-		info.dlpi_tls_data  = current->tls.image;
-
-		ret = (callback)(&info, sizeof (info), data);
-
-		if (ret != 0) break;
-
-		pthread_rwlock_rdlock(&lock);
-		current = current->next;
-		pthread_rwlock_unlock(&lock);
-	}
-	return ret;
-}
-
-static void error(const char *fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	if (!runtime) {
-		vdprintf(2, fmt, ap);
-		dprintf(2, "\n");
-		ldso_fail = 1;
-		va_end(ap);
-		return;
-	}
-	__dl_vseterr(fmt, ap);
-	va_end(ap);
-}
lib/libc/wasi/libc-top-half/musl/tools/add-cfi.common.awk
@@ -1,26 +0,0 @@
-function hex2int(str,   i) {
-  str = tolower(str)
-
-  for (i = 1; i <= 16; i++) {
-    char = substr("0123456789abcdef", i, 1)
-    lookup[char] = i-1
-  }
-
-  result = 0
-  for (i = 1; i <= length(str); i++) {
-    result = result * 16
-    char   = substr(str, i, 1)
-    result = result + lookup[char]
-  }
-  return result
-}
-
-function parse_const(str) {
-  sign = sub(/^-/, "", str)
-  hex  = sub(/^0x/, "", str)
-  if (hex)
-    n = hex2int(str)
-  else
-    n = str+0
-  return sign ? -n : n
-}
lib/libc/wasi/libc-top-half/musl/tools/add-cfi.i386.awk
@@ -1,209 +0,0 @@
-# Insert GAS CFI directives ("control frame information") into x86-32 asm input
-#
-# CFI directives tell the assembler how to generate "stack frame" debug info
-# This information can tell a debugger (like gdb) how to find the current stack
-#   frame at any point in the program code, and how to find the values which
-#   various registers had at higher points in the call stack
-# With this information, the debugger can show a backtrace, and you can move up
-#   and down the call stack and examine the values of local variables
-
-BEGIN {
-  # don't put CFI data in the .eh_frame ELF section (which we don't keep)
-  print ".cfi_sections .debug_frame"
-
-  # only emit CFI directives inside a function
-  in_function = 0
-
-  # emit .loc directives with line numbers from original source
-  printf ".file 1 \"%s\"\n", ARGV[1]
-  line_number = 0
-
-  # used to detect "call label; label:" trick
-  called = ""
-}
-
-function get_const1() {
-  # for instructions with 2 operands, get 1st operand (assuming it is constant)
-  match($0, /-?(0x[0-9a-fA-F]+|[0-9]+),/)
-  return parse_const(substr($0, RSTART, RLENGTH-1))
-}
-
-function canonicalize_reg(register) {
-  if (match(register, /^e/))
-    return register
-  else if (match(register, /[hl]$/)) # AH, AL, BH, BL, etc
-    return "e" substr(register, 1, 1) "x"
-  else # AX, BX, CX, etc
-    return "e" register
-}
-function get_reg() {
-  # only use if you already know there is 1 and only 1 register
-  match($0, /%e?([abcd][hlx]|si|di|bp)/)
-  return canonicalize_reg(substr($0, RSTART+1, RLENGTH-1))
-}
-function get_reg1() {
-  # for instructions with 2 operands, get 1st operand (assuming it is register)
-  match($0, /%e?([abcd][hlx]|si|di|bp),/)
-  return canonicalize_reg(substr($0, RSTART+1, RLENGTH-2))
-}
-function get_reg2() {
-  # for instructions with 2 operands, get 2nd operand (assuming it is register)
-  match($0, /,%e?([abcd][hlx]|si|di|bp)/)
-  return canonicalize_reg(substr($0, RSTART+2, RLENGTH-2))
-}
-
-function adjust_sp_offset(delta) {
-  if (in_function)
-    printf ".cfi_adjust_cfa_offset %d\n", delta
-}
-
-{
-  line_number = line_number + 1
-
-  # clean the input up before doing anything else
-  # delete comments
-  gsub(/(#|\/\/).*/, "")
-
-  # canonicalize whitespace
-  gsub(/[ \t]+/, " ") # mawk doesn't understand \s
-  gsub(/ *, */, ",")
-  gsub(/ *: */, ": ")
-  gsub(/ $/, "")
-  gsub(/^ /, "")
-}
-
-# check for assembler directives which we care about
-/^\.(section|data|text)/ {
-  # a .cfi_startproc/.cfi_endproc pair should be within the same section
-  # otherwise, clang will choke when generating ELF output
-  if (in_function) {
-    print ".cfi_endproc"
-    in_function = 0
-  }
-}
-/^\.type [a-zA-Z0-9_]+,@function/ {
-  functions[substr($2, 1, length($2)-10)] = 1
-}
-# not interested in assembler directives beyond this, just pass them through
-/^\./ {
-  print
-  next
-}
-
-/^[a-zA-Z0-9_]+:/ {
-  label = substr($1, 1, length($1)-1) # drop trailing :
-
-  if (called == label) {
-    # note adjustment of stack pointer from "call label; label:"
-    adjust_sp_offset(4)
-  }
-
-  if (functions[label]) {
-    if (in_function)
-      print ".cfi_endproc"
-
-    in_function = 1
-    print ".cfi_startproc"
-
-    for (register in saved)
-      delete saved[register]
-    for (register in dirty)
-      delete dirty[register]
-  }
-
-  # an instruction may follow on the same line, so continue processing
-}
-
-/^$/ { next }
-
-{
-  called = ""
-  printf ".loc 1 %d\n", line_number
-  print
-}
-
-# KEEPING UP WITH THE STACK POINTER
-# We do NOT attempt to understand foolish and ridiculous tricks like stashing
-#   the stack pointer and then using %esp as a scratch register, or bitshifting
-#   it or taking its square root or anything stupid like that.
-# %esp should only be adjusted by pushing/popping or adding/subtracting constants
-#
-/pushl?/ {
-  if (match($0, / %(ax|bx|cx|dx|di|si|bp|sp)/))
-    adjust_sp_offset(2)
-  else
-    adjust_sp_offset(4)
-}
-/popl?/ {
-  if (match($0, / %(ax|bx|cx|dx|di|si|bp|sp)/))
-    adjust_sp_offset(-2)
-  else
-    adjust_sp_offset(-4)
-}
-/addl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%esp/ { adjust_sp_offset(-get_const1()) }
-/subl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%esp/ { adjust_sp_offset(get_const1()) }
-
-/call/ {
-  if (match($0, /call [0-9]+f/)) # "forward" label
-    called = substr($0, RSTART+5, RLENGTH-6)
-  else if (match($0, /call [0-9a-zA-Z_]+/))
-    called = substr($0, RSTART+5, RLENGTH-5)
-}
-
-# TRACKING REGISTER VALUES FROM THE PREVIOUS STACK FRAME
-#
-/pushl? %e(ax|bx|cx|dx|si|di|bp)/ { # don't match "push (%reg)"
-  # if a register is being pushed, and its value has not changed since the
-  #   beginning of this function, the pushed value can be used when printing
-  #   local variables at the next level up the stack
-  # emit '.cfi_rel_offset' for that
-
-  if (in_function) {
-    register = get_reg()
-    if (!saved[register] && !dirty[register]) {
-      printf ".cfi_rel_offset %s,0\n", register
-      saved[register] = 1
-    }
-  }
-}
-
-/movl? %e(ax|bx|cx|dx|si|di|bp),-?(0x[0-9a-fA-F]+|[0-9]+)?\(%esp\)/ {
-  if (in_function) {
-    register = get_reg()
-    if (match($0, /-?(0x[0-9a-fA-F]+|[0-9]+)\(%esp\)/)) {
-      offset = parse_const(substr($0, RSTART, RLENGTH-6))
-    } else {
-      offset = 0
-    }
-    if (!saved[register] && !dirty[register]) {
-      printf ".cfi_rel_offset %s,%d\n", register, offset
-      saved[register] = 1
-    }
-  }
-}
-
-# IF REGISTER VALUES ARE UNCEREMONIOUSLY TRASHED
-# ...then we want to know about it.
-#
-function trashed(register) {
-  if (in_function && !saved[register] && !dirty[register]) {
-    printf ".cfi_undefined %s\n", register
-  }
-  dirty[register] = 1
-}
-# this does NOT exhaustively check for all possible instructions which could
-# overwrite a register value inherited from the caller (just the common ones)
-/mov.*,%e?([abcd][hlx]|si|di|bp)$/  { trashed(get_reg2()) }
-/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr).*,%e?([abcd][hlx]|si|di|bp)$/ {
-  trashed(get_reg2())
-}
-/^i?mul [^,]*$/                      { trashed("eax"); trashed("edx") }
-/^i?mul.*,%e?([abcd][hlx]|si|di|bp)$/ { trashed(get_reg2()) }
-/^i?div/                             { trashed("eax"); trashed("edx") }
-/(dec|inc|not|neg|pop) %e?([abcd][hlx]|si|di|bp)/  { trashed(get_reg()) }
-/cpuid/ { trashed("eax"); trashed("ebx"); trashed("ecx"); trashed("edx") }
-
-END {
-  if (in_function)
-    print ".cfi_endproc"
-}
lib/libc/wasi/libc-top-half/musl/tools/add-cfi.x86_64.awk
@@ -1,196 +0,0 @@
-# Insert GAS CFI directives ("control frame information") into x86-64 asm input
-
-BEGIN {
-  # don't put CFI data in the .eh_frame ELF section (which we don't keep)
-  print ".cfi_sections .debug_frame"
-
-  # only emit CFI directives inside a function
-  in_function = 0
-
-  # emit .loc directives with line numbers from original source
-  printf ".file 1 \"%s\"\n", ARGV[1]
-  line_number = 0
-
-  # used to detect "call label; label:" trick
-  called = ""
-}
-
-function get_const1() {
-  # for instructions with 2 operands, get 1st operand (assuming it is constant)
-  match($0, /-?(0x[0-9a-fA-F]+|[0-9]+),/)
-  return parse_const(substr($0, RSTART, RLENGTH-1))
-}
-
-function canonicalize_reg(register) {
-  if (match(register, /^r/))
-    return register
-  else if (match(register, /^e/))
-    return "r" substr(register, 2, length(register)-1)
-  else if (match(register, /[hl]$/)) # AH, AL, BH, BL, etc
-    return "r" substr(register, 1, 1) "x"
-  else # AX, BX, CX, etc
-    return "r" register
-}
-function get_reg() {
-  # only use if you already know there is 1 and only 1 register
-  match($0, /%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/)
-  return canonicalize_reg(substr($0, RSTART+1, RLENGTH-1))
-}
-function get_reg1() {
-  # for instructions with 2 operands, get 1st operand (assuming it is register)
-  match($0, /%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15),/)
-  return canonicalize_reg(substr($0, RSTART+1, RLENGTH-2))
-}
-function get_reg2() {
-  # for instructions with 2 operands, get 2nd operand (assuming it is register)
-  match($0, /,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/)
-  return canonicalize_reg(substr($0, RSTART+2, RLENGTH-2))
-}
-
-function adjust_sp_offset(delta) {
-  if (in_function)
-    printf ".cfi_adjust_cfa_offset %d\n", delta
-}
-
-{
-  line_number = line_number + 1
-
-  # clean the input up before doing anything else
-  # delete comments
-  gsub(/(#|\/\/).*/, "")
-
-  # canonicalize whitespace
-  gsub(/[ \t]+/, " ") # mawk doesn't understand \s
-  gsub(/ *, */, ",")
-  gsub(/ *: */, ": ")
-  gsub(/ $/, "")
-  gsub(/^ /, "")
-}
-
-# check for assembler directives which we care about
-/^\.(section|data|text)/ {
-  # a .cfi_startproc/.cfi_endproc pair should be within the same section
-  # otherwise, clang will choke when generating ELF output
-  if (in_function) {
-    print ".cfi_endproc"
-    in_function = 0
-  }
-}
-/^\.type [a-zA-Z0-9_]+,@function/ {
-  functions[substr($2, 1, length($2)-10)] = 1
-}
-# not interested in assembler directives beyond this, just pass them through
-/^\./ {
-  print
-  next
-}
-
-/^[a-zA-Z0-9_]+:/ {
-  label = substr($1, 1, length($1)-1) # drop trailing :
-
-  if (called == label) {
-    # note adjustment of stack pointer from "call label; label:"
-    adjust_sp_offset(8)
-  }
-
-  if (functions[label]) {
-    if (in_function)
-      print ".cfi_endproc"
-
-    in_function = 1
-    print ".cfi_startproc"
-
-    for (register in saved)
-      delete saved[register]
-    for (register in dirty)
-      delete dirty[register]
-  }
-
-  # an instruction may follow on the same line, so continue processing
-}
-
-/^$/ { next }
-
-{
-  called = ""
-  printf ".loc 1 %d\n", line_number
-  print
-}
-
-# KEEPING UP WITH THE STACK POINTER
-# %rsp should only be adjusted by pushing/popping or adding/subtracting constants
-#
-/pushl?/ {
-  adjust_sp_offset(8)
-}
-/popl?/ {
-  adjust_sp_offset(-8)
-}
-/addl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%rsp/ { adjust_sp_offset(-get_const1()) }
-/subl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%rsp/ { adjust_sp_offset(get_const1()) }
-
-/call/ {
-  if (match($0, /call [0-9]+f/)) # "forward" label
-    called = substr($0, RSTART+5, RLENGTH-6)
-  else if (match($0, /call [0-9a-zA-Z_]+/))
-    called = substr($0, RSTART+5, RLENGTH-5)
-}
-
-# TRACKING REGISTER VALUES FROM THE PREVIOUS STACK FRAME
-#
-/pushl? %r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15)/ { # don't match "push (%reg)"
-  # if a register is being pushed, and its value has not changed since the
-  #   beginning of this function, the pushed value can be used when printing
-  #   local variables at the next level up the stack
-  # emit '.cfi_rel_offset' for that
-
-  if (in_function) {
-    register = get_reg()
-    if (!saved[register] && !dirty[register]) {
-      printf ".cfi_rel_offset %s,0\n", register
-      saved[register] = 1
-    }
-  }
-}
-
-/movl? %r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15),-?(0x[0-9a-fA-F]+|[0-9]+)?\(%rsp\)/ {
-  if (in_function) {
-    register = get_reg()
-    if (match($0, /-?(0x[0-9a-fA-F]+|[0-9]+)\(%rsp\)/)) {
-      offset = parse_const(substr($0, RSTART, RLENGTH-6))
-    } else {
-      offset = 0
-    }
-    if (!saved[register] && !dirty[register]) {
-      printf ".cfi_rel_offset %s,%d\n", register, offset
-      saved[register] = 1
-    }
-  }
-}
-
-# IF REGISTER VALUES ARE UNCEREMONIOUSLY TRASHED
-# ...then we want to know about it.
-#
-function trashed(register) {
-  if (in_function && !saved[register] && !dirty[register]) {
-    printf ".cfi_undefined %s\n", register
-  }
-  dirty[register] = 1
-}
-# this does NOT exhaustively check for all possible instructions which could
-# overwrite a register value inherited from the caller (just the common ones)
-/mov.*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ { trashed(get_reg2()) }
-/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr).*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ {
-  trashed(get_reg2())
-}
-/^i?mul [^,]*$/ { trashed("rax"); trashed("rdx") }
-/^i?mul.*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ { trashed(get_reg2()) }
-/^i?div/ { trashed("rax"); trashed("rdx") }
-
-/(dec|inc|not|neg|pop) %[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/  { trashed(get_reg()) }
-/cpuid/ { trashed("rax"); trashed("rbx"); trashed("rcx"); trashed("rdx") }
-
-END {
-  if (in_function)
-    print ".cfi_endproc"
-}
lib/libc/wasi/libc-top-half/musl/tools/install.sh
@@ -1,64 +0,0 @@
-#!/bin/sh
-#
-# This is an actually-safe install command which installs the new
-# file atomically in the new location, rather than overwriting
-# existing files.
-#
-
-usage() {
-printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2
-exit 1
-}
-
-mkdirp=
-symlink=
-mode=755
-
-while getopts Dlm: name ; do
-case "$name" in
-D) mkdirp=yes ;;
-l) symlink=yes ;;
-m) mode=$OPTARG ;;
-?) usage ;;
-esac
-done
-shift $(($OPTIND - 1))
-
-test "$#" -eq 2 || usage
-src=$1
-dst=$2
-tmp="$dst.tmp.$$"
-
-case "$dst" in
-*/) printf "%s: %s ends in /\n", "$0" "$dst" 1>&2 ; exit 1 ;;
-esac
-
-set -C
-set -e
-
-if test "$mkdirp" ; then
-umask 022
-case "$2" in
-*/*) mkdir -p "${dst%/*}" ;;
-esac
-fi
-
-trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
-
-umask 077
-
-if test "$symlink" ; then
-ln -s "$1" "$tmp"
-else
-cat < "$1" > "$tmp"
-chmod "$mode" "$tmp"
-fi
-
-mv -f "$tmp" "$2"
-test -d "$2" && {
-rm -f "$2/$tmp"
-printf "%s: %s is a directory\n" "$0" "$dst" 1>&2
-exit 1
-}
-
-exit 0
lib/libc/wasi/libc-top-half/musl/tools/ld.musl-clang.in
@@ -1,51 +0,0 @@
-#!/bin/sh
-cc="@CC@"
-libc_lib="@LIBDIR@"
-ldso="@LDSO@"
-cleared=
-shared=
-userlinkdir=
-userlink=
-
-for x ; do
-    test "$cleared" || set -- ; cleared=1
-
-    case "$x" in
-        -L-user-start)
-            userlinkdir=1
-            ;;
-        -L-user-end)
-            userlinkdir=
-            ;;
-        -L*)
-            test "$userlinkdir" && set -- "$@" "$x"
-            ;;
-        -l-user-start)
-            userlink=1
-            ;;
-        -l-user-end)
-            userlink=
-            ;;
-        crtbegin*.o|crtend*.o)
-            set -- "$@" $($cc -print-file-name=$x)
-            ;;
-        -lgcc|-lgcc_eh)
-            file=lib${x#-l}.a
-            set -- "$@" $($cc -print-file-name=$file)
-            ;;
-        -l*)
-            test "$userlink" && set -- "$@" "$x"
-            ;;
-        -shared)
-            shared=1
-            set -- "$@" -shared
-            ;;
-        -sysroot=*|--sysroot=*)
-            ;;
-        *)
-            set -- "$@" "$x"
-            ;;
-    esac
-done
-
-exec $($cc -print-prog-name=ld) -nostdlib "$@" -lc -dynamic-linker "$ldso"
lib/libc/wasi/libc-top-half/musl/tools/mkalltypes.sed
@@ -1,15 +0,0 @@
-/^TYPEDEF/s/TYPEDEF \(.*\) \([^ ]*\);$/#if defined(__NEED_\2) \&\& !defined(__DEFINED_\2)\
-typedef \1 \2;\
-#define __DEFINED_\2\
-#endif\
-/
-/^STRUCT/s/STRUCT * \([^ ]*\) \(.*\);$/#if defined(__NEED_struct_\1) \&\& !defined(__DEFINED_struct_\1)\
-struct \1 \2;\
-#define __DEFINED_struct_\1\
-#endif\
-/
-/^UNION/s/UNION * \([^ ]*\) \(.*\);$/#if defined(__NEED_union_\1) \&\& !defined(__DEFINED_union_\1)\
-union \1 \2;\
-#define __DEFINED_union_\1\
-#endif\
-/
lib/libc/wasi/libc-top-half/musl/tools/musl-clang.in
@@ -1,35 +0,0 @@
-#!/bin/sh
-cc="@CC@"
-libc="@PREFIX@"
-libc_inc="@INCDIR@"
-libc_lib="@LIBDIR@"
-thisdir="`cd "$(dirname "$0")"; pwd`"
-
-# prevent clang from running the linker (and erroring) on no input.
-sflags=
-eflags=
-for x ; do
-    case "$x" in
-        -l*) input=1 ;;
-        *) input= ;;
-    esac
-    if test "$input" ; then
-        sflags="-l-user-start"
-        eflags="-l-user-end"
-        break
-    fi
-done
-
-exec $cc \
-    -B"$thisdir" \
-    -fuse-ld=musl-clang \
-    -static-libgcc \
-    -nostdinc \
-    --sysroot "$libc" \
-    -isystem "$libc_inc" \
-    -L-user-start \
-    $sflags \
-    "$@" \
-    $eflags \
-    -L"$libc_lib" \
-    -L-user-end
lib/libc/wasi/libc-top-half/musl/tools/musl-gcc.specs.sh
@@ -1,37 +0,0 @@
-incdir=$1
-libdir=$2
-ldso=$3
-cat <<EOF
-%rename cpp_options old_cpp_options
-
-*cpp_options:
--nostdinc -isystem $incdir -isystem include%s %(old_cpp_options)
-
-*cc1:
-%(cc1_cpu) -nostdinc -isystem $incdir -isystem include%s
-
-*link_libgcc:
--L$libdir -L .%s
-
-*libgcc:
-libgcc.a%s %:if-exists(libgcc_eh.a%s)
-
-*startfile:
-%{!shared: $libdir/Scrt1.o} $libdir/crti.o crtbeginS.o%s
-
-*endfile:
-crtendS.o%s $libdir/crtn.o
-
-*link:
--dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}
-
-*esp_link:
-
-
-*esp_options:
-
-
-*esp_cpp_options:
-
-
-EOF
lib/libc/wasi/libc-top-half/musl/tools/version.sh
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if test -d .git ; then
-if type git >/dev/null 2>&1 ; then
-git describe --tags --match 'v[0-9]*' 2>/dev/null \
-| sed -e 's/^v//' -e 's/-/-git-/'
-else
-sed 's/$/-git/' < VERSION
-fi
-else
-cat VERSION
-fi
lib/libc/wasi/libc-top-half/musl/configure
@@ -1,816 +0,0 @@
-#!/bin/sh
-
-usage () {
-cat <<EOF
-Usage: $0 [OPTION]... [VAR=VALUE]... [TARGET]
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  --srcdir=DIR            source directory [detected]
-
-Installation directories:
-  --prefix=PREFIX         main installation prefix [/usr/local/musl]
-  --exec-prefix=EPREFIX   installation prefix for executable files [PREFIX]
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --libdir=DIR            library files for the linker [PREFIX/lib]
-  --includedir=DIR        include files for the C compiler [PREFIX/include]
-  --syslibdir=DIR         location for the dynamic linker [/lib]
-
-System types:
-  --target=TARGET         configure to run on target TARGET [detected]
-  --host=HOST             same as --target
-  --build=BUILD           build system type; used only to infer cross-compiling
-
-Optional features:
-  --enable-optimize=...   optimize listed components for speed over size [auto]
-  --enable-debug          build with debugging information [disabled]
-  --disable-warnings      build with recommended warnings flags [enabled]
-  --enable-wrapper=...    build given musl toolchain wrapper [auto]
-  --disable-shared        inhibit building shared library [enabled]
-  --disable-static        inhibit building static library [enabled]
-
-Optional packages:
-  --with-malloc=...       choose malloc implementation [mallocng]
-
-Some influential environment variables:
-  CC                      C compiler command [detected]
-  CFLAGS                  C compiler flags [-Os -pipe ...]
-  CROSS_COMPILE           prefix for cross compiler and tools [none]
-  LIBCC                   compiler runtime library [detected]
-
-Use these variables to override the choices made by configure.
-
-EOF
-exit 0
-}
-
-# Helper functions
-
-quote () {
-tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
-$1
-EOF
-printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#"
-}
-echo () { printf "%s\n" "$*" ; }
-fail () { echo "$*" ; exit 1 ; }
-fnmatch () { eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac" ; }
-cmdexists () { type "$1" >/dev/null 2>&1 ; }
-trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
-
-stripdir () {
-while eval "fnmatch '*/' \"\${$1}\"" ; do eval "$1=\${$1%/}" ; done
-}
-
-trycppif () {
-printf "checking preprocessor condition %s... " "$1"
-echo "typedef int x;" > "$tmpc"
-echo "#if $1" >> "$tmpc"
-echo "#error yes" >> "$tmpc"
-echo "#endif" >> "$tmpc"
-if $CC $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "false\n"
-return 1
-else
-printf "true\n"
-return 0
-fi
-}
-
-tryflag () {
-printf "checking whether compiler accepts %s... " "$2"
-echo "typedef int x;" > "$tmpc"
-if $CC $CFLAGS_TRY $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-eval "$1=\"\${$1} \$2\""
-eval "$1=\${$1# }"
-return 0
-else
-printf "no\n"
-return 1
-fi
-}
-
-tryldflag () {
-printf "checking whether linker accepts %s... " "$2"
-echo "typedef int x;" > "$tmpc"
-if $CC $LDFLAGS_TRY -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-eval "$1=\"\${$1} \$2\""
-eval "$1=\${$1# }"
-return 0
-else
-printf "no\n"
-return 1
-fi
-}
-
-
-
-# Beginning of actual script
-
-CFLAGS_C99FSE=
-CFLAGS_AUTO=
-CFLAGS_MEMOPS=
-CFLAGS_NOSSP=
-CFLAGS_TRY=
-LDFLAGS_AUTO=
-LDFLAGS_TRY=
-OPTIMIZE_GLOBS=
-srcdir=
-prefix=/usr/local/musl
-exec_prefix='$(prefix)'
-bindir='$(exec_prefix)/bin'
-libdir='$(prefix)/lib'
-includedir='$(prefix)/include'
-syslibdir='/lib'
-tools=
-tool_libs=
-build=
-target=
-optimize=auto
-debug=no
-warnings=yes
-shared=auto
-static=yes
-wrapper=auto
-gcc_wrapper=no
-clang_wrapper=no
-malloc_dir=mallocng
-
-for arg ; do
-case "$arg" in
---help|-h) usage ;;
---srcdir=*) srcdir=${arg#*=} ;;
---prefix=*) prefix=${arg#*=} ;;
---exec-prefix=*) exec_prefix=${arg#*=} ;;
---bindir=*) bindir=${arg#*=} ;;
---libdir=*) libdir=${arg#*=} ;;
---includedir=*) includedir=${arg#*=} ;;
---syslibdir=*) syslibdir=${arg#*=} ;;
---enable-shared|--enable-shared=yes) shared=yes ;;
---disable-shared|--enable-shared=no) shared=no ;;
---enable-static|--enable-static=yes) static=yes ;;
---disable-static|--enable-static=no) static=no ;;
---enable-optimize) optimize=yes ;;
---enable-optimize=*) optimize=${arg#*=} ;;
---disable-optimize) optimize=no ;;
---enable-debug|--enable-debug=yes) debug=yes ;;
---disable-debug|--enable-debug=no) debug=no ;;
---enable-warnings|--enable-warnings=yes) warnings=yes ;;
---disable-warnings|--enable-warnings=no) warnings=no ;;
---enable-wrapper|--enable-wrapper=yes) wrapper=detect ;;
---enable-wrapper=all) wrapper=yes ; gcc_wrapper=yes ; clang_wrapper=yes ;;
---enable-wrapper=gcc) wrapper=yes ; gcc_wrapper=yes ;;
---enable-wrapper=clang) wrapper=yes ; clang_wrapper=yes ;;
---disable-wrapper|--enable-wrapper=no) wrapper=no ;;
---enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ; gcc_wrapper=yes ;;
---disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
---with-malloc=*) malloc_dir=${arg#*=} ;;
---enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
---host=*|--target=*) target=${arg#*=} ;;
---build=*) build=${arg#*=} ;;
--* ) echo "$0: unknown option $arg" ;;
-AR=*) AR=${arg#*=} ;;
-RANLIB=*) RANLIB=${arg#*=} ;;
-CC=*) CC=${arg#*=} ;;
-CFLAGS=*) CFLAGS=${arg#*=} ;;
-CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
-LDFLAGS=*) LDFLAGS=${arg#*=} ;;
-CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;;
-LIBCC=*) LIBCC=${arg#*=} ;;
-*=*) ;;
-*) build=$arg ; target=$arg ;;
-esac
-done
-
-for i in srcdir prefix exec_prefix bindir libdir includedir syslibdir ; do
-stripdir $i
-done
-
-#
-# Get the source dir for out-of-tree builds
-#
-if test -z "$srcdir" ; then
-srcdir="${0%/configure}"
-stripdir srcdir
-fi
-abs_builddir="$(pwd)" || fail "$0: cannot determine working directory"
-abs_srcdir="$(cd $srcdir && pwd)" || fail "$0: invalid source directory $srcdir"
-test "$abs_srcdir" = "$abs_builddir" && srcdir=.
-test "$srcdir" != "." && test -f Makefile && test ! -h Makefile && fail "$0: Makefile already exists in the working directory"
-
-#
-# Get a temp filename we can use
-#
-i=0
-set -C
-while : ; do i=$(($i+1))
-tmpc="./conf$$-$PPID-$i.c"
-2>|/dev/null > "$tmpc" && break
-test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc"
-done
-set +C
-trap 'rm "$tmpc"' EXIT INT QUIT TERM HUP
-
-#
-# Check that the requested malloc implementation exists
-#
-test -d "$srcdir/src/malloc/$malloc_dir" \
-|| fail "$0: error: chosen malloc implementation '$malloc_dir' does not exist"
-
-#
-# Check whether we are cross-compiling, and set a default
-# CROSS_COMPILE prefix if none was provided.
-#
-test "$target" && \
-test "$target" != "$build" && \
-test -z "$CROSS_COMPILE" && \
-CROSS_COMPILE="$target-"
-
-#
-# Find a C compiler to use
-#
-printf "checking for C compiler... "
-trycc ${CROSS_COMPILE}gcc
-trycc ${CROSS_COMPILE}c99
-trycc ${CROSS_COMPILE}cc
-printf "%s\n" "$CC"
-test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
-
-printf "checking whether C compiler works... "
-echo "typedef int x;" > "$tmpc"
-if output=$($CC $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" 2>&1) ; then
-printf "yes\n"
-else
-printf "no; compiler output follows:\n%s\n" "$output"
-exit 1
-fi
-
-#
-# Figure out options to force errors on unknown flags.
-#
-tryflag   CFLAGS_TRY  -Werror=unknown-warning-option
-tryflag   CFLAGS_TRY  -Werror=unused-command-line-argument
-tryflag   CFLAGS_TRY  -Werror=ignored-optimization-argument
-tryldflag LDFLAGS_TRY -Werror=unknown-warning-option
-tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument
-
-#
-# Need to know if the compiler is gcc or clang to decide which toolchain
-# wrappers to build.
-#
-printf "checking for C compiler family... "
-cc_ver="$(LC_ALL=C $CC -v 2>&1)"
-cc_family=unknown
-if fnmatch '*gcc\ version*' "$cc_ver" ; then
-cc_family=gcc
-elif fnmatch '*clang\ version*' "$cc_ver" ; then
-cc_family=clang
-fi
-echo "$cc_family"
-
-#
-# Figure out toolchain wrapper to build
-#
-if test "$wrapper" = auto || test "$wrapper" = detect ; then
-echo "#include <stdlib.h>" > "$tmpc"
-echo "#if ! __GLIBC__" >> "$tmpc"
-echo "#error no" >> "$tmpc"
-echo "#endif" >> "$tmpc"
-printf "checking for toolchain wrapper to build... "
-if test "$wrapper" = auto && ! $CC -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-echo "none"
-elif test "$cc_family" = gcc ; then
-gcc_wrapper=yes
-echo "gcc"
-elif test "$cc_family" = clang ; then
-clang_wrapper=yes
-echo "clang"
-else
-echo "none"
-if test "$wrapper" = detect ; then
-fail "$0: could not find an appropriate toolchain wrapper"
-fi
-fi
-fi
-
-if test "$gcc_wrapper" = yes ; then
-tools="$tools obj/musl-gcc"
-tool_libs="$tool_libs lib/musl-gcc.specs"
-fi
-if test "$clang_wrapper" = yes ; then
-tools="$tools obj/musl-clang obj/ld.musl-clang"
-fi
-
-#
-# Find the target architecture
-#
-printf "checking target system type... "
-test -n "$target" || target=$($CC -dumpmachine 2>/dev/null) || target=unknown
-printf "%s\n" "$target"
-
-#
-# Convert to just ARCH
-#
-case "$target" in
-# Catch these early to simplify matching for 32-bit archs
-arm*) ARCH=arm ;;
-aarch64*) ARCH=aarch64 ;;
-i?86-nt32*) ARCH=nt32 ;;
-i?86*) ARCH=i386 ;;
-x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
-x86_64-nt64*) ARCH=nt64 ;;
-x86_64*) ARCH=x86_64 ;;
-m68k*) ARCH=m68k ;;
-mips64*|mipsisa64*) ARCH=mips64 ;;
-mips*) ARCH=mips ;;
-microblaze*) ARCH=microblaze ;;
-or1k*) ARCH=or1k ;;
-powerpc64*|ppc64*) ARCH=powerpc64 ;;
-powerpc*|ppc*) ARCH=powerpc ;;
-riscv64*) ARCH=riscv64 ;;
-sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
-s390x*) ARCH=s390x ;;
-wasm32) ARCH=wasm32 ;;
-wasm64) ARCH=wasm64 ;;
-unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
-*) fail "$0: unknown or unsupported target \"$target\"" ;;
-esac
-
-#
-# Try to get a conforming C99 freestanding environment
-#
-tryflag CFLAGS_C99FSE -std=c99
-tryflag CFLAGS_C99FSE -nostdinc
-tryflag CFLAGS_C99FSE -ffreestanding \
-|| tryflag CFLAGS_C99FSE -fno-builtin
-tryflag CFLAGS_C99FSE -fexcess-precision=standard \
-|| { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
-tryflag CFLAGS_C99FSE -frounding-math
-
-#
-# We may use the may_alias attribute if __GNUC__ is defined, so
-# if the compiler defines __GNUC__ but does not provide it,
-# it must be defined away as part of the CFLAGS.
-#
-printf "checking whether compiler needs attribute((may_alias)) suppression... "
-cat > "$tmpc" <<EOF
-typedef int
-#ifdef __GNUC__
-__attribute__((__may_alias__))
-#endif
-x;
-EOF
-if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS \
-  -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "no\n"
-else
-printf "yes\n"
-CFLAGS_C99FSE="$CFLAGS_C99FSE -D__may_alias__="
-fi
-
-#
-# The GNU toolchain defaults to assuming unmarked files need an
-# executable stack, potentially exposing vulnerabilities in programs
-# linked with such object files. Fix this.
-#
-tryflag CFLAGS_C99FSE -Wa,--noexecstack
-
-#
-# Check for options to disable stack protector, which needs to be
-# disabled for a few early-bootstrap translation units. If not found,
-# this is not an error; we assume the toolchain does not do ssp.
-#
-tryflag CFLAGS_NOSSP -fno-stack-protector
-
-#
-# Check for options that may be needed to prevent the compiler from
-# generating self-referential versions of memcpy,, memmove, memcmp,
-# and memset. Really, we should add a check to determine if this
-# option is sufficient, and if not, add a macro to cripple these
-# functions with volatile...
-#
-tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
-
-#
-# Enable debugging if requessted.
-#
-test "$debug" = yes && CFLAGS_AUTO=-g
-
-#
-# Preprocess asm files to add extra debugging information if debug is
-# enabled, our assembler supports the needed directives, and the
-# preprocessing script has been written for our architecture.
-#
-printf "checking whether we should preprocess assembly to add debugging information... "
-if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" &&
-   test -f "tools/add-cfi.$ARCH.awk" &&
-   printf ".file 1 \"srcfile.s\"\n.line 1\n.cfi_startproc\n.cfi_endproc" | $CC -g -x assembler -c -o /dev/null 2>/dev/null -
-then
-  ADD_CFI=yes
-else
-  ADD_CFI=no
-fi
-printf "%s\n" "$ADD_CFI"
-
-#
-# Possibly add a -O option to CFLAGS and select modules to optimize with
-# -O3 based on the status of --enable-optimize and provided CFLAGS.
-#
-printf "checking for optimization settings... "
-case "x$optimize" in
-xauto)
-if fnmatch '-O*|*\ -O*' "$CFLAGS_AUTO $CFLAGS" ; then
-printf "using provided CFLAGS\n" ;optimize=no
-else
-printf "using defaults\n" ; optimize=yes
-fi
-;;
-xsize|xnone) printf "minimize size\n" ; optimize=size ;;
-xno|x) printf "disabled\n" ; optimize=no ;;
-*) printf "custom\n" ;;
-esac
-
-test "$optimize" = no || tryflag CFLAGS_AUTO -Os || tryflag CFLAGS_AUTO -O2
-test "$optimize" = yes && optimize="internal,malloc,string"
-
-if fnmatch 'no|size' "$optimize" ; then :
-else
-printf "components to be optimized for speed:"
-while test "$optimize" ; do
-case "$optimize" in
-*,*) this=${optimize%%,*} optimize=${optimize#*,} ;;
-*) this=$optimize optimize=
-esac
-printf " $this"
-case "$this" in
-*/*.c) ;;
-*/*) this=$this*.c ;;
-*) this=$this/*.c ;;
-esac
-OPTIMIZE_GLOBS="$OPTIMIZE_GLOBS $this"
-done
-OPTIMIZE_GLOBS=${OPTIMIZE_GLOBS# }
-printf "\n"
-fi
-
-# Always try -pipe
-tryflag CFLAGS_AUTO -pipe
-
-#
-# If debugging is disabled, omit frame pointer. Modern GCC does this
-# anyway on most archs even when debugging is enabled since the frame
-# pointer is no longer needed for debugging.
-#
-if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" ; then :
-else
-tryflag CFLAGS_AUTO -fomit-frame-pointer
-fi
-
-#
-# Modern GCC wants to put DWARF tables (used for debugging and
-# unwinding) in the loaded part of the program where they are
-# unstrippable. These options force them back to debug sections (and
-# cause them not to get generated at all if debugging is off).
-#
-tryflag CFLAGS_AUTO -fno-unwind-tables
-tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
-
-#
-# Attempt to put each function and each data object in its own
-# section. This both allows additional size optimizations at link
-# time and works around a dangerous class of compiler/assembler bugs
-# whereby relative address expressions are constant-folded by the
-# assembler even when one or more of the symbols involved is
-# replaceable. See gas pr 18561 and gcc pr 66609, 68178, etc.
-#
-tryflag CFLAGS_AUTO -ffunction-sections
-tryflag CFLAGS_AUTO -fdata-sections
-
-#
-# On x86, make sure we don't have incompatible instruction set
-# extensions enabled by default. This is bad for making static binaries.
-# We cheat and use i486 rather than i386 because i386 really does not
-# work anyway (issues with atomic ops).
-# Some build environments pass -march and -mtune options via CC, so
-# check both CC and CFLAGS.
-#
-if test "$ARCH" = "i386" ; then
-fnmatch '-march=*|*\ -march=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
-fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
-fi
-
-#
-# GCC defines -w as overriding any -W options, regardless of order, but
-# clang has a bunch of annoying warnings enabled by default and needs -w
-# to start from a clean slate. So use -w if building with clang. Also
-# turn off a common on-by-default cast warning regardless of compiler.
-#
-test "$cc_family" = clang && tryflag CFLAGS_AUTO -w
-
-tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast
-
-#
-# Even with -std=c99, gcc accepts some constructs which are constraint
-# violations. We want to treat these as errors regardless of whether
-# other purely stylistic warnings are enabled -- especially implicit
-# function declarations, which are a dangerous programming error.
-#
-tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
-tryflag CFLAGS_AUTO -Werror=implicit-int
-tryflag CFLAGS_AUTO -Werror=pointer-sign
-tryflag CFLAGS_AUTO -Werror=pointer-arith
-tryflag CFLAGS_AUTO -Werror=int-conversion
-tryflag CFLAGS_AUTO -Werror=incompatible-pointer-types
-tryflag CFLAGS_AUTO -Werror=discarded-qualifiers
-tryflag CFLAGS_AUTO -Werror=discarded-array-qualifiers
-
-#
-# GCC ignores unused arguements by default, but Clang needs this extra
-# parameter to stop printing warnings about LDFLAGS passed during
-# compiling stage and CFLAGS passed during linking stage.
-#
-test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments
-
-if test "x$warnings" = xyes ; then
-tryflag CFLAGS_AUTO -Waddress
-tryflag CFLAGS_AUTO -Warray-bounds
-tryflag CFLAGS_AUTO -Wchar-subscripts
-tryflag CFLAGS_AUTO -Wduplicate-decl-specifier
-tryflag CFLAGS_AUTO -Winit-self
-tryflag CFLAGS_AUTO -Wreturn-type
-tryflag CFLAGS_AUTO -Wsequence-point
-tryflag CFLAGS_AUTO -Wstrict-aliasing
-tryflag CFLAGS_AUTO -Wunused-function
-tryflag CFLAGS_AUTO -Wunused-label
-tryflag CFLAGS_AUTO -Wunused-variable
-fi
-
-# Determine if the compiler produces position-independent code (PIC)
-# by default. If so, we don't need to compile separate object files
-# for libc.a and libc.so.
-if trycppif __PIC__ "$CFLAGS_C99FSE $CPPFLAGS $CFLAGS" ; then
-pic_default=yes
-else
-pic_default=no
-fi
-
-# Reduce space lost to padding for alignment purposes by sorting data
-# objects according to their alignment reqirements. This approximates
-# optimal packing.
-tryldflag LDFLAGS_AUTO -Wl,--sort-section,alignment
-tryldflag LDFLAGS_AUTO -Wl,--sort-common
-
-# When linking shared library, drop dummy weak definitions that were
-# replaced by strong definitions from other translation units.
-tryldflag LDFLAGS_AUTO -Wl,--gc-sections
-
-# Some patched GCC builds have these defaults messed up...
-tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
-
-# Prevent linking if there are undefined symbols; if any exist,
-# libc.so will crash at runtime during relocation processing.
-# The common way this can happen is failure to link the compiler
-# runtime library; implementation error is also a possibility.
-tryldflag LDFLAGS_AUTO -Wl,--no-undefined
-
-# Avoid exporting symbols from compiler runtime libraries. They
-# should be hidden anyway, but some toolchains including old gcc
-# versions built without shared library support and pcc are broken.
-tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL
-
-# Public data symbols must be interposable to allow for copy
-# relocations, but otherwise we want to bind symbols at libc link
-# time to eliminate startup relocations and PLT overhead. Use
-# --dynamic-list rather than -Bsymbolic-functions for greater
-# control over what symbols are left unbound.
-tryldflag LDFLAGS_AUTO -Wl,--dynamic-list="$srcdir/dynamic.list"
-
-# Find compiler runtime library
-test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
-test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
-test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
-                 && tryldflag LIBCC "$try_libcc"
-test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
-                 && tryldflag LIBCC "$try_libcc"
-printf "using compiler runtime libraries: %s\n" "$LIBCC"
-
-# Figure out arch variants for archs with variants
-SUBARCH=
-t="$CFLAGS_C99FSE $CPPFLAGS $CFLAGS"
-
-if test "$ARCH" = "i386" ; then
-printf "checking whether compiler can use ebx in PIC asm constraints... "
-cat > "$tmpc" <<EOF
-int foo(int x) { __asm__ ( "" : "+b"(x) ); return x; }
-EOF
-if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -fPIC \
-  -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-else
-printf "no\n"
-CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_EBX_ASM"
-fi
-fi
-
-if test "$ARCH" = "x86_64" ; then
-trycppif __ILP32__ "$t" && ARCH=x32
-fi
-
-if test "$ARCH" = "arm" ; then
-if trycppif __thumb2__ "$t" ; then
-tryflag CFLAGS_AUTO -mimplicit-it=always
-tryflag CFLAGS_AUTO -Wa,-mimplicit-it=always
-tryflag CFLAGS_AUTO -Wa,-mthumb
-fi
-trycppif __ARMEB__ "$t" && SUBARCH=${SUBARCH}eb
-trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf
-# Versions of clang up until at least 3.8 have the wrong constraint codes
-# for floating point operands to inline asm. Detect this so the affected
-# source files can just disable the asm.
-if test "$cc_family" = clang ; then
-printf "checking whether clang's vfp asm constraints work... "
-echo 'float f(float x) { __asm__("":"+t"(x)); return x; }' > "$tmpc"
-if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-else
-printf "no\n"
-CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_VFP_ASM"
-CFLAGS_AUTO="${CFLAGS_AUTO# }"
-fi
-fi
-fi
-
-if test "$ARCH" = "aarch64" ; then
-trycppif __AARCH64EB__ "$t" && SUBARCH=${SUBARCH}_be
-fi
-
-if test "$ARCH" = "m68k" ; then
-if trycppif "__HAVE_68881__" ; then : ;
-elif trycppif "__mcffpu__" ; then SUBARCH="-fp64"
-else SUBARCH="-sf"
-fi
-fi
-
-if test "$ARCH" = "mips" ; then
-trycppif "__mips_isa_rev >= 6" "$t" && SUBARCH=${SUBARCH}r6
-trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" && SUBARCH=${SUBARCH}el
-trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
-fi
-
-if test "$ARCH" = "mips64" ; then
-trycppif "_MIPS_SIM != _ABI64" "$t" && ARCH=mipsn32
-trycppif "__mips_isa_rev >= 6" "$t" && SUBARCH=${SUBARCH}r6
-trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" && SUBARCH=${SUBARCH}el
-trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
-fi
-
-if test "$ARCH" = "powerpc" ; then
-trycppif "__NO_FPRS__ && !_SOFT_FLOAT" "$t" && fail \
-  "$0: error: compiler's floating point configuration is unsupported"
-trycppif _SOFT_FLOAT "$t" && SUBARCH=${SUBARCH}-sf
-printf "checking whether compiler can use 'd' constraint in asm... "
-echo 'double f(double x) { __asm__ ("fabs %0, %1" : "=d"(x) : "d"(x)); return x; }' > "$tmpc"
-if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-else
-printf "no\n"
-CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_PPC_D_ASM"
-CFLAGS_AUTO="${CFLAGS_AUTO# }"
-fi
-fi
-
-test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
-&& SUBARCH=${SUBARCH}el
-
-if test "$ARCH" = "powerpc64" ; then
-trycppif "_CALL_ELF == 2" "$t" || fail "$0: error: unsupported powerpc64 ABI"
-trycppif __LITTLE_ENDIAN__ "$t" && SUBARCH=${SUBARCH}le
-trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64"
-fi
-
-if test "$ARCH" = "riscv64" ; then
-trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf
-trycppif __riscv_float_abi_single "$t" && SUBARCH=${SUBARCH}-sp
-fi
-
-if test "$ARCH" = "sh" ; then
-tryflag CFLAGS_AUTO -Wa,--isa=any
-trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb
-if trycppif "__SH_FPU_ANY__ || __SH4__" "$t" ; then
-# Some sh configurations are broken and replace double with float
-# rather than using softfloat when the fpu is present but only
-# supports single precision. Reject them.
-printf "checking whether compiler's double type is IEEE double... "
-echo 'typedef char dblcheck[(int)sizeof(double)-5];' > "$tmpc"
-if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-else
-printf "no\n"
-fail "$0: error: compiler's floating point configuration is unsupported"
-fi
-else
-SUBARCH=${SUBARCH}-nofpu
-fi
-if trycppif __SH_FDPIC__ "$t" ; then
-SUBARCH=${SUBARCH}-fdpic
-fi
-fi
-
-test "$SUBARCH" \
-&& printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"
-
-case "$ARCH$SUBARCH" in
-arm) ASMSUBARCH=el ;;
-*) ASMSUBARCH=$SUBARCH ;;
-esac
-
-#
-# Some archs (powerpc) have different possible long double formats
-# that the compiler can be configured for. The logic for whether this
-# is supported is in bits/float.h; in general, it is not. We need to
-# check for mismatches here or code in printf, strotd, and scanf will
-# be dangerously incorrect because it depends on (1) the macros being
-# correct, and (2) IEEE semantics.
-#
-printf "checking whether compiler's long double definition matches float.h... "
-echo '#include <float.h>' > "$tmpc"
-echo '#define C(m,s) (m==LDBL_MANT_DIG && s==sizeof(long double))' >> "$tmpc"
-echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc"
-if $CC $CFLAGS_C99FSE \
-  -I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \
-  $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
-printf "yes\n"
-else
-printf "no\n"
-fail "$0: error: unsupported long double type"
-fi
-
-#
-# Some build systems globally pass in broken CFLAGS like -ffast-math
-# for all packages. On recent GCC we can detect this and error out
-# early rather than producing a seriously-broken math library.
-#
-if trycppif "__FAST_MATH__" \
-  "$CFLAGS_C99FSE $CPPFLAGS $CFLAGS" ; then
-fail "$0: error: compiler has broken floating point; check CFLAGS"
-fi
-
-printf "creating config.mak... "
-
-cmdline=$(quote "$0")
-for i ; do cmdline="$cmdline $(quote "$i")" ; done
-
-exec 3>&1 1>config.mak
-
-
-cat << EOF
-# This version of config.mak was generated by:
-# $cmdline
-# Any changes made here will be lost if configure is re-run
-AR = ${AR:-\$(CROSS_COMPILE)ar}
-RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib}
-ARCH = $ARCH
-SUBARCH = $SUBARCH
-ASMSUBARCH = $ASMSUBARCH
-srcdir = $srcdir
-prefix = $prefix
-exec_prefix = $exec_prefix
-bindir = $bindir
-libdir = $libdir
-includedir = $includedir
-syslibdir = $syslibdir
-CC = $CC
-CFLAGS = $CFLAGS
-CFLAGS_AUTO = $CFLAGS_AUTO
-CFLAGS_C99FSE = $CFLAGS_C99FSE
-CFLAGS_MEMOPS = $CFLAGS_MEMOPS
-CFLAGS_NOSSP = $CFLAGS_NOSSP
-CPPFLAGS = $CPPFLAGS
-LDFLAGS = $LDFLAGS
-LDFLAGS_AUTO = $LDFLAGS_AUTO
-CROSS_COMPILE = $CROSS_COMPILE
-LIBCC = $LIBCC
-OPTIMIZE_GLOBS = $OPTIMIZE_GLOBS
-ALL_TOOLS = $tools
-TOOL_LIBS = $tool_libs
-ADD_CFI = $ADD_CFI
-MALLOC_DIR = $malloc_dir
-EOF
-test "x$static" = xno && echo "STATIC_LIBS ="
-test "x$shared" = xno && echo "SHARED_LIBS ="
-test "x$cc_family" = xgcc && echo 'WRAPCC_GCC = $(CC)'
-test "x$cc_family" = xclang && echo 'WRAPCC_CLANG = $(CC)'
-test "x$pic_default" = xyes && echo 'AOBJS = $(LOBJS)'
-exec 1>&3 3>&-
-
-test "$srcdir" = "." || ln -sf $srcdir/Makefile .
-
-printf "done\n"
lib/libc/wasi/libc-top-half/musl/dynamic.list
@@ -1,45 +0,0 @@
-{
-environ;
-__environ;
-
-stdin;
-stdout;
-stderr;
-
-malloc;
-calloc;
-realloc;
-free;
-memalign;
-posix_memalign;
-aligned_alloc;
-malloc_usable_size;
-
-timezone;
-daylight;
-tzname;
-__timezone;
-__daylight;
-__tzname;
-
-signgam;
-__signgam;
-
-optarg;
-optind;
-opterr;
-optopt;
-optreset;
-__optreset;
-
-getdate_err;
-
-h_errno;
-
-program_invocation_name;
-program_invocation_short_name;
-__progname;
-__progname_full;
-
-__stack_chk_guard;
-};
lib/libc/wasi/libc-top-half/musl/INSTALL
@@ -1,191 +0,0 @@
-
-Quick Installation Guide for musl libc
-======================================
-
-There are many different ways to install musl depending on your usage
-case. This document covers only the build and installation of musl by
-itself, which is useful for upgrading an existing musl-based system or
-compiler toolchain, or for using the provided musl-gcc wrapper with an
-existing non-musl-based compiler.
-
-Building complete native or cross-compiler toolchains is outside the
-scope of this INSTALL file. More information can be found on the musl
-website and community wiki.
-
-
-Build Prerequisites
--------------------
-
-The only build-time prerequisites for musl are GNU Make and a
-freestanding C99 compiler toolchain targeting the desired instruction
-set architecture and ABI, with support for a minimal subset of "GNU C"
-extensions consisting mainly of gcc-style inline assembly, weak
-aliases, hidden visibility, and stand-alone assembly source files.
-
-GCC, LLVM/clang, Firm/cparser, and PCC have all successfully built
-musl, but GCC is the most widely used/tested. Recent compiler (and
-binutils) versions should be used if possible since some older
-versions have bugs which affect musl.
-
-The system used to build musl does not need to be Linux-based, nor do
-the Linux kernel headers need to be available.
-
-
-
-Supported Targets
------------------
-
-musl can be built for the following CPU instruction set architecture
-and ABI combinations:
-
-* i386
-    * Minimum CPU model is actually 80486 unless kernel emulation of
-      the `cmpxchg` instruction is added
-
-* x86_64
-    * ILP32 ABI (x32) is available as a separate arch but is still
-      experimental
-
-* ARM
-    * EABI, standard or hard-float VFP variant
-    * Little-endian default; big-endian variants also supported
-    * Compiler toolchains only support armv4t and later
-
-* AArch64
-    * Little-endian default; big-endian variants also supported
-
-* MIPS
-    * ABI is o32, fp32/fpxx (except on r6 which is fp64)
-    * Big-endian default; little-endian variants also supported
-    * Default ABI variant uses FPU registers; alternate soft-float ABI
-      that does not use FPU registers or instructions is available
-    * MIPS2 or later, or kernel emulation of ll/sc (standard in Linux)
-      is required
-    * MIPS32r6, an incompatible ISA, is supported as a variant "mipsr6"
-
-* MIPS64
-    * ABI is n64 (LP64) or n32 (ILP32)
-    * Big-endian default; little-endian variants also supported
-    * Default ABI variant uses FPU registers; alternate soft-float ABI
-      that does not use FPU registers or instructions is available
-
-* PowerPC
-    * Compiler toolchain must provide 64-bit long double, not IBM
-      double-double or IEEE quad
-    * For dynamic linking, compiler toolchain must be configured for
-      "secure PLT" variant
-
-* PowerPC64
-    * Both little and big endian variants are supported
-    * Compiler toolchain must provide 64-bit long double, not IBM
-      double-double or IEEE quad
-    * Compiler toolchain must use the new (ELFv2) ABI regardless of
-      whether it is for little or big endian
-
-* S390X (64-bit S390)
-
-* SuperH (SH)
-    * Standard ELF ABI or FDPIC ABI (shared-text without MMU)
-    * Little-endian by default; big-endian variant also supported
-    * Full FPU ABI or soft-float ABI is supported, but the
-      single-precision-only FPU ABI is not
-
-* Microblaze
-    * Big-endian default; little-endian variants also supported
-    * Soft-float
-    * Requires support for lwx/swx instructions
-
-* OpenRISC 1000 (or1k)
-
-* RISC-V 64
-    * Little endian
-    * Hard, soft, and hard-single/soft-double floating point ABIs
-    * Standard ELF; no shared-text NOMMU support
-
-
-
-Build and Installation Procedure
---------------------------------
-
-To build and install musl:
-
-1. Run the provided configure script from the top-level source
-   directory, passing on its command line any desired options.
-
-2. Run "make" to compile.
-
-3. Run "make install" with appropriate privileges to write to the
-   target locations.
-
-The configure script attempts to determine automatically the correct
-target architecture based on the compiler being used. For some
-compilers, this may not be possible. If detection fails or selects the
-wrong architecture, you can provide an explicit selection on the
-configure command line.
-
-By default, configure installs to a prefix of "/usr/local/musl". This
-differs from the behavior of most configure scripts, and is chosen
-specifically to avoid clashing with libraries already present on the
-system. DO NOT set the prefix to "/usr", "/usr/local", or "/" unless
-you're upgrading libc on an existing musl-based system. Doing so will
-break your existing system when you run "make install" and it may be
-difficult to recover.
-
-
-
-Notes on Dynamic Linking
-------------------------
-
-If dynamic linking is enabled, one file needs to be installed outside
-of the installation prefix: /lib/ld-musl-$ARCH.so.1. This is the
-dynamic linker. Its pathname is hard-coded into all dynamic-linked
-programs, so for the sake of being able to share binaries between
-systems, a consistent location should be used everywhere. Note that
-the same applies to glibc and its dynamic linker, which is named
-/lib/ld-linux.so.2 on i386 systems.
-
-If for some reason it is impossible to install the dynamic linker in
-its standard location (for example, if you are installing without root
-privileges), the --syslibdir option to configure can be used to
-provide a different location
-
-At runtime, the dynamic linker needs to know the paths to search for
-shared libraries. You should create a text file named
-/etc/ld-musl-$ARCH.path (where $ARCH matches the architecture name
-used in the dynamic linker) containing a list of directories where you
-want the dynamic linker to search for shared libraries, separated by
-colons or newlines. If the dynamic linker has been installed in a
-non-default location, the path file also needs to reside at that
-location (../etc relative to the chosen syslibdir).
-
-If you do not intend to use dynamic linking, you may disable it by
-passing --disable-shared to configure; this also cuts the build time
-in half.
-
-
-
-Checking for Successful Installation
-------------------------------------
-
-After installing, you should be able to use musl via the musl-gcc
-wrapper. For example:
-
-cat > hello.c <<EOF
-#include <stdio.h>
-int main()
-{
-	printf("hello, world!\n");
-	return 0;
-}
-EOF
-/usr/local/musl/bin/musl-gcc hello.c
-./a.out
-
-To configure autoconf-based program to compile and link against musl,
-set the CC variable to musl-gcc when running configure, as in:
-
-CC=musl-gcc ./configure ...
-
-You will probably also want to use --prefix when building libraries to
-ensure that they are installed under the musl prefix and not in the
-main host system library directories.
lib/libc/wasi/libc-top-half/musl/Makefile
@@ -1,237 +0,0 @@
-#
-# Makefile for musl (requires GNU make)
-#
-# This is how simple every makefile should be...
-# No, I take that back - actually most should be less than half this size.
-#
-# Use config.mak to override any of the following variables.
-# Do not make changes here.
-#
-
-srcdir = .
-exec_prefix = /usr/local
-bindir = $(exec_prefix)/bin
-
-prefix = /usr/local/musl
-includedir = $(prefix)/include
-libdir = $(prefix)/lib
-syslibdir = /lib
-
-MALLOC_DIR = mallocng
-SRC_DIRS = $(addprefix $(srcdir)/,src/* src/malloc/$(MALLOC_DIR) crt ldso $(COMPAT_SRC_DIRS))
-BASE_GLOBS = $(addsuffix /*.c,$(SRC_DIRS))
-ARCH_GLOBS = $(addsuffix /$(ARCH)/*.[csS],$(SRC_DIRS))
-BASE_SRCS = $(sort $(wildcard $(BASE_GLOBS)))
-ARCH_SRCS = $(sort $(wildcard $(ARCH_GLOBS)))
-BASE_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(BASE_SRCS)))
-ARCH_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(ARCH_SRCS)))
-REPLACED_OBJS = $(sort $(subst /$(ARCH)/,/,$(ARCH_OBJS)))
-ALL_OBJS = $(addprefix obj/, $(filter-out $(REPLACED_OBJS), $(sort $(BASE_OBJS) $(ARCH_OBJS))))
-
-LIBC_OBJS = $(filter obj/src/%,$(ALL_OBJS)) $(filter obj/compat/%,$(ALL_OBJS))
-LDSO_OBJS = $(filter obj/ldso/%,$(ALL_OBJS:%.o=%.lo))
-CRT_OBJS = $(filter obj/crt/%,$(ALL_OBJS))
-
-AOBJS = $(LIBC_OBJS)
-LOBJS = $(LIBC_OBJS:.o=.lo)
-GENH = obj/include/bits/alltypes.h obj/include/bits/syscall.h
-GENH_INT = obj/src/internal/version.h
-IMPH = $(addprefix $(srcdir)/, src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/locale_impl.h src/internal/libc.h)
-
-LDFLAGS =
-LDFLAGS_AUTO =
-LIBCC = -lgcc
-CPPFLAGS =
-CFLAGS =
-CFLAGS_AUTO = -Os -pipe
-CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc 
-
-CFLAGS_ALL = $(CFLAGS_C99FSE)
-CFLAGS_ALL += -D_XOPEN_SOURCE=700 -I$(srcdir)/arch/$(ARCH) -I$(srcdir)/arch/generic -Iobj/src/internal -I$(srcdir)/src/include -I$(srcdir)/src/internal -Iobj/include -I$(srcdir)/include
-CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS)
-
-LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS)
-
-AR      = $(CROSS_COMPILE)ar
-RANLIB  = $(CROSS_COMPILE)ranlib
-INSTALL = $(srcdir)/tools/install.sh
-
-ARCH_INCLUDES = $(wildcard $(srcdir)/arch/$(ARCH)/bits/*.h)
-GENERIC_INCLUDES = $(wildcard $(srcdir)/arch/generic/bits/*.h)
-INCLUDES = $(wildcard $(srcdir)/include/*.h $(srcdir)/include/*/*.h)
-ALL_INCLUDES = $(sort $(INCLUDES:$(srcdir)/%=%) $(GENH:obj/%=%) $(ARCH_INCLUDES:$(srcdir)/arch/$(ARCH)/%=include/%) $(GENERIC_INCLUDES:$(srcdir)/arch/generic/%=include/%))
-
-EMPTY_LIB_NAMES = m rt pthread crypt util xnet resolv dl
-EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
-CRT_LIBS = $(addprefix lib/,$(notdir $(CRT_OBJS)))
-STATIC_LIBS = lib/libc.a
-SHARED_LIBS = lib/libc.so
-TOOL_LIBS = lib/musl-gcc.specs
-ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS)
-ALL_TOOLS = obj/musl-gcc
-
-WRAPCC_GCC = gcc
-WRAPCC_CLANG = clang
-
-LDSO_PATHNAME = $(syslibdir)/ld-musl-$(ARCH)$(SUBARCH).so.1
-
--include config.mak
--include $(srcdir)/arch/$(ARCH)/arch.mak
-
-ifeq ($(ARCH),)
-
-all:
-	@echo "Please set ARCH in config.mak before running make."
-	@exit 1
-
-else
-
-all: $(ALL_LIBS) $(ALL_TOOLS)
-
-OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include)
-
-$(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS)
-
-$(OBJ_DIRS):
-	mkdir -p $@
-
-obj/include/bits/alltypes.h: $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in $(srcdir)/tools/mkalltypes.sed
-	sed -f $(srcdir)/tools/mkalltypes.sed $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in > $@
-
-obj/include/bits/syscall.h: $(srcdir)/arch/$(ARCH)/bits/syscall.h.in
-	cp $< $@
-	sed -n -e s/__NR_/SYS_/p < $< >> $@
-
-obj/src/internal/version.h: $(wildcard $(srcdir)/VERSION $(srcdir)/.git)
-	printf '#define VERSION "%s"\n' "$$(cd $(srcdir); sh tools/version.sh)" > $@
-
-obj/src/internal/version.o obj/src/internal/version.lo: obj/src/internal/version.h
-
-obj/crt/rcrt1.o obj/ldso/dlstart.lo obj/ldso/dynlink.lo: $(srcdir)/src/internal/dynlink.h $(srcdir)/arch/$(ARCH)/reloc.h
-
-obj/crt/crt1.o obj/crt/scrt1.o obj/crt/rcrt1.o obj/ldso/dlstart.lo: $(srcdir)/arch/$(ARCH)/crt_arch.h
-
-obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.c
-
-obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC
-
-OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%))
-$(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3
-
-MEMOPS_OBJS = $(filter %/memcpy.o %/memmove.o %/memcmp.o %/memset.o, $(LIBC_OBJS))
-$(MEMOPS_OBJS) $(MEMOPS_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_MEMOPS)
-
-NOSSP_OBJS = $(CRT_OBJS) $(LDSO_OBJS) $(filter \
-	%/__libc_start_main.o %/__init_tls.o %/__stack_chk_fail.o \
-	%/__set_thread_area.o %/memset.o %/memcpy.o \
-	, $(LIBC_OBJS))
-$(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP)
-
-$(CRT_OBJS): CFLAGS_ALL += -DCRT
-
-$(LOBJS) $(LDSO_OBJS): CFLAGS_ALL += -fPIC
-
-CC_CMD = $(CC) $(CFLAGS_ALL) -c -o $@ $<
-
-# Choose invocation of assembler to be used
-ifeq ($(ADD_CFI),yes)
-	AS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) -x assembler -c -o $@ -
-else
-	AS_CMD = $(CC_CMD)
-endif
-
-obj/%.o: $(srcdir)/%.s
-	$(AS_CMD)
-
-obj/%.o: $(srcdir)/%.S
-	$(CC_CMD)
-
-obj/%.o: $(srcdir)/%.c $(GENH) $(IMPH)
-	$(CC_CMD)
-
-obj/%.lo: $(srcdir)/%.s
-	$(AS_CMD)
-
-obj/%.lo: $(srcdir)/%.S
-	$(CC_CMD)
-
-obj/%.lo: $(srcdir)/%.c $(GENH) $(IMPH)
-	$(CC_CMD)
-
-lib/libc.so: $(LOBJS) $(LDSO_OBJS)
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -nostdlib -shared \
-	-Wl,-e,_dlstart -o $@ $(LOBJS) $(LDSO_OBJS) $(LIBCC)
-
-lib/libc.a: $(AOBJS)
-	rm -f $@
-	$(AR) rc $@ $(AOBJS)
-	$(RANLIB) $@
-
-$(EMPTY_LIBS):
-	rm -f $@
-	$(AR) rc $@
-
-lib/%.o: obj/crt/$(ARCH)/%.o
-	cp $< $@
-
-lib/%.o: obj/crt/%.o
-	cp $< $@
-
-lib/musl-gcc.specs: $(srcdir)/tools/musl-gcc.specs.sh config.mak
-	sh $< "$(includedir)" "$(libdir)" "$(LDSO_PATHNAME)" > $@
-
-obj/musl-gcc: config.mak
-	printf '#!/bin/sh\nexec "$${REALGCC:-$(WRAPCC_GCC)}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@
-	chmod +x $@
-
-obj/%-clang: $(srcdir)/tools/%-clang.in config.mak
-	sed -e 's!@CC@!$(WRAPCC_CLANG)!g' -e 's!@PREFIX@!$(prefix)!g' -e 's!@INCDIR@!$(includedir)!g' -e 's!@LIBDIR@!$(libdir)!g' -e 's!@LDSO@!$(LDSO_PATHNAME)!g' $< > $@
-	chmod +x $@
-
-$(DESTDIR)$(bindir)/%: obj/%
-	$(INSTALL) -D $< $@
-
-$(DESTDIR)$(libdir)/%.so: lib/%.so
-	$(INSTALL) -D -m 755 $< $@
-
-$(DESTDIR)$(libdir)/%: lib/%
-	$(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(includedir)/bits/%: $(srcdir)/arch/$(ARCH)/bits/%
-	$(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(includedir)/bits/%: $(srcdir)/arch/generic/bits/%
-	$(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(includedir)/bits/%: obj/include/bits/%
-	$(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(includedir)/%: $(srcdir)/include/%
-	$(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
-	$(INSTALL) -D -l $(libdir)/libc.so $@ || true
-
-install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
-
-install-headers: $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%)
-
-install-tools: $(ALL_TOOLS:obj/%=$(DESTDIR)$(bindir)/%)
-
-install: install-libs install-headers install-tools
-
-musl-git-%.tar.gz: .git
-	 git --git-dir=$(srcdir)/.git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ $(patsubst musl-git-%.tar.gz,%,$@)
-
-musl-%.tar.gz: .git
-	 git --git-dir=$(srcdir)/.git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ v$(patsubst musl-%.tar.gz,%,$@)
-
-endif
-
-clean:
-	rm -rf obj lib
-
-distclean: clean
-	rm -f config.mak
-
-.PHONY: all clean install install-libs install-headers install-tools
lib/libc/wasi/libc-top-half/musl/README
@@ -1,23 +0,0 @@
-
-    musl libc
-
-musl, pronounced like the word "mussel", is an MIT-licensed
-implementation of the standard C library targetting the Linux syscall
-API, suitable for use in a wide range of deployment environments. musl
-offers efficient static and dynamic linking support, lightweight code
-and low runtime overhead, strong fail-safe guarantees under correct
-usage, and correctness in the sense of standards conformance and
-safety. musl is built on the principle that these goals are best
-achieved through simple code that is easy to understand and maintain.
-
-The 1.1 release series for musl features coverage for all interfaces
-defined in ISO C99 and POSIX 2008 base, along with a number of
-non-standardized interfaces for compatibility with Linux, BSD, and
-glibc functionality.
-
-For basic installation instructions, see the included INSTALL file.
-Information on full musl-targeted compiler toolchains, system
-bootstrapping, and Linux distributions built on musl can be found on
-the project website:
-
-    https://musl.libc.org/
lib/libc/wasi/libc-top-half/musl/VERSION
@@ -1,1 +0,0 @@
-1.2.2
lib/libc/wasi/libc-top-half/musl/WHATSNEW
@@ -1,2289 +0,0 @@
-0.5.0 - initial release
-
-
-
-0.5.9 - signal ABI bugfix, various cleanup and fixes:
-
-sigset_t was wrongly defined as 1024 bytes instead of 1024 bits,
-breaking the intended ABI compatibility with the LSB/glibc sigaction
-structure. users should upgrade immediately and rebuild any libraries
-or object files that might be using the incorrect definitions.
-
-improved security against DoS with tcb shadow passwords by checking
-that the file opened was really an ordinary file.
-
-fixed a bug in the implementation of atomic ops that could have
-allowed the compiler to incorrectly reorder them (in practice, gcc
-with the default settings on i386 was not reordering them).
-
-greatly improved conformance to the C and POSIX standards regarding
-what the standard header files make visible. _POSIX_C_SOURCE is now
-needed to get POSIX functions in standard C headers, and _XOPEN_SOURCE
-or _GNU_SOURCE are required to get XSI interfaces or GNU extensions,
-respectively.
-
-many internal improvements have been made to the syscall-related code
-in preparation for porting to x86_64 and other archs.
-
-
-
-0.6.0 - x86_64 port, various important bugs fixed
-
-new x86_64 (amd64) architecture port, contributed by Nicholas J. Kain,
-along with PORTING guide. source tree layout and build system have
-been improved to accommodate further ports.
-
-various bugs that were introduced while making the headers respect C
-and POSIX namespace standards have been fixed. conformance to the
-standards has been improved.
-
-fixed an inefficiency in qsort that triggered a bug (occasionaly
-internal compiler error) in some versions of gcc.
-
-fixed a major bug in the printf %n specifier that prevented it from
-working and caused memory corruption.
-
-
-
-0.7.0 - major improvements to posix conformance and completeness
-
-implemented posix shared memory and semaphore interfaces.
-
-implemented all remaining required pthread and clock interfaces.
-
-major fixes to signal semantics.
-
-greatly improved temporary file name generation for safety against
-denial of service due to intentional name collisions.
-
-added syscall wrappers for the linux inotify interface.
-
-malloc(0) now returns a non-null pointer.
-
-fixed printf %n specifier (again), pthread_once (it was always
-hanging), and non-default-type mutex behavior.
-
-added ucontext/sigcontext support in headers to facilitate building
-libgcc with dwarf2 unwind support, and possibly other low-level tools.
-
-improved musl-gcc compiler wrapper.
-
-implemented many small missing functions here and there, minor header
-fixes, etc.
-
-
-
-0.7.1 - improvements to completeness, bug fixes
-
-implemented flockfile, wprintf, and robust mutex functions.
-
-fixed stack corruption bug in times(), minor header bugs, and some
-error return value bugs in thread interfaces.
-
-
-
-0.7.5 - new features, major optimization, and robustness
-
-implemented POSIX timers.
-
-optimized and simplified many thread-related functions.
-
-eliminated resource leak races in thread cancellation. (almost all
-existing implementations, including glibc, have these leaks.)
-
-overhauled stdio implementation to take advantage of readv/writev for
-reduced syscall load, and improved stdio's handling of error status.
-
-added syscall header and interface for applications to use and
-greatly simplified internal system for making syscalls.
-
-strangthened tmpnam/tempnam/tmpfile filename generation and made the
-straight C functions not depend on POSIX symbols.
-
-fixed pthread cancellation ABI on i386 to match the LSB/glibc ABI
-
-better double-free handling in malloc
-
-various minor bug fixes
-
-
-
-0.7.6 - major bug fixes
-
-fixed rare but serious under-allocation bug in malloc.
-
-fixed signedness bug in strchr that prevented finding high bytes.
-
-fixed serious parsing bugs in strtold.
-
-fixed statvfs syscall (it was always failing with EINVAL).
-
-fixed race condition in set*id() functions with threads (possible
-deadlock). further audit still needed though.
-
-fseek no longer sets the stream error flag on failed seeks (this was
-wrong and broke some programs, notably GNU m4).
-
-nl_langinfo is no longer a dummy function. (the functionality was
-previously implemented but accidentally left unused).
-
-various small fixes have been made to the implementations and
-prototypes for nonstandard and obsolete functions
-
-
-
-0.7.7 - more bug fixes and program-compatibility improvements
-
-fixed floating point formatting and rounding bugs in printf.
-
-fixed broken %N$ positional argument specifiers in printf.
-
-fixed misaligned read/overread bug in strchr which could lead to
-crashes scanning tiny strings at the end of a page when the next page
-is not readable, or on archs (not yet supported) that forbid
-misaligned reads.
-
-fixed breakage of statvfs on x86_64
-
-fixed crash in getmntent_r
-
-fixed bug in POSIX timers created with NULL sigevent argument
-
-improved semaphore performance, and sem_wait is now interruptable by
-signals, as required by POSIX.
-
-added many compatibility and system-level interfaces, increasing the
-proportion of busybox that works with musl.
-
-
-
-0.7.8 - more bug fixes and compatibility improvements
-
-fixed problems with ipv6 dns and address printing code that made ipv6
-support practically unusable, and some other getaddrinfo bugs.
-
-fixed broken sendmsg/recvmsg functions on x86_64 (caused by incorrect
-msghdr structure).
-
-fixed broken sigsetjmp asm on x86_64.
-
-worked around a problem with input buffering on terminals reblocking
-after getting a blank line, due to a bug in the linux readv syscall.
-
-various improvements to the "rsyscall" system used to implement
-threaded setuid, setgid, etc.
-
-exiting/cancelling the a timer handler thread no longer kills the
-timer.
-
-fixed incorrect trailing zeros on some %g conversions in printf.
-
-fixed buggy byte-swapping functions and moved them to inlines in
-byteswap.h.
-
-many small improvements to header/application compatibility, support
-for nonstandard macros, etc.
-
-
-
-0.7.9 release notes
-
-new pthread cancellation implementation:
-- safe against resource-leak/side-effect-leak race conditions
-- safe against interruption by signal handlers
-- reduced bloat in all cancellable functions
-- reduced bloat for blocking cancellation
-
-new interfaces implemented:
-- realpath (limited functionality)
-- wordexp (limited functionality)
-- flock (nonstandard)
-- forkpty (nonstandard)
-- posix_fadvise
-- posix_fallocate
-
-general bug fixes:
-- syslog function failure to communicate with syslogd
-- bug in siginfo_t definition if wait.h was included before signal.h
-- incorrect struct definitions for most of sysv ipc
-- pthread_exit/cancel on timer handler wrongly destroying the timer
-- linux dup2 ebusy workaround
-- obscure issues in non-threaded programs using some pthread functions
-- getopt_long allowed mismatch in last char of option name
-- incorrect parsing of obscure ip address forms
-- initgroups not working reliably (uninitialized var)
-- shadow pass treating empty expiry field as pass-expired-in-1970
-- bogus longjmp if pthread_exit was called from cancellation handlers
-
-x86_64-specific bug fixes:
-- fcntl file locking
-- thread stack alignment
-- broken select timeouts due to incorrect timeval definition
-
-
-
-0.7.10 release notes
-
-new features:
-- ipv6 numeric string parsing
-- eventfd syscall wrappers
-
-optimizations:
-- new qsort implementation using the smoothsort algorithm
-- much smaller/faster sigset_t handling functions
-- lowered spin count before futex wait in synchronization functions
-
-general bug fixes:
-- incorrect floating point round-to-even behavior in printf
-- major bugs in pthread barrier implementation
-- off-by-one error in scanf %n results
-- scanf failure to report EOF when scanning for literal text
-- minor missing/incorrect prototype issues
-- dependency on undefined call order in fclose
-
-compiler issue workarounds:
-- incorrect inlining of variadic functions on recent gcc versions
-- pcc preprocessor bug with recursive macro expansion
-
-
-
-0.7.11 release notes
-
-new features:
-- integrated dynamic linker
-- dynamic loading (dlopen/dlsym) (for dynamic-linked programs only)
-- XSI search.h API
-- POSIX message queues
-- POSIX spawn interfaces
-- BSD pseudo-random number generator API (random/srandom/initstate/etc.)
-- floating point environment (limited usefulness due to gcc bugs)
-
-general bug fixes:
-- possible crashes with wordexp due to uninitialized variable
-- race condition in pthread_kill (also present and unfixed in glibc/nptl)
-- pthread exit destructors called too late
-- dangerous unbounded vla in glob
-- brk/sbrk legacy functions mismatching legacy semantics
-- wcsncpy dest buffer overflow
-- strncat and wcsncat possible overflows due to double-termination
-
-
-
-0.7.12 release notes
-
-new features:
-- support for textrels in shared objects
-- rpath support in dynamic linker
-- stdio_ext.h functions (for better gnu software compatibility)
-
-bug fixes:
-- some compilers miscompiling dlopen due to misuse of longjmp
-- safe handling of invalid long-double bit patterns (affects printf)
-- workaround for bugs in linux mprotect syscall
-- thread-safety for random() functions
-- various minor issues
-
-
-
-0.8.0 release notes
-
-new features:
-- chinese and japanese legacy charset support in iconv
-- zero-syscall clock_gettime support (dynamic-linked x86_64 only)
-- futex-based locking for stdio (previously used spinlocks)
-- LD_PRELOAD and RTLD_NEXT support in dynamic linker
-- strptime (mostly working but incomplete)
-- posix aio (mostly working but not entirely conformant)
-- memory streams (fmemopen, open_memstream, ...)
-- stub/dummy implementations for various useless legacy functions
-- if_nameindex
-
-security hardening:
-- setuid, etc. should not longer be able to "partially fail" with threads
-- ensure suid programs start with fd 0,1,2 open
-- improved openpty/forkpty failure checks
-
-threads/synchronization bug fixes:
-- dangerous spurious wakeup in pthread_join lead to early return
-- race condition enabling async cancellation (delayed/lost cancellation)
-- destruction/unmapping race conditions in semaphores, mutexes, rwlocks
-- recursive rwlock_rdlock deadlock when a writer is waiting
-- race condition in sigqueue with fork
-- timer expiration thread exit wasn't running dtors
-- timer threads weren't blocking signals
-- close was wrongly cancellable after succeeding on some devices
-- robust mutex list was not reset on fork
-
-general bug fixes:
-- incorrect logic in fread (spurious blocking; crash on write-only files)
-- many corner cases and overflow cases for strtol-family functions
-- various printf integer formatting issues with flags/width/precision
-- incorrect iconv return value on failure
-- broken FD_* macros on 64-bit targets
-- clock function returning wrong value (real time not cpu time)
-- siglongjmp signal mask clobbering (off-by-one pointer error)
-- dynamic linker weak symbol resolution issues
-- fdopendir failure to set errno
-- various minor header fixes
-
-
-
-0.8.1 release notes
-
-bug fixes:
-- mismatching prototypes caused build failure on 64-bit
-- other minor prototype errors in the headers have been fixed
-- various other small omissions fixed
-
-
-
-0.8.2 release notes
-
-new features:
-- ptrace syscall support
-
-bug fixes:
-- const error (only a warning with many compilers) in lio_listio
-- minor portability fixes aimed at supporting new arch targets
-
-
-
-0.8.3 release notes
-
-new features:
-- arm port (experimental)
-- better musl-gcc wrapper script for building against musl
-- added clone system call
-
-bug fixes:
-- numerous header file typos, copy/paste errors, omissions
-- statfs and statvfs ABI are now LSB-conformant (and actually work)
-
-
-
-0.8.4 release notes
-
-new features: 
-- arm dynamic linker support
-- process-shared pthread barriers now work
-- efficient futex-requeue-based cond var broadcast
-- more optional cancellation points are now cancellable
-- printf accepts null pointers with %s, prints as "(null)"
-- recursive mutexes are now fully reentrant
-- __cxa_atexit support
-- real vfork
-- dynamic linker now gold-compatible
-- prlimit syscall
-- support for large limits with setrlimit/getrlimit (even on 32-bit)
-- glob now supports GLOB_PERIOD option (GNU extension)
-
-bug fixes:
-- many serious issues in condition variables
-- rwlock failure-to-wake deadlock issues
-- various small header files bugs/omissions
-- wrong failure return for pthread_create
-- path handling issues on execvp
-- lock count corruption with robust recursive mutexes on owner death
-- integer overflows in atoi, etc. reading most-negative value
-- spurious mremaps on every realloc of large memory chunks
-- pthread cancellation failure in single-threaded programs
-
-security:
-- avoid fd_set overflow in dns lookups
-
-
-
-0.8.5 release notes
-
-new features:
-- stdio operations are now cancellable (only when low-level io happens)
-- global ctor/dtor support in main program start code and shared libs
-- dynamic linker support for PIE executables (but missing startup code)
-- vfork support on x86_64
-- complete set of locale_t functions (all ignore the locale argument)
-- provide define float_t and double_t in math.h
-- lighter/faster cancellation cleanup handler register/unregister
-
-bug fixes:
-- gcc wrapper now supports -shared, -nostdlib, -nostartfiles
-- removed one wrongly-classified character from iswspace set (zwsp)
-- fixed crashes in dns lookup on some errors, e.g. resolv.conf missing
-- "make install" no longer tries to build shared libc if disabled
-- ptrace argument handling bugs fixed
-- work around visibility-hidden bugs in gcc 3.x
-- fix thread-pointer-loss issue when it's initialized in signal handlers
-- various minor typo/misc fixes in headers
-
-compatibility:
-- glob behaves more like traditional implementations w.r.t. GLOB_MARK
-- added legacy futimes, lutimes functions
-- more compatibility macros in sys/param.h (nonstandard header)
-- setfs[ug]id syscall wrappers (linux specific)
-- fgetpwent function (nonstandard)
-- utmp.h matches traditional version more closely
-- caddr_t now matches glibc type (void * instead of long)
-- dummy (always-fail) dlopen and dlsym functions for static linked programs
-- [efg]cvt functions (previously posix, removed from standard)
-- get_current_dir_name function (nonstandard)
-
-
-
-0.8.6 release notes
-
-bug fixes:
-- fix crash in dns lookups for all static-linked, non-threaded programs
-
-
-
-0.8.7 release notes
-
-new features:
-- c++ support with g++'s libstdc++
-- c99 math library (float, long double, complex, etc.)
-- numerous wchar_t functions
-- a64l, l64a functions
-- getdate function
-
-compatibility:
-- c89 compatibility in math.h
-- syscall.h alias for sys/syscall.h
-- memory.h alias for string.h
-- getcwd supports null buffer argument (auto-allocation)
-
-bug fixes:
-- major fenv (floating point environment) fixes and optimizations
-- strptime mishandling of day/month names
-- strtoull wrongly rejecting the highest 16 possible values as overflow
-- math.h constant expression fixes for INFINITY/NAN/etc.
-- scanf mishandling of "0" with "%x"
-
-
-
-0.8.8 release notes
-
-new feature:
-- major math correctness and performance improvements
-- many math functions implemented in asm for i386
-- some math functions (mostly long double) in asm for x86_64
-- new floating point parser/converter with correct rounding
-- implement wcstod, wcstof, and wcstold
-- new scanf implementation - cleaner, faster, more correct
-- minimal/incomplete strfmon implementation
-
-compatibility:
-- header fixes for c++
-- regex code resync with TRE; support common regex extensions
-- support for compiling apps with gcc's -funsigned-char
-- sysconf now returns dynamic limits for open files, processes
-- give dlerror proper error status stickiness
-- make alloca work even with -fno-builtin
-
-critical security fixes:
-- stack-based buffer overflow in fprintf on unbuffered files
-
-other bug fixes:
-- rare gcc register allocation (miscompilation) bug in syscall wrappers
-- printf was rejecting the valid (but redundant) %lf format specifier
-- fixed big data bloat (missing const) in math functions
-- many math fixes related to floating point exceptions and rounding
-- corrected DECIMAL_DIG definitions
-- tgammal was wrongly setting global signgam
-- crash in wordfree with uninitialized we_offs
-- fix wordexp not null-initializing the we_offs initial slots
-
-
-
-0.8.9 release notes
-
-bug fixes:
-- major breakage in strtol and family: failure to accept leading spaces
-- incorrect name for MATH_ERREXCEPT in math.h
-
-compatibility:
-- prototypes for a few additional nonstandard functions
-
-
-
-0.8.10 release notes
-
-new features:
-- correct over/underflow detection (ERANGE setting) for strtod
-- new musl-gcc wrapper, specfile based, faster and more robust
-- meaningful return strings for dlerror
-- new iswalpha, iswpunct, and wcwidth; sync'd to Unicode 6.1
-- towupper/towlower sync'd with Unicode 6.1
-- new futex-based libc-internal locks instead of spinlocks
-- experimental stack protector support (minimal; no random canary)
-- experimental gdb shared library tracking support
-
-compatibility:
-- getusershell family functions
-- getresuid and getresgid syscall wrappers
-- byte swapping macros in endian.h
-- getdtablesize was wrongly declared in unistd.h for _XOPEN_SOURCE
-
-bug fixes:
-- iconv_open wrongly rejecting most dest charsets (broken in 0.8.0)
-- sysconf failure when correct value is -1 (broken in 0.8.8)
-- scanf and strtod family functions overreading past NAN (4 bytes vs 3)
-- scanf and strtod wrongly treating "0.00000000001", etc. as 0
-- many bugs in towupper/towlower (never seriously tested before)
-- int8_t definition was wrong when gcc -funsigned-char was used
-
-
-
-0.9.0 release notes
-
-license change: MIT
-
-new features:
-- configure script, improved build system
-- full stack protector support
-- PIE support on x86 and x86_64
-- new O(1) space, O(nm) time implementation of fnmatch
-- improved support for sse2 floating point mode on x86
-
-compatibility:
-- added linux unshare syscall
-- exp10/pow10 function
-- sqrtl support on arm (previously missing)
-- removed minimal linux/*.h headers that could conflict with real ones
-- support for _LARGEFILE64_SOURCE (mapped to standard fcns with #define)
-- better c89 compatibility in headers
-- stub versions of sched_* functions (previously missing)
-- pthread stacks no longer executable (compat with hardened kernels)
-- new ar.h and lastlog.h (legacy junk)
-- various other header improvements
-
-optimization:
-- additional x86_64 math asm
-- better formula for acos use in i386 asm
-
-bug fixes:
-- large (up to a few %) errors in strtod for certain values due to bug
-- mbsnrtowcs and wcsnrtombs were completely broken (bad exit logic)
-- wide printf %.0s could fail due to uninitialized variable
-- missing dlerror strings for dlsym in some cases
-
-
-
-0.9.1 release notes
-
-new features:
-- dynamic linker can be used as a program to explicitly load/run executables
-- ldd command, usable by making a symlink to the dynamic linker named ldd
-
-bug fixes:
-- major bugs in POSIX BRE parsing inherited from TRE regex code
-- character matching bug in regex on ARM: WCHAR_MAX was assumed to be signed
-- various obscure fixes related to signals and pthread cancellation
-- remquot subnormal remainder bug
-- buggy macros in (nonstandard) sys/param.h
-- major bug in pthread barriers on x86_64 (out of bounds write)
-- utimes (legacy) function was making wrong syscall (utime instead of utimes)
-- avoid using "old" syscalls that don't exist on arm eabi linux
-- broken strrchr(str, 0)
-- broken mbsinit(0)
-- broken wcsncmp
-- syntax error in nextafter macro in tgmath.h
-- missing support for -pie in musl-gcc wrapper
-- abort could wrongly fail to terminate the program in some cases
-
-compatibility:
-- increase default thread stack size to 80k
-- support _BSD_SOURCE feature test macro
-- support _LARGEFILE64_SOURCE feature test macro (merely exposes alt names)
-- lots of legacy-compatibility improvements in headers
-- various minor GNU extension functions
-- sysconf reporting number of available CPUs/cores
-- various LSB/glibc ABI interfaces aimed at compatibility with some binaries
-- use fistpll asm mnemonic instead of fistpq for compat with clang
-
-
-
-0.9.2 release notes
-
-bug fixes:
-- pointer overflow in printf (crash on 32bit userspace, 64bit kernel)
-- printf %ls over-read bug
-- strtod failure to read -0x as negative zero
-- flush stdio after dtors, not before
-- wrong file position for buffered input streams on exit
-- popen was broken when stdin/out were already closed
-- broken wcwidth tables (missing many characters)
-- fwrite: wrong return value of partial/failed write
-- broken utf-16 conversions
-- bad buffer length check in getlogin_r
-- bad perror("") behavior; did not match perror(0)
-- broken sysinfo syscall/structure
-- stdint.h const macro signedness bugs
-- broken include guards in some headers
-- bogus localeconv values
-- cancellation-safety for popen and pclose
-- fma corner cases wrong on i386
-- fcntl F_GETOWN errno missing on failure.
-- char signedness bug in dynamic linker broke dlopen on arm
-- mprotect failure in dynamic linker caused crash instead of error
-
-build system:
-- configure check to work around hacked-up gcc versions
-- test for old binutils that can't support musl dynamic linker
-
-compatibility:
-- make _GNU_SOURCE imply _LARGEFILE64_SOURCE
-- syscall wrapper for lots of nonstandard and/or legacy linux syscalls
-- versionsort stub
-- timegm function (inverse of gmtime)
-- various minor header tweaks
-- make __freading/__fwriting semantics match traditional ones
-- added gnulib-compatibility stdio interfaces
-- added pthread_attr_setstack interface
-- make strerror_r return partial string when buffer is too small
-- duplocale should accept LC_GLOBAL_LOCALE
-- align ptsname_r to upcoming posix requirements
-- support invalid ld80 bit patterns as extra nans.
-
-
-
-0.9.3 release notes
-
-new features:
-- mips (32-bit, o32 abi) port, currently static-linked only
-- newly overhauled crypt implementation
-- improved library pathname info for debugger from the dynamic linker
-- getaddrinfo (and getservbyname) now support /etc/services lookups
-- pipe2 syscall wrapper
-- splice and vmsplice syscall wrappers
-- syscall wrappers for extended attribute interfaces
-- ioperm/iopl syscall wrappers on archs that support these operations
-
-bug fixes:
-- dlsym RTLD_NEXT library search order was wrong
-- multiple dlopen pathname and library name handling errors
-- potential race condition in detached thread exit
-- broken internal-lock-handling code not updated for futex-based __lock
-- sem_trywait spurious EAGAIN errors arising from CAS failures
-- workaround kernel bug in cmsghdr size_t vs socklen_t issue (64-bit)
-- getservby* crash on null protocol argument
-- logic error skipping failed interfaces in if_nameindex
-- various minor header/declaration related issues
-
-arm-specific bug fixes:
-- broken crti/crtn startup code when gcc crtbegin/end files are linked
-- sigsetjmp tail call optimization failure broke the function
-- incorrect little-endian assumptions in atomic.h functions
-- use of blx instruction in asm (not supported on pre-v5 arm)
-
-build system:
-- only use expensive -ffloat-store cflag on archs/compilers that need it
-- make musl-gcc wrapper support -lgcc (mainly for self-hosting)
-
-
-
-0.9.4 release notes
-
-new features:
-- blowfish crypt
-- dynamic linking on mips
-- arm hard float support
-- BSD fgetln function in stdio
-- minor header improvements for compatibility
-- support for CROSS_COMPILE variable to configure
-- legacy significand function
-- better support for SUSv3-targeted programs
-
-performance:
-- assembly (string ops based) memcpy for i386 and x86_64
-- reduce printf overhead
-
-bug fixes:
-- failure of strtod, etc. to process extremely long strings correctly
-- read overrun in wcsstr for short needles
-- various major mips issues that prevented most software from working
-- erroneous floating point exception behavior in i386/x86_64 exp asm
-- crashes on null arguments to legacy err.h functions
-- various header file/type issues
-- extremely rare/obscure race condition with robust mutexes
-- crypt now never returns null (most programs don't check, then crash)
-- missing xattr remove functions
-
-
-
-0.9.5 release notes
-
-compatibility and headers:
-- POSIX+XSI+BSD features enabled by default with no macros defined
-- most programs can now be built without adding -D_GNU_SOURCE
-- added C99 restrict keyword where required in all prototypes
-- greater C89 compatibility
-- cleaner, more-compatible public syscall.h
-- many other header fixes
-- support for compiling musl with clang/llvm
-
-new features:
-- sha 256/512 password hash functions in crypt
-- GNU hash support in dynamic linker
-- partial C11 coverage
-- dladdr function added
-- dynamic linker reports all errors instead of exiting on first error
-- syscall wrappers added for most remaining linux syscalls
-- provide POSIX O_SEARCH open mode using linux O_PATH
-
-bug fixes:
-- most atexit functions were being skipped when exiting
-- some BSD functions were not being exposed under _BSD_SOURCE
-- issues loading ssp-protected DSO into non-ssp program with dlopen
-
-debloating:
-- eliminate .eh_frame (10-15% loaded size bloat)
-- optimal inline syscall asm for ARM and MIPS
-- no longer force -O3 for shared libs
-
-
-
-0.9.6 release notes
-
-bug fixes:
-- serious breakage in definition of O_ACCMODE mask (missing a bit)
-
-new features:
-- O_EXEC open mode
-- md5 crypt hash function
-
-
-
-0.9.7 release notes
-
-new features:
-- thread-local storage (__thread/_Thread_local)
-- microblaze port
-- getopt option parsing reset support
-- vsyscall (sysenter, etc.) support on i386 (faster syscalls)
-- memmem function (GNU extension)
-- mips fenv support
-- accept "nan(n-char-sequence)" in strtod/scanf family functions
-- configure now supports compiling with pcc
-
-quality and correctness improvements:
-- close-on-exec flag for all library-internal file descriptors
-- cancellation-safety and corner-case overhaul in shm_open/sem_open
-- close EINTR vs EINPROGRESS issue
-- mark binaries as not requiring executable stack
-- better gdb compatibility in dynamic linker
-- support recursive dlopen (dlopen called from constructors)
-- posix_spawn/system/popen no longer momentarily double commit charge
-- all stdio functions wait for locks
-
-bug fixes:
-- broken sysvipc *ctl functions on 64-bit archs
-- broken shmdt on some archs
-- getaddrinfo failure with port "0"
-- dirname handling of trailing slash
-- vfork race in posix_spawn
-
-
-
-0.9.8 release notes
-
-new features:
-- powerpc port
-- dl_iterate_phdr interface
-- added mips-specific syscalls
-- thread priority scheduling
-- C11 CMPLX macro in complex.h
-- x86 port io functions in sys/io.h
-
-compatibility:
-- improved headers for trace/debugging/machine-access
-- stub functions for unsupported thread-related functionality
-
-bug fixes:
-- numerous math bugs (mostly exception flags and excess-precision issues)
-- register clobber error in i386 vsyscall asm (did not affect most callers)
-- various incorrect definitions in mips headers
-- broken dlsym asm on mips
-- empty prefix handling in configure script (--prefix="")
-- ldso search path logic issues
-- lock handling for stdio memory streams at exit time
-- invalid SO_REUSEPORT definition in socket.h (not supported by Linux)
-- broken redirection attempt to /dev/null in configure script
-
-
-
-0.9.9 release notes
-
-new features:
-- tgamma implementation (no longer lgamma wrapper with low precision)
-- various gnu extensions: sigandset, sigorset, etc.
-- futimesat function (obsolete)
-- various linux syscalls: arch_prctl, personality, etc.
-
-optimizations:
-- hyperbolic, inverse hyperbolic, and inverse trig, bessel functions
-- is* comparison macros in math.h now expand inline properly
-
-library bugs fixed:
-- calling getenv from shared library ctors was broken
-- invalid read in mmap-serviced aligned_alloc/memalign (possible crash)
-- wrong errno result in fallback path of pipe2 
-- various math functions raising spurious exceptions
-- mmap errno value on invalid offsets
-- backwards alignment logic in strlcpy
-- integer overflows in bessel functions
-- large (up to 60ulp) error in erfcf
-- dlsym/dlclose crashing on invalid library handles
-- failure to handle arch variations for cloexec/nonblock flags
-- lio_listio wrong return value for LIO_WAIT mode
-- dladdr failure to resolve PLT addresses
-- time_t/struct tm conversion off-by-one-day in december
-- malloc corruption on nonstandard kernels with non-page-aligned brk
-
-arch-specific bugs fixed:
-- arm ctors/dtors were not working with recent gcc versions
-- arm and mips setjmp/longjmp wrongly saved/restored fenv state
-- loss of precision in i386/x86_64 expl
-
-header bugs fixed:
-- incorrect PRI/SCN macros in inttypes.h for some types
-- arm sys/user.h regressions
-- failure of offsetof() to be an integer constant expression
-- tgmath return value type problems
-
-header compatibility improvements:
-- _GNU_SOURCE now enables everything; _ALL_SOURCE also works
-- scsi/scsi.h and scsi/sg.h are now provided
-- additional MAP_* flags for mmap
-- additional F_* commands and flags for fcntl
-- additional socket option, IPPROTO_* values, and multicase macros
-- thread-related waitpid flags
-- EHWPOISON added to errno.h
-- additional macros for mount, swap, and reboot operations
-- expose additional link.h structures
-- always ensure sizeof(NULL)==sizeof(void *), even in c++
-- additional flags for poll, epoll, inotify, timerfd, timex, dlfcn
-- register names in signal.h/ucontext.h for x86
-- ipc.h ipc_perm nonstandard struct field name compatibility improve
-
-
-
-0.9.10 release notes
-
-new features:
-- getifaddrs 
-- pthread_getattr_np (widely used by garbage collectors)
-- mkostemps, mkostemp, mkstemps functions (mkostemp is future-POSIX)
-- strcasestr and strverscmp (previously stubs)
-
-improvements:
-- major performance improvements in mbtowc
-- avoid filling caller-provided thread stacks with large TLS
-- debloat unnecessary static buffers
-- robust posix_spawn based on CLONE_VM instead of vfork
-- new system() and popen() based on posix_spawn
-- better strerror strings
-- further emulation of atomic close-on-exec/nonblock options for old kernels
-- provide macro constants for new-ish kernel features
-
-compatibility:
-- several nonstandard but widely-available pwd/grp/shadow functions
-- program_invocation_[short_]name
-- re-added useconds_t type used by some programs
-- some legacy arpa headers
-- dn_skipname function (legacy resolver API)
-- additional ABI aliases for supporting glibc-linked libraries/binaries
-
-general bugs fixed:
-- stale locks and bogus munmap call when pthread_create fails
-- uninitialized argument to munmap when dynlink load_library fails
-- incorrect error returns in gethostby*_r
-- memory leak in gethostbyname family
-- blank ai_canonname in getaddrinfo for non-CNAME records
-- undefined HZ macro in scsi/sg.h
-- wrong return value for wmemmove on forward-copy
-- namespace conformance in strings.h
-- various utmp.h bugs
-- unnecessary DT_SONAME in libc.so caused problems on some systems
-- multiple bugs in syslog, some possibly dangerous
-- non-functional setpriority function
-- slight mishandling of 0xf5 byte in UTF-8 decoder
-- misaligned memory accesses in mbsrtowcs
-
-arch-specific bugs fixed:
-- crash in shared library loading on arm
-- missing __aeabi_atexit needed by arm eabi
-- wrong float_t definition on x86_64
-- various low-impact type size/alignment mismatches in some headers
-- epoll struct alignment wrong on non-x86[_64] archs
-- broken pipe2 fallback code on mips with old kernels
-
-
-
-0.9.11 release notes
-
-new features:
-- %m allocation modifier for scanf
-- week number and ISO week-based-year functionality in strftime
-- per-process and per-thread cputime clocks
-- ethernet address conversion interfaces
-- legacy classful ipv4 network address interfaces
-- minimal dlinfo function (nonstandard)
-
-other improvements:
-- dynamic linker path file can now use newlines to separate paths
-- math optimizations for archs with extended precision (i386)
-- musl-gcc wrapper now exposes gcc's intrinsic headers
-- quality of rand and rand_r pseudo-random sequences
-- support for large device minor numbers (greater than 8 bits)
-- various header conformance and compatibility fixes
-
-directly user-visible bugs fixed:
-- scanf losing characters on unbuffered streams and fmemopen streams
-- failure of mbsrtowcs to record stop position when dest is full
-- failure of iconv to convert to legacy codepages
-- non-working pthread_[sg]etschedparam functions (wrong syscall arguments)
-
-other potentially-serious bugs fixed:
-- resource leaks in sem_open
-- various bugs in thread exit synchronization
-- invalid access in aio notification after aiocb free/reuse
-- synchronization in dynamic linker when new thread dlopens during ctors
-- lack of error handling for failure to read dynamic linker path file
-- creation by mmap or shmget of objects larger than PTRDIFF_MAX
-
-minor conformance bugs fixed:
-- overflow handling for the clock function
-- workaround for incorrect exceptions in fma due to compiler bugs
-- workaround wrong kernel type for sem_nsems field in struct semid_ds
-
-arch-specific bugs fixed:
-- x86_64 sigsetjmp clobbered the signal mask rather than saving it
-- misaligned stack when calling ctors/dtors (crashing on x86_64)
-
-
-
-0.9.12 release notes
-
-new features:
-- zoneinfo time zone support
-- PIE support on all supported archs
-- named sub-archs for endian and float ABI variants
-- improved support for non-root installs of the dynamic linker
-- ability to selectively build only performance-critical modules with -O3
-- simple buffer overflow detection in free/realloc
-- inet_ntop now presents v4-mapped addresses in ::ffff:a.b.c.d form
-- ldd now reports libc and the dynamic linker in its output
-
-compatibility:
-- support for new init/fini array (needed for ctors/dtors on newer gcc)
-- C++ ABI fully matches glibc/LSB, at least on x86
-- many added ABI compatibility symbols for using glibc-linked libs
-- support for STB_GNU_UNIQUE symbol bindings (found in some C++ libs)
-- macros/types for new Linux kernel features in headers
-
-bugs fixed:
-- crashes in scanf on literal mismatches (regression from adding %m)
-- dl_iterate_phdr was passing invalid phdr pointers to its callback
-- getaddrinfo with null host and AF_UNSPEC was failing to report IPv6
-- integer overflows in date/time conversion code
-- misinterpretation of pre-1930s dates as post-2038 on 32-bit archs
-- make install failed to install bits headers if make was not run first
-- shm_open was wrongly cancellable
-- low- or no-impact heap corruption in memalign
-- explicitly running the dynamic linker on PIE programs did not work
-- missing macros and sysconf for some supported POSIX option groups
-- missing close-on-exec flags for several internal fd uses
-
-arch-specific bugs:
-- wrong SIG_ATOMIC_MIN/MAX macros on x86_64
-- erfcl was missing on archs where long double is same as double
-- broken dynamic-model TLS in static-linked arm/mips/powerpc programs
-
-
-
-0.9.13 release notes
-
-new features:
-- iconv support for EUC-KR and Big5 (including HKSCS) encodings
-- field widths (POSIX 2008 feature) in strftime
-- recursive rpath and $ORIGIN support in dynamic linker
-- cpu affinity interfaces
-- support for armhf (hardfloat) floating point environment (fenv)
-- support for SSE fenv on i386 (for apps using -mfpmath=sse -msse2)
-- strftime %s format (seconds since the epoch, future POSIX requirement)
-- configure script now saves its command line as a comment in config.mak
-- legacy functions valloc and euidaccess
-
-performance:
-- optimized asm memcpy for arm
-- optimized asm memset for i386 and x86_64
-- optimized C versions of memcpy and memset for all archs
-- eliminated major spurious syscalls from posix_spawn
-- some math asm for armhf (hardfloat)
-
-workarounds for:
-- qemu-user's rt_sigaction syscall does not allow old to alias new
-- qemu-user's madvise always succeeds (broke pthread_getattr_np)
-- passing PT_INTERP to dlopen attempted to double-load libc
-- gcc 4.8.x generating self-referential (infinite recursion) memcpy/memset
-- linux's lack of support for fchdir, fchmod, fchown, fstat on O_PATH fds
-
-bugs fixed:
-- failure to honor flags for fchmodat and faccessat (linux syscall api flaws)
-- SIGEV_THREAD timer id corruption and race condition issues
-- timer thread TLS incorrectly keeping values from previous expiry run
-- ecvt/fcvt decimal position off-by-one
-- in symbol-versioned libs, symbol resolved to oldest instead of newest
-- posix_spawn not correctly reporting errno from exec failure
-- "make install" was not atomic (overwrote files rather than replacing)
-- integer overflows in strftime
-- unset/empty TZ variable was mishandled
-- strftime could crash if the struct tm did not have valid tm_zone field
-- failure of fenv functions to handle invalid arguments (required by ISO C)
-- failure of some math functions (C and i386 asm) to raise underflow flag
-- broken dn_expand function (previously not used internally)
-- race conditions with signals during fork
-- incorrect access check in mktemp (obsolete function)
-- unnecessary arbitrary limits on size of program headers in dynamic loader
-- text formatting bugs in output of err.h functions
-
-arch-specific bugs:
-- fesetenv(FE_DFL_ENV) crashed on i386
-- breakage of arm crt code when libc is compiled as thumb
-- arm/armhf (hardfloat) misidentified by configure
-- ambiguity of wait (exit status) macros on mips with signal number 127
-- wrong value of _NSIG and SIGRTMAX on mips
-
-
-
-0.9.14 release notes
-
-bugs fixed:
-- failure to properly install dynamic linker with DESTDIR set (symlink wrong)
-- rare deadlock in libc-internal locking routines
-- dynamic linker used fallback paths wrongly on (possibly transient) errors
-- popen broken when stdin or stdout was already closed in parent
-- deadlock/memory-corruption in multithreaded set*id and setrlimit functions
-- realpath failed when file was not readable
-- readpath mistakenly had cancellation points in it
-- crashes in scanf with invalid %m conversion specifiers
-- misclassificiation of some invalid ld80 float representation in fpclassify
-- various overflow and underflow flag issues in math functions
-- domain handling errors for acoshf and acoshl
-- wrong values for some sysconf properties
-- lack of proper memory barriers on arm
-
-mips-specific bugs:
-- broken sysv ipc structures
-- multiple stack-related bugs in clone, leading to crashes in parent or child
-- overflow writing sigset_t in multithreaded set*id and setrlimit functions
-
-other improvements:
-- size and performance improvements to various math functions
-- wait.h as a compatibility alias for sys/wait.h
-- various header improvements
-- support for runtime-variable page size on archs that need it (mainly mips)
-
-
-
-0.9.15 release notes
-
-new features:
-- support for mixing IPv4 and v6 nameserver addresses in resolv.conf
-- RFC 3678 multicast structures/macros in netinet/in.h
-- putspent and fgetspent functions (shadow password API)
-- timef function (obsolete, removed in POSIX 2008)
-- fanotify syscalls (Linux-specific feature)
-- semtimedop syscall (Linux-specific sysvipc extension)
-- quotactl syscall and header (filesystem quotas support)
-- drem and finite functions (obsolete BSD functions)
-- getloadavg function (non-standard)
-- herror function (non-standard and obsolete)
-- libc.so now stores and prints its version information
-- expose constants for new Linux features including O_TMPFILE
-- implement FNM_LEADING_DIR option to fnmatch (GNU extension)
-- posix_close function (accepted for inclusion in next POSIX issue)
-
-bugs fixed:
-- buffer overflow in mbsrtowcs
-- clobbering of gr_name in getgrnam_r and getgrgid_r
-- execle ignoring the environment argument
-- setenv crash on malloc failure
-- out-of-bounds access in fnmatch with FNM_PATHNAME and certain patterns
-- failure of malloc to set errno when failing to extend heap
-- incorrect errno value from getcwd with zero size
-- spurious failure in faccessat with AT_EACCESS flag with suid/sgid programs
-- several fd leaks due to missing close-on-exec flag
-- misspellings/typos in macro names in several headers
-- incorrect failure return value in inet_pton
-- various numeric ip address parsing and validation fixes
-- namespace conformance issues in several headers
-- minor header issues
-- zombie processes left by faccessat with AT_EACCESS
-- timezone file parser failing/crashing on 64-bit archs
-- hang in localtime with near-overflowing time_t values on 64-bit archs
-- timezone path search was only trying first path
-- incorrect handling of excessive-length TZ environment strings
-- timezone file loading was wrongly enforcing O_NOFOLLOW/rejecting symlinks
-- iswspace was wrongly returning true for the null character
-- various bugs in wordexp
-- putgrent could write corrupt lines after write failures
-- dn_expand misinterpreted in-packet offsets greater than 255
-- spurious strftime/wcsftime failure on len+1==bufsize case
-- incorrect underflow flag in fma corner cases
-- log*(0) wrongly returned +inf in downward-rounding mode
-- failure of fchmod, fstat, fchdir, and fchown to produce EBADF
-
-arch-specific bugs fixed:
-- i386: failure of fesetround to set sse rounding mode
-- i386: floating point limit constants misinterpreted due to excess precision
-- powerpc: broken thread pointer access when compiled with clang
-- microblaze: dynamic linker entry point code possibly clobbering argv
-
-strict conformance issues:
-- NULL definition re-aligned with POSIX (requires (void *) cast)
-- alignment of math.h is* comparison functions with C11 annex F requirements
-
-
-
-1.0.0 release notes
-
-new features:
-- support for mips softfloat ABI variant
-- legacy setkey and encrypt API for DES
-- support for BSD version of struct tcphdr in addition to GNU version
-- added ipv6 and icmpv6 protocol lookups to getprotoent-family functions
-
-new experimental ports:
-- sh (SuperH)
-- x32 (ILP32 ABI for x86_64)
-
-compatibility:
-- improved c89 compiler support in math.h
-- eliminate some compiler warnings in public headers
-- added some missing things for LFS64 APIs
-- added fallback emulation of accept4 for older kernels
-
-bugs fixed:
-- buffer overflow in printf when printing smallest denormal exactly
-- rounding errors in printf in some just-over-halfway cases
-- posix_spawn did not accept null pid pointer (crashed)
-- ftello gave incorrect result for unflushed append-mode streams
-- mishandling of n=0 case in wcsxfrm (wild buffer overrun)
-- possible system breakage during libc upgrade due to install.sh bugs
-- nftw FTW_MOUNT flag prevented walking any directories at all
-- ptsname/ptsname_r returned negated error codes
-- getprotoent function returned junk after listing valid protocols
-- wrong error code from readdir when the directory has been deleted
-- various prototype/argument-type fixes, mostly to legacy functions
-- various header namespace violations
-
-arch-specific bugs fixed:
-- fesetenv(FE_DFL_ENV) was broken on i386 and x86_64
-- strerror(EDQUOT) did not work on mips
-- recvmsg/sendmsg were broken on powerpc
-- sysv ipc was broken on powerpc and mips
-- statfs/statvfs were broken on mips
-- sigaltstack was broken on mips
-
-
-
-1.1.0 release notes
-
-new features:
-- relro memory protection in dynamic linker
-- malloc can now extend heap with mmap if brk fails
-- vdso clock_gettime/gettimeofday/time acceleration on x86_64
-- thread/library-safe versions of search.h functions (nonstandard)
-- getauxval function (nonstandard)
-- sysconf extensions to query physical memory size
-
-bugs fixed:
-- floating point printf output corruption from carry into uninitialized slot
-- possible runaway carry overflow in printf floating point
-- printf %g failure to strip trailing zeros in some cases
-- search past end of haystack in memmem
-- off-by-one error in confstr return value
-- crashes in some near-empty static programs that use stack protector
-- deadlock race in pthread_once
-- non-working clock_gettime fallback for old kernels
-
-arch-specific bugs fixed:
-- crash from missing syscall asm register clobbers on real microblaze kernel
-- crash in all nontrivial dynamic linker use on microblaze
-- incorrect rlimit constants on mips
-- broken, possibly dangerous, use of getrlimit syscall on x32 in sysconf
-
-
-
-1.1.1 release notes
-
-new features:
-- new options --preload and --library-path to dynamic linker
-- public execvpe function (nonstandard extension)
-- iconv support for cp437 and cp850
-
-bugs fixed:
-- false negatives with some periodic needles in strstr, wcsstr, and memmem
-- crash on invalid zoneinfo files
-- incorrect zero-padding of some outputs for strftime %s specifier
-- misreporting of errors in configure script when $CC does not work at all
-- treating not-yet-implemented strptime specifiers as errors
-
-compatibility:
-- configure now detects serious constant-folding bug in gcc 4.9.0
-- removed __yield symbol (unused) that clashed with some compilers
-- improvements to sysconf's handling of unsupported/invalid arguments
-
-arch-specific bugs fixed:
-- misdetection of superh ABI variant by configure on gcc 3.x
-- missing SO_RCVBUFFORCE and SO_SNDBUFFORCE in mips socket.h
-- build regression on armv6 and later with -mthumb
-
-
-
-1.1.2 release notes
-
-new features:
-- multi-protocol matches (tcp and udp) in getaddrinfo
-- support for AI_V4MAPPED and AI_ALL flags to getaddrinfo
-- reverse name lookups from /etc/hosts
-- reverse service lookups from /etc/services
-- support for service aliases in /etc/services
-- ipsec and tunneling protocols to getprotoent-family functions
-- res_send, res_mkquery, res_querydomain, and dn_comp functions
-- ipv6 scope id handling for link-local scope addresses
-- previously-unimplemented %C and %y in strptime now work
-- vdso clock_gettime acceleration on i386 (new kernel feature)
-- better O_CLOEXEC/SOCK_CLOEXEC fallbacks for old kernels
-
-bugs fixed:
-- buffer overflow in dns response parsing (CVE-2014-3484)
-- possible infinite loop in dns response parsing
-- sendfile off_t 32/64-bit size mismatch
-- incorrect end pointer in some cases when wcsrtombs stops early
-- incorrect if_nametoindex return value when interface does not exist
-- dummy "ent" function aliases that possibly shadowed real ones
-- tmpfile fd leak on memory exhaustion
-- getaddrinfo returning EAI_NONAME for some transient failures
-
-arch-specific bugs fixed:
-- broken kernel side RLIM_INFINITY on mips
-- incorrect syscall argument 6/7 types for pselect on x32
-
-
-
-1.1.3 release notes
-
-new features:
-- address sorting in getaddrinfo, etc. modeled on rfc 3484/6724
-- default timezone taken from /etc/localtime when $TZ is unset
-- getopt double-colon extension for optional arguments
-- support for TLSDESC-based (gnu2) TLS dialect on i386 and x86_64
-- sendmmsg/recvmmsg (linux-specific)
-- fmtmsg (last mandatory XSI function that was missing)
-
-compatibility:
-- treat dns rcode=2 as temporary failure, not negative result
-- working thread-pointer for pre-2.6 kernels on i386
-- further ABI-compat symbols: __xmknod[at], __sysv_signal
-
-bugs fixed:
-- memmem false positives/false negatives/crashes from invalid logic
-- gethostby*_r not setting result pointer to null on failure
-- aliasing violations in syscall.h SYSLOG_NAMES feature
-- fanotify_mark syscall arguments wrong
-
-arch-specific bugs fixed:
-- various subtle relocation bugs in powerpc and sh dynamic linker
-
-
-
-1.1.4 release notes
-
-new features:
-- experimental locale support for LC_MESSAGES and LC_TIME
-- non-stub gettext family functions for message translation
-- or1k (OpenRISC 1000) port
-- syslog options LOG_CONS and LOG_PERROR
-- issetugid function (from OpenBSD)
-- improved if_nameindex and getifaddrs functions
-
-compatibility:
-- work around bug #61144 in gcc 4.9.0 and 4.9.1
-- support getauxval(AT_SECURE) even on kernels without AT_SECURE
-
-bugs fixed:
-- empty dynamic linker error messages (regression in 1.1.3)
-- if_nameindex omitted unconfigured and ipv6-only interfaces
-- incorrect return value for fwide function
-- failure of wide printf/scanf functions to set wide orientation
-- multiple issues in legacy function getpass
-- dynamic linker did not accept colon as a separator for LD_PRELOAD
-- errno clobber in syslog caused wrong output for %m specifier
-- crash in regexec for nonzero nmatch argument with REG_NOSUB
-- minor bugs in rarely-used nl_langinfo item lookups
-
-arch-specific bugs fixed:
-- broken relocations in mips dynamic linker (regression in 1.1.3)
-- register state corruption in setjmp asm for microblaze
-- broken struct stat st_ino field on microblaze
-- broken struct stat st_dev field on big endian mips
-- broken asm register constraints in atomics on powerpc
-- missing barriers in atomics on mips, powerpc, microblaze, and sh
-
-
-
-1.1.5 release notes
-
-new features:
-- full C11 coverage (threads, UTF-16/32 API, timespec_get, etc.)
-- malloc_usable_size function (nonstandard)
-- support for new F_OFD_* fcntl operations (linux 3.15, POSIX-future)
-- new _DEFAULT_SOURCE feature test macro to request default profile
-
-performance:
-- private-futex support
-- redesigned cond var implementation with major performance improvement
-- tweaked spinning in userspace before performing futex waits
-
-bugs fixed:
-- failure of dn_expand to null-terminate name for crafted DNS packets
-- corruption of cond var mutex state when switching mutexes
-- use of uninitialized memory with application-provided thread stacks
-- false ownership of orphaned mutexes due to tid reuse
-- possible failure-to-wake for robust mutexes on owner death
-- subtle errors in robust mutex unrecoverable status handling
-- missing memory/compiler barrier spinning to obtain locks
-- wrong behavior in various zero-length stdio operations
-- buffer overflow in swab with odd argument
-- incorrect sequence generation in the rand48 family of prng functions
-- missing cancellation check in non-wait paths of sem_wait, pthread_join
-- missing barrier in pthread_once fast path
-- memory leak in regexec when input contains illegal sequence
-- various parser bugs in regcomp
-- wrong return value on overflow in some strtoul-family functions
-- broken CPU_EQUAL macro in sched.h
-- dlerror not working in static-linked programs
-- mishandling of negative non-whole-hour TZ offsets
-- incorrect case mappings for U+00DF
-- namespace pollution via accidentally-non-static function named "dummy"
-- missing __fpclassifyl and __signbitl definitions for ld64 archs
-
-
-
-1.1.6 release notes
-
-new features:
-- getopt '-' flag for processing non-option arguments
-- getopt_long argument permutation extension
-- getopt_long abbreviated options
-- ns_parserr and related DNS-packet-parsing functions
-- fnmatch FNM_CASEFOLD extension
-- support for translation of getopt error messages
-- login_tty function (legacy)
-
-performance:
-- efficient atomics on armv7+ targets
-- pthread_once shrink-wrapping of fast path
-
-compatibility:
-- baseline arm binaries now work on new cpus/kernels without kuser_helper
-- dynamic linker now honors DT_RUNPATH without DT_RPATH (new binutils)
-- arm asm is now compatible with clang's internal assembler
-- suppress macro implementations of functions when headers are used in C++
-- increased message length limit for syslog
-
-bugs fixed:
-- open ignored file creation mode argument for O_TMPFILE
-- wrong printf formatting for %#.0o with value zero
-- missing private state for uchar.h functions (null ps pointer)
-- sched_getaffinity left uninitialized data in output bit array
-- wrong return values for pthread_getaffinity_np and pthread_setaffinity_np
-- buggy handling of multibyte option chars with arguments in getopt
-- printf failed to report or stop on write errors
-- printf failed to honor '+' modifier when printing NANs
-- wcsnrtombs returned the wrong value in one code path
-- syslog failed to check for connect error
-- multi-threaded set*id() had spurious failures from ugly workaround code
-- various minor header conformance bugs (signedness, constant expressions, ...)
-
-arch-specific bugs fixed:
-- on or1k, some syscalls with 64-bit arguments were broken (misaligned)
-- usage of sahf instruction on x86_64 crashed on some early cpu models
-
-
-
-1.1.7 release notes
-
-new features:
-- alternate passwd/group backend support via nscd protocol
-- masked cancellation mode extension (experimental)
-- aio cancellation
-- aarch64 port (experimental)
-
-performance:
-- significant memset asm optimizations on i386 and x86_64
-
-compatibility:
-- suppress EINTR in semaphores for old kernels where futex restart is broken
-- always set optarg in getopt_long
-- support SOCK_RAW socket type in getaddrinfo
-- report success instead of EINPROGRESS when close is interrupted
-
-bugs fixed:
-- multithreaded set*id() was not async-signal safe, had various race bugs
-- getspnam_r returned results for partial username matches
-- wordexp bad character checker mis-counted parentheses
-- close on fd with pending aio could lead to file corruption
-- old aio implementation had numerous conformance bugs
-- malloc init code could deadlock due to race condition
-- pthread_exit did not disable cancellation
-- pthread_cond_wait could wrongly consume signal on cancellation
-- execvp wrongly stopped path search on EACCESS
-- fsync, fdatasync, and msync were not honored as cancellation points
-- fchmodat was subject to fd leak race (missing O_CLOEXEC)
-- fchmodat failed to report EOPNOTSUPP in race path
-- passwd/group lookup functions had various minor error-reporting bugs
-- isatty had false-positives/device-state-corruption for OSS sound devices
-- configure script failed to detect gcc with translated messages
-- FLT_ROUNDS macro failed to reflect rounding mode changes in fenv
-
-arch-specific bugs fixed:
-- mips fesetenv did not handle FE_DFL_ENV
-- mips POLLWRNORM and POLLWRBAND macros had wrong values
-- x32 pthread synchronization object type definitions were wrong
-- powerpc minimum signal stack size was insufficient
-
-
-
-1.1.8 release notes
-
-bugs fixed:
-- stack-based buffer overflow in inet_pton (CVE-2015-1817)
-- regcomp crash/mem-corruption with illegal bytes after backslash
-- regcomp wrongly allowed backrefs in ER
-- regcomp miscompiled character class brace-repetitions
-- regcomp wrongly processed \0 as an unmatchable backref
-- new FLT_ROUNDS definition failed to work in C++ code
-
-arch-specific bugs fixed:
-- aarch64 was missing max_align_t definition
-
-
-
-1.1.9 release notes
-
-new features:
-- ability to protect libc code itself with stack protector
-- sigsetjmp now restores signal mask after restoring context, not before
-- thread-local dlerror status/messages
-- dlerror messages are no longer truncated
-- diagnostics for constraint violations with ctype.h macros
-
-optimizations:
-- reduce cost of PIC on archs where PLT calls need a fixed GOT register
-- spin locks no longer constantly invalidate cache lines while spinning
-- code size reduction in static-linked TLS init
-
-bugs fixed:
-- failure to process robust mutexes on detached-thread exit
-- possible memory corruption due to robust mutex list on detached-thread exit
-- crash on memory exhaustion in getgr* internals
-- misaligned memory accesses in static binaries with low-alignment TLS blocks
-- multiple cases of wrongful path search continuation after transient failure
-- small memory leak on failure of dlopen with RPATH $ORIGIN
-- several small math bugs related to exception flags with non-finite args
-- mmap leak in sem_open failure path for link call
-- duplocale clobbered new locale struct with memcpy of old
-- futimes crashed with null timeval argument
-
-arch-specific bugs fixed:
-- stack protector spuriously aborted after forking on x32
-- stack protector spuriously aborted with flockfile on powerpc
-- theoretically-possible clobbering of syscall return value on mips
-- random thread-pointer setup failure on sh (uninitialized return value)
-- possible crash in dlsym on sh due to incorrectly-computed branch target
-- broken fesetenv(FE_DFL_ENV) on mips
-- dynamic linker name for sh ignored fpu/nofpu and endianness
-- various minor aarch64 bugs
-- dangling pointers in x32 syscall timespec fixup code
-
-
-
-1.1.10 release notes
-
-new features:
-- fail-safe (allocation-free) C locale for newlocale to return
-- all locale categories track requested locale name
-- rcrt1.o start file for static PIE
-
-optimizations:
-- inline atomics for sh4a
-- removed heavy atomics from locale-related code paths
-- removed global data accesses from CURRENT_LOCALE macro & callers
-- dynamic linker stage 1 size reduction
-
-compatibility:
-- better configure detection of unsupported compiler options
-- support for more relocation types in libc.so, not currently used
-- iconv_open accepts "" and "CHAR" as aliases for native (UTF-8)
-- additional LFS64 macros in sys/resource.h
-
-regressions fixed:
-- dynamic linker crash on NONE-type relocations (only mips affected)
-- inability to build as thumb2 on arm
-- failure to run under qemu-i386 user-level emulation
-- inability to access globals from libc on powerpc
-- PIE link errors in Scrt1.o under unusual usage on some archs
-
-other bugs fixed:
-- failure of ungetc/ungetwc to work on FILE streams in EOF state
-- possible null pointer dereference in gettext
-- possible initial stack misalignment on mips with PIE
-
-
-
-1.1.11 release notes
-
-new features:
-- byte-based C locale
-- vdso clock_gettime on arm
-- musl-clang wrapper
-- sh2 nommu target support
-
-performance:
-- major speed-up for dynamic linker symbol lookups with GNU hash
-
-compatibility:
-- strverscmp now matches GNU behavior in corner cases
-- empty TZ environment variable gives GMT rather than system default
-- reconnection on syslog server socket loss (syslogd restart)
-- mmap fallback in simple_malloc when brk fails
-- support for %m and %s with null pointers in wide printf variants
-- call frame information in i386 asm for improved debugger support
-
-bugs fixed:
-- spurious errors from pwd/grp functions when nscd backend is absent
-- possible invalid access on calloc with simple_malloc
-- null pointer dereferences after calling uselocale((locale_t)0)
-- erroneous support for cancellation in stdio caused data loss
-- inconsistent handling of atexit called from atexit handler
-- missing locking in error paths for ungetwc
-- btowc mishandling of out-of-range non-EOF inputs
-- negated return value of ns_skiprr, failure in related functions
-- incorrect void return type for syncfs, missing error status
-- possible failure of tempnam due to missing null termination
-- negated tm_gmtoff field in struct tm
-- off-by-one error in getsubopt leaving equals sign in value result
-
-arch-specific bugs fixed:
-- soft deadlocks on i386/x86_64 due to missing barrier in internal locks
-- regression in arm pre-v7 support for kernels with kuser helper removed
-- runaway PC on mips detached thread exit (due to kernel regression)
-- mismatched ABI for local-dynamic model TLS on mips and powerpc
-- incorrect value of some SO_* constants on mips
-- broken 64-bit syscall argument passing on aarch64
-
-
-
-1.1.12 release notes
-
-new features:
-- fdpic abi on sh2 for shareable text segment without mmu
-- general fdpic elf support in dynamic linker
-- CFI generation for x86_64 asm source files
-- protection against silently building a libc.so with missing symbols
-
-compatibility:
-- nl_langinfo(CODESET) now returns "ASCII" in byte-based C locale
-- fixed build regression due to buggy .SECONDARY in some GNU make versions
-- additional arm eabi functions needed by llvm arm backend
-- added format argument attributes to gettext function prototypes
-- static PIE no longer requires linking with -E/-rdynamic
-- eliminated spurious protected-data warnings linking against libc.so
-- avoided spurious fpu asm errors with some armhf toolchains
-
-bugs fixed:
-- fclose of stdin/stdout caused deadlock at exit
-- missing memory barrier in pthread_join
-- open_[w]memstream produced no buffer when no writes took place
-- uninitialized scopeid in address lookups from hosts file and ip literals
-- ip literals for mismatching family (v4 vs v6) were queried as hostnames
-- possible crash on OOM in regcomp
-- incorrect contents in localeconv structure (-1 instead of CHAR_MAX)
-- strftime mishandling of out-of-range struct tm members
-- wrongful attribute((const)) on pthread_self and errno location function
-
-arch-specific bugs fixed:
-- arm crt1 entry point failed to align stack pointer in some cases
-- mips fesetround failed to actually set rounding mode
-- i386 asm source CFI generation had multiple bugs
-
-
-
-1.1.13 release notes
-
-new features:
-- out-of-tree builds
-- search domains in resolv.conf
-- sh arch supports j-core (j2) cas.l atomics
-- dynamic linker includes arch/abi in output when run as a command
-- header support for new kernel features through linux 4.4
-- mips vdso clock_gettime support
-- regex BRE extensions: \|, \+, \?
-
-performance:
-- improved atomics performance on all archs with ll/sc model
-- atomic instructions are now inlined on armv6
-- use fpu sqrt for arm softfp abi on targets with vfp
-
-compatibility:
-- getnameinfo now accepts sockaddr sizes larger than needed
-- new default CFLAGS/LDFLAGS avoid entire classes of toolchain bugs
-- explicit use of float_t/double_t avoids compiler float spill bugs
-- i386 max_align_t definition now works with g++ 4.7's pseudo-c++11
-- all known protocols are added to protoent functions
-- stub utmpname, utmpxname functions
-- linker support for -Bsymbolic-functions is no longer mandatory
-- regex parsing size limits increased
-- malloc_usable_size now accepts null pointer input
-
-bugs fixed:
-- potential single-byte heap overflow in getdelim
-- mishandling of transient failure opening hosts, services, resolv.conf
-- mremap was sometimes able to allocate objects larger than PTRDIFF_MAX
-- nl_langinfo wrongly returned NULL instead of "" for invalid items
-- out-of-bounds dynamic tls allocation due to pointer/index scaling error
-- getifaddrs misreported point-to-point interface addresses
-- tdelete left tsearch trees misbalanced
-- tsearch crashed on allocation failure
-- tsearch, tfind, and tdelete failed to handle null pointer input
-- passing signal number 0 to sigaction resulted in a crash
-- getdelim updated caller's size wrongly when realloc failed
-- getdelim realloc strategy was wasteful
-- if_nametoindex returned wrong value on failure
-- missing ssp-suppression for some source files called from early-init
-- various minor resolv.conf parsing bugs
-- fwrite wrongly reported success on write errors in line-buffered flush
-- fwrite and fread wrongly returned nmemb (not 0) when size was 0
-
-nommu-specific bugs fix:
-- failure to zero bss in FDPIC shared library loader
-- unsafe writes to read-only file mapping in non-FDPIC library loader
-
-arch-specific bugs fixed:
-- sh[eb]-nofpu-fdpic was using fpu-dependent setjmp/longjmp variants
-- dynamic linker path file name was wrong for arm "softfp" targets
-- mips siginfo_t and related macros were defined incorrectly
-- possibly misaligned pointer globals on arm (from an asm source file)
-- mips dynamic linker failed to provide info needed by debugger
-- mips cancellation asm wrongly assumed validity of $gp register value
-
-
-
-1.1.14 release notes
-
-regressions fixed:
-- treatment of empty string argument as error by puts and fputs
-- make clean and distclean failure in unconfigured trees
-- sh/fdpic dynamic linker entry point hang due to wrong code
-- armhf (and arm softfp model) build failure with clang
-
-other bugs fixed:
-- wrongly clamping (rather than failing) excessive rounds in crypt-sha*
-
-
-
-1.1.15 release notes
-
-new features:
-- mips64 (full 64-bit and n32) port
-- mips r6 isa support (subarch for mips, mips64, and mipsn32 archs)
-- powerpc64 port
-- powerpc (32-bit) soft-float ABI support (subarch)
-- pthread_tryjoin_np and pthread_timedjoin_np (nonstandard extensions)
-- header-level support for linux 4.5 and 4.6 features
-- sched_getcpu (nonstandard extension) support, including vdso version
-- __STDC_ISO_10646__, __STDC_IEC_559__ macros predefined via stdc-predef.h
-- support for new elf/arch features in elf.h
-
-compatibility:
-- configure now correctly chooses cross-prefix based on build/host/target
-- abort now successfully terminates pid 1 in a container (or top-level)
-
-bugs fixed:
-- memmem read past end of haystack, possible false positives or crashes
-- buffer underflow (reverse-overflow) in ungetwc
-- double-free under certain usage of putenv
-- incorrect treatment by regcomp of * at start of BRE subexpression
-- gethostbyname[2][_r] produced ip addresses in misaligned buffers
-- looking up some invalid hostnames caused malformed dns queries
-- lookups from hosts file were inconsistent with non-matching family
-- missing h_length value in gethostbyaddr results
-- a64l function produced wrong-signed results on 64-bit archs
-- broken padding of string formats to width in wide printf variants
-- wrong results for expf(-NAN) and exp2f(-NAN)
-- wrong value for RUSAGE_CHILDREN prevented it from working
-- abort failed to provide abnormal termination with SIGABRT blocked
-
-arch-specific bugs fixed:
-- broken posix_fadvise on arm and powerpc (32-bit)
-- thread structure/dtv corruption on powerpc at thread startup
-- various wrong mips and powerpc ioctl and termios constant values
-
-
-
-1.1.16 release notes
-
-new features:
-- s390x (64-bit S/390) port
-- pthread_setname_np extension function
-- limited pthread_setattr_default_np function to set stack size defaults
-- header-level support for linux 4.7, 4.8, and 4.9 features
-- confstr _CS_V6_ENV and _CS_V7_ENV items
-
-compatibility:
-- public prototypes for abi-compat *_unlocked symbols, etc.
-- fflush_unlocked(NULL) now works
-- resolv.h __RES version macro now matches supported APIs
-- workaround for gdb bugs backtracing across signals on x86_64
-- anchors ^ and $ are now accepted in BRE subexpressions
-- building for thumb2-only arm isa levels is now possible
-
-bugs fixed:
-- integer overflows in regexec buffer allocation (CVE-2016-8859)
-- failure of regexec to report matches at offsets past INT_MAX
-- static-pie executables with initialized thread-local storage crashed
-- printf failed to catch EOVERFLOW in some cases, wrongly produced it in others
-- printf produced wrong output, result for float with precision near INT_MAX
-- printf produced wrong results with alt-form octal, zero flag, & field width
-- printf float rounding was wrong for some midpoint cases
-- swprintf printed junk after internal (256-byte) buffer filled up
-- strtod family rounded incorrectly in several corner cases
-- getmntent failed to handle long records
-- getopt_long_only wrongly treated "--" as an option
-- asctime output wrongly varied by locale
-- strftime %y specifier produced wrong output for negative tm_year
-- time zone names quoted with <> were misparsed
-- corner case integer overflow in tm_year for some date conversions
-- failure to load shared libs whose names were prefixes of standard lib names
-- wrong error codes for several failure cases in various functions
-- various asymptomatic undefined behavior
-- various minor namespace issues in headers
-
-arch-specific bugs fixed:
-- tcsetattr regression on mips (completely non-working)
-- wrong pread/pwrite syscall calling convention on sh
-- wrong preadv2/pwritev2 syscall numbers on x32
-- mrand48/jrand48 produced wrong-signedness results on 64-bit archs
-
-
-1.1.17 release notes
-
-new features:
-- RTLD_LAZY deferred symbol binding, functionally equivalent to lazy binding
-- safeguard against dlopen of multiple libc versions/instances
-- new posix_spawn flag POSIX_SPAWN_SETSID
-- posix_spawnattr_setflags now reports unknown flags as error
-- ldso option --argv0 to set argv[0]
-- added _NL_LOCALE_NAME extension to nl_langinfo
-
-compatibility:
-- dlopen local-to-global promotion no longer changes existing symbols
-- gettext now searches locale name variants for translation files
-- increased locale name length limit from 15 to 23 bytes
-- setlocale(LC_ALL, 0) returns single name if all categories are same
-- realloc no longer fails when mremap doesn't work
-- getservby* no longer treat numeric port strings as service records
-- mmap now works around incorrect EPERM error codes from kernel
-- impact of REG_* namespace pollution in x86[_64] signal.h is reduced
-- arm atomic asm now assembles correctly with new binutils
-- PAGE_SIZE on arm is no longer constant (quiet upstream ABI relaxation)
-- lsearch/lfind now pass args to compare callback in canonical order
-- STB_WEAK and STB_GNU_UNIQUE symbols now behave same as STB_GLOBAL
-- better clang CFLAGS checks in configure
-- global vis.h hack, which made lld refuse to link to libc.so, is disabled
-
-performance:
-- single-instruction optimized math functions for aarch64, s390x, powerpc64
-- fast path for ASCII in towupper/towlower
-- new mostly-integer-math fma function
-
-semantic bugs fixed:
-- POSIX-format TZ dst time transitions were wrong for southern hemisphere
-- regex REG_NEWLINE semantics were wrong with negated brackets
-- various bugs in strptime %j, %p, %C formats
-- iconv mapped some characters to legacy 8bit encodings incorrectly
-- glob failed to match "/"
-- UTF-8 decoder accepted invalid f4 9x xx xx code sequences
-- scanf %% conversion failed to consume whitespace
-- glob with GLOB_PERIOD wrongly descended into . and ..
-- nftw gave incorrect base name offset when pathname ends in "/"
-- functional regression in resolv.conf attempts option
-- scalbn could produce wrong result due to double rounding in subnormal range
-- strftime %y format wrong with negative years
-- mbsnrtowcs and wcsnrtombs mishandled input limits
-- minor issues with error codes for various functions
-
-safety/consistency bugs fixed:
-- stack-based buffer overflow in dns response processing
-- invalid free in regexec on certain error paths
-- invalid free in globfree after failed glob
-- one-byte buffer overflow in legacy getpass function
-- failed dlopen corrupted thread-local storage module list
-- race in pthread_create with priority attributes could leave signals masked
-- multithreaded set*id() functions could induce spurious EINTRs
-- dl_iterate_phdr reported wrong base address in static PIE
-- fd leak and wrong cancellation state after dns socket failure
-- memory leaks and other issues in environment-modification functions
-- read-after-free race in pthread_detach
-- memmem performed single-byte over-read in short-needle code paths
-- read via uninitialized pointer in gettext core
-- bindtextdomain broke bindings for all other domains
-- various silent undefined behavior
-- getopt clobbered optopt on success
-
-arch-specific bugs fixed:
-- x32 dynamic TLS accesses crashed
-- s390x was missing dlsym entry point (needed for RTLD_NEXT)
-- powerpc64 ldso startup could crash depending on link order
-- powerpc64 setjmp/longjmp didn't properly save/restore TOC pointer
-- thumb2 setjmp/longjmp silently broke at ld-time with text not aligned
-- fchown was broken on archs without SYS_fchown syscall
-- fstatat was broken on mips64
-- various incorrect constants in powerpc64 and mips headers
-
-
-1.1.18 release notes
-
-regression fixes:
-- glob failed to match literal . and .. path components
-- build for armv4t ISA level was broken
-
-other bug fixes:
-- stack overflow in posix_spawnp with large PATH variable in environment
-
-
-1.1.19 release notes
-
-new features:
-- iconv framework for processing stateful encodings
-- iconv support for iso-2022-jp
-- iconv support for converting to legacy JIS-based Japanese encodings
-- iconv support for UTF-16/32 with BOM-determined endianness
-- iconv ibm1047 (ebcdic latin1-equivalent) support
-- iconv cp866 (dos cyrillic) support
-- character data tables & case mappings updated to Unicode 10.0
-- fopencookie stdio extension
-- strftime padding character extensions
-- header-level support for new linux features through 4.13
-
-compatibility:
-- UTC timezone is now called UTC instead of GMT
-- _DIRENT_HAVE_D_* macros in dirent.h
-- dladdr dli_fbase definition now matches other implementations
-- pthread_getattr_np now reports guard size
-- strftime '+' modifier better matches apparent intent of POSIX
-- getopt_long handles long option names containing '='
-- better compatibility with linux uapi headers
-- workaround linux bug where getcwd can return non-absolute pathname
-- configure logic for finding compiler_rt with clang
-- execvp path search now continues after ENOTDIR components
-
-bugs fixed:
-- fgetwc failed when character crossed buffer boundary
-- memory corruption after failing to dlopen a second libc
-- sysconf reported infinite rlimits incorrectly
-- getopt_long --opt=arg did not work with partial matches
-- printf was wrong for alt-form octal with value 0, no explicit precision
-- endian errors in arpa/nameser.h and netinet/icmp6.h (missing endian.h)
-- atfork handler could clobber fork's errno
-- iconv could wrongly output surrogate pairs in ucs2
-- fmemopen buffer underallocation with extreme size argument
-- getaddrinfo AI_NUMERICSERV wrong error code
-- data race in at_quick_exit
-- ldd failed to honor rpath $ORIGIN for program in . without "./" prefix
-
-arch-specfic bugs fixed:
-- x32 unistd.h wrongly reported LP64 instead of ILP32
-- aarch64 signal.h had wrong type for ucontext_t uc_link member
-
-
-1.1.20 release notes
-
-new features:
-- m68k port
-- replacement of malloc is now allowed/supported
-- setvbuf now accepts caller-provided buffers for stdio streams
-- getrandom syscall wrapper, getentropy function
-- mlock2 syscall wrapper
-- memfd_create syscall wrapper
-- explicit_bzero function
-- header-level support for new linux features through 4.17
-- wcsftime now supports padding specifier extensions
-- dynamic linker's reclaim_gaps now works on fdpic archs
-- getaddrinfo now honors AI_ADDRCONFIG
-- pthread_attr_init now honors pthread_setattr_default_np defaults
-
-hardening:
-- prevent bypass of guarantee that suids start with fd 0/1/2 open
-- dlopen now rejects libraries with initial-exec refs to dynamic TLS
-
-compatibility:
-- elf.h: new flags, aux vector entry types, etc.
-- minor namespace issues in several headers
-- intNN_t types used in bitfields now safe against -funsigned-bitfields
-- complex arc trig/hyperbolic functions were badly broken
-- nice function returned wrong value
-- stdio locks no longer depend on read-after-free not faulting
-- avoid excessive stack usage in getcwd
-- inet_ntop no longer compresses single zeros in IPv6 (RFC 5952)
-- resolver routability probe for sorting results works on no-IPv6 systems
-- added missing ST_RELATIME definition to statvfs.h
-- uchar.h now works with old C++ profiles
-- added missing and arch-specific commands to ptrace.h
-- musl-gcc wrapper now works with default-pie host toolchains
-
-bugs fixed:
-- getopt wrongly treating colons in optstring as valid option chars
-- nl_langinfo_l(CODESET, loc) reported wrong locale's value
-- out-of-tree build produced broken crt files with stack protector enabled
-- fmaf produced wrong result for some corner cases
-- out of bounds write for zero length buffer passed to gethostname
-- getopt_long_only wrongly prefix-matched long-options over short ones
-- pthread_kill wrongly returned ESRCH for exited by valid pthread_t's
-- iconv buffer overflow converting to legacy JIS-based encodings
-- iconv conversion to "UTF-32" (no explicit endianness) failed (regression)
-- iconv mishandled big5-hkscs characters that map to two unicode chars
-- dynamic linker didn't map/clear bss for libraries with single LOAD segment
-- resolver wrongly duplicated trailing dot from query into canonical name
-- some futex waits omitted timeout arg to syscall, thereby spun on EFAULT
-- dladdr mishandled addresses not matching symbols
-- alignment of dirent structures from readdir was broken (regression)
-- strftime %z output wrong sign for offsets <1 hour west of UTC
-- limits.h, pathconf erroneously defined SYMLINK_MAX
-- FP_ILOGB0 and FP_ILOGBNAN definitions were not valid for use in #if
-- getopt failed to update optarg and optind correctly on missing argument
-- EMULTIHOP error lacked strerror text
-- mktime malfunctioned with tm_isdst>0 but no-DST POSIX-format time zone
-- async thread self-cancellation produced a deadlock condition
-- pthread_barrierattr_setpshared failed to produce EINVAL for bad argument
-- fileno failed to produce EBADF for non-fd-associated FILEs
-- fmemopen's w+ mode failed to truncate buffer at open
-- open_[w]memstream did not bind stream orientation at open time
-- system wrongly returned 0x7f00 instead of -1 on error
-- wide printf functions ignored field width for %c formats
-- fprintf failed to set stream orientation for unbuffered stream or no output
-- psignal, psiginfo, and perror wrongly set stream orientation for stderr
-- psignal, psiginfo potentially clobbered errno on success
-
-arch-specfic bugs fixed:
-- on arm/aarch64/sh, local-exec TLS layout mismatched ABI with large align
-- on arm/microblaze/sh, struct ipc_perm mismatched (buggy) kernel ABI
-- SO_PEERSEC definition was wrong on mips
-- on mips, return from start function passed to clone crashed (runaway exec)
-- printf %a precision specifier malfunctioned except on ld80 archs
-- async thread cancellation crashed on powerpc64 and sh-fdpic
-
-
-1.1.21 release notes
-
-new features:
-- setting default thread stack size via PT_GNU_STACK program header
-- arm vfork implementation
-- arm tlsdesc/gnu2 tls dialect support
-- name_to_handle_at and name_to_handle_at syscall wrappers
-- header-level support for new linux features through 4.18
-
-optimizations:
-- glob rewrite with much better performance and stack usage properties
-- single-threaded and already-locked fast paths for getc/putc variants
-- single-instruction fma implementations for arm, s390x, powerpc, & x86_64
-- single-instruction fabs and sqrt implementations for powerpc
-- size and performance from making all internal-only functions/data hidden
-- made &errno and pthread_self results cachable again (attribute((const)))
-- significant speedup in strtod with short inputs
-- new tsearch AVL tree implementation, smaller and faster
-- special-cased nop calls to wmemmove
-- fixed erroneously suboptimal skip conditions in strstr and memmem
-
-hardening:
-- default thread stack guard size increased from 4k to 8k
-
-compatibility:
-- default thread stack size increased from 80k to 128k
-- building for arm as thumb2 with clang internal assembler now works
-- aio threads could overflow stack on kernels that break MINSIGSTKSZ ABI
-- aio threads no longer call malloc (problematic with malloc replacement)
-- pthread_sigmask/sigprocmask now ignore an invalid how when not changing mask
-
-bugs fixed:
-- soft deadlock regression in stdio FILE locks with >2 threads contending
-- deadlock and buffered data loss race in fclose
-- race condition leading to possible crash in dcngettext plural forms
-- glob failed to see past searchable-but-unreadable path components
-- getdelim wrongly realloc'd buffer that was already exactly right size
-- getdelim failed to set stream orientation on early error
-- ttyname[_r] reported wrong error when given bad fd
-- pthread_key_delete left old tsd values exposed if slot was reused
-- freeaddrinfo failed to support freeing sublists
-- access to optopt was broken by copy relocations
-- memccpy returned wrong result if first byte past buffer end matched
-- wordexp read past end of input string ending in backslash
-- sem_wait and sem_timedwait were wrongly not interruptible by signals
-- getspnam[_r] wrongly treated not-found as an error
-
-arch-specfic bugs fixed:
-- soft deadlocks (missing futex wake) on powerpc locking
-- dlsym returned wrong address for thread-local symbols on ppc/mips/m68k
-
-
-1.1.22 release notes
-
-new features:
-- priority-inheritance mutexes
-- membarrier syscall, pre-registration to use it, fallback emulation
-- header-level support for new linux features in 4.19, 4.20, 5.0
-
-major internal changes:
-- complete, async-safe view of all existent threads as global list
-- robust __synccall based on new thread list
-- new dynamic TLS is installed synchronously at dlopen
-- TLSDESC resolver functions no longer make bad ABI assumptions to call C
-- resolved shared library dependencies are now recorded
-
-compatibility & conformance:
-- dependency-order shared library constructor execution
-- sigaltstack no longer rejects SS_AUTODISARM, future flags
-- FILE is now a complete (dummy) type in pre-C11 feature profiles
-- setvbuf reports failure on invalid arguments
-- TSVTX is exposed unconditionally in tar.h
-- multithreaded set*id() no longer depends on /proc
-- key slot reuse after pthread_key_delete no longer depends on /proc
-
-bugs fixed:
-- failures in multithreaded set*id() with concurrent thread creation/exit
-- interposed free was called from invalid/inconsistent contexts
-- freeaddrinfo performed invalid free of some partial results lists
-- dlsym dependency order search had false negatives and false positives
-- dn_skipname gave wrong results for labels with 8-bit content
-- dcngettext clobbered errno, often breaking printing of error messages
-- sscanf read past end of buffer under certain conditions (1.1.21 regression)
-- pthread_key_create spuriously failed under race condition (1.1.21 regression)
-- fdopendir wrongly succeeded with O_PATH file descriptors
-- gets behaved incorrectly in presence of null bytes
-- namespace violations in c11 tsd and mutex function dependencies
-- incorrect prototype for makecontext (unimplemented)
-
-arch-specfic bugs fixed:
-- s390x had wrong values for POSIX_FADV_DONTNEED/_NOREUSE
-
-
-
-1.1.23 release notes
-
-new features:
-- riscv64 port
-- configure now allows customizing AR and RANLIB vars
-- header-level support for new linux features in 5.1
-
-major internal changes:
-- removed extern __syscall; syscall header code is now fully self-contained
-
-performance:
-- new math library implementation for log/exp/pow
-- aarch64 dynamic tlsdesc function is streamlined
-
-compatibility & conformance:
-- O_TTY_INIT is now defined
-- sys/types.h no longer pollutes namespace with sys/sysmacros.h in any profile
-- powerpc asm is now compatible with clang internal assembler
-
-changes for new POSIX interpretations:
-- fgetwc now sets stream error indicator on encoding errors
-- fmemopen no longer rejects 0 size
-
-bugs fixed:
-- static TLS for shared libraries was allocated wrong on "Variant I" archs
-- crash in dladdr reading through uninitialized pointer on non-match
-- sigaltstack wrongly errored out on invalid ss_size when doing SS_DISABLE
-- getdents function misbehaved with buffer length larger than INT_MAX
-- set*id could deadlock after fork from multithreaded process
-
-arch-specfic bugs fixed:
-- s390x SO_PEERSEC definition was wrong
-- passing of 64-bit syscall arguments was broken on microblaze
-- posix_fadvise was broken on mips due to missing 7-arg syscall support
-- vrregset_t layout and member naming was wrong on powerpc64
-
-
-
-1.1.24 release notes
-
-new features:
-- GLOB_TILDE extension to glob
-- non-stub catgets localization API, using netbsd binary catalog format
-- posix_spawn file actions for [f]chdir (extension, pending future standard)
-- secure_getenv function (extension)
-- copy_file_range syscall wrapper (Linux extension)
-- header-level support for new linux features in 5.2
-
-performance:
-- new fast path for lrint (generic C version) on 32-bit archs
-
-major internal changes:
-- functions involving time are overhauled to be time64-ready in 32-bit archs
-- x32 uses the new time64 code paths to replace nasty hacks in syscall glue
-
-compatibility & conformance:
-- support for powerpc[64] unaligned relocation types
-- powerpc[64] and sh sys/user.h no longer clash with kernel asm/ptrace.h
-- select no longer modifies timeout on failure (or at all)
-- mips64 stat results are no longer limited to 32-bit time range
-- optreset (BSD extension) now has a public declaration
-- support for clang inconsistencies in wchar_t type vs some 32-bit archs
-- mips r6 syscall asm no longer has invalid lo/hi register clobbers
-- vestigial asm declarations of __tls_get_new are removed (broke some tooling)
-- riscv64 mcontext_t mismatch glibc's member naming is corrected
-
-bugs fixed:
-- glob failed to match broken symlinks consistently
-- invalid use of interposed calloc to allocate initial TLS
-- various dlsym symbol resolution logic errors
-- semctl with SEM_STAT_ANY didn't work
-- pthread_create with explicit scheduling was subject to priority inversion
-- pthread_create failure path had data race for thread count
-- timer_create with SIGEV_THREAD notification had data race getting timer id
-- wide printf family failed to support l modifier for float formats
-
-arch-specific bugs fixed:
-- x87 floating point stack imbalance in math asm (i386-only CVE-2019-14697)
-- x32 clock_adjtime, getrusage, wait3, wait4 produced junk (struct mismatches)
-- lseek broken on x32 and mipsn32 with large file offsets
-- riscv64 atomics weren't compiler barriers
-- riscv64 atomics had broken asm constraints (missing earlyclobber flag)
-- arm clone() was broken when compiled as thumb if start function returned
-- mipsr6 setjmp/longjmp did not preserve fpu register state correctly
-
-
-
-1.2.0 release notes
-
-new features:
-- time_t is now 64-bit on all archs (not just 64-bit archs)
-- character type & case mapping data updated to Unicode 12.1.0
-- header-level support for new linux features in 5.3 and 5.4
-
-performance:
-- new O(1) wchar_t case mapping implementation
-- i386 now uses C math code for exp, faster than old asm
-- mips math asm
-
-compatibility & conformance:
-- endian.h now aims to conform to future POSIX definition
-- support older compilers that don't accept powerpc math asm constraints
-- fdpic code in ldso was incompatible with valid optimizations in gcc 9+
-- RLIMIT_RTTIME was missing from sys/resource.h
-
-bugs fixed:
-- wcwidth wrongly returned 0 for most of planes 4 and up
-- missing case mapping between U+03F3 and U+037F
-- wrong cacosh results for arguments with negative imaginary part
-- wrong catanf/catanl results for various classes of arguments
-- wrong return value for ungetc with argument outside [0,UCHAR_MAX]
-- posix_openpt with no ptys available produced wrong errno
-
-arch-specific bugs fixed:
-- sigcontext/regset definition mistakes & omissions on m68k, powerpc64
-- fesetenv(FE_DFL_ENV) crashed on riscv64
-- sh2 dynamic linker was broken since 1.1.21 (crash in stage 2b)
-- arm dynamic linker chose wrong tls/atomic variants since 1.1.21
-- some math library functions returned excess precision on i386
-- unconfirmed regression in fchmodat AT_SYMLINK_NOFOLLOW on mips*
-
-
-
-1.2.1 release notes
-
-major changes:
-- new malloc implementation (mallocng & overhauled bump allocator)
-
-new features:
-- DNS queries via res_* now set AD flag, report zone signedness (DNSSEC)
-- PTHREAD_NULL macro (POSIX-future)
-
-performance:
-- optimized memcpy and memset for aarch64
-- optimized memcpy for arm now supports big endian
-- optimized x86_64 remquol
-- improved strerror without linear search
-
-bugs fixed:
-- lock-skipping for processes that returned to single-threaded was wrong
-- AF_UNSPEC dns lookups mishandled single failure in paired A+AAAA
-- res_send and res_query returned wrong value on errors from nameserver
-- corrupted sysvipc timestamps on 32-bit archs with old kernels
-- incorrect parsing of timezone offsets after overly-long zone name
-- clock_adjtime was broken on 32-bit archs (time64)
-- pthread_kill as not async-signal-safe
-- pthread_cancel was not async-cancel-safe
-- large-ulp errors in various math functions in non-default rounding modes
-
-arch-specific bugs fixed:
-- arm clock_gettime was broken on some hw due to bad time64 vdso
-- m68k sqrtl lacked long double precision
-- mips* syscall mechanism regressions on older kernels
-- mips* had negated error codes for some syscalls (kernel bug)
-- mips* SIGEMT was wrongly called SIGSTKFLT
-- sh fesetround didn't work correctly on sh
-
-
-
-1.2.2 release notes
-
-major changes:
-- child restrictions lifted after fork of multithreaded parent
-
-new features:
-- _Fork function (POSIX-future)
-- reallocarray function (extension from OpenBSD, now widespread)
-- gettid function (kernel tid as supported concept)
-- SIGEV_THREAD_ID sigevent API (Linux extension)
-- tcgetwinsize and tcsetwinsize functions (POSIX-future)
-
-performance:
-- faster software sqrt on archs without native sqrt instruction
-
-compatibility:
-- realpath no longer depends on procfs availability & accuracy
-- time zone parser now always prefers 64-bit tables if present
-- crypt_blowfish now supports $2b$ prefix
-- res_query now reports errors via h_errno
-- set*id and setrlimit are now safe in vforked/cloned child
-- setgroups now applies to all threads
-- dlopen debugger notification is improved, should work with lldb
-- setrlimit no longer needs __synccall broadcast on linux 2.6.36+
-- faccessat with AT_EACCESS no longer needs child process on linux 5.8+
-
-bugs fixed:
-- buffer overflow and infinite loop errors in wcsnrtombs (CVE-2020-28928)
-- sem_close unmapped still-referenced semaphores
-- fork of process with active aio could deadlock or crash paren
-- pthread_cond_wait was broken with priority-inheritance mutex
-- getgrouplist wrongly failed when nscd reported an empty list
-- abort could leak modified SIGABRT disposition to fork or posix_spawn child
-- regression with mallocng: malloc_usable_size(0) crashed
-- readlink wrongly gave EINVAL on zero length dest buffer
-- sqrtl was severely inaccurate (not correctly rounded) on ldquad archs
-- assert failure wrongly flushed stdio (possible deadlock)
-- MUSL_LOCPATH search was broken with multiple components
-- missing newline in herror output
-- possible deadlock in pthread_exit with pshared mutex or barrier usage
-- pthread_mutexattr_getprotocol didn't read back protocol
-- v4l2 ioctl translation for pre-time64 kernels didn't work
-
-arch-specific bugs fixed:
-- x86_64 longjmp failed to handle 0 argument reliably
-- i386 __set_thread_area fallback for pre-2.6 kernels didn't work
-- missing O_LARGEFILE macro value on x86_64, x32, mips64
-- unpredictable s390x breakage from failure to preserve call-saved registers
lib/libc/wasi/libc-top-half/README.md
@@ -1,25 +0,0 @@
-# WASI libc "top half".
-
-The WASI libc "top half" is conceptually the upper half of a traditional libc
-implementation, consisting of C standard library and other relatively
-higher-level functionality.
-
-Code in the musl directory is based on musl revision
-040c1d16b468c50c04fc94edff521f1637708328, which is v1.2.0, from
-git://git.musl-libc.org/musl.
-
-Whole files which are unused are omitted. Changes to upstream code are wrapped
-in preprocessor directives controlled by the macro `__wasilibc_unmodified_upstream`.
-
-Some major known missing areas include:
- - threads
- - aio
- - setjmp
- - signals
- - ipc
- - termios
- - nss
- - timezones
- - non-builtin locales
- - TIOCGWINSZ (because cloudabi lacks it; affects isatty, line buffering for stdout)
- - O\_CLOEXEC, O\_NOCTTY (because cloudabi lacks them)