├── .gitattributes ├── .github └── workflows │ ├── build_cxx_sysroot.yml │ ├── main.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── CODE_OF_CONDUCT.md ├── LICENSE ├── LICENSE-APACHE ├── LICENSE-APACHE-LLVM ├── LICENSE-MIT ├── Makefile ├── Makefile-eh ├── README.md ├── build.sh ├── build32-eh.sh ├── build32.sh ├── build64.sh ├── dlmalloc ├── include │ └── unistd.h └── src │ ├── dlmalloc.c │ └── malloc.c ├── emmalloc └── emmalloc.c ├── examples ├── Makefile ├── epoll.c ├── execve.c ├── file-copy.c ├── fork-longjmp.c ├── fork.c ├── getrandom.c ├── longjmp.c ├── pipe.c ├── readdir_tree.c ├── signal.c ├── spawn.c └── vfork.c ├── expected ├── wasm32-wasi-eh │ ├── defined-symbols.txt │ ├── include-all.c │ ├── predefined-macros.txt │ └── undefined-symbols.txt ├── wasm32-wasi-threads │ ├── defined-symbols.txt │ ├── include-all.c │ ├── predefined-macros.txt │ └── undefined-symbols.txt ├── wasm32-wasi │ ├── defined-symbols.txt │ ├── include-all.c │ ├── predefined-macros.txt │ └── undefined-symbols.txt └── wasm64-wasi │ ├── defined-symbols.txt │ ├── include-all.c │ ├── predefined-macros.txt │ └── undefined-symbols.txt ├── libc-bottom-half ├── README.md ├── clocks │ ├── clock.c │ ├── getrusage.c │ └── times.c ├── cloudlibc │ ├── LICENSE │ └── src │ │ ├── common │ │ ├── clock.h │ │ ├── limits.h │ │ ├── net.h │ │ └── time.h │ │ ├── include │ │ └── _ │ │ │ └── cdefs.h │ │ └── libc │ │ ├── dirent │ │ ├── closedir.c │ │ ├── dirent_impl.h │ │ ├── dirfd.c │ │ ├── fdclosedir.c │ │ ├── fdopendir.c │ │ ├── opendirat.c │ │ ├── readdir.c │ │ ├── rewinddir.c │ │ ├── scandirat.c │ │ ├── seekdir.c │ │ └── telldir.c │ │ ├── errno │ │ └── errno.c │ │ ├── fcntl │ │ ├── fcntl.c │ │ ├── openat.c │ │ ├── posix_fadvise.c │ │ └── posix_fallocate.c │ │ ├── poll │ │ └── poll.c │ │ ├── sched │ │ └── sched_yield.c │ │ ├── stdio │ │ └── renameat.c │ │ ├── stdlib │ │ └── _Exit.c │ │ ├── sys │ │ ├── ioctl │ │ │ └── ioctl.c │ │ ├── select │ │ │ ├── pselect.c │ │ │ └── select.c │ │ ├── socket │ │ │ ├── accept.c │ │ │ ├── bind.c │ │ │ ├── connect.c │ │ │ ├── freeifaddrs.c │ │ │ ├── getifaddrs.c │ │ │ ├── getpeername.c │ │ │ ├── getsockname.c │ │ │ ├── getsockopt.c │ │ │ ├── listen.c │ │ │ ├── recv.c │ │ │ ├── recvfrom.c │ │ │ ├── recvmsg.c │ │ │ ├── send.c │ │ │ ├── sendfile.c │ │ │ ├── sendmsg.c │ │ │ ├── sendto.c │ │ │ ├── setsockopt.c │ │ │ ├── shutdown.c │ │ │ ├── socket.c │ │ │ ├── socket_impl.h │ │ │ └── socketpair.c │ │ ├── stat │ │ │ ├── fstat.c │ │ │ ├── fstatat.c │ │ │ ├── futimens.c │ │ │ ├── mkdirat.c │ │ │ ├── stat_impl.h │ │ │ └── utimensat.c │ │ ├── time │ │ │ └── gettimeofday.c │ │ └── uio │ │ │ ├── preadv.c │ │ │ ├── pwritev.c │ │ │ ├── readv.c │ │ │ └── writev.c │ │ ├── time │ │ ├── CLOCK_MONOTONIC.c │ │ ├── CLOCK_REALTIME.c │ │ ├── clock_getres.c │ │ ├── clock_gettime.c │ │ ├── clock_nanosleep.c │ │ ├── clock_settime.c │ │ ├── nanosleep.c │ │ └── time.c │ │ └── unistd │ │ ├── close.c │ │ ├── dup.c │ │ ├── dup2.c │ │ ├── dup3.c │ │ ├── faccessat.c │ │ ├── fdatasync.c │ │ ├── fsync.c │ │ ├── ftruncate.c │ │ ├── getegid.c │ │ ├── geteuid.c │ │ ├── getgid.c │ │ ├── getuid.c │ │ ├── linkat.c │ │ ├── lseek.c │ │ ├── pipe.c │ │ ├── pipe2.c │ │ ├── pread.c │ │ ├── pwrite.c │ │ ├── read.c │ │ ├── readlinkat.c │ │ ├── setegid.c │ │ ├── seteuid.c │ │ ├── setgid.c │ │ ├── setuid.c │ │ ├── sleep.c │ │ ├── symlinkat.c │ │ ├── unlinkat.c │ │ ├── usleep.c │ │ └── write.c ├── crt │ ├── crt1-command.c │ ├── crt1-reactor.c │ └── crt1.c ├── headers │ ├── private │ │ ├── _ │ │ │ ├── limits.h │ │ │ ├── struct │ │ │ │ ├── timespec.h │ │ │ │ └── timeval.h │ │ │ └── types.h │ │ ├── assert.h │ │ ├── common │ │ │ └── crt.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ ├── sched.h │ │ ├── stdarg.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ ├── sys │ │ │ └── mman.h │ │ └── threads.h │ └── public │ │ ├── __errno.h │ │ ├── __errno_values.h │ │ ├── __fd_set.h │ │ ├── __function___isatty.h │ │ ├── __functions_malloc.h │ │ ├── __functions_memcpy.h │ │ ├── __header_dirent.h │ │ ├── __header_fcntl.h │ │ ├── __header_inttypes.h │ │ ├── __header_netinet_in.h │ │ ├── __header_poll.h │ │ ├── __header_stdlib.h │ │ ├── __header_string.h │ │ ├── __header_sys_ioctl.h │ │ ├── __header_sys_resource.h │ │ ├── __header_sys_socket.h │ │ ├── __header_sys_stat.h │ │ ├── __header_time.h │ │ ├── __header_unistd.h │ │ ├── __macro_FD_SETSIZE.h │ │ ├── __macro_PAGESIZE.h │ │ ├── __mode_t.h │ │ ├── __seek.h │ │ ├── __struct_dirent.h │ │ ├── __struct_group_filter.h │ │ ├── __struct_group_req.h │ │ ├── __struct_group_source_req.h │ │ ├── __struct_if_addrs.h │ │ ├── __struct_in6_addr.h │ │ ├── __struct_in6_mtuinfo.h │ │ ├── __struct_in6_pktinfo.h │ │ ├── __struct_in_addr.h │ │ ├── __struct_in_pktinfo.h │ │ ├── __struct_iovec.h │ │ ├── __struct_ip_mreq.h │ │ ├── __struct_ip_mreq_source.h │ │ ├── __struct_ip_mreqn.h │ │ ├── __struct_ip_msfilter.h │ │ ├── __struct_ip_opts.h │ │ ├── __struct_ipv6_mreq.h │ │ ├── __struct_msghdr.h │ │ ├── __struct_pollfd.h │ │ ├── __struct_rusage.h │ │ ├── __struct_sockaddr.h │ │ ├── __struct_sockaddr_in.h │ │ ├── __struct_sockaddr_in6.h │ │ ├── __struct_sockaddr_storage.h │ │ ├── __struct_sockaddr_un.h │ │ ├── __struct_stat.h │ │ ├── __struct_timespec.h │ │ ├── __struct_timeval.h │ │ ├── __struct_tm.h │ │ ├── __struct_tms.h │ │ ├── __typedef_DIR.h │ │ ├── __typedef_blkcnt_t.h │ │ ├── __typedef_blksize_t.h │ │ ├── __typedef_clock_t.h │ │ ├── __typedef_clockid_t.h │ │ ├── __typedef_dev_t.h │ │ ├── __typedef_fd_set.h │ │ ├── __typedef_gid_t.h │ │ ├── __typedef_in_addr_t.h │ │ ├── __typedef_in_port_t.h │ │ ├── __typedef_ino_t.h │ │ ├── __typedef_mode_t.h │ │ ├── __typedef_nfds_t.h │ │ ├── __typedef_nlink_t.h │ │ ├── __typedef_off_t.h │ │ ├── __typedef_sa_family_t.h │ │ ├── __typedef_sigset_t.h │ │ ├── __typedef_socklen_t.h │ │ ├── __typedef_ssize_t.h │ │ ├── __typedef_suseconds_t.h │ │ ├── __typedef_time_t.h │ │ ├── __typedef_uid_t.h │ │ ├── dirent.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ ├── inttypes.h │ │ ├── netinet │ │ └── in.h │ │ ├── poll.h │ │ ├── stdlib.h │ │ ├── string.h │ │ ├── sys │ │ ├── ioctl.h │ │ ├── resource.h │ │ ├── select.h │ │ ├── socket.h │ │ ├── stat.h │ │ ├── time.h │ │ ├── times.h │ │ ├── types.h │ │ ├── uio.h │ │ └── un.h │ │ ├── time.h │ │ ├── unistd.h │ │ ├── wasi │ │ ├── api.h │ │ ├── api_poly.h │ │ ├── api_wasi.h │ │ ├── api_wasix.h │ │ ├── libc-environ.h │ │ ├── libc-find-relpath.h │ │ ├── libc-nocwd.h │ │ └── libc.h │ │ └── wchar.h ├── mman │ └── mman.c ├── signal │ └── signal.c └── sources │ ├── __errno_location.c │ ├── __main_void.c │ ├── __wasilibc_dt.c │ ├── __wasilibc_environ.c │ ├── __wasilibc_fd_renumber.c │ ├── __wasilibc_futex.c │ ├── __wasilibc_initialize_environ.c │ ├── __wasilibc_poly_real.c │ ├── __wasilibc_real.c │ ├── __wasilibc_rmdirat.c │ ├── __wasilibc_stack.c │ ├── __wasilibc_tell.c │ ├── __wasilibc_unlinkat.c │ ├── __wasixlibc_real.c │ ├── abort.c │ ├── at_fdcwd.c │ ├── chdir.c │ ├── complex-builtins.c │ ├── environ.c │ ├── errno.c │ ├── getcwd.c │ ├── getentropy.c │ ├── getpid.c │ ├── getppid.c │ ├── getrandom.c │ ├── isatty.c │ ├── math │ ├── fmin-fmax.c │ └── math-builtins.c │ ├── posix.c │ ├── preopens.c │ ├── reallocarray.c │ ├── sbrk.c │ └── truncate.c ├── libc-top-half ├── README.md ├── headers │ └── private │ │ ├── printscan.h │ │ └── wasi │ │ └── libc-environ-compat.h ├── musl │ ├── .mailmap │ ├── COPYRIGHT │ ├── INSTALL │ ├── Makefile │ ├── README │ ├── VERSION │ ├── WHATSNEW │ ├── arch │ │ ├── aarch64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── fp_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── arm │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl_fix.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── generic │ │ │ ├── bits │ │ │ │ ├── dirent.h │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── io.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ioctl_fix.h │ │ │ │ ├── ipc.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── kd.h │ │ │ │ ├── limits.h │ │ │ │ ├── link.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── poll.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── resource.h │ │ │ │ ├── sem.h │ │ │ │ ├── shm.h │ │ │ │ ├── socket.h │ │ │ │ ├── soundcard.h │ │ │ │ ├── statfs.h │ │ │ │ ├── termios.h │ │ │ │ └── vt.h │ │ │ └── fp_arch.h │ │ ├── i386 │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── io.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── limits.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── m68k │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── microblaze │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── float.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── mips │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── poll.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── resource.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── statfs.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ ├── termios.h │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── mips64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipc.h │ │ │ │ ├── mman.h │ │ │ │ ├── poll.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── resource.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── statfs.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ ├── termios.h │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── mipsn32 │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── poll.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── resource.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── statfs.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ ├── termios.h │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── or1k │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── float.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── limits.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── powerpc │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipc.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ ├── termios.h │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── powerpc64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── errno.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipc.h │ │ │ │ ├── mman.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ ├── termios.h │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── riscv64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── s390x │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl_fix.h │ │ │ │ ├── limits.h │ │ │ │ ├── link.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── statfs.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── sh │ │ │ ├── arch.mak │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── hwcap.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── ipcstat.h │ │ │ │ ├── limits.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── wasm32 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── dirent.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── float.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── limits.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ └── stdint.h │ │ │ ├── fp_arch.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── wasm64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── dirent.h │ │ │ │ ├── fcntl.h │ │ │ │ ├── float.h │ │ │ │ ├── ioctl.h │ │ │ │ ├── limits.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ └── stdint.h │ │ │ ├── fp_arch.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ ├── x32 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ │ ├── alltypes.h.in │ │ │ │ ├── fcntl.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── io.h │ │ │ │ ├── ioctl_fix.h │ │ │ │ ├── ipc.h │ │ │ │ ├── limits.h │ │ │ │ ├── mman.h │ │ │ │ ├── msg.h │ │ │ │ ├── posix.h │ │ │ │ ├── ptrace.h │ │ │ │ ├── reg.h │ │ │ │ ├── sem.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── shm.h │ │ │ │ ├── signal.h │ │ │ │ ├── socket.h │ │ │ │ ├── stat.h │ │ │ │ ├── statfs.h │ │ │ │ ├── stdint.h │ │ │ │ ├── syscall.h.in │ │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ │ └── x86_64 │ │ │ ├── atomic_arch.h │ │ │ ├── bits │ │ │ ├── alltypes.h.in │ │ │ ├── fenv.h │ │ │ ├── float.h │ │ │ ├── io.h │ │ │ ├── limits.h │ │ │ ├── mman.h │ │ │ ├── posix.h │ │ │ ├── ptrace.h │ │ │ ├── reg.h │ │ │ ├── sem.h │ │ │ ├── setjmp.h │ │ │ ├── signal.h │ │ │ ├── stat.h │ │ │ ├── stdint.h │ │ │ ├── syscall.h.in │ │ │ └── user.h │ │ │ ├── crt_arch.h │ │ │ ├── ksigaction.h │ │ │ ├── kstat.h │ │ │ ├── pthread_arch.h │ │ │ ├── reloc.h │ │ │ └── syscall_arch.h │ ├── compat │ │ └── time32 │ │ │ ├── __xstat.c │ │ │ ├── adjtime32.c │ │ │ ├── adjtimex_time32.c │ │ │ ├── aio_suspend_time32.c │ │ │ ├── clock_adjtime32.c │ │ │ ├── clock_getres_time32.c │ │ │ ├── clock_gettime32.c │ │ │ ├── clock_nanosleep_time32.c │ │ │ ├── clock_settime32.c │ │ │ ├── cnd_timedwait_time32.c │ │ │ ├── ctime32.c │ │ │ ├── ctime32_r.c │ │ │ ├── difftime32.c │ │ │ ├── fstat_time32.c │ │ │ ├── fstatat_time32.c │ │ │ ├── ftime32.c │ │ │ ├── futimens_time32.c │ │ │ ├── futimes_time32.c │ │ │ ├── futimesat_time32.c │ │ │ ├── getitimer_time32.c │ │ │ ├── getrusage_time32.c │ │ │ ├── gettimeofday_time32.c │ │ │ ├── gmtime32.c │ │ │ ├── gmtime32_r.c │ │ │ ├── localtime32.c │ │ │ ├── localtime32_r.c │ │ │ ├── lstat_time32.c │ │ │ ├── lutimes_time32.c │ │ │ ├── mktime32.c │ │ │ ├── mq_timedreceive_time32.c │ │ │ ├── mq_timedsend_time32.c │ │ │ ├── mtx_timedlock_time32.c │ │ │ ├── nanosleep_time32.c │ │ │ ├── ppoll_time32.c │ │ │ ├── pselect_time32.c │ │ │ ├── pthread_cond_timedwait_time32.c │ │ │ ├── pthread_mutex_timedlock_time32.c │ │ │ ├── pthread_rwlock_timedrdlock_time32.c │ │ │ ├── pthread_rwlock_timedwrlock_time32.c │ │ │ ├── pthread_timedjoin_np_time32.c │ │ │ ├── recvmmsg_time32.c │ │ │ ├── sched_rr_get_interval_time32.c │ │ │ ├── select_time32.c │ │ │ ├── sem_timedwait_time32.c │ │ │ ├── semtimedop_time32.c │ │ │ ├── setitimer_time32.c │ │ │ ├── settimeofday_time32.c │ │ │ ├── sigtimedwait_time32.c │ │ │ ├── stat_time32.c │ │ │ ├── stime32.c │ │ │ ├── thrd_sleep_time32.c │ │ │ ├── time32.c │ │ │ ├── time32.h │ │ │ ├── time32gm.c │ │ │ ├── timer_gettime32.c │ │ │ ├── timer_settime32.c │ │ │ ├── timerfd_gettime32.c │ │ │ ├── timerfd_settime32.c │ │ │ ├── timespec_get_time32.c │ │ │ ├── utime_time32.c │ │ │ ├── utimensat_time32.c │ │ │ ├── utimes_time32.c │ │ │ ├── wait3_time32.c │ │ │ └── wait4_time32.c │ ├── configure │ ├── crt │ │ ├── Scrt1.c │ │ ├── aarch64 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── arm │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── crt1.c │ │ ├── crti.c │ │ ├── crtn.c │ │ ├── i386 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── microblaze │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── mips │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── mips64 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── mipsn32 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── or1k │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── powerpc │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── powerpc64 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── rcrt1.c │ │ ├── s390x │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── sh │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ ├── x32 │ │ │ ├── crti.s │ │ │ └── crtn.s │ │ └── x86_64 │ │ │ ├── crti.s │ │ │ └── crtn.s │ ├── dist │ │ └── config.mak │ ├── dynamic.list │ ├── include │ │ ├── aio.h │ │ ├── alloca.h │ │ ├── alltypes.h.in │ │ ├── ar.h │ │ ├── arpa │ │ │ ├── ftp.h │ │ │ ├── inet.h │ │ │ ├── nameser.h │ │ │ ├── nameser_compat.h │ │ │ ├── telnet.h │ │ │ └── tftp.h │ │ ├── assert.h │ │ ├── byteswap.h │ │ ├── complex.h │ │ ├── cpio.h │ │ ├── crypt.h │ │ ├── ctype.h │ │ ├── dirent.h │ │ ├── dlfcn.h │ │ ├── elf.h │ │ ├── endian.h │ │ ├── err.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ ├── features.h │ │ ├── fenv.h │ │ ├── float.h │ │ ├── fmtmsg.h │ │ ├── fnmatch.h │ │ ├── ftw.h │ │ ├── getopt.h │ │ ├── glob.h │ │ ├── grp.h │ │ ├── iconv.h │ │ ├── ifaddrs.h │ │ ├── inttypes.h │ │ ├── iso646.h │ │ ├── langinfo.h │ │ ├── lastlog.h │ │ ├── libgen.h │ │ ├── libintl.h │ │ ├── limits.h │ │ ├── link.h │ │ ├── locale.h │ │ ├── malloc.h │ │ ├── math.h │ │ ├── memory.h │ │ ├── mntent.h │ │ ├── monetary.h │ │ ├── mqueue.h │ │ ├── net │ │ │ ├── ethernet.h │ │ │ ├── if.h │ │ │ ├── if_arp.h │ │ │ └── route.h │ │ ├── netdb.h │ │ ├── netinet │ │ │ ├── ether.h │ │ │ ├── icmp6.h │ │ │ ├── if_ether.h │ │ │ ├── igmp.h │ │ │ ├── in.h │ │ │ ├── in_systm.h │ │ │ ├── ip.h │ │ │ ├── ip6.h │ │ │ ├── ip_icmp.h │ │ │ ├── tcp.h │ │ │ └── udp.h │ │ ├── netpacket │ │ │ └── packet.h │ │ ├── nl_types.h │ │ ├── paths.h │ │ ├── poll.h │ │ ├── pthread.h │ │ ├── pty.h │ │ ├── pwd.h │ │ ├── regex.h │ │ ├── resolv.h │ │ ├── sched.h │ │ ├── scsi │ │ │ ├── scsi.h │ │ │ ├── scsi_ioctl.h │ │ │ └── sg.h │ │ ├── search.h │ │ ├── semaphore.h │ │ ├── setjmp.h │ │ ├── shadow.h │ │ ├── signal.h │ │ ├── spawn.h │ │ ├── stdalign.h │ │ ├── stdarg.h │ │ ├── stdbool.h │ │ ├── stdc-predef.h │ │ ├── stddef.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdio_ext.h │ │ ├── stdlib.h │ │ ├── stdnoreturn.h │ │ ├── string.h │ │ ├── strings.h │ │ ├── stropts.h │ │ ├── sys │ │ │ ├── acct.h │ │ │ ├── auxv.h │ │ │ ├── cachectl.h │ │ │ ├── dir.h │ │ │ ├── epoll.h │ │ │ ├── errno.h │ │ │ ├── eventfd.h │ │ │ ├── fanotify.h │ │ │ ├── fcntl.h │ │ │ ├── file.h │ │ │ ├── fsuid.h │ │ │ ├── inotify.h │ │ │ ├── io.h │ │ │ ├── ioctl.h │ │ │ ├── ipc.h │ │ │ ├── kd.h │ │ │ ├── klog.h │ │ │ ├── membarrier.h │ │ │ ├── mman.h │ │ │ ├── mount.h │ │ │ ├── msg.h │ │ │ ├── mtio.h │ │ │ ├── param.h │ │ │ ├── personality.h │ │ │ ├── poll.h │ │ │ ├── prctl.h │ │ │ ├── procfs.h │ │ │ ├── ptrace.h │ │ │ ├── quota.h │ │ │ ├── random.h │ │ │ ├── reboot.h │ │ │ ├── reg.h │ │ │ ├── resource.h │ │ │ ├── select.h │ │ │ ├── sem.h │ │ │ ├── sendfile.h │ │ │ ├── shm.h │ │ │ ├── signal.h │ │ │ ├── signalfd.h │ │ │ ├── socket.h │ │ │ ├── soundcard.h │ │ │ ├── stat.h │ │ │ ├── statfs.h │ │ │ ├── statvfs.h │ │ │ ├── stropts.h │ │ │ ├── swap.h │ │ │ ├── syscall.h │ │ │ ├── sysinfo.h │ │ │ ├── syslog.h │ │ │ ├── sysmacros.h │ │ │ ├── termios.h │ │ │ ├── time.h │ │ │ ├── timeb.h │ │ │ ├── timerfd.h │ │ │ ├── times.h │ │ │ ├── timex.h │ │ │ ├── ttydefaults.h │ │ │ ├── types.h │ │ │ ├── ucontext.h │ │ │ ├── uio.h │ │ │ ├── un.h │ │ │ ├── user.h │ │ │ ├── utsname.h │ │ │ ├── vfs.h │ │ │ ├── vt.h │ │ │ ├── wait.h │ │ │ └── xattr.h │ │ ├── syscall.h │ │ ├── sysexits.h │ │ ├── syslog.h │ │ ├── tar.h │ │ ├── termios.h │ │ ├── tgmath.h │ │ ├── threads.h │ │ ├── time.h │ │ ├── uchar.h │ │ ├── ucontext.h │ │ ├── ulimit.h │ │ ├── unistd.h │ │ ├── utime.h │ │ ├── utmp.h │ │ ├── utmpx.h │ │ ├── values.h │ │ ├── wait.h │ │ ├── wchar.h │ │ ├── wctype.h │ │ └── wordexp.h │ ├── ldso │ │ ├── dlstart.c │ │ └── dynlink.c │ ├── src │ │ ├── aio │ │ │ ├── aio.c │ │ │ ├── aio_suspend.c │ │ │ └── lio_listio.c │ │ ├── complex │ │ │ ├── __cexp.c │ │ │ ├── __cexpf.c │ │ │ ├── cabs.c │ │ │ ├── cabsf.c │ │ │ ├── cabsl.c │ │ │ ├── cacos.c │ │ │ ├── cacosf.c │ │ │ ├── cacosh.c │ │ │ ├── cacoshf.c │ │ │ ├── cacoshl.c │ │ │ ├── cacosl.c │ │ │ ├── carg.c │ │ │ ├── cargf.c │ │ │ ├── cargl.c │ │ │ ├── casin.c │ │ │ ├── casinf.c │ │ │ ├── casinh.c │ │ │ ├── casinhf.c │ │ │ ├── casinhl.c │ │ │ ├── casinl.c │ │ │ ├── catan.c │ │ │ ├── catanf.c │ │ │ ├── catanh.c │ │ │ ├── catanhf.c │ │ │ ├── catanhl.c │ │ │ ├── catanl.c │ │ │ ├── ccos.c │ │ │ ├── ccosf.c │ │ │ ├── ccosh.c │ │ │ ├── ccoshf.c │ │ │ ├── ccoshl.c │ │ │ ├── ccosl.c │ │ │ ├── cexp.c │ │ │ ├── cexpf.c │ │ │ ├── cexpl.c │ │ │ ├── cimag.c │ │ │ ├── cimagf.c │ │ │ ├── cimagl.c │ │ │ ├── clog.c │ │ │ ├── clogf.c │ │ │ ├── clogl.c │ │ │ ├── conj.c │ │ │ ├── conjf.c │ │ │ ├── conjl.c │ │ │ ├── cpow.c │ │ │ ├── cpowf.c │ │ │ ├── cpowl.c │ │ │ ├── cproj.c │ │ │ ├── cprojf.c │ │ │ ├── cprojl.c │ │ │ ├── creal.c │ │ │ ├── crealf.c │ │ │ ├── creall.c │ │ │ ├── csin.c │ │ │ ├── csinf.c │ │ │ ├── csinh.c │ │ │ ├── csinhf.c │ │ │ ├── csinhl.c │ │ │ ├── csinl.c │ │ │ ├── csqrt.c │ │ │ ├── csqrtf.c │ │ │ ├── csqrtl.c │ │ │ ├── ctan.c │ │ │ ├── ctanf.c │ │ │ ├── ctanh.c │ │ │ ├── ctanhf.c │ │ │ ├── ctanhl.c │ │ │ └── ctanl.c │ │ ├── conf │ │ │ ├── confstr.c │ │ │ ├── fpathconf.c │ │ │ ├── legacy.c │ │ │ ├── pathconf.c │ │ │ └── sysconf.c │ │ ├── crypt │ │ │ ├── crypt.c │ │ │ ├── crypt_blowfish.c │ │ │ ├── crypt_des.c │ │ │ ├── crypt_des.h │ │ │ ├── crypt_md5.c │ │ │ ├── crypt_r.c │ │ │ ├── crypt_sha256.c │ │ │ ├── crypt_sha512.c │ │ │ └── encrypt.c │ │ ├── ctype │ │ │ ├── __ctype_b_loc.c │ │ │ ├── __ctype_get_mb_cur_max.c │ │ │ ├── __ctype_tolower_loc.c │ │ │ ├── __ctype_toupper_loc.c │ │ │ ├── alpha.h │ │ │ ├── casemap.h │ │ │ ├── isalnum.c │ │ │ ├── isalpha.c │ │ │ ├── isascii.c │ │ │ ├── isblank.c │ │ │ ├── iscntrl.c │ │ │ ├── isdigit.c │ │ │ ├── isgraph.c │ │ │ ├── islower.c │ │ │ ├── isprint.c │ │ │ ├── ispunct.c │ │ │ ├── isspace.c │ │ │ ├── isupper.c │ │ │ ├── iswalnum.c │ │ │ ├── iswalpha.c │ │ │ ├── iswblank.c │ │ │ ├── iswcntrl.c │ │ │ ├── iswctype.c │ │ │ ├── iswdigit.c │ │ │ ├── iswgraph.c │ │ │ ├── iswlower.c │ │ │ ├── iswprint.c │ │ │ ├── iswpunct.c │ │ │ ├── iswspace.c │ │ │ ├── iswupper.c │ │ │ ├── iswxdigit.c │ │ │ ├── isxdigit.c │ │ │ ├── nonspacing.h │ │ │ ├── punct.h │ │ │ ├── toascii.c │ │ │ ├── tolower.c │ │ │ ├── toupper.c │ │ │ ├── towctrans.c │ │ │ ├── wcswidth.c │ │ │ ├── wctrans.c │ │ │ ├── wcwidth.c │ │ │ └── wide.h │ │ ├── dirent │ │ │ ├── __dirent.h │ │ │ ├── alphasort.c │ │ │ ├── closedir.c │ │ │ ├── dirfd.c │ │ │ ├── fdopendir.c │ │ │ ├── opendir.c │ │ │ ├── readdir.c │ │ │ ├── readdir_r.c │ │ │ ├── rewinddir.c │ │ │ ├── scandir.c │ │ │ ├── seekdir.c │ │ │ ├── telldir.c │ │ │ └── versionsort.c │ │ ├── env │ │ │ ├── __environ.c │ │ │ ├── __init_tls.c │ │ │ ├── __libc_start_main.c │ │ │ ├── __reset_tls.c │ │ │ ├── __stack_chk_fail.c │ │ │ ├── clearenv.c │ │ │ ├── getenv.c │ │ │ ├── putenv.c │ │ │ ├── secure_getenv.c │ │ │ ├── setenv.c │ │ │ └── unsetenv.c │ │ ├── errno │ │ │ ├── __errno_location.c │ │ │ ├── __strerror.h │ │ │ └── strerror.c │ │ ├── exit │ │ │ ├── _Exit.c │ │ │ ├── abort.c │ │ │ ├── abort_lock.c │ │ │ ├── arm │ │ │ │ └── __aeabi_atexit.c │ │ │ ├── assert.c │ │ │ ├── at_quick_exit.c │ │ │ ├── atexit.c │ │ │ ├── exit.c │ │ │ └── quick_exit.c │ │ ├── fcntl │ │ │ ├── creat.c │ │ │ ├── fcntl.c │ │ │ ├── open.c │ │ │ ├── openat.c │ │ │ ├── posix_fadvise.c │ │ │ └── posix_fallocate.c │ │ ├── fenv │ │ │ ├── __flt_rounds.c │ │ │ ├── aarch64 │ │ │ │ └── fenv.s │ │ │ ├── arm │ │ │ │ ├── fenv-hf.S │ │ │ │ └── fenv.c │ │ │ ├── fegetexceptflag.c │ │ │ ├── feholdexcept.c │ │ │ ├── fenv.c │ │ │ ├── fesetexceptflag.c │ │ │ ├── fesetround.c │ │ │ ├── feupdateenv.c │ │ │ ├── i386 │ │ │ │ └── fenv.s │ │ │ ├── m68k │ │ │ │ └── fenv.c │ │ │ ├── mips │ │ │ │ ├── fenv-sf.c │ │ │ │ └── fenv.S │ │ │ ├── mips64 │ │ │ │ ├── fenv-sf.c │ │ │ │ └── fenv.S │ │ │ ├── mipsn32 │ │ │ │ ├── fenv-sf.c │ │ │ │ └── fenv.S │ │ │ ├── powerpc │ │ │ │ ├── fenv-sf.c │ │ │ │ └── fenv.S │ │ │ ├── powerpc64 │ │ │ │ └── fenv.c │ │ │ ├── riscv64 │ │ │ │ ├── fenv-sf.c │ │ │ │ └── fenv.S │ │ │ ├── s390x │ │ │ │ └── fenv.c │ │ │ ├── sh │ │ │ │ ├── fenv-nofpu.c │ │ │ │ └── fenv.S │ │ │ ├── x32 │ │ │ │ └── fenv.s │ │ │ └── x86_64 │ │ │ │ └── fenv.s │ │ ├── include │ │ │ ├── arpa │ │ │ │ └── inet.h │ │ │ ├── crypt.h │ │ │ ├── errno.h │ │ │ ├── features.h │ │ │ ├── langinfo.h │ │ │ ├── pthread.h │ │ │ ├── resolv.h │ │ │ ├── signal.h │ │ │ ├── stdio.h │ │ │ ├── stdlib.h │ │ │ ├── string.h │ │ │ ├── sys │ │ │ │ ├── auxv.h │ │ │ │ ├── membarrier.h │ │ │ │ ├── mman.h │ │ │ │ ├── sysinfo.h │ │ │ │ └── time.h │ │ │ ├── time.h │ │ │ ├── unistd.h │ │ │ ├── uthash.h │ │ │ └── wchar.h │ │ ├── internal │ │ │ ├── aio_impl.h │ │ │ ├── atomic.h │ │ │ ├── complex_impl.h │ │ │ ├── defsysinfo.c │ │ │ ├── dynlink.h │ │ │ ├── fdpic_crt.h │ │ │ ├── floatscan.c │ │ │ ├── floatscan.h │ │ │ ├── fork_impl.h │ │ │ ├── futex.h │ │ │ ├── i386 │ │ │ │ └── defsysinfo.s │ │ │ ├── intscan.c │ │ │ ├── intscan.h │ │ │ ├── ksigaction.h │ │ │ ├── libc.c │ │ │ ├── libc.h │ │ │ ├── libm.h │ │ │ ├── locale_impl.h │ │ │ ├── lock.h │ │ │ ├── procfdname.c │ │ │ ├── pthread_impl.h │ │ │ ├── sh │ │ │ │ └── __shcall.c │ │ │ ├── shgetc.c │ │ │ ├── shgetc.h │ │ │ ├── stdio_impl.h │ │ │ ├── syscall.h │ │ │ ├── syscall_ret.c │ │ │ ├── vdso.c │ │ │ └── version.c │ │ ├── ipc │ │ │ ├── ftok.c │ │ │ ├── ipc.h │ │ │ ├── msgctl.c │ │ │ ├── msgget.c │ │ │ ├── msgrcv.c │ │ │ ├── msgsnd.c │ │ │ ├── semctl.c │ │ │ ├── semget.c │ │ │ ├── semop.c │ │ │ ├── semtimedop.c │ │ │ ├── shmat.c │ │ │ ├── shmctl.c │ │ │ ├── shmdt.c │ │ │ └── shmget.c │ │ ├── ldso │ │ │ ├── __dlsym.c │ │ │ ├── aarch64 │ │ │ │ ├── dlsym.s │ │ │ │ └── tlsdesc.s │ │ │ ├── arm │ │ │ │ ├── dlsym.s │ │ │ │ ├── dlsym_time64.S │ │ │ │ ├── find_exidx.c │ │ │ │ └── tlsdesc.S │ │ │ ├── dl_iterate_phdr.c │ │ │ ├── dladdr.c │ │ │ ├── dlclose.c │ │ │ ├── dlerror.c │ │ │ ├── dlinfo.c │ │ │ ├── dlopen.c │ │ │ ├── dlsym.c │ │ │ ├── i386 │ │ │ │ ├── dlsym.s │ │ │ │ ├── dlsym_time64.S │ │ │ │ └── tlsdesc.s │ │ │ ├── m68k │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── microblaze │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── mips │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── mips64 │ │ │ │ └── dlsym.s │ │ │ ├── mipsn32 │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── or1k │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── powerpc │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── powerpc64 │ │ │ │ └── dlsym.s │ │ │ ├── riscv64 │ │ │ │ └── dlsym.s │ │ │ ├── s390x │ │ │ │ └── dlsym.s │ │ │ ├── sh │ │ │ │ ├── dlsym.s │ │ │ │ └── dlsym_time64.S │ │ │ ├── tlsdesc.c │ │ │ ├── x32 │ │ │ │ └── dlsym.s │ │ │ └── x86_64 │ │ │ │ ├── dlsym.s │ │ │ │ └── tlsdesc.s │ │ ├── legacy │ │ │ ├── cuserid.c │ │ │ ├── daemon.c │ │ │ ├── err.c │ │ │ ├── euidaccess.c │ │ │ ├── ftw.c │ │ │ ├── futimes.c │ │ │ ├── getdtablesize.c │ │ │ ├── getloadavg.c │ │ │ ├── getpagesize.c │ │ │ ├── getpass.c │ │ │ ├── getusershell.c │ │ │ ├── isastream.c │ │ │ ├── lutimes.c │ │ │ ├── ulimit.c │ │ │ ├── utmpx.c │ │ │ └── valloc.c │ │ ├── linux │ │ │ ├── adjtime.c │ │ │ ├── adjtimex.c │ │ │ ├── arch_prctl.c │ │ │ ├── brk.c │ │ │ ├── cache.c │ │ │ ├── cap.c │ │ │ ├── chroot.c │ │ │ ├── clock_adjtime.c │ │ │ ├── clone.c │ │ │ ├── copy_file_range.c │ │ │ ├── epoll.c │ │ │ ├── eventfd.c │ │ │ ├── fallocate.c │ │ │ ├── fanotify.c │ │ │ ├── flock.c │ │ │ ├── getdents.c │ │ │ ├── getrandom.c │ │ │ ├── gettid.c │ │ │ ├── inotify.c │ │ │ ├── ioperm.c │ │ │ ├── iopl.c │ │ │ ├── klogctl.c │ │ │ ├── membarrier.c │ │ │ ├── memfd_create.c │ │ │ ├── mlock2.c │ │ │ ├── module.c │ │ │ ├── mount.c │ │ │ ├── name_to_handle_at.c │ │ │ ├── open_by_handle_at.c │ │ │ ├── personality.c │ │ │ ├── pivot_root.c │ │ │ ├── ppoll.c │ │ │ ├── prctl.c │ │ │ ├── prlimit.c │ │ │ ├── process_vm.c │ │ │ ├── ptrace.c │ │ │ ├── quotactl.c │ │ │ ├── readahead.c │ │ │ ├── reboot.c │ │ │ ├── remap_file_pages.c │ │ │ ├── sbrk.c │ │ │ ├── sendfile.c │ │ │ ├── setfsgid.c │ │ │ ├── setfsuid.c │ │ │ ├── setgroups.c │ │ │ ├── sethostname.c │ │ │ ├── setns.c │ │ │ ├── settimeofday.c │ │ │ ├── signalfd.c │ │ │ ├── splice.c │ │ │ ├── stime.c │ │ │ ├── swap.c │ │ │ ├── sync_file_range.c │ │ │ ├── syncfs.c │ │ │ ├── sysinfo.c │ │ │ ├── tee.c │ │ │ ├── timerfd.c │ │ │ ├── unshare.c │ │ │ ├── utimes.c │ │ │ ├── vhangup.c │ │ │ ├── vmsplice.c │ │ │ ├── wait3.c │ │ │ ├── wait4.c │ │ │ ├── x32 │ │ │ │ └── sysinfo.c │ │ │ └── xattr.c │ │ ├── locale │ │ │ ├── __lctrans.c │ │ │ ├── __mo_lookup.c │ │ │ ├── big5.h │ │ │ ├── bind_textdomain_codeset.c │ │ │ ├── c_locale.c │ │ │ ├── catclose.c │ │ │ ├── catgets.c │ │ │ ├── catopen.c │ │ │ ├── codepages.h │ │ │ ├── dcngettext.c │ │ │ ├── duplocale.c │ │ │ ├── freelocale.c │ │ │ ├── gb18030.h │ │ │ ├── hkscs.h │ │ │ ├── iconv.c │ │ │ ├── iconv_close.c │ │ │ ├── jis0208.h │ │ │ ├── ksc.h │ │ │ ├── langinfo.c │ │ │ ├── legacychars.h │ │ │ ├── locale_map.c │ │ │ ├── localeconv.c │ │ │ ├── newlocale.c │ │ │ ├── pleval.c │ │ │ ├── pleval.h │ │ │ ├── revjis.h │ │ │ ├── setlocale.c │ │ │ ├── strcoll.c │ │ │ ├── strfmon.c │ │ │ ├── strxfrm.c │ │ │ ├── textdomain.c │ │ │ ├── uselocale.c │ │ │ ├── wcscoll.c │ │ │ └── wcsxfrm.c │ │ ├── malloc │ │ │ ├── calloc.c │ │ │ ├── free.c │ │ │ ├── libc_calloc.c │ │ │ ├── lite_malloc.c │ │ │ ├── mallocng │ │ │ │ ├── aligned_alloc.c │ │ │ │ ├── donate.c │ │ │ │ ├── free.c │ │ │ │ ├── glue.h │ │ │ │ ├── malloc.c │ │ │ │ ├── malloc_usable_size.c │ │ │ │ ├── meta.h │ │ │ │ └── realloc.c │ │ │ ├── memalign.c │ │ │ ├── oldmalloc │ │ │ │ ├── aligned_alloc.c │ │ │ │ ├── malloc.c │ │ │ │ ├── malloc_impl.h │ │ │ │ └── malloc_usable_size.c │ │ │ ├── posix_memalign.c │ │ │ ├── realloc.c │ │ │ ├── reallocarray.c │ │ │ └── replaced.c │ │ ├── math │ │ │ ├── __cos.c │ │ │ ├── __cosdf.c │ │ │ ├── __cosl.c │ │ │ ├── __expo2.c │ │ │ ├── __expo2f.c │ │ │ ├── __fpclassify.c │ │ │ ├── __fpclassifyf.c │ │ │ ├── __fpclassifyl.c │ │ │ ├── __invtrigl.c │ │ │ ├── __invtrigl.h │ │ │ ├── __math_divzero.c │ │ │ ├── __math_divzerof.c │ │ │ ├── __math_invalid.c │ │ │ ├── __math_invalidf.c │ │ │ ├── __math_invalidl.c │ │ │ ├── __math_oflow.c │ │ │ ├── __math_oflowf.c │ │ │ ├── __math_uflow.c │ │ │ ├── __math_uflowf.c │ │ │ ├── __math_xflow.c │ │ │ ├── __math_xflowf.c │ │ │ ├── __polevll.c │ │ │ ├── __rem_pio2.c │ │ │ ├── __rem_pio2_large.c │ │ │ ├── __rem_pio2f.c │ │ │ ├── __rem_pio2l.c │ │ │ ├── __signbit.c │ │ │ ├── __signbitf.c │ │ │ ├── __signbitl.c │ │ │ ├── __sin.c │ │ │ ├── __sindf.c │ │ │ ├── __sinl.c │ │ │ ├── __tan.c │ │ │ ├── __tandf.c │ │ │ ├── __tanl.c │ │ │ ├── aarch64 │ │ │ │ ├── ceil.c │ │ │ │ ├── ceilf.c │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── floor.c │ │ │ │ ├── floorf.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── fmax.c │ │ │ │ ├── fmaxf.c │ │ │ │ ├── fmin.c │ │ │ │ ├── fminf.c │ │ │ │ ├── llrint.c │ │ │ │ ├── llrintf.c │ │ │ │ ├── llround.c │ │ │ │ ├── llroundf.c │ │ │ │ ├── lrint.c │ │ │ │ ├── lrintf.c │ │ │ │ ├── lround.c │ │ │ │ ├── lroundf.c │ │ │ │ ├── nearbyint.c │ │ │ │ ├── nearbyintf.c │ │ │ │ ├── rint.c │ │ │ │ ├── rintf.c │ │ │ │ ├── round.c │ │ │ │ ├── roundf.c │ │ │ │ ├── sqrt.c │ │ │ │ ├── sqrtf.c │ │ │ │ ├── trunc.c │ │ │ │ └── truncf.c │ │ │ ├── acos.c │ │ │ ├── acosf.c │ │ │ ├── acosh.c │ │ │ ├── acoshf.c │ │ │ ├── acoshl.c │ │ │ ├── acosl.c │ │ │ ├── arm │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── sqrt.c │ │ │ │ └── sqrtf.c │ │ │ ├── asin.c │ │ │ ├── asinf.c │ │ │ ├── asinh.c │ │ │ ├── asinhf.c │ │ │ ├── asinhl.c │ │ │ ├── asinl.c │ │ │ ├── atan.c │ │ │ ├── atan2.c │ │ │ ├── atan2f.c │ │ │ ├── atan2l.c │ │ │ ├── atanf.c │ │ │ ├── atanh.c │ │ │ ├── atanhf.c │ │ │ ├── atanhl.c │ │ │ ├── atanl.c │ │ │ ├── cbrt.c │ │ │ ├── cbrtf.c │ │ │ ├── cbrtl.c │ │ │ ├── ceil.c │ │ │ ├── ceilf.c │ │ │ ├── ceill.c │ │ │ ├── copysign.c │ │ │ ├── copysignf.c │ │ │ ├── copysignl.c │ │ │ ├── cos.c │ │ │ ├── cosf.c │ │ │ ├── cosh.c │ │ │ ├── coshf.c │ │ │ ├── coshl.c │ │ │ ├── cosl.c │ │ │ ├── erf.c │ │ │ ├── erff.c │ │ │ ├── erfl.c │ │ │ ├── exp.c │ │ │ ├── exp10.c │ │ │ ├── exp10f.c │ │ │ ├── exp10l.c │ │ │ ├── exp2.c │ │ │ ├── exp2f.c │ │ │ ├── exp2f_data.c │ │ │ ├── exp2f_data.h │ │ │ ├── exp2l.c │ │ │ ├── exp_data.c │ │ │ ├── exp_data.h │ │ │ ├── expf.c │ │ │ ├── expl.c │ │ │ ├── expm1.c │ │ │ ├── expm1f.c │ │ │ ├── expm1l.c │ │ │ ├── fabs.c │ │ │ ├── fabsf.c │ │ │ ├── fabsl.c │ │ │ ├── fdim.c │ │ │ ├── fdimf.c │ │ │ ├── fdiml.c │ │ │ ├── finite.c │ │ │ ├── finitef.c │ │ │ ├── floor.c │ │ │ ├── floorf.c │ │ │ ├── floorl.c │ │ │ ├── fma.c │ │ │ ├── fmaf.c │ │ │ ├── fmal.c │ │ │ ├── fmax.c │ │ │ ├── fmaxf.c │ │ │ ├── fmaxl.c │ │ │ ├── fmin.c │ │ │ ├── fminf.c │ │ │ ├── fminl.c │ │ │ ├── fmod.c │ │ │ ├── fmodf.c │ │ │ ├── fmodl.c │ │ │ ├── frexp.c │ │ │ ├── frexpf.c │ │ │ ├── frexpl.c │ │ │ ├── hypot.c │ │ │ ├── hypotf.c │ │ │ ├── hypotl.c │ │ │ ├── i386 │ │ │ │ ├── __invtrigl.s │ │ │ │ ├── acos.s │ │ │ │ ├── acosf.s │ │ │ │ ├── acosl.s │ │ │ │ ├── asin.s │ │ │ │ ├── asinf.s │ │ │ │ ├── asinl.s │ │ │ │ ├── atan.s │ │ │ │ ├── atan2.s │ │ │ │ ├── atan2f.s │ │ │ │ ├── atan2l.s │ │ │ │ ├── atanf.s │ │ │ │ ├── atanl.s │ │ │ │ ├── ceil.s │ │ │ │ ├── ceilf.s │ │ │ │ ├── ceill.s │ │ │ │ ├── exp2l.s │ │ │ │ ├── exp_ld.s │ │ │ │ ├── expl.s │ │ │ │ ├── expm1l.s │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fabsl.c │ │ │ │ ├── floor.s │ │ │ │ ├── floorf.s │ │ │ │ ├── floorl.s │ │ │ │ ├── fmod.c │ │ │ │ ├── fmodf.c │ │ │ │ ├── fmodl.c │ │ │ │ ├── hypot.s │ │ │ │ ├── hypotf.s │ │ │ │ ├── ldexp.s │ │ │ │ ├── ldexpf.s │ │ │ │ ├── ldexpl.s │ │ │ │ ├── llrint.c │ │ │ │ ├── llrintf.c │ │ │ │ ├── llrintl.c │ │ │ │ ├── log.s │ │ │ │ ├── log10.s │ │ │ │ ├── log10f.s │ │ │ │ ├── log10l.s │ │ │ │ ├── log1p.s │ │ │ │ ├── log1pf.s │ │ │ │ ├── log1pl.s │ │ │ │ ├── log2.s │ │ │ │ ├── log2f.s │ │ │ │ ├── log2l.s │ │ │ │ ├── logf.s │ │ │ │ ├── logl.s │ │ │ │ ├── lrint.c │ │ │ │ ├── lrintf.c │ │ │ │ ├── lrintl.c │ │ │ │ ├── remainder.c │ │ │ │ ├── remainderf.c │ │ │ │ ├── remainderl.c │ │ │ │ ├── remquo.s │ │ │ │ ├── remquof.s │ │ │ │ ├── remquol.s │ │ │ │ ├── rint.c │ │ │ │ ├── rintf.c │ │ │ │ ├── rintl.c │ │ │ │ ├── scalbln.s │ │ │ │ ├── scalblnf.s │ │ │ │ ├── scalblnl.s │ │ │ │ ├── scalbn.s │ │ │ │ ├── scalbnf.s │ │ │ │ ├── scalbnl.s │ │ │ │ ├── sqrt.c │ │ │ │ ├── sqrtf.c │ │ │ │ ├── sqrtl.c │ │ │ │ ├── trunc.s │ │ │ │ ├── truncf.s │ │ │ │ └── truncl.s │ │ │ ├── ilogb.c │ │ │ ├── ilogbf.c │ │ │ ├── ilogbl.c │ │ │ ├── j0.c │ │ │ ├── j0f.c │ │ │ ├── j1.c │ │ │ ├── j1f.c │ │ │ ├── jn.c │ │ │ ├── jnf.c │ │ │ ├── ldexp.c │ │ │ ├── ldexpf.c │ │ │ ├── ldexpl.c │ │ │ ├── lgamma.c │ │ │ ├── lgamma_r.c │ │ │ ├── lgammaf.c │ │ │ ├── lgammaf_r.c │ │ │ ├── lgammal.c │ │ │ ├── llrint.c │ │ │ ├── llrintf.c │ │ │ ├── llrintl.c │ │ │ ├── llround.c │ │ │ ├── llroundf.c │ │ │ ├── llroundl.c │ │ │ ├── log.c │ │ │ ├── log10.c │ │ │ ├── log10f.c │ │ │ ├── log10l.c │ │ │ ├── log1p.c │ │ │ ├── log1pf.c │ │ │ ├── log1pl.c │ │ │ ├── log2.c │ │ │ ├── log2_data.c │ │ │ ├── log2_data.h │ │ │ ├── log2f.c │ │ │ ├── log2f_data.c │ │ │ ├── log2f_data.h │ │ │ ├── log2l.c │ │ │ ├── log_data.c │ │ │ ├── log_data.h │ │ │ ├── logb.c │ │ │ ├── logbf.c │ │ │ ├── logbl.c │ │ │ ├── logf.c │ │ │ ├── logf_data.c │ │ │ ├── logf_data.h │ │ │ ├── logl.c │ │ │ ├── lrint.c │ │ │ ├── lrintf.c │ │ │ ├── lrintl.c │ │ │ ├── lround.c │ │ │ ├── lroundf.c │ │ │ ├── lroundl.c │ │ │ ├── m68k │ │ │ │ └── sqrtl.c │ │ │ ├── mips │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── sqrt.c │ │ │ │ └── sqrtf.c │ │ │ ├── modf.c │ │ │ ├── modff.c │ │ │ ├── modfl.c │ │ │ ├── nan.c │ │ │ ├── nanf.c │ │ │ ├── nanl.c │ │ │ ├── nearbyint.c │ │ │ ├── nearbyintf.c │ │ │ ├── nearbyintl.c │ │ │ ├── nextafter.c │ │ │ ├── nextafterf.c │ │ │ ├── nextafterl.c │ │ │ ├── nexttoward.c │ │ │ ├── nexttowardf.c │ │ │ ├── nexttowardl.c │ │ │ ├── pow.c │ │ │ ├── pow_data.c │ │ │ ├── pow_data.h │ │ │ ├── powerpc │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── sqrt.c │ │ │ │ └── sqrtf.c │ │ │ ├── powerpc64 │ │ │ │ ├── ceil.c │ │ │ │ ├── ceilf.c │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── floor.c │ │ │ │ ├── floorf.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── fmax.c │ │ │ │ ├── fmaxf.c │ │ │ │ ├── fmin.c │ │ │ │ ├── fminf.c │ │ │ │ ├── lrint.c │ │ │ │ ├── lrintf.c │ │ │ │ ├── lround.c │ │ │ │ ├── lroundf.c │ │ │ │ ├── round.c │ │ │ │ ├── roundf.c │ │ │ │ ├── sqrt.c │ │ │ │ ├── sqrtf.c │ │ │ │ ├── trunc.c │ │ │ │ └── truncf.c │ │ │ ├── powf.c │ │ │ ├── powf_data.c │ │ │ ├── powf_data.h │ │ │ ├── powl.c │ │ │ ├── remainder.c │ │ │ ├── remainderf.c │ │ │ ├── remainderl.c │ │ │ ├── remquo.c │ │ │ ├── remquof.c │ │ │ ├── remquol.c │ │ │ ├── rint.c │ │ │ ├── rintf.c │ │ │ ├── rintl.c │ │ │ ├── riscv64 │ │ │ │ ├── copysign.c │ │ │ │ ├── copysignf.c │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── fmax.c │ │ │ │ ├── fmaxf.c │ │ │ │ ├── fmin.c │ │ │ │ ├── fminf.c │ │ │ │ ├── sqrt.c │ │ │ │ └── sqrtf.c │ │ │ ├── round.c │ │ │ ├── roundf.c │ │ │ ├── roundl.c │ │ │ ├── s390x │ │ │ │ ├── ceil.c │ │ │ │ ├── ceilf.c │ │ │ │ ├── ceill.c │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fabsl.c │ │ │ │ ├── floor.c │ │ │ │ ├── floorf.c │ │ │ │ ├── floorl.c │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── nearbyint.c │ │ │ │ ├── nearbyintf.c │ │ │ │ ├── nearbyintl.c │ │ │ │ ├── rint.c │ │ │ │ ├── rintf.c │ │ │ │ ├── rintl.c │ │ │ │ ├── round.c │ │ │ │ ├── roundf.c │ │ │ │ ├── roundl.c │ │ │ │ ├── sqrt.c │ │ │ │ ├── sqrtf.c │ │ │ │ ├── sqrtl.c │ │ │ │ ├── trunc.c │ │ │ │ ├── truncf.c │ │ │ │ └── truncl.c │ │ │ ├── scalb.c │ │ │ ├── scalbf.c │ │ │ ├── scalbln.c │ │ │ ├── scalblnf.c │ │ │ ├── scalblnl.c │ │ │ ├── scalbn.c │ │ │ ├── scalbnf.c │ │ │ ├── scalbnl.c │ │ │ ├── signgam.c │ │ │ ├── significand.c │ │ │ ├── significandf.c │ │ │ ├── sin.c │ │ │ ├── sincos.c │ │ │ ├── sincosf.c │ │ │ ├── sincosl.c │ │ │ ├── sinf.c │ │ │ ├── sinh.c │ │ │ ├── sinhf.c │ │ │ ├── sinhl.c │ │ │ ├── sinl.c │ │ │ ├── sqrt.c │ │ │ ├── sqrt_data.c │ │ │ ├── sqrt_data.h │ │ │ ├── sqrtf.c │ │ │ ├── sqrtl.c │ │ │ ├── tan.c │ │ │ ├── tanf.c │ │ │ ├── tanh.c │ │ │ ├── tanhf.c │ │ │ ├── tanhl.c │ │ │ ├── tanl.c │ │ │ ├── tgamma.c │ │ │ ├── tgammaf.c │ │ │ ├── tgammal.c │ │ │ ├── trunc.c │ │ │ ├── truncf.c │ │ │ ├── truncl.c │ │ │ ├── x32 │ │ │ │ ├── __invtrigl.s │ │ │ │ ├── acosl.s │ │ │ │ ├── asinl.s │ │ │ │ ├── atan2l.s │ │ │ │ ├── atanl.s │ │ │ │ ├── ceill.s │ │ │ │ ├── exp2l.s │ │ │ │ ├── expl.s │ │ │ │ ├── expm1l.s │ │ │ │ ├── fabs.s │ │ │ │ ├── fabsf.s │ │ │ │ ├── fabsl.s │ │ │ │ ├── floorl.s │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── fmodl.s │ │ │ │ ├── llrint.s │ │ │ │ ├── llrintf.s │ │ │ │ ├── llrintl.s │ │ │ │ ├── log10l.s │ │ │ │ ├── log1pl.s │ │ │ │ ├── log2l.s │ │ │ │ ├── logl.s │ │ │ │ ├── lrint.s │ │ │ │ ├── lrintf.s │ │ │ │ ├── lrintl.s │ │ │ │ ├── remainderl.s │ │ │ │ ├── rintl.s │ │ │ │ ├── sqrt.s │ │ │ │ ├── sqrtf.s │ │ │ │ ├── sqrtl.s │ │ │ │ └── truncl.s │ │ │ └── x86_64 │ │ │ │ ├── __invtrigl.s │ │ │ │ ├── acosl.s │ │ │ │ ├── asinl.s │ │ │ │ ├── atan2l.s │ │ │ │ ├── atanl.s │ │ │ │ ├── ceill.s │ │ │ │ ├── exp2l.s │ │ │ │ ├── expl.s │ │ │ │ ├── expm1l.s │ │ │ │ ├── fabs.c │ │ │ │ ├── fabsf.c │ │ │ │ ├── fabsl.c │ │ │ │ ├── floorl.s │ │ │ │ ├── fma.c │ │ │ │ ├── fmaf.c │ │ │ │ ├── fmodl.c │ │ │ │ ├── llrint.c │ │ │ │ ├── llrintf.c │ │ │ │ ├── llrintl.c │ │ │ │ ├── log10l.s │ │ │ │ ├── log1pl.s │ │ │ │ ├── log2l.s │ │ │ │ ├── logl.s │ │ │ │ ├── lrint.c │ │ │ │ ├── lrintf.c │ │ │ │ ├── lrintl.c │ │ │ │ ├── remainderl.c │ │ │ │ ├── remquol.c │ │ │ │ ├── rintl.c │ │ │ │ ├── sqrt.c │ │ │ │ ├── sqrtf.c │ │ │ │ ├── sqrtl.c │ │ │ │ └── truncl.s │ │ ├── misc │ │ │ ├── a64l.c │ │ │ ├── basename.c │ │ │ ├── dirname.c │ │ │ ├── ffs.c │ │ │ ├── ffsl.c │ │ │ ├── ffsll.c │ │ │ ├── fmtmsg.c │ │ │ ├── forkpty.c │ │ │ ├── get_current_dir_name.c │ │ │ ├── getauxval.c │ │ │ ├── getdomainname.c │ │ │ ├── getentropy.c │ │ │ ├── gethostid.c │ │ │ ├── getopt.c │ │ │ ├── getopt_long.c │ │ │ ├── getpriority.c │ │ │ ├── getresgid.c │ │ │ ├── getresuid.c │ │ │ ├── getrlimit.c │ │ │ ├── getrusage.c │ │ │ ├── getsubopt.c │ │ │ ├── initgroups.c │ │ │ ├── ioctl.c │ │ │ ├── issetugid.c │ │ │ ├── lockf.c │ │ │ ├── login_tty.c │ │ │ ├── mntent.c │ │ │ ├── nftw.c │ │ │ ├── openpty.c │ │ │ ├── ptsname.c │ │ │ ├── pty.c │ │ │ ├── realpath.c │ │ │ ├── setdomainname.c │ │ │ ├── setpriority.c │ │ │ ├── setrlimit.c │ │ │ ├── syscall.c │ │ │ ├── syslog.c │ │ │ ├── uname.c │ │ │ └── wordexp.c │ │ ├── mman │ │ │ ├── madvise.c │ │ │ ├── mincore.c │ │ │ ├── mlock.c │ │ │ ├── mlockall.c │ │ │ ├── mmap.c │ │ │ ├── mprotect.c │ │ │ ├── mremap.c │ │ │ ├── msync.c │ │ │ ├── munlock.c │ │ │ ├── munlockall.c │ │ │ ├── munmap.c │ │ │ ├── posix_madvise.c │ │ │ └── shm_open.c │ │ ├── mq │ │ │ ├── mq_close.c │ │ │ ├── mq_getattr.c │ │ │ ├── mq_notify.c │ │ │ ├── mq_open.c │ │ │ ├── mq_receive.c │ │ │ ├── mq_send.c │ │ │ ├── mq_setattr.c │ │ │ ├── mq_timedreceive.c │ │ │ ├── mq_timedsend.c │ │ │ └── mq_unlink.c │ │ ├── multibyte │ │ │ ├── btowc.c │ │ │ ├── c16rtomb.c │ │ │ ├── c32rtomb.c │ │ │ ├── internal.c │ │ │ ├── internal.h │ │ │ ├── mblen.c │ │ │ ├── mbrlen.c │ │ │ ├── mbrtoc16.c │ │ │ ├── mbrtoc32.c │ │ │ ├── mbrtowc.c │ │ │ ├── mbsinit.c │ │ │ ├── mbsnrtowcs.c │ │ │ ├── mbsrtowcs.c │ │ │ ├── mbstowcs.c │ │ │ ├── mbtowc.c │ │ │ ├── wcrtomb.c │ │ │ ├── wcsnrtombs.c │ │ │ ├── wcsrtombs.c │ │ │ ├── wcstombs.c │ │ │ ├── wctob.c │ │ │ └── wctomb.c │ │ ├── network │ │ │ ├── accept.c │ │ │ ├── accept4.c │ │ │ ├── bind.c │ │ │ ├── connect.c │ │ │ ├── dn_comp.c │ │ │ ├── dn_expand.c │ │ │ ├── dn_skipname.c │ │ │ ├── dns_parse.c │ │ │ ├── ent.c │ │ │ ├── ether.c │ │ │ ├── freeaddrinfo.c │ │ │ ├── gai_strerror.c │ │ │ ├── getaddrinfo.c │ │ │ ├── gethostbyaddr.c │ │ │ ├── gethostbyaddr_r.c │ │ │ ├── gethostbyname.c │ │ │ ├── gethostbyname2.c │ │ │ ├── gethostbyname2_r.c │ │ │ ├── gethostbyname_r.c │ │ │ ├── getifaddrs.c │ │ │ ├── getnameinfo.c │ │ │ ├── getpeername.c │ │ │ ├── getservbyname.c │ │ │ ├── getservbyname_r.c │ │ │ ├── getservbyport.c │ │ │ ├── getservbyport_r.c │ │ │ ├── getsockname.c │ │ │ ├── getsockopt.c │ │ │ ├── h_errno.c │ │ │ ├── herror.c │ │ │ ├── hstrerror.c │ │ │ ├── htonl.c │ │ │ ├── htons.c │ │ │ ├── if_freenameindex.c │ │ │ ├── if_indextoname.c │ │ │ ├── if_nameindex.c │ │ │ ├── if_nametoindex.c │ │ │ ├── in6addr_any.c │ │ │ ├── in6addr_loopback.c │ │ │ ├── inet_addr.c │ │ │ ├── inet_aton.c │ │ │ ├── inet_legacy.c │ │ │ ├── inet_ntoa.c │ │ │ ├── inet_ntop.c │ │ │ ├── inet_pton.c │ │ │ ├── listen.c │ │ │ ├── lookup.h │ │ │ ├── lookup_ipliteral.c │ │ │ ├── lookup_name.c │ │ │ ├── lookup_serv.c │ │ │ ├── netlink.c │ │ │ ├── netlink.h │ │ │ ├── netname.c │ │ │ ├── ns_parse.c │ │ │ ├── ntohl.c │ │ │ ├── ntohs.c │ │ │ ├── proto.c │ │ │ ├── recv.c │ │ │ ├── recvfrom.c │ │ │ ├── recvmmsg.c │ │ │ ├── recvmsg.c │ │ │ ├── res_init.c │ │ │ ├── res_mkquery.c │ │ │ ├── res_msend.c │ │ │ ├── res_query.c │ │ │ ├── res_querydomain.c │ │ │ ├── res_send.c │ │ │ ├── res_state.c │ │ │ ├── resolvconf.c │ │ │ ├── send.c │ │ │ ├── sendmmsg.c │ │ │ ├── sendmsg.c │ │ │ ├── sendto.c │ │ │ ├── serv.c │ │ │ ├── services.c │ │ │ ├── services.h │ │ │ ├── setsockopt.c │ │ │ ├── shutdown.c │ │ │ ├── sockatmark.c │ │ │ ├── socket.c │ │ │ └── socketpair.c │ │ ├── passwd │ │ │ ├── fgetgrent.c │ │ │ ├── fgetpwent.c │ │ │ ├── fgetspent.c │ │ │ ├── getgr_a.c │ │ │ ├── getgr_r.c │ │ │ ├── getgrent.c │ │ │ ├── getgrent_a.c │ │ │ ├── getgrouplist.c │ │ │ ├── getpw_a.c │ │ │ ├── getpw_r.c │ │ │ ├── getpwent.c │ │ │ ├── getpwent_a.c │ │ │ ├── getspent.c │ │ │ ├── getspnam.c │ │ │ ├── getspnam_r.c │ │ │ ├── lckpwdf.c │ │ │ ├── nscd.h │ │ │ ├── nscd_query.c │ │ │ ├── putgrent.c │ │ │ ├── putpwent.c │ │ │ ├── putspent.c │ │ │ └── pwf.h │ │ ├── prng │ │ │ ├── __rand48_step.c │ │ │ ├── __seed48.c │ │ │ ├── drand48.c │ │ │ ├── lcong48.c │ │ │ ├── lrand48.c │ │ │ ├── mrand48.c │ │ │ ├── rand.c │ │ │ ├── rand48.h │ │ │ ├── rand_r.c │ │ │ ├── random.c │ │ │ ├── seed48.c │ │ │ └── srand48.c │ │ ├── process │ │ │ ├── _Fork.c │ │ │ ├── arm │ │ │ │ └── vfork.s │ │ │ ├── execl.c │ │ │ ├── execle.c │ │ │ ├── execlp.c │ │ │ ├── execv.c │ │ │ ├── execve.c │ │ │ ├── execvp.c │ │ │ ├── fdop.h │ │ │ ├── fexecve.c │ │ │ ├── fork.c │ │ │ ├── i386 │ │ │ │ └── vfork.s │ │ │ ├── posix_spawn.c │ │ │ ├── posix_spawn_file_actions_addchdir.c │ │ │ ├── posix_spawn_file_actions_addclose.c │ │ │ ├── posix_spawn_file_actions_adddup2.c │ │ │ ├── posix_spawn_file_actions_addfchdir.c │ │ │ ├── posix_spawn_file_actions_addopen.c │ │ │ ├── posix_spawn_file_actions_destroy.c │ │ │ ├── posix_spawn_file_actions_init.c │ │ │ ├── posix_spawnattr_destroy.c │ │ │ ├── posix_spawnattr_getflags.c │ │ │ ├── posix_spawnattr_getpgroup.c │ │ │ ├── posix_spawnattr_getsigdefault.c │ │ │ ├── posix_spawnattr_getsigmask.c │ │ │ ├── posix_spawnattr_init.c │ │ │ ├── posix_spawnattr_sched.c │ │ │ ├── posix_spawnattr_setflags.c │ │ │ ├── posix_spawnattr_setpgroup.c │ │ │ ├── posix_spawnattr_setsigdefault.c │ │ │ ├── posix_spawnattr_setsigmask.c │ │ │ ├── posix_spawnp.c │ │ │ ├── s390x │ │ │ │ └── vfork.s │ │ │ ├── sh │ │ │ │ └── vfork.s │ │ │ ├── system.c │ │ │ ├── vfork.c │ │ │ ├── wait.c │ │ │ ├── waitid.c │ │ │ ├── waitpid.c │ │ │ ├── wasix_proc_snapshot.c │ │ │ ├── x32 │ │ │ │ └── vfork.s │ │ │ └── x86_64 │ │ │ │ └── vfork.s │ │ ├── regex │ │ │ ├── fnmatch.c │ │ │ ├── glob.c │ │ │ ├── regcomp.c │ │ │ ├── regerror.c │ │ │ ├── regexec.c │ │ │ ├── tre-mem.c │ │ │ └── tre.h │ │ ├── sched │ │ │ ├── affinity.c │ │ │ ├── sched_cpucount.c │ │ │ ├── sched_get_priority_max.c │ │ │ ├── sched_getcpu.c │ │ │ ├── sched_getparam.c │ │ │ ├── sched_getscheduler.c │ │ │ ├── sched_rr_get_interval.c │ │ │ ├── sched_setparam.c │ │ │ ├── sched_setscheduler.c │ │ │ └── sched_yield.c │ │ ├── search │ │ │ ├── hsearch.c │ │ │ ├── insque.c │ │ │ ├── lsearch.c │ │ │ ├── tdelete.c │ │ │ ├── tdestroy.c │ │ │ ├── tfind.c │ │ │ ├── tsearch.c │ │ │ ├── tsearch.h │ │ │ └── twalk.c │ │ ├── select │ │ │ ├── poll.c │ │ │ ├── pselect.c │ │ │ └── select.c │ │ ├── setjmp │ │ │ ├── aarch64 │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── arm │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── i386 │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── m68k │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── microblaze │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── mips │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── mips64 │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── mipsn32 │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── or1k │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── powerpc │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── powerpc64 │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── riscv64 │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── s390x │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ ├── setjmplongjmp.c │ │ │ ├── sh │ │ │ │ ├── longjmp.S │ │ │ │ └── setjmp.S │ │ │ ├── x32 │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ │ └── x86_64 │ │ │ │ ├── longjmp.s │ │ │ │ └── setjmp.s │ │ ├── signal │ │ │ ├── aarch64 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── arm │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── block.c │ │ │ ├── getitimer.c │ │ │ ├── i386 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── kill.c │ │ │ ├── killpg.c │ │ │ ├── m68k │ │ │ │ └── sigsetjmp.s │ │ │ ├── microblaze │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── mips │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── mips64 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── mipsn32 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── or1k │ │ │ │ └── sigsetjmp.s │ │ │ ├── powerpc │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── powerpc64 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── psiginfo.c │ │ │ ├── psignal.c │ │ │ ├── raise.c │ │ │ ├── restore.c │ │ │ ├── riscv64 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── s390x │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── setitimer.c │ │ │ ├── sh │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ │ ├── sigaction.c │ │ │ ├── sigaddset.c │ │ │ ├── sigaltstack.c │ │ │ ├── sigandset.c │ │ │ ├── sigdelset.c │ │ │ ├── sigemptyset.c │ │ │ ├── sigfillset.c │ │ │ ├── sighold.c │ │ │ ├── sigignore.c │ │ │ ├── siginterrupt.c │ │ │ ├── sigisemptyset.c │ │ │ ├── sigismember.c │ │ │ ├── siglongjmp.c │ │ │ ├── signal.c │ │ │ ├── sigorset.c │ │ │ ├── sigpause.c │ │ │ ├── sigpending.c │ │ │ ├── sigprocmask.c │ │ │ ├── sigqueue.c │ │ │ ├── sigrelse.c │ │ │ ├── sigrtmax.c │ │ │ ├── sigrtmin.c │ │ │ ├── sigset.c │ │ │ ├── sigsetjmp.c │ │ │ ├── sigsetjmp_tail.c │ │ │ ├── sigsuspend.c │ │ │ ├── sigtimedwait.c │ │ │ ├── sigwait.c │ │ │ ├── sigwaitinfo.c │ │ │ ├── x32 │ │ │ │ ├── getitimer.c │ │ │ │ ├── restore.s │ │ │ │ ├── setitimer.c │ │ │ │ └── sigsetjmp.s │ │ │ └── x86_64 │ │ │ │ ├── restore.s │ │ │ │ └── sigsetjmp.s │ │ ├── stat │ │ │ ├── __xstat.c │ │ │ ├── chmod.c │ │ │ ├── fchmod.c │ │ │ ├── fchmodat.c │ │ │ ├── fstat.c │ │ │ ├── fstatat.c │ │ │ ├── futimens.c │ │ │ ├── futimesat.c │ │ │ ├── lchmod.c │ │ │ ├── lstat.c │ │ │ ├── mkdir.c │ │ │ ├── mkdirat.c │ │ │ ├── mkfifo.c │ │ │ ├── mkfifoat.c │ │ │ ├── mknod.c │ │ │ ├── mknodat.c │ │ │ ├── stat.c │ │ │ ├── statvfs.c │ │ │ ├── umask.c │ │ │ └── utimensat.c │ │ ├── stdio │ │ │ ├── __fclose_ca.c │ │ │ ├── __fdopen.c │ │ │ ├── __fmodeflags.c │ │ │ ├── __fopen_rb_ca.c │ │ │ ├── __lockfile.c │ │ │ ├── __overflow.c │ │ │ ├── __stdio_close.c │ │ │ ├── __stdio_exit.c │ │ │ ├── __stdio_read.c │ │ │ ├── __stdio_seek.c │ │ │ ├── __stdio_write.c │ │ │ ├── __stdout_write.c │ │ │ ├── __toread.c │ │ │ ├── __towrite.c │ │ │ ├── __uflow.c │ │ │ ├── asprintf.c │ │ │ ├── clearerr.c │ │ │ ├── dprintf.c │ │ │ ├── ext.c │ │ │ ├── ext2.c │ │ │ ├── fclose.c │ │ │ ├── feof.c │ │ │ ├── ferror.c │ │ │ ├── fflush.c │ │ │ ├── fgetc.c │ │ │ ├── fgetln.c │ │ │ ├── fgetpos.c │ │ │ ├── fgets.c │ │ │ ├── fgetwc.c │ │ │ ├── fgetws.c │ │ │ ├── fileno.c │ │ │ ├── flockfile.c │ │ │ ├── fmemopen.c │ │ │ ├── fopen.c │ │ │ ├── fopencookie.c │ │ │ ├── fprintf.c │ │ │ ├── fputc.c │ │ │ ├── fputs.c │ │ │ ├── fputwc.c │ │ │ ├── fputws.c │ │ │ ├── fread.c │ │ │ ├── freopen.c │ │ │ ├── fscanf.c │ │ │ ├── fseek.c │ │ │ ├── fsetpos.c │ │ │ ├── ftell.c │ │ │ ├── ftrylockfile.c │ │ │ ├── funlockfile.c │ │ │ ├── fwide.c │ │ │ ├── fwprintf.c │ │ │ ├── fwrite.c │ │ │ ├── fwscanf.c │ │ │ ├── getc.c │ │ │ ├── getc.h │ │ │ ├── getc_unlocked.c │ │ │ ├── getchar.c │ │ │ ├── getchar_unlocked.c │ │ │ ├── getdelim.c │ │ │ ├── getline.c │ │ │ ├── gets.c │ │ │ ├── getw.c │ │ │ ├── getwc.c │ │ │ ├── getwchar.c │ │ │ ├── ofl.c │ │ │ ├── ofl_add.c │ │ │ ├── open_memstream.c │ │ │ ├── open_wmemstream.c │ │ │ ├── pclose.c │ │ │ ├── perror.c │ │ │ ├── popen.c │ │ │ ├── printf.c │ │ │ ├── putc.c │ │ │ ├── putc.h │ │ │ ├── putc_unlocked.c │ │ │ ├── putchar.c │ │ │ ├── putchar_unlocked.c │ │ │ ├── puts.c │ │ │ ├── putw.c │ │ │ ├── putwc.c │ │ │ ├── putwchar.c │ │ │ ├── remove.c │ │ │ ├── rename.c │ │ │ ├── rewind.c │ │ │ ├── scanf.c │ │ │ ├── setbuf.c │ │ │ ├── setbuffer.c │ │ │ ├── setlinebuf.c │ │ │ ├── setvbuf.c │ │ │ ├── snprintf.c │ │ │ ├── sprintf.c │ │ │ ├── sscanf.c │ │ │ ├── stderr.c │ │ │ ├── stdin.c │ │ │ ├── stdout.c │ │ │ ├── swprintf.c │ │ │ ├── swscanf.c │ │ │ ├── tempnam.c │ │ │ ├── tmpfile.c │ │ │ ├── tmpnam.c │ │ │ ├── ungetc.c │ │ │ ├── ungetwc.c │ │ │ ├── vasprintf.c │ │ │ ├── vdprintf.c │ │ │ ├── vfprintf.c │ │ │ ├── vfscanf.c │ │ │ ├── vfwprintf.c │ │ │ ├── vfwscanf.c │ │ │ ├── vprintf.c │ │ │ ├── vscanf.c │ │ │ ├── vsnprintf.c │ │ │ ├── vsprintf.c │ │ │ ├── vsscanf.c │ │ │ ├── vswprintf.c │ │ │ ├── vswscanf.c │ │ │ ├── vwprintf.c │ │ │ ├── vwscanf.c │ │ │ ├── wprintf.c │ │ │ └── wscanf.c │ │ ├── stdlib │ │ │ ├── abs.c │ │ │ ├── atof.c │ │ │ ├── atoi.c │ │ │ ├── atol.c │ │ │ ├── atoll.c │ │ │ ├── bsearch.c │ │ │ ├── div.c │ │ │ ├── ecvt.c │ │ │ ├── fcvt.c │ │ │ ├── gcvt.c │ │ │ ├── imaxabs.c │ │ │ ├── imaxdiv.c │ │ │ ├── labs.c │ │ │ ├── ldiv.c │ │ │ ├── llabs.c │ │ │ ├── lldiv.c │ │ │ ├── qsort.c │ │ │ ├── strtod.c │ │ │ ├── strtol.c │ │ │ ├── wcstod.c │ │ │ └── wcstol.c │ │ ├── string │ │ │ ├── aarch64 │ │ │ │ ├── memcpy.S │ │ │ │ └── memset.S │ │ │ ├── arm │ │ │ │ ├── __aeabi_memcpy.s │ │ │ │ ├── __aeabi_memset.s │ │ │ │ └── memcpy.S │ │ │ ├── bcmp.c │ │ │ ├── bcopy.c │ │ │ ├── bzero.c │ │ │ ├── explicit_bzero.c │ │ │ ├── i386 │ │ │ │ ├── memcpy.s │ │ │ │ ├── memmove.s │ │ │ │ └── memset.s │ │ │ ├── index.c │ │ │ ├── memccpy.c │ │ │ ├── memchr.c │ │ │ ├── memcmp.c │ │ │ ├── memcpy.c │ │ │ ├── memmem.c │ │ │ ├── memmove.c │ │ │ ├── mempcpy.c │ │ │ ├── memrchr.c │ │ │ ├── memset.c │ │ │ ├── rindex.c │ │ │ ├── stpcpy.c │ │ │ ├── stpncpy.c │ │ │ ├── strcasecmp.c │ │ │ ├── strcasestr.c │ │ │ ├── strcat.c │ │ │ ├── strchr.c │ │ │ ├── strchrnul.c │ │ │ ├── strcmp.c │ │ │ ├── strcpy.c │ │ │ ├── strcspn.c │ │ │ ├── strdup.c │ │ │ ├── strerror_r.c │ │ │ ├── strlcat.c │ │ │ ├── strlcpy.c │ │ │ ├── strlen.c │ │ │ ├── strncasecmp.c │ │ │ ├── strncat.c │ │ │ ├── strncmp.c │ │ │ ├── strncpy.c │ │ │ ├── strndup.c │ │ │ ├── strnlen.c │ │ │ ├── strpbrk.c │ │ │ ├── strrchr.c │ │ │ ├── strsep.c │ │ │ ├── strsignal.c │ │ │ ├── strspn.c │ │ │ ├── strstr.c │ │ │ ├── strtok.c │ │ │ ├── strtok_r.c │ │ │ ├── strverscmp.c │ │ │ ├── swab.c │ │ │ ├── wcpcpy.c │ │ │ ├── wcpncpy.c │ │ │ ├── wcscasecmp.c │ │ │ ├── wcscasecmp_l.c │ │ │ ├── wcscat.c │ │ │ ├── wcschr.c │ │ │ ├── wcscmp.c │ │ │ ├── wcscpy.c │ │ │ ├── wcscspn.c │ │ │ ├── wcsdup.c │ │ │ ├── wcslen.c │ │ │ ├── wcsncasecmp.c │ │ │ ├── wcsncasecmp_l.c │ │ │ ├── wcsncat.c │ │ │ ├── wcsncmp.c │ │ │ ├── wcsncpy.c │ │ │ ├── wcsnlen.c │ │ │ ├── wcspbrk.c │ │ │ ├── wcsrchr.c │ │ │ ├── wcsspn.c │ │ │ ├── wcsstr.c │ │ │ ├── wcstok.c │ │ │ ├── wcswcs.c │ │ │ ├── wmemchr.c │ │ │ ├── wmemcmp.c │ │ │ ├── wmemcpy.c │ │ │ ├── wmemmove.c │ │ │ ├── wmemset.c │ │ │ └── x86_64 │ │ │ │ ├── memcpy.s │ │ │ │ ├── memmove.s │ │ │ │ └── memset.s │ │ ├── temp │ │ │ ├── __randname.c │ │ │ ├── mkdtemp.c │ │ │ ├── mkostemp.c │ │ │ ├── mkostemps.c │ │ │ ├── mkstemp.c │ │ │ ├── mkstemps.c │ │ │ └── mktemp.c │ │ ├── termios │ │ │ ├── cfgetospeed.c │ │ │ ├── cfmakeraw.c │ │ │ ├── cfsetospeed.c │ │ │ ├── tcdrain.c │ │ │ ├── tcflow.c │ │ │ ├── tcflush.c │ │ │ ├── tcgetattr.c │ │ │ ├── tcgetsid.c │ │ │ ├── tcgetwinsize.c │ │ │ ├── tcsendbreak.c │ │ │ ├── tcsetattr.c │ │ │ └── tcsetwinsize.c │ │ ├── thread │ │ │ ├── __lock.c │ │ │ ├── __set_thread_area.c │ │ │ ├── __syscall_cp.c │ │ │ ├── __timedwait.c │ │ │ ├── __tls_get_addr.c │ │ │ ├── __unmapself.c │ │ │ ├── __wait.c │ │ │ ├── aarch64 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── arm │ │ │ │ ├── __aeabi_read_tp.s │ │ │ │ ├── __set_thread_area.c │ │ │ │ ├── __unmapself.s │ │ │ │ ├── atomics.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── call_once.c │ │ │ ├── clone.c │ │ │ ├── cnd_broadcast.c │ │ │ ├── cnd_destroy.c │ │ │ ├── cnd_init.c │ │ │ ├── cnd_signal.c │ │ │ ├── cnd_timedwait.c │ │ │ ├── cnd_wait.c │ │ │ ├── default_attr.c │ │ │ ├── i386 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ ├── syscall_cp.s │ │ │ │ └── tls.s │ │ │ ├── lock_ptc.c │ │ │ ├── m68k │ │ │ │ ├── __m68k_read_tp.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── microblaze │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── mips │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── mips64 │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── mipsn32 │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── mtx_destroy.c │ │ │ ├── mtx_init.c │ │ │ ├── mtx_lock.c │ │ │ ├── mtx_timedlock.c │ │ │ ├── mtx_trylock.c │ │ │ ├── mtx_unlock.c │ │ │ ├── or1k │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── powerpc │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── powerpc64 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── pthread_atfork.c │ │ │ ├── pthread_attr_destroy.c │ │ │ ├── pthread_attr_get.c │ │ │ ├── pthread_attr_init.c │ │ │ ├── pthread_attr_setdetachstate.c │ │ │ ├── pthread_attr_setguardsize.c │ │ │ ├── pthread_attr_setinheritsched.c │ │ │ ├── pthread_attr_setschedparam.c │ │ │ ├── pthread_attr_setschedpolicy.c │ │ │ ├── pthread_attr_setscope.c │ │ │ ├── pthread_attr_setstack.c │ │ │ ├── pthread_attr_setstacksize.c │ │ │ ├── pthread_barrier_destroy.c │ │ │ ├── pthread_barrier_init.c │ │ │ ├── pthread_barrier_wait.c │ │ │ ├── pthread_barrierattr_destroy.c │ │ │ ├── pthread_barrierattr_init.c │ │ │ ├── pthread_barrierattr_setpshared.c │ │ │ ├── pthread_cancel.c │ │ │ ├── pthread_cleanup_push.c │ │ │ ├── pthread_cond_broadcast.c │ │ │ ├── pthread_cond_destroy.c │ │ │ ├── pthread_cond_init.c │ │ │ ├── pthread_cond_signal.c │ │ │ ├── pthread_cond_timedwait.c │ │ │ ├── pthread_cond_wait.c │ │ │ ├── pthread_condattr_destroy.c │ │ │ ├── pthread_condattr_init.c │ │ │ ├── pthread_condattr_setclock.c │ │ │ ├── pthread_condattr_setpshared.c │ │ │ ├── pthread_create.c │ │ │ ├── pthread_detach.c │ │ │ ├── pthread_equal.c │ │ │ ├── pthread_getattr_np.c │ │ │ ├── pthread_getconcurrency.c │ │ │ ├── pthread_getcpuclockid.c │ │ │ ├── pthread_getschedparam.c │ │ │ ├── pthread_getspecific.c │ │ │ ├── pthread_join.c │ │ │ ├── pthread_key_create.c │ │ │ ├── pthread_kill.c │ │ │ ├── pthread_mutex_consistent.c │ │ │ ├── pthread_mutex_destroy.c │ │ │ ├── pthread_mutex_getprioceiling.c │ │ │ ├── pthread_mutex_init.c │ │ │ ├── pthread_mutex_lock.c │ │ │ ├── pthread_mutex_setprioceiling.c │ │ │ ├── pthread_mutex_timedlock.c │ │ │ ├── pthread_mutex_trylock.c │ │ │ ├── pthread_mutex_unlock.c │ │ │ ├── pthread_mutexattr_destroy.c │ │ │ ├── pthread_mutexattr_init.c │ │ │ ├── pthread_mutexattr_setprotocol.c │ │ │ ├── pthread_mutexattr_setpshared.c │ │ │ ├── pthread_mutexattr_setrobust.c │ │ │ ├── pthread_mutexattr_settype.c │ │ │ ├── pthread_once.c │ │ │ ├── pthread_rwlock_destroy.c │ │ │ ├── pthread_rwlock_init.c │ │ │ ├── pthread_rwlock_rdlock.c │ │ │ ├── pthread_rwlock_timedrdlock.c │ │ │ ├── pthread_rwlock_timedwrlock.c │ │ │ ├── pthread_rwlock_tryrdlock.c │ │ │ ├── pthread_rwlock_trywrlock.c │ │ │ ├── pthread_rwlock_unlock.c │ │ │ ├── pthread_rwlock_wrlock.c │ │ │ ├── pthread_rwlockattr_destroy.c │ │ │ ├── pthread_rwlockattr_init.c │ │ │ ├── pthread_rwlockattr_setpshared.c │ │ │ ├── pthread_self.c │ │ │ ├── pthread_setattr_default_np.c │ │ │ ├── pthread_setcancelstate.c │ │ │ ├── pthread_setcanceltype.c │ │ │ ├── pthread_setconcurrency.c │ │ │ ├── pthread_setname_np.c │ │ │ ├── pthread_setschedparam.c │ │ │ ├── pthread_setschedprio.c │ │ │ ├── pthread_setspecific.c │ │ │ ├── pthread_sigmask.c │ │ │ ├── pthread_spin_destroy.c │ │ │ ├── pthread_spin_init.c │ │ │ ├── pthread_spin_lock.c │ │ │ ├── pthread_spin_trylock.c │ │ │ ├── pthread_spin_unlock.c │ │ │ ├── pthread_testcancel.c │ │ │ ├── riscv64 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── s390x │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __tls_get_offset.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── sem_destroy.c │ │ │ ├── sem_getvalue.c │ │ │ ├── sem_init.c │ │ │ ├── sem_open.c │ │ │ ├── sem_post.c │ │ │ ├── sem_timedwait.c │ │ │ ├── sem_trywait.c │ │ │ ├── sem_unlink.c │ │ │ ├── sem_wait.c │ │ │ ├── sh │ │ │ │ ├── __set_thread_area.c │ │ │ │ ├── __unmapself.c │ │ │ │ ├── __unmapself_mmu.s │ │ │ │ ├── atomics.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ ├── synccall.c │ │ │ ├── syscall_cp.c │ │ │ ├── thrd_create.c │ │ │ ├── thrd_exit.c │ │ │ ├── thrd_join.c │ │ │ ├── thrd_sleep.c │ │ │ ├── thrd_yield.c │ │ │ ├── tls.c │ │ │ ├── tss_create.c │ │ │ ├── tss_delete.c │ │ │ ├── tss_set.c │ │ │ ├── vmlock.c │ │ │ ├── wasm32 │ │ │ │ └── wasi_thread_start.s │ │ │ ├── wasm64 │ │ │ │ └── wasi_thread_start.s │ │ │ ├── x32 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ │ └── x86_64 │ │ │ │ ├── __set_thread_area.s │ │ │ │ ├── __unmapself.s │ │ │ │ ├── clone.s │ │ │ │ └── syscall_cp.s │ │ ├── time │ │ │ ├── __map_file.c │ │ │ ├── __month_to_secs.c │ │ │ ├── __secs_to_tm.c │ │ │ ├── __tm_to_secs.c │ │ │ ├── __tz.c │ │ │ ├── __year_to_secs.c │ │ │ ├── asctime.c │ │ │ ├── asctime_r.c │ │ │ ├── clock.c │ │ │ ├── clock_getcpuclockid.c │ │ │ ├── clock_getres.c │ │ │ ├── clock_gettime.c │ │ │ ├── clock_nanosleep.c │ │ │ ├── clock_settime.c │ │ │ ├── ctime.c │ │ │ ├── ctime_r.c │ │ │ ├── difftime.c │ │ │ ├── ftime.c │ │ │ ├── getdate.c │ │ │ ├── gettimeofday.c │ │ │ ├── gmtime.c │ │ │ ├── gmtime_r.c │ │ │ ├── localtime.c │ │ │ ├── localtime_r.c │ │ │ ├── mktime.c │ │ │ ├── nanosleep.c │ │ │ ├── strftime.c │ │ │ ├── strptime.c │ │ │ ├── time.c │ │ │ ├── time_impl.h │ │ │ ├── timegm.c │ │ │ ├── timer_create.c │ │ │ ├── timer_delete.c │ │ │ ├── timer_getoverrun.c │ │ │ ├── timer_gettime.c │ │ │ ├── timer_settime.c │ │ │ ├── times.c │ │ │ ├── timespec_get.c │ │ │ ├── utime.c │ │ │ └── wcsftime.c │ │ └── unistd │ │ │ ├── _exit.c │ │ │ ├── access.c │ │ │ ├── acct.c │ │ │ ├── alarm.c │ │ │ ├── chdir.c │ │ │ ├── chown.c │ │ │ ├── close.c │ │ │ ├── ctermid.c │ │ │ ├── dup.c │ │ │ ├── dup2.c │ │ │ ├── dup3.c │ │ │ ├── faccessat.c │ │ │ ├── fchdir.c │ │ │ ├── fchown.c │ │ │ ├── fchownat.c │ │ │ ├── fdatasync.c │ │ │ ├── fsync.c │ │ │ ├── ftruncate.c │ │ │ ├── getcwd.c │ │ │ ├── getegid.c │ │ │ ├── geteuid.c │ │ │ ├── getgid.c │ │ │ ├── getgroups.c │ │ │ ├── gethostname.c │ │ │ ├── getlogin.c │ │ │ ├── getlogin_r.c │ │ │ ├── getpgid.c │ │ │ ├── getpgrp.c │ │ │ ├── getpid.c │ │ │ ├── getppid.c │ │ │ ├── getsid.c │ │ │ ├── getuid.c │ │ │ ├── isatty.c │ │ │ ├── lchown.c │ │ │ ├── link.c │ │ │ ├── linkat.c │ │ │ ├── lseek.c │ │ │ ├── mips │ │ │ └── pipe.s │ │ │ ├── mips64 │ │ │ └── pipe.s │ │ │ ├── mipsn32 │ │ │ ├── lseek.c │ │ │ └── pipe.s │ │ │ ├── nice.c │ │ │ ├── pause.c │ │ │ ├── pipe.c │ │ │ ├── pipe2.c │ │ │ ├── posix_close.c │ │ │ ├── pread.c │ │ │ ├── preadv.c │ │ │ ├── pwrite.c │ │ │ ├── pwritev.c │ │ │ ├── read.c │ │ │ ├── readlink.c │ │ │ ├── readlinkat.c │ │ │ ├── readv.c │ │ │ ├── renameat.c │ │ │ ├── rmdir.c │ │ │ ├── setegid.c │ │ │ ├── seteuid.c │ │ │ ├── setgid.c │ │ │ ├── setpgid.c │ │ │ ├── setpgrp.c │ │ │ ├── setregid.c │ │ │ ├── setresgid.c │ │ │ ├── setresuid.c │ │ │ ├── setreuid.c │ │ │ ├── setsid.c │ │ │ ├── setuid.c │ │ │ ├── setxid.c │ │ │ ├── sh │ │ │ └── pipe.s │ │ │ ├── sleep.c │ │ │ ├── symlink.c │ │ │ ├── symlinkat.c │ │ │ ├── sync.c │ │ │ ├── tcgetpgrp.c │ │ │ ├── tcsetpgrp.c │ │ │ ├── truncate.c │ │ │ ├── ttyname.c │ │ │ ├── ttyname_r.c │ │ │ ├── ualarm.c │ │ │ ├── unlink.c │ │ │ ├── unlinkat.c │ │ │ ├── usleep.c │ │ │ ├── write.c │ │ │ ├── writev.c │ │ │ └── x32 │ │ │ └── lseek.c │ └── tools │ │ ├── add-cfi.common.awk │ │ ├── add-cfi.i386.awk │ │ ├── add-cfi.x86_64.awk │ │ ├── install.sh │ │ ├── ld.musl-clang.in │ │ ├── mkalltypes.sed │ │ ├── musl-clang.in │ │ ├── musl-gcc.specs.sh │ │ └── version.sh └── sources │ └── arc4random.c ├── libclang_rt.builtins-wasm32.a ├── take-expected.sh ├── test ├── .gitignore ├── Makefile ├── README.md └── wasix │ ├── c_pthreads │ ├── CMakeLists.txt │ ├── main.c │ └── test.sh │ ├── cpp_atomic │ ├── CMakeLists.txt │ ├── main.cpp │ └── test.sh │ ├── cpp_executable │ ├── CMakeLists.txt │ ├── main.cpp │ └── test.sh │ ├── cpp_iostream │ ├── CMakeLists.txt │ ├── main.cpp │ └── test.sh │ ├── cpp_threads │ ├── CMakeLists.txt │ ├── main.cpp │ └── test.sh │ └── run_tests.sh └── tools ├── append-builtins └── wasm32-wasi.mri ├── clang-wasix-eh.cmake_toolchain ├── clang-wasix.cmake_toolchain ├── generate-services.py ├── wasi-headers ├── .gitignore ├── Cargo.toml ├── LICENSE └── src │ ├── c_header.rs │ ├── lib.rs │ └── main.rs └── wasix-headers ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE └── src ├── c_header.rs ├── lib.rs └── main.rs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Se publish headers and other files from the repo, and we don't want 2 | # them differing depending on the line-ending style of the host they 3 | # were checked out on. 4 | * text eol=lf 5 | *.a binary 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .ccls* 2 | sysroot 3 | sysroot32 4 | sysroot32-eh 5 | sysroot64 6 | build 7 | .vscode 8 | dist 9 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash -e 2 | make clean 3 | ./build64.sh 4 | ./build32.sh 5 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/getegid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | gid_t getegid(void) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/geteuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | uid_t geteuid(void) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/getgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | gid_t getgid(void) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/getuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | uid_t getuid(void) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/setegid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int setegid(gid_t gid) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/seteuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int seteuid(uid_t uid) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/setgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int setgid(gid_t gid) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/cloudlibc/src/libc/unistd/setuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int setuid(uid_t uid) { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-bottom-half/crt/crt1.c: -------------------------------------------------------------------------------- 1 | // We compile a plain crt1.o for toolchain compatibility, but it's 2 | // identical to crt1-command.o. 3 | #include "crt1-command.c" 4 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/_/limits.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/_/struct/timespec.h: -------------------------------------------------------------------------------- 1 | #include <__struct_timespec.h> 2 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/_/struct/timeval.h: -------------------------------------------------------------------------------- 1 | #include <__struct_timeval.h> 2 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/assert.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef __cplusplus 4 | #define static_assert _Static_assert 5 | #endif 6 | 7 | #define assert(x) ((void)((x) || (abort(), 0))) 8 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/common/crt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-bottom-half/headers/private/common/crt.h -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/errno.h: -------------------------------------------------------------------------------- 1 | #include_next 2 | #define EOPNOTSUPP ENOTSUP 3 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/fcntl.h: -------------------------------------------------------------------------------- 1 | #include_next 2 | #include <_/types.h> 3 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/sched.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-bottom-half/headers/private/sched.h -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/stdarg.h: -------------------------------------------------------------------------------- 1 | #include_next 2 | #include <_/cdefs.h> 3 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/stdio.h: -------------------------------------------------------------------------------- 1 | #include <_/cdefs.h> 2 | int snprintf(char *str, size_t size, const char *format, ...); 3 | int rename(const char *oldpath, const char *newpath); 4 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/stdlib.h: -------------------------------------------------------------------------------- 1 | #define __need_size_t 2 | #define __need_wchar_t 3 | #define __need_NULL 4 | #include 5 | 6 | #include_next 7 | 8 | int clearenv(void); 9 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/string.h: -------------------------------------------------------------------------------- 1 | #include_next 2 | #include <_/cdefs.h> 3 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/sys/mman.h: -------------------------------------------------------------------------------- 1 | #include_next 2 | #include <_/types.h> 3 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/private/threads.h: -------------------------------------------------------------------------------- 1 | #ifndef __cplusplus 2 | #define thread_local _Thread_local 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__macro_FD_SETSIZE.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___macro_FD_SETSIZE_h 2 | #define __wasilibc___macro_FD_SETSIZE_h 3 | 4 | #define FD_SETSIZE 1024 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__struct_in6_addr.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___struct_in6_addr_h 2 | #define __wasilibc___struct_in6_addr_h 3 | 4 | struct in6_addr { 5 | _Alignas(int32_t) unsigned char s6_addr[16]; 6 | }; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_DIR.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_DIR_h 2 | #define __wasilibc___typedef_DIR_h 3 | 4 | typedef struct _DIR DIR; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_blksize_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_blksize_t_h 2 | #define __wasilibc___typedef_blksize_t_h 3 | 4 | typedef long blksize_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_gid_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_gid_t_h 2 | #define __wasilibc___typedef_gid_t_h 3 | 4 | typedef unsigned gid_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_in_addr_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_in_addr_t_h 2 | #define __wasilibc___typedef_in_addr_t_h 3 | 4 | typedef unsigned in_addr_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_in_port_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_in_port_t_h 2 | #define __wasilibc___typedef_in_port_t_h 3 | 4 | typedef unsigned short in_port_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_mode_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_mode_t_h 2 | #define __wasilibc___typedef_mode_t_h 3 | 4 | typedef unsigned mode_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_nfds_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_nfds_t_h 2 | #define __wasilibc___typedef_nfds_t_h 3 | 4 | typedef unsigned long nfds_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_sa_family_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_sa_family_t_h 2 | #define __wasilibc___typedef_sa_family_t_h 3 | 4 | typedef unsigned short sa_family_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_socklen_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_socklen_t_h 2 | #define __wasilibc___typedef_socklen_t_h 3 | 4 | typedef unsigned socklen_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_ssize_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_ssize_t_h 2 | #define __wasilibc___typedef_ssize_t_h 3 | 4 | /* This is defined to be the same size as size_t. */ 5 | typedef long ssize_t; 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/__typedef_uid_t.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc___typedef_uid_t_h 2 | #define __wasilibc___typedef_uid_t_h 3 | 4 | typedef unsigned uid_t; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_errno_h 2 | #define __wasilibc_errno_h 3 | 4 | #include <__errno.h> 5 | #include <__errno_values.h> 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/netinet/in.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_netinet_in_h 2 | #define __wasilibc_netinet_in_h 3 | 4 | #include <__header_netinet_in.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/sys/socket.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_sys_socket_h 2 | #define __wasilibc_sys_socket_h 3 | 4 | #include <__header_sys_socket.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_sys_time_h 2 | #define __wasilibc_sys_time_h 3 | 4 | #include <__struct_timeval.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/sys/times.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_sys_times_h 2 | #define __wasilibc_sys_times_h 3 | 4 | #include <__struct_tms.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/sys/uio.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_sys_uio_h 2 | #define __wasilibc_sys_uio_h 3 | 4 | #include <__struct_iovec.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/sys/un.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_sys_un_h 2 | #define __wasilibc_sys_un_h 3 | 4 | #include <__struct_sockaddr_un.h> 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/wasi/api.h: -------------------------------------------------------------------------------- 1 | #include "api_wasi.h" 2 | #include "api_wasix.h" 3 | #include "api_poly.h" 4 | -------------------------------------------------------------------------------- /libc-bottom-half/headers/public/wchar.h: -------------------------------------------------------------------------------- 1 | #ifndef __wasilibc_wchar_h 2 | #define __wasilibc_wchar_h 3 | 4 | #define __need_size_t 5 | #define __need_wchar_t 6 | #define __need_NULL 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /libc-bottom-half/sources/__errno_location.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int *__errno_location(void) { 4 | return &errno; 5 | } 6 | -------------------------------------------------------------------------------- /libc-bottom-half/sources/abort.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void abort(void) { 4 | // wasm doesn't support signals, so just trap to halt the program. 5 | __builtin_trap(); 6 | } 7 | -------------------------------------------------------------------------------- /libc-bottom-half/sources/errno.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // These values are used by reference-sysroot's dlmalloc. 4 | const int __EINVAL = EINVAL; 5 | const int __ENOMEM = ENOMEM; 6 | -------------------------------------------------------------------------------- /libc-top-half/headers/private/printscan.h: -------------------------------------------------------------------------------- 1 | // Full long double support. 2 | typedef long double long_double; 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/.mailmap: -------------------------------------------------------------------------------- 1 | Ada Worcester 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/VERSION: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/aarch64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/aarch64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/aarch64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[22]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/bits/ioctl_fix.h: -------------------------------------------------------------------------------- 1 | #undef FIOQSIZE 2 | #define FIOQSIZE 0x545e 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/arm/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[32]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/hwcap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/hwcap.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/io.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/io.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/ioctl_fix.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/ioctl_fix.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 2 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/kd.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/limits.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/limits.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/link.h: -------------------------------------------------------------------------------- 1 | typedef uint32_t Elf_Symndx; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/mman.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/mman.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/poll.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/poll.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/ptrace.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/ptrace.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/resource.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/socket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/bits/socket.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/soundcard.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/bits/vt.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/generic/fp_arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/generic/fp_arch.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/bits/mman.h: -------------------------------------------------------------------------------- 1 | #define MAP_32BIT 0x40 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[6]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/i386/pthread_arch.h: -------------------------------------------------------------------------------- 1 | static inline uintptr_t __get_tp() 2 | { 3 | uintptr_t tp; 4 | __asm__ ("movl %%gs:0,%0" : "=r" (tp) ); 5 | return tp; 6 | } 7 | 8 | #define MC_PC gregs[REG_EIP] 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/m68k/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/m68k/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/m68k/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/m68k/bits/ptrace.h: -------------------------------------------------------------------------------- 1 | #define PTRACE_GET_THREAD_AREA 25 2 | #define PTRACE_SINGLEBLOCK 33 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/m68k/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[39]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[18]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/microblaze/pthread_arch.h: -------------------------------------------------------------------------------- 1 | static inline uintptr_t __get_tp() 2 | { 3 | uintptr_t tp; 4 | __asm__ ("ori %0, r21, 0" : "=r" (tp) ); 5 | return tp; 6 | } 7 | 8 | #define MC_PC regs.pc 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/bits/poll.h: -------------------------------------------------------------------------------- 1 | #define POLLWRNORM POLLOUT 2 | #define POLLWRBAND 0x100 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/bits/resource.h: -------------------------------------------------------------------------------- 1 | #define RLIMIT_NOFILE 5 2 | #define RLIMIT_AS 6 3 | #define RLIMIT_RSS 7 4 | #define RLIMIT_NPROC 8 5 | #define RLIMIT_MEMLOCK 9 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[13]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips64/bits/hwcap.h: -------------------------------------------------------------------------------- 1 | #define HWCAP_MIPS_R6 (1 << 0) 2 | #define HWCAP_MIPS_MSA (1 << 1) 3 | #define HWCAP_MIPS_CRC32 (1 << 2) 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips64/bits/poll.h: -------------------------------------------------------------------------------- 1 | #define POLLWRNORM POLLOUT 2 | #define POLLWRBAND 0x100 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFFBIG 1 2 | #define _POSIX_V7_LP64_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips64/bits/resource.h: -------------------------------------------------------------------------------- 1 | #define RLIMIT_NOFILE 5 2 | #define RLIMIT_AS 6 3 | #define RLIMIT_RSS 7 4 | #define RLIMIT_NPROC 8 5 | #define RLIMIT_MEMLOCK 9 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mips64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[23]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/hwcap.h: -------------------------------------------------------------------------------- 1 | #define HWCAP_MIPS_R6 (1 << 0) 2 | #define HWCAP_MIPS_MSA (1 << 1) 3 | #define HWCAP_MIPS_CRC32 (1 << 2) 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/poll.h: -------------------------------------------------------------------------------- 1 | #define POLLWRNORM POLLOUT 2 | #define POLLWRBAND 0x100 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/resource.h: -------------------------------------------------------------------------------- 1 | #define RLIMIT_NOFILE 5 2 | #define RLIMIT_AS 6 3 | #define RLIMIT_RSS 7 4 | #define RLIMIT_NPROC 8 5 | #define RLIMIT_MEMLOCK 9 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/mipsn32/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[23]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 8192 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[13]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/or1k/bits/user.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/or1k/bits/user.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[56]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/powerpc64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned __int128 __jmp_buf[32]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/riscv64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/riscv64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/riscv64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[26]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/riscv64/bits/user.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define ELF_NGREG 32 4 | typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; 5 | typedef union __riscv_mc_fp_state elf_fpregset_t; 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/ioctl_fix.h: -------------------------------------------------------------------------------- 1 | #undef FIOQSIZE 2 | #define FIOQSIZE 0x545e 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/link.h: -------------------------------------------------------------------------------- 1 | typedef uint64_t Elf_Symndx; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/s390x/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[18]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/arch.mak: -------------------------------------------------------------------------------- 1 | COMPAT_SRC_DIRS = compat/time32 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/bits/ipcstat.h: -------------------------------------------------------------------------------- 1 | #define IPC_STAT 0x102 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/bits/ptrace.h: -------------------------------------------------------------------------------- 1 | #define PTRACE_GETFDPIC 31 2 | #define PTRACE_GETFDPIC_EXEC 0 3 | #define PTRACE_GETFDPIC_INTERP 1 4 | #define PTRACE_GETDSPREGS 55 5 | #define PTRACE_SETDSPREGS 56 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/sh/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[15]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/dirent.h: -------------------------------------------------------------------------------- 1 | #include <__struct_dirent.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/fcntl.h: -------------------------------------------------------------------------------- 1 | /* Use the WASI libc fcntl implementation bits. */ 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/ioctl.h: -------------------------------------------------------------------------------- 1 | /* Use the WASI libc ioctl implementation bits. */ 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/limits.h: -------------------------------------------------------------------------------- 1 | #include <__macro_PAGESIZE.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG (1) 2 | #define _POSIX_V7_ILP32_OFFBIG (1) 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/bits/stat.h: -------------------------------------------------------------------------------- 1 | #include <__struct_stat.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/pthread_arch.h: -------------------------------------------------------------------------------- 1 | extern _Thread_local struct __pthread __wasilibc_pthread_self; 2 | 3 | static inline uintptr_t __get_tp() { 4 | return (uintptr_t)&__wasilibc_pthread_self; 5 | } 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/reloc.h: -------------------------------------------------------------------------------- 1 | #define LDSO_ARCH "wasm32" 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm32/syscall_arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/wasm32/syscall_arch.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/dirent.h: -------------------------------------------------------------------------------- 1 | #include <__struct_dirent.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/fcntl.h: -------------------------------------------------------------------------------- 1 | /* Use the WASI libc fcntl implementation bits. */ 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/ioctl.h: -------------------------------------------------------------------------------- 1 | /* Use the WASI libc ioctl implementation bits. */ 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/limits.h: -------------------------------------------------------------------------------- 1 | #include <__macro_PAGESIZE.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG (1) 2 | #define _POSIX_V7_ILP32_OFFBIG (1) 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/bits/stat.h: -------------------------------------------------------------------------------- 1 | #include <__struct_stat.h> 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/reloc.h: -------------------------------------------------------------------------------- 1 | #define LDSO_ARCH "wasm64" 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/wasm64/syscall_arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/arch/wasm64/syscall_arch.h -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/ioctl_fix.h: -------------------------------------------------------------------------------- 1 | #undef SIOCGSTAMP 2 | #undef SIOCGSTAMPNS 3 | #define SIOCGSTAMP 0x8906 4 | #define SIOCGSTAMPNS 0x8907 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/mman.h: -------------------------------------------------------------------------------- 1 | #define MAP_32BIT 0x40 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[8]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x32/bits/socket.h: -------------------------------------------------------------------------------- 1 | #define SO_RCVTIMEO 20 2 | #define SO_SNDTIMEO 21 3 | #define SO_TIMESTAMP 29 4 | #define SO_TIMESTAMPNS 35 5 | #define SO_TIMESTAMPING 37 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x86_64/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x86_64/bits/mman.h: -------------------------------------------------------------------------------- 1 | #define MAP_32BIT 0x40 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x86_64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x86_64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[8]; 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/arch/x86_64/pthread_arch.h: -------------------------------------------------------------------------------- 1 | static inline uintptr_t __get_tp() 2 | { 3 | uintptr_t tp; 4 | __asm__ ("mov %%fs:0,%0" : "=r" (tp) ); 5 | return tp; 6 | } 7 | 8 | #define MC_PC gregs[REG_RIP] 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/ctime32.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | char *__ctime32(time32_t *t) 5 | { 6 | return ctime(&(time_t){*t}); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/ctime32_r.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | char *__ctime32_r(time32_t *t, char *buf) 5 | { 6 | return ctime_r(&(time_t){*t}, buf); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/difftime32.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | double __difftime32(time32_t t1, time32_t t2) 5 | { 6 | return difftime(t1, t2); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/gmtime32.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | struct tm *__gmtime32(time32_t *t) 5 | { 6 | return gmtime(&(time_t){*t}); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/gmtime32_r.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | struct tm *__gmtime32_r(time32_t *t, struct tm *tm) 5 | { 6 | return gmtime_r(&(time_t){*t}, tm); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/localtime32.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | struct tm *__localtime32(time32_t *t) 5 | { 6 | return localtime(&(time_t){*t}); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/localtime32_r.c: -------------------------------------------------------------------------------- 1 | #include "time32.h" 2 | #include 3 | 4 | struct tm *__localtime32_r(time32_t *t, struct tm *tm) 5 | { 6 | return localtime_r(&(time_t){*t}, tm); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/compat/time32/stime32.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include "time32.h" 3 | #include 4 | 5 | int __stime32(const time32_t *t) 6 | { 7 | return stime(&(time_t){*t}); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/Scrt1.c: -------------------------------------------------------------------------------- 1 | #include "crt1.c" 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/aarch64/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | ldp x29,x30,[sp],#16 3 | ret 4 | 5 | .section .fini 6 | ldp x29,x30,[sp],#16 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/arm/crtn.s: -------------------------------------------------------------------------------- 1 | .syntax unified 2 | 3 | .section .init 4 | pop {r0,lr} 5 | bx lr 6 | 7 | .section .fini 8 | pop {r0,lr} 9 | bx lr 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/crti.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/crt/crti.c -------------------------------------------------------------------------------- /libc-top-half/musl/crt/crtn.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/crt/crtn.c -------------------------------------------------------------------------------- /libc-top-half/musl/crt/i386/crti.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | _init: 4 | sub $12,%esp 5 | 6 | .section .fini 7 | .global _fini 8 | _fini: 9 | sub $12,%esp 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/i386/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | add $12,%esp 3 | ret 4 | 5 | .section .fini 6 | add $12,%esp 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/microblaze/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | lwi r15, r1, 0 3 | rtsd r15, 8 4 | addi r1, r1, 32 5 | 6 | .section .fini 7 | lwi r15, r1, 0 8 | rtsd r15, 8 9 | addi r1, r1, 32 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/or1k/crti.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | _init: 4 | l.addi r1,r1,-4 5 | l.sw 0(r1),r9 6 | 7 | .section .fini 8 | .global _fini 9 | _fini: 10 | l.addi r1,r1,-4 11 | l.sw 0(r1),r9 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/or1k/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | l.lwz r9,0(r1) 3 | l.jr r9 4 | l.addi r1,r1,4 5 | 6 | .section .fini 7 | l.lwz r9,0(r1) 8 | l.jr r9 9 | l.addi r1,r1,4 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/powerpc/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .align 2 3 | lwz 0,36(1) 4 | addi 1,1,32 5 | mtlr 0 6 | blr 7 | 8 | .section .fini 9 | .align 2 10 | lwz 0,36(1) 11 | addi 1,1,32 12 | mtlr 0 13 | blr 14 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/powerpc64/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .align 2 3 | addi 1, 1, 32 4 | ld 0, 16(1) 5 | mtlr 0 6 | blr 7 | 8 | .section .fini 9 | .align 2 10 | addi 1, 1, 32 11 | ld 0, 16(1) 12 | mtlr 0 13 | blr 14 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/s390x/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .align 2 3 | lmg %r14, %r15, 272(%r15) 4 | br %r14 5 | 6 | .section .fini 7 | .align 2 8 | lmg %r14, %r15, 272(%r15) 9 | br %r14 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/x32/crti.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | _init: 4 | push %rax 5 | 6 | .section .fini 7 | .global _fini 8 | _fini: 9 | push %rax 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/x32/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | pop %rax 3 | ret 4 | 5 | .section .fini 6 | pop %rax 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/x86_64/crti.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | .global _init 3 | _init: 4 | push %rax 5 | 6 | .section .fini 7 | .global _fini 8 | _fini: 9 | push %rax 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/crt/x86_64/crtn.s: -------------------------------------------------------------------------------- 1 | .section .init 2 | pop %rax 3 | ret 4 | 5 | .section .fini 6 | pop %rax 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/arpa/nameser_compat.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/lastlog.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/memory.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/netinet/in_systm.h: -------------------------------------------------------------------------------- 1 | #ifndef _NETINET_IN_SYSTM_H 2 | #define _NETINET_IN_SYSTM_H 3 | 4 | #include 5 | 6 | typedef uint16_t n_short; 7 | typedef uint32_t n_long, n_time; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/stdnoreturn.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDNORETURN_H 2 | #define _STDNORETURN_H 3 | #ifndef __cplusplus 4 | #include 5 | #define noreturn _Noreturn 6 | #endif 7 | #endif 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/dir.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define direct dirent 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/errno.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/fcntl.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/kd.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/poll.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/reg.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_REG_H 2 | #define _SYS_REG_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/signal.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/soundcard.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/stropts.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/syslog.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/termios.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/ucontext.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/vfs.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/sys/vt.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/syscall.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/include/wait.h: -------------------------------------------------------------------------------- 1 | #warning redirecting incorrect #include to 2 | #include 3 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cabs.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | double cabs(double complex z) 4 | { 5 | return hypot(creal(z), cimag(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cabsf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float cabsf(float complex z) 4 | { 5 | return hypotf(crealf(z), cimagf(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cacosf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | // FIXME 4 | 5 | float complex cacosf(float complex z) 6 | { 7 | z = casinf(z); 8 | return CMPLXF((float)M_PI_2 - crealf(z), -cimagf(z)); 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/carg.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | double carg(double complex z) 4 | { 5 | return atan2(cimag(z), creal(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cargf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float cargf(float complex z) 4 | { 5 | return atan2f(cimagf(z), crealf(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/casinhf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex casinhf(float complex z) 4 | { 5 | z = casinf(CMPLXF(-cimagf(z), crealf(z))); 6 | return CMPLXF(cimagf(z), -crealf(z)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/catanhf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex catanhf(float complex z) 4 | { 5 | z = catanf(CMPLXF(-cimagf(z), crealf(z))); 6 | return CMPLXF(cimagf(z), -crealf(z)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/ccos.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | /* cos(z) = cosh(i z) */ 4 | 5 | double complex ccos(double complex z) 6 | { 7 | return ccosh(CMPLX(-cimag(z), creal(z))); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/ccosf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex ccosf(float complex z) 4 | { 5 | return ccoshf(CMPLXF(-cimagf(z), crealf(z))); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/ccoshl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | //FIXME 4 | long double complex ccoshl(long double complex z) 5 | { 6 | return ccosh(z); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cexpl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | //FIXME 4 | long double complex cexpl(long double complex z) 5 | { 6 | return cexp(z); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cimag.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | double (cimag)(double complex z) 4 | { 5 | return cimag(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cimagf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float (cimagf)(float complex z) 4 | { 5 | return cimagf(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cimagl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | long double (cimagl)(long double complex z) 4 | { 5 | return cimagl(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/conj.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | double complex conj(double complex z) 4 | { 5 | return CMPLX(creal(z), -cimag(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/conjf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex conjf(float complex z) 4 | { 5 | return CMPLXF(crealf(z), -cimagf(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/conjl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | long double complex conjl(long double complex z) 4 | { 5 | return CMPLXL(creall(z), -cimagl(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cpow.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | /* pow(z, c) = exp(c log(z)), See C99 G.6.4.1 */ 4 | 5 | double complex cpow(double complex z, double complex c) 6 | { 7 | return cexp(c * clog(z)); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cpowf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex cpowf(float complex z, float complex c) 4 | { 5 | return cexpf(c * clogf(z)); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/cproj.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | double complex cproj(double complex z) 4 | { 5 | if (isinf(creal(z)) || isinf(cimag(z))) 6 | return CMPLX(INFINITY, copysign(0.0, creal(z))); 7 | return z; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/creal.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double (creal)(double complex z) 4 | { 5 | return creal(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/crealf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float (crealf)(float complex z) 4 | { 5 | return crealf(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/creall.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double (creall)(long double complex z) 4 | { 5 | return creall(z); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/csinf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex csinf(float complex z) 4 | { 5 | z = csinhf(CMPLXF(-cimagf(z), crealf(z))); 6 | return CMPLXF(cimagf(z), -crealf(z)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/csinhl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | //FIXME 4 | long double complex csinhl(long double complex z) 5 | { 6 | return csinh(z); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/csqrtl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | //FIXME 4 | long double complex csqrtl(long double complex z) 5 | { 6 | return csqrt(z); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/ctanf.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | float complex ctanf(float complex z) 4 | { 5 | z = ctanhf(CMPLXF(-cimagf(z), crealf(z))); 6 | return CMPLXF(cimagf(z), -crealf(z)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/complex/ctanhl.c: -------------------------------------------------------------------------------- 1 | #include "complex_impl.h" 2 | 3 | //FIXME 4 | long double complex ctanhl(long double complex z) 5 | { 6 | return ctanh(z); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/conf/pathconf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long pathconf(const char *path, int name) 4 | { 5 | return fpathconf(-1, name); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ctype/__ctype_get_mb_cur_max.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "locale_impl.h" 3 | 4 | size_t __ctype_get_mb_cur_max() 5 | { 6 | return MB_CUR_MAX; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ctype/isascii.c: -------------------------------------------------------------------------------- 1 | #include 2 | #undef isascii 3 | 4 | int isascii(int c) 5 | { 6 | return !(c&~0x7f); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ctype/toascii.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* nonsense function that should NEVER be used! */ 4 | int toascii(int c) 5 | { 6 | return c & 0x7f; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ctype/wcswidth.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wcswidth(const wchar_t *wcs, size_t n) 4 | { 5 | int l=0, k=0; 6 | for (; n-- && *wcs && (k = wcwidth(*wcs)) >= 0; l+=k, wcs++); 7 | return (k < 0) ? k : l; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/dirent/dirfd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "__dirent.h" 3 | 4 | int dirfd(DIR *d) 5 | { 6 | return d->fd; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/dirent/telldir.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "__dirent.h" 3 | 4 | long telldir(DIR *dir) 5 | { 6 | return dir->tell; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/exit/abort_lock.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | volatile int __abort_lock[1]; 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/exit/arm/__aeabi_atexit.c: -------------------------------------------------------------------------------- 1 | int __cxa_atexit(void (*func)(void *), void *arg, void *dso); 2 | 3 | int __aeabi_atexit (void *obj, void (*func) (void *), void *d) 4 | { 5 | return __cxa_atexit (func, obj, d); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fcntl/creat.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int creat(const char *filename, mode_t mode) 4 | { 5 | return open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode); 6 | } 7 | 8 | weak_alias(creat, creat64); 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/arm/fenv.c: -------------------------------------------------------------------------------- 1 | #if !__ARM_PCS_VFP 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/fegetexceptflag.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int fegetexceptflag(fexcept_t *fp, int mask) 4 | { 5 | *fp = fetestexcept(mask); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/feholdexcept.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int feholdexcept(fenv_t *envp) 4 | { 5 | fegetenv(envp); 6 | feclearexcept(FE_ALL_EXCEPT); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/fesetexceptflag.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int fesetexceptflag(const fexcept_t *fp, int mask) 4 | { 5 | feclearexcept(~*fp & mask); 6 | feraiseexcept(*fp & mask); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/feupdateenv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int feupdateenv(const fenv_t *envp) 4 | { 5 | int ex = fetestexcept(FE_ALL_EXCEPT); 6 | fesetenv(envp); 7 | feraiseexcept(ex); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/mips/fenv-sf.c: -------------------------------------------------------------------------------- 1 | #ifdef __mips_soft_float 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/mips64/fenv-sf.c: -------------------------------------------------------------------------------- 1 | #ifdef __mips_soft_float 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/mipsn32/fenv-sf.c: -------------------------------------------------------------------------------- 1 | #ifdef __mips_soft_float 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/powerpc/fenv-sf.c: -------------------------------------------------------------------------------- 1 | #ifdef _SOFT_FLOAT 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/riscv64/fenv-sf.c: -------------------------------------------------------------------------------- 1 | #ifndef __riscv_flen 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/fenv/sh/fenv-nofpu.c: -------------------------------------------------------------------------------- 1 | #if !__SH_FPU_ANY__ && !__SH4__ 2 | #include "../fenv.c" 3 | #endif 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/include/arpa/inet.h: -------------------------------------------------------------------------------- 1 | #ifndef ARPA_INET_H 2 | #define ARPA_INET_H 3 | 4 | #include "../../../include/arpa/inet.h" 5 | 6 | hidden int __inet_aton(const char *, struct in_addr *); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/include/langinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef LANGINFO_H 2 | #define LANGINFO_H 3 | 4 | #include "../../include/langinfo.h" 5 | 6 | char *__nl_langinfo_l(nl_item, locale_t); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/include/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef SYS_TIME_H 2 | #define SYS_TIME_H 3 | 4 | #include "../../../include/sys/time.h" 5 | 6 | hidden int __futimesat(int, const char *, const struct timeval [2]); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/defsysinfo.c: -------------------------------------------------------------------------------- 1 | #include "libc.h" 2 | 3 | size_t __sysinfo; 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/floatscan.h: -------------------------------------------------------------------------------- 1 | #ifndef FLOATSCAN_H 2 | #define FLOATSCAN_H 3 | 4 | #include 5 | 6 | hidden long double __floatscan(FILE *, int, int); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/i386/defsysinfo.s: -------------------------------------------------------------------------------- 1 | 1: int $128 2 | ret 3 | 4 | .data 5 | .align 4 6 | .hidden __sysinfo 7 | .global __sysinfo 8 | __sysinfo: 9 | .long 1b 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/intscan.h: -------------------------------------------------------------------------------- 1 | #ifndef INTSCAN_H 2 | #define INTSCAN_H 3 | 4 | #include 5 | 6 | hidden unsigned long long __intscan(FILE *, unsigned, int, unsigned long long); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/sh/__shcall.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | hidden int __shcall(void *arg, int (*func)(void *)) 4 | { 5 | return func(arg); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/syscall_ret.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | long __syscall_ret(unsigned long r) 5 | { 6 | if (r > -4096UL) { 7 | errno = -r; 8 | return -1; 9 | } 10 | return r; 11 | } 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/internal/version.c: -------------------------------------------------------------------------------- 1 | #include "version.h" 2 | #include "libc.h" 3 | 4 | const char __libc_version[] = VERSION; 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/aarch64/dlsym.s: -------------------------------------------------------------------------------- 1 | .global dlsym 2 | .hidden __dlsym 3 | .type dlsym,%function 4 | dlsym: 5 | mov x2,x30 6 | b __dlsym 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/arm/dlsym.s: -------------------------------------------------------------------------------- 1 | .syntax unified 2 | .text 3 | .global dlsym 4 | .hidden __dlsym 5 | .type dlsym,%function 6 | dlsym: 7 | mov r2,lr 8 | b __dlsym 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/arm/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/dladdr.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | static int stub_dladdr(const void *addr, Dl_info *info) 5 | { 6 | return 0; 7 | } 8 | 9 | weak_alias(stub_dladdr, dladdr); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/dlclose.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "dynlink.h" 3 | 4 | int dlclose(void *p) 5 | { 6 | return __dl_invalid_handle(p); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/dlsym.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "dynlink.h" 3 | 4 | void *dlsym(void *restrict p, const char *restrict s) 5 | { 6 | return __dlsym(p, s, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/i386/dlsym.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global dlsym 3 | .hidden __dlsym 4 | .type dlsym,@function 5 | dlsym: 6 | push (%esp) 7 | push 12(%esp) 8 | push 12(%esp) 9 | call __dlsym 10 | add $12,%esp 11 | ret 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/i386/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/m68k/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/microblaze/dlsym.s: -------------------------------------------------------------------------------- 1 | .global dlsym 2 | .hidden __dlsym 3 | .type dlsym,@function 4 | dlsym: 5 | brid __dlsym 6 | add r7, r15, r0 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/microblaze/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/mips/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/mipsn32/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/or1k/dlsym.s: -------------------------------------------------------------------------------- 1 | .global dlsym 2 | .hidden __dlsym 3 | .type dlsym,@function 4 | dlsym: 5 | l.j __dlsym 6 | l.ori r5, r9, 0 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/or1k/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/powerpc/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/riscv64/dlsym.s: -------------------------------------------------------------------------------- 1 | .global dlsym 2 | .hidden __dlsym 3 | .type dlsym, %function 4 | dlsym: 5 | mv a2, ra 6 | tail __dlsym 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/s390x/dlsym.s: -------------------------------------------------------------------------------- 1 | .global dlsym 2 | .hidden __dlsym 3 | .type dlsym,@function 4 | dlsym: 5 | lgr %r4, %r14 6 | jg __dlsym 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/sh/dlsym_time64.S: -------------------------------------------------------------------------------- 1 | #define __dlsym __dlsym_redir_time64 2 | #define dlsym __dlsym_time64 3 | #include "dlsym.s" 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/tlsdesc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | ptrdiff_t __tlsdesc_static() 5 | { 6 | return 0; 7 | } 8 | 9 | weak_alias(__tlsdesc_static, __tlsdesc_dynamic); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/x32/dlsym.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global dlsym 3 | .hidden __dlsym 4 | .type dlsym,@function 5 | dlsym: 6 | mov (%rsp),%rdx 7 | jmp __dlsym 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/ldso/x86_64/dlsym.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global dlsym 3 | .hidden __dlsym 4 | .type dlsym,@function 5 | dlsym: 6 | mov (%rsp),%rdx 7 | jmp __dlsym 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/legacy/getpagesize.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "libc.h" 4 | 5 | int getpagesize(void) 6 | { 7 | return PAGE_SIZE; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/legacy/isastream.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int isastream(int fd) 5 | { 6 | return fcntl(fd, F_GETFD) < 0 ? -1 : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/legacy/valloc.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include "libc.h" 4 | 5 | void *valloc(size_t size) 6 | { 7 | return memalign(PAGE_SIZE, size); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/adjtimex.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int adjtimex(struct timex *tx) 5 | { 6 | return clock_adjtime(CLOCK_REALTIME, tx); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/arch_prctl.c: -------------------------------------------------------------------------------- 1 | #include "syscall.h" 2 | #ifdef SYS_arch_prctl 3 | int arch_prctl(int code, unsigned long addr) 4 | { 5 | return syscall(SYS_arch_prctl, code, addr); 6 | } 7 | #endif 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/brk.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | #include "syscall.h" 5 | 6 | int brk(void *end) 7 | { 8 | return __syscall_ret(-ENOMEM); 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/chroot.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int chroot(const char *path) 6 | { 7 | return syscall(SYS_chroot, path); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/flock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int flock(int fd, int op) 5 | { 6 | return syscall(SYS_flock, fd, op); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/getrandom.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | ssize_t getrandom(void *buf, size_t buflen, unsigned flags) 5 | { 6 | return syscall_cp(SYS_getrandom, buf, buflen, flags); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/gettid.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "pthread_impl.h" 4 | 5 | pid_t gettid(void) 6 | { 7 | return __pthread_self()->tid; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/iopl.c: -------------------------------------------------------------------------------- 1 | #include "syscall.h" 2 | 3 | #ifdef SYS_iopl 4 | #include 5 | 6 | int iopl(int level) 7 | { 8 | return syscall(SYS_iopl, level); 9 | } 10 | #endif 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/klogctl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int klogctl (int type, char *buf, int len) 5 | { 6 | return syscall(SYS_syslog, type, buf, len); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/personality.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #ifdef SYS_personality 4 | int personality(unsigned long persona) 5 | { 6 | return syscall(SYS_personality, persona); 7 | } 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/pivot_root.c: -------------------------------------------------------------------------------- 1 | #include "syscall.h" 2 | 3 | int pivot_root(const char *new, const char *old) 4 | { 5 | return syscall(SYS_pivot_root, new, old); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/quotactl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int quotactl(int cmd, const char *special, int id, char *addr) 5 | { 6 | return syscall(SYS_quotactl, cmd, special, id, addr); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/reboot.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int reboot(int type) 5 | { 6 | return syscall(SYS_reboot, 0xfee1dead, 672274793, type); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/setfsgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int setfsgid(gid_t gid) 5 | { 6 | return syscall(SYS_setfsgid, gid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/setfsuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int setfsuid(uid_t uid) 5 | { 6 | return syscall(SYS_setfsuid, uid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/sethostname.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int sethostname(const char *name, size_t len) 6 | { 7 | return syscall(SYS_sethostname, name, len); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/setns.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int setns(int fd, int nstype) 6 | { 7 | return syscall(SYS_setns, fd, nstype); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/syncfs.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int syncfs(int fd) 6 | { 7 | return syscall(SYS_syncfs, fd); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/sysinfo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int __lsysinfo(struct sysinfo *info) 5 | { 6 | return syscall(SYS_sysinfo, info); 7 | } 8 | 9 | weak_alias(__lsysinfo, sysinfo); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/tee.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | ssize_t tee(int src, int dest, size_t len, unsigned flags) 6 | { 7 | return syscall(SYS_tee, src, dest, len, flags); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/unshare.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int unshare(int flags) 6 | { 7 | return syscall(SYS_unshare, flags); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/utimes.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "fcntl.h" 3 | #include "syscall.h" 4 | 5 | int utimes(const char *path, const struct timeval times[2]) 6 | { 7 | return __futimesat(AT_FDCWD, path, times); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/linux/vhangup.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int vhangup(void) 6 | { 7 | return syscall(SYS_vhangup); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/locale/iconv_close.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int iconv_close(iconv_t cd) 5 | { 6 | if (!((size_t)cd & 1)) free((void *)cd); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/locale/pleval.h: -------------------------------------------------------------------------------- 1 | #ifndef PLEVAL_H 2 | #define PLEVAL_H 3 | 4 | #include 5 | 6 | hidden unsigned long __pleval(const char *, unsigned long); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/malloc/free.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void free(void *p) 4 | { 5 | return __libc_free(p); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/malloc/libc_calloc.c: -------------------------------------------------------------------------------- 1 | #define calloc __libc_calloc 2 | #define malloc __libc_malloc 3 | 4 | #include "calloc.c" 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/malloc/memalign.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | 4 | void *memalign(size_t align, size_t len) 5 | { 6 | return aligned_alloc(align, len); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/malloc/realloc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void *realloc(void *p, size_t n) 4 | { 5 | return __libc_realloc(p, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/malloc/replaced.c: -------------------------------------------------------------------------------- 1 | #include "dynlink.h" 2 | 3 | int __malloc_replaced; 4 | int __aligned_alloc_replaced; 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_divzero.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double __math_divzero(uint32_t sign) 4 | { 5 | return fp_barrier(sign ? -1.0 : 1.0) / 0.0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_divzerof.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | float __math_divzerof(uint32_t sign) 4 | { 5 | return fp_barrierf(sign ? -1.0f : 1.0f) / 0.0f; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_invalid.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double __math_invalid(double x) 4 | { 5 | return (x - x) / (x - x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_invalidf.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | float __math_invalidf(float x) 4 | { 5 | return (x - x) / (x - x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_oflow.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double __math_oflow(uint32_t sign) 4 | { 5 | return __math_xflow(sign, 0x1p769); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_oflowf.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | float __math_oflowf(uint32_t sign) 4 | { 5 | return __math_xflowf(sign, 0x1p97f); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_uflow.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double __math_uflow(uint32_t sign) 4 | { 5 | return __math_xflow(sign, 0x1p-767); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_uflowf.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | float __math_uflowf(uint32_t sign) 4 | { 5 | return __math_xflowf(sign, 0x1p-95f); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_xflow.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double __math_xflow(uint32_t sign, double y) 4 | { 5 | return eval_as_double(fp_barrier(sign ? -y : y) * y); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__math_xflowf.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | float __math_xflowf(uint32_t sign, float y) 4 | { 5 | return eval_as_float(fp_barrierf(sign ? -y : y) * y); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/__signbitf.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | // FIXME: macro in math.h 4 | int __signbitf(float x) 5 | { 6 | union { 7 | float f; 8 | uint32_t i; 9 | } y = { x }; 10 | return y.i>>31; 11 | } 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/ceil.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double ceil(double x) 4 | { 5 | __asm__ ("frintp %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/ceilf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float ceilf(float x) 4 | { 5 | __asm__ ("frintp %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fabs(double x) 4 | { 5 | __asm__ ("fabs %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fabsf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fabsf(float x) 4 | { 5 | __asm__ ("fabs %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/floor.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double floor(double x) 4 | { 5 | __asm__ ("frintm %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/floorf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float floorf(float x) 4 | { 5 | __asm__ ("frintm %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fma.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fma(double x, double y, double z) 4 | { 5 | __asm__ ("fmadd %d0, %d1, %d2, %d3" : "=w"(x) : "w"(x), "w"(y), "w"(z)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fmaf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fmaf(float x, float y, float z) 4 | { 5 | __asm__ ("fmadd %s0, %s1, %s2, %s3" : "=w"(x) : "w"(x), "w"(y), "w"(z)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fmax.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fmax(double x, double y) 4 | { 5 | __asm__ ("fmaxnm %d0, %d1, %d2" : "=w"(x) : "w"(x), "w"(y)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fmaxf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fmaxf(float x, float y) 4 | { 5 | __asm__ ("fmaxnm %s0, %s1, %s2" : "=w"(x) : "w"(x), "w"(y)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fmin.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fmin(double x, double y) 4 | { 5 | __asm__ ("fminnm %d0, %d1, %d2" : "=w"(x) : "w"(x), "w"(y)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/fminf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fminf(float x, float y) 4 | { 5 | __asm__ ("fminnm %s0, %s1, %s2" : "=w"(x) : "w"(x), "w"(y)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/llround.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llround(double x) 4 | { 5 | long long n; 6 | __asm__ ("fcvtas %x0, %d1" : "=r"(n) : "w"(x)); 7 | return n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/llroundf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llroundf(float x) 4 | { 5 | long long n; 6 | __asm__ ("fcvtas %x0, %s1" : "=r"(n) : "w"(x)); 7 | return n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/lrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrint(double x) 4 | { 5 | long n; 6 | __asm__ ( 7 | "frintx %d1, %d1\n" 8 | "fcvtzs %x0, %d1\n" : "=r"(n), "+w"(x)); 9 | return n; 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/lrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrintf(float x) 4 | { 5 | long n; 6 | __asm__ ( 7 | "frintx %s1, %s1\n" 8 | "fcvtzs %x0, %s1\n" : "=r"(n), "+w"(x)); 9 | return n; 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/lround.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lround(double x) 4 | { 5 | long n; 6 | __asm__ ("fcvtas %x0, %d1" : "=r"(n) : "w"(x)); 7 | return n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/lroundf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lroundf(float x) 4 | { 5 | long n; 6 | __asm__ ("fcvtas %x0, %s1" : "=r"(n) : "w"(x)); 7 | return n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/nearbyint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double nearbyint(double x) 4 | { 5 | __asm__ ("frinti %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/nearbyintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float nearbyintf(float x) 4 | { 5 | __asm__ ("frinti %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/rint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double rint(double x) 4 | { 5 | __asm__ ("frintx %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/rintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float rintf(float x) 4 | { 5 | __asm__ ("frintx %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/round.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double round(double x) 4 | { 5 | __asm__ ("frinta %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/roundf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float roundf(float x) 4 | { 5 | __asm__ ("frinta %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/sqrt.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double sqrt(double x) 4 | { 5 | __asm__ ("fsqrt %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/sqrtf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float sqrtf(float x) 4 | { 5 | __asm__ ("fsqrt %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/trunc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double trunc(double x) 4 | { 5 | __asm__ ("frintz %d0, %d1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/aarch64/truncf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float truncf(float x) 4 | { 5 | __asm__ ("frintz %s0, %s1" : "=w"(x) : "w"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/copysign.c: -------------------------------------------------------------------------------- 1 | #include "libm.h" 2 | 3 | double copysign(double x, double y) { 4 | union {double f; uint64_t i;} ux={x}, uy={y}; 5 | ux.i &= -1ULL/2; 6 | ux.i |= uy.i & 1ULL<<63; 7 | return ux.f; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/fabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | double fabs(double x) 5 | { 6 | union {double f; uint64_t i;} u = {x}; 7 | u.i &= -1ULL/2; 8 | return u.f; 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/fabsf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | float fabsf(float x) 5 | { 6 | union {float f; uint32_t i;} u = {x}; 7 | u.i &= 0x7fffffff; 8 | return u.f; 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/fdim.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fdim(double x, double y) 4 | { 5 | if (isnan(x)) 6 | return x; 7 | if (isnan(y)) 8 | return y; 9 | return x > y ? x - y : 0; 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/fdimf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fdimf(float x, float y) 4 | { 5 | if (isnan(x)) 6 | return x; 7 | if (isnan(y)) 8 | return y; 9 | return x > y ? x - y : 0; 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/finite.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | int finite(double x) 5 | { 6 | return isfinite(x); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/finitef.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | int finitef(float x) 5 | { 6 | return isfinite(x); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/__invtrigl.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/math/i386/__invtrigl.s -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/asinl.s: -------------------------------------------------------------------------------- 1 | .global asinl 2 | .type asinl,@function 3 | asinl: 4 | fldt 4(%esp) 5 | fld %st(0) 6 | fld1 7 | fsub %st(0),%st(1) 8 | fadd %st(2) 9 | fmulp 10 | fsqrt 11 | fpatan 12 | ret 13 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/atan2l.s: -------------------------------------------------------------------------------- 1 | .global atan2l 2 | .type atan2l,@function 3 | atan2l: 4 | fldt 4(%esp) 5 | fldt 16(%esp) 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/atanl.s: -------------------------------------------------------------------------------- 1 | .global atanl 2 | .type atanl,@function 3 | atanl: 4 | fldt 4(%esp) 5 | fld1 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ceil.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ceilf.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ceill.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/exp2l.s: -------------------------------------------------------------------------------- 1 | # see exp_ld.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/expm1l.s: -------------------------------------------------------------------------------- 1 | # see exp_ld.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/fabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fabs(double x) 4 | { 5 | __asm__ ("fabs" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/fabsf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fabsf(float x) 4 | { 5 | __asm__ ("fabs" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/fabsl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double fabsl(long double x) 4 | { 5 | __asm__ ("fabs" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/floorf.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/floorl.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ldexp.s: -------------------------------------------------------------------------------- 1 | # see scalbn.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ldexpf.s: -------------------------------------------------------------------------------- 1 | # see scalbnf.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/ldexpl.s: -------------------------------------------------------------------------------- 1 | # see scalbnl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/llrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrint(double x) 4 | { 5 | long long r; 6 | __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/llrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrintf(float x) 4 | { 5 | long long r; 6 | __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/llrintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrintl(long double x) 4 | { 5 | long long r; 6 | __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log.s: -------------------------------------------------------------------------------- 1 | .global log 2 | .type log,@function 3 | log: 4 | fldln2 5 | fldl 4(%esp) 6 | fyl2x 7 | fstpl 4(%esp) 8 | fldl 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log10.s: -------------------------------------------------------------------------------- 1 | .global log10 2 | .type log10,@function 3 | log10: 4 | fldlg2 5 | fldl 4(%esp) 6 | fyl2x 7 | fstpl 4(%esp) 8 | fldl 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log10f.s: -------------------------------------------------------------------------------- 1 | .global log10f 2 | .type log10f,@function 3 | log10f: 4 | fldlg2 5 | flds 4(%esp) 6 | fyl2x 7 | fstps 4(%esp) 8 | flds 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log10l.s: -------------------------------------------------------------------------------- 1 | .global log10l 2 | .type log10l,@function 3 | log10l: 4 | fldlg2 5 | fldt 4(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log2.s: -------------------------------------------------------------------------------- 1 | .global log2 2 | .type log2,@function 3 | log2: 4 | fld1 5 | fldl 4(%esp) 6 | fyl2x 7 | fstpl 4(%esp) 8 | fldl 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log2f.s: -------------------------------------------------------------------------------- 1 | .global log2f 2 | .type log2f,@function 3 | log2f: 4 | fld1 5 | flds 4(%esp) 6 | fyl2x 7 | fstps 4(%esp) 8 | flds 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/log2l.s: -------------------------------------------------------------------------------- 1 | .global log2l 2 | .type log2l,@function 3 | log2l: 4 | fld1 5 | fldt 4(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/logf.s: -------------------------------------------------------------------------------- 1 | .global logf 2 | .type logf,@function 3 | logf: 4 | fldln2 5 | flds 4(%esp) 6 | fyl2x 7 | fstps 4(%esp) 8 | flds 4(%esp) 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/logl.s: -------------------------------------------------------------------------------- 1 | .global logl 2 | .type logl,@function 3 | logl: 4 | fldln2 5 | fldt 4(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/lrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrint(double x) 4 | { 5 | long r; 6 | __asm__ ("fistpl %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/lrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrintf(float x) 4 | { 5 | long r; 6 | __asm__ ("fistpl %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/lrintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrintl(long double x) 4 | { 5 | long r; 6 | __asm__ ("fistpl %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/remquof.s: -------------------------------------------------------------------------------- 1 | # see remquo.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/remquol.s: -------------------------------------------------------------------------------- 1 | # see remquo.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/rint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double rint(double x) 4 | { 5 | __asm__ ("frndint" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/rintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float rintf(float x) 4 | { 5 | __asm__ ("frndint" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/rintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double rintl(long double x) 4 | { 5 | __asm__ ("frndint" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/scalbln.s: -------------------------------------------------------------------------------- 1 | # see scalbn.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/scalblnf.s: -------------------------------------------------------------------------------- 1 | # see scalbnf.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/scalblnl.s: -------------------------------------------------------------------------------- 1 | # see scalbnl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/sqrtl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double sqrtl(long double x) 4 | { 5 | __asm__ ("fsqrt" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/trunc.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/truncf.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/i386/truncl.s: -------------------------------------------------------------------------------- 1 | # see floor.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/ldexp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double ldexp(double x, int n) 4 | { 5 | return scalbn(x, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/ldexpf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float ldexpf(float x, int n) 4 | { 5 | return scalbnf(x, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/ldexpl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double ldexpl(long double x, int n) 4 | { 5 | return scalbnl(x, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lgamma.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libm.h" 3 | 4 | double lgamma(double x) 5 | { 6 | return __lgamma_r(x, &__signgam); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lgammaf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libm.h" 3 | 4 | float lgammaf(float x) 5 | { 6 | return __lgammaf_r(x, &__signgam); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/llrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* uses LLONG_MAX > 2^53, see comments in lrint.c */ 4 | 5 | long long llrint(double x) 6 | { 7 | return rint(x); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/llrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* uses LLONG_MAX > 2^24, see comments in lrint.c */ 4 | 5 | long long llrintf(float x) 6 | { 7 | return rintf(x); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/llround.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llround(double x) 4 | { 5 | return round(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/llroundf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llroundf(float x) 4 | { 5 | return roundf(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/llroundl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llroundl(long double x) 4 | { 5 | return roundl(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/logbf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float logbf(float x) 4 | { 5 | if (!isfinite(x)) 6 | return x * x; 7 | if (x == 0) 8 | return -1/(x*x); 9 | return ilogbf(x); 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* uses LONG_MAX > 2^24, see comments in lrint.c */ 4 | 5 | long lrintf(float x) 6 | { 7 | return rintf(x); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lround.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lround(double x) 4 | { 5 | return round(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lroundf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lroundf(float x) 4 | { 5 | return roundf(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/lroundl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lroundl(long double x) 4 | { 5 | return roundl(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/nan.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double nan(const char *s) 4 | { 5 | return NAN; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/nanf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float nanf(const char *s) 4 | { 5 | return NAN; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/nanl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double nanl(const char *s) 4 | { 5 | return NAN; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/nexttowardl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double nexttowardl(long double x, long double y) 4 | { 5 | return nextafterl(x, y); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/fabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fabs(double x) 4 | { 5 | __asm__ ("fabs %0, %1" : "=d"(x) : "d"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/fabsf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fabsf(float x) 4 | { 5 | __asm__ ("fabs %0, %1" : "=f"(x) : "f"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/fma.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fma(double x, double y, double z) 4 | { 5 | __asm__ ("fmadd %0, %1, %2, %3" : "=d"(x) : "d"(x), "d"(y), "d"(z)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/fmaf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fmaf(float x, float y, float z) 4 | { 5 | __asm__ ("fmadds %0, %1, %2, %3" : "=f"(x) : "f"(x), "f"(y), "f"(z)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/sqrt.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double sqrt(double x) 4 | { 5 | __asm__ ("fsqrt %0, %1" : "=d"(x) : "d"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/powerpc64/sqrtf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float sqrtf(float x) 4 | { 5 | __asm__ ("fsqrts %0, %1" : "=f"(x) : "f"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/remainder.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double remainder(double x, double y) 4 | { 5 | int q; 6 | return remquo(x, y, &q); 7 | } 8 | 9 | weak_alias(remainder, drem); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/remainderf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float remainderf(float x, float y) 4 | { 5 | int q; 6 | return remquof(x, y, &q); 7 | } 8 | 9 | weak_alias(remainderf, dremf); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/s390x/fma.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double fma(double x, double y, double z) 4 | { 5 | __asm__ ("madbr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y)); 6 | return z; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/s390x/fmaf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float fmaf(float x, float y, float z) 4 | { 5 | __asm__ ("maebr %0, %1, %2" : "+f"(z) : "f"(x), "f"(y)); 6 | return z; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/signgam.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libm.h" 3 | 4 | int __signgam = 0; 5 | 6 | weak_alias(__signgam, signgam); 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/significand.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | double significand(double x) 5 | { 6 | return scalbn(x, -ilogb(x)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/significandf.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | float significandf(float x) 5 | { 6 | return scalbnf(x, -ilogbf(x)); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/tgammaf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float tgammaf(float x) 4 | { 5 | return tgamma(x); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/__invtrigl.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/math/x32/__invtrigl.s -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/asinl.s: -------------------------------------------------------------------------------- 1 | .global asinl 2 | .type asinl,@function 3 | asinl: 4 | fldt 8(%esp) 5 | 1: fld %st(0) 6 | fld1 7 | fsub %st(0),%st(1) 8 | fadd %st(2) 9 | fmulp 10 | fsqrt 11 | fpatan 12 | ret 13 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/atan2l.s: -------------------------------------------------------------------------------- 1 | .global atan2l 2 | .type atan2l,@function 3 | atan2l: 4 | fldt 8(%esp) 5 | fldt 24(%esp) 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/atanl.s: -------------------------------------------------------------------------------- 1 | .global atanl 2 | .type atanl,@function 3 | atanl: 4 | fldt 8(%esp) 5 | fld1 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/ceill.s: -------------------------------------------------------------------------------- 1 | # see floorl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/expm1l.s: -------------------------------------------------------------------------------- 1 | # see exp2l.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/fabs.s: -------------------------------------------------------------------------------- 1 | .global fabs 2 | .type fabs,@function 3 | fabs: 4 | xor %eax,%eax 5 | dec %rax 6 | shr %rax 7 | movq %rax,%xmm1 8 | andpd %xmm1,%xmm0 9 | ret 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/fabsf.s: -------------------------------------------------------------------------------- 1 | .global fabsf 2 | .type fabsf,@function 3 | fabsf: 4 | mov $0x7fffffff,%eax 5 | movq %rax,%xmm1 6 | andps %xmm1,%xmm0 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/fabsl.s: -------------------------------------------------------------------------------- 1 | .global fabsl 2 | .type fabsl,@function 3 | fabsl: 4 | fldt 8(%esp) 5 | fabs 6 | ret 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/fmodl.s: -------------------------------------------------------------------------------- 1 | .global fmodl 2 | .type fmodl,@function 3 | fmodl: 4 | fldt 24(%esp) 5 | fldt 8(%esp) 6 | 1: fprem 7 | fnstsw %ax 8 | testb $4,%ah 9 | jnz 1b 10 | fstp %st(1) 11 | ret 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/llrint.s: -------------------------------------------------------------------------------- 1 | .global llrint 2 | .type llrint,@function 3 | llrint: 4 | cvtsd2si %xmm0,%rax 5 | ret 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/llrintf.s: -------------------------------------------------------------------------------- 1 | .global llrintf 2 | .type llrintf,@function 3 | llrintf: 4 | cvtss2si %xmm0,%rax 5 | ret 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/llrintl.s: -------------------------------------------------------------------------------- 1 | .global llrintl 2 | .type llrintl,@function 3 | llrintl: 4 | fldt 8(%esp) 5 | fistpll 8(%esp) 6 | mov 8(%esp),%rax 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/log10l.s: -------------------------------------------------------------------------------- 1 | .global log10l 2 | .type log10l,@function 3 | log10l: 4 | fldlg2 5 | fldt 8(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/log2l.s: -------------------------------------------------------------------------------- 1 | .global log2l 2 | .type log2l,@function 3 | log2l: 4 | fld1 5 | fldt 8(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/logl.s: -------------------------------------------------------------------------------- 1 | .global logl 2 | .type logl,@function 3 | logl: 4 | fldln2 5 | fldt 8(%esp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/lrint.s: -------------------------------------------------------------------------------- 1 | .global lrint 2 | .type lrint,@function 3 | lrint: 4 | cvtsd2si %xmm0,%rax 5 | ret 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/lrintf.s: -------------------------------------------------------------------------------- 1 | .global lrintf 2 | .type lrintf,@function 3 | lrintf: 4 | cvtss2si %xmm0,%rax 5 | ret 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/lrintl.s: -------------------------------------------------------------------------------- 1 | .global lrintl 2 | .type lrintl,@function 3 | lrintl: 4 | fldt 8(%esp) 5 | fistpl 8(%esp) 6 | movl 8(%esp),%eax 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/rintl.s: -------------------------------------------------------------------------------- 1 | .global rintl 2 | .type rintl,@function 3 | rintl: 4 | fldt 8(%esp) 5 | frndint 6 | ret 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/sqrt.s: -------------------------------------------------------------------------------- 1 | .global sqrt 2 | .type sqrt,@function 3 | sqrt: sqrtsd %xmm0, %xmm0 4 | ret 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/sqrtf.s: -------------------------------------------------------------------------------- 1 | .global sqrtf 2 | .type sqrtf,@function 3 | sqrtf: sqrtss %xmm0, %xmm0 4 | ret 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/sqrtl.s: -------------------------------------------------------------------------------- 1 | .global sqrtl 2 | .type sqrtl,@function 3 | sqrtl: fldt 8(%esp) 4 | fsqrt 5 | ret 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x32/truncl.s: -------------------------------------------------------------------------------- 1 | # see floorl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/__invtrigl.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/math/x86_64/__invtrigl.s -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/asinl.s: -------------------------------------------------------------------------------- 1 | .global asinl 2 | .type asinl,@function 3 | asinl: 4 | fldt 8(%rsp) 5 | 1: fld %st(0) 6 | fld1 7 | fsub %st(0),%st(1) 8 | fadd %st(2) 9 | fmulp 10 | fsqrt 11 | fpatan 12 | ret 13 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/atan2l.s: -------------------------------------------------------------------------------- 1 | .global atan2l 2 | .type atan2l,@function 3 | atan2l: 4 | fldt 8(%rsp) 5 | fldt 24(%rsp) 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/atanl.s: -------------------------------------------------------------------------------- 1 | .global atanl 2 | .type atanl,@function 3 | atanl: 4 | fldt 8(%rsp) 5 | fld1 6 | fpatan 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/ceill.s: -------------------------------------------------------------------------------- 1 | # see floorl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/expm1l.s: -------------------------------------------------------------------------------- 1 | # see exp2l.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/fabsl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double fabsl(long double x) 4 | { 5 | __asm__ ("fabs" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/llrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrint(double x) 4 | { 5 | long long r; 6 | __asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x)); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/llrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrintf(float x) 4 | { 5 | long long r; 6 | __asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x)); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/llrintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llrintl(long double x) 4 | { 5 | long long r; 6 | __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/log10l.s: -------------------------------------------------------------------------------- 1 | .global log10l 2 | .type log10l,@function 3 | log10l: 4 | fldlg2 5 | fldt 8(%rsp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/log2l.s: -------------------------------------------------------------------------------- 1 | .global log2l 2 | .type log2l,@function 3 | log2l: 4 | fld1 5 | fldt 8(%rsp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/logl.s: -------------------------------------------------------------------------------- 1 | .global logl 2 | .type logl,@function 3 | logl: 4 | fldln2 5 | fldt 8(%rsp) 6 | fyl2x 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/lrint.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrint(double x) 4 | { 5 | long r; 6 | __asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x)); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/lrintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrintf(float x) 4 | { 5 | long r; 6 | __asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x)); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/lrintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long lrintl(long double x) 4 | { 5 | long r; 6 | __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); 7 | return r; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/rintl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double rintl(long double x) 4 | { 5 | __asm__ ("frndint" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/sqrt.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double sqrt(double x) 4 | { 5 | __asm__ ("sqrtsd %1, %0" : "=x"(x) : "x"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/sqrtf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float sqrtf(float x) 4 | { 5 | __asm__ ("sqrtss %1, %0" : "=x"(x) : "x"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/sqrtl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long double sqrtl(long double x) 4 | { 5 | __asm__ ("fsqrt" : "+t"(x)); 6 | return x; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/math/x86_64/truncl.s: -------------------------------------------------------------------------------- 1 | # see floorl.s 2 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/ffs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "atomic.h" 3 | 4 | int ffs(int i) 5 | { 6 | return i ? a_ctz_l(i)+1 : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/ffsl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "atomic.h" 3 | 4 | int ffsl(long i) 5 | { 6 | return i ? a_ctz_l(i)+1 : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/ffsll.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "atomic.h" 3 | 4 | int ffsll(long long i) 5 | { 6 | return i ? a_ctz_64(i)+1 : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/gethostid.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long gethostid() 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/getresgid.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid) 6 | { 7 | return syscall(SYS_getresgid, rgid, egid, sgid); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/getresuid.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) 6 | { 7 | return syscall(SYS_getresuid, ruid, euid, suid); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/issetugid.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include "libc.h" 4 | 5 | int issetugid(void) 6 | { 7 | return libc.secure; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/setdomainname.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int setdomainname(const char *name, size_t len) 6 | { 7 | return syscall(SYS_setdomainname, name, len); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/misc/setpriority.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int setpriority(int which, id_t who, int prio) 5 | { 6 | return syscall(SYS_setpriority, which, who, prio); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mman/mincore.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int mincore (void *addr, size_t len, unsigned char *vec) 6 | { 7 | return syscall(SYS_mincore, addr, len, vec); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mman/mlockall.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int mlockall(int flags) 5 | { 6 | return syscall(SYS_mlockall, flags); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mman/msync.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int msync(void *start, size_t len, int flags) 5 | { 6 | return syscall_cp(SYS_msync, start, len, flags); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mman/munlock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int munlock(const void *addr, size_t len) 5 | { 6 | return syscall(SYS_munlock, addr, len); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mman/munlockall.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int munlockall(void) 5 | { 6 | return syscall(SYS_munlockall); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mq/mq_close.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int mq_close(mqd_t mqd) 5 | { 6 | return syscall(SYS_close, mqd); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mq/mq_getattr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int mq_getattr(mqd_t mqd, struct mq_attr *attr) 5 | { 6 | return mq_setattr(mqd, 0, attr); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mq/mq_receive.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ssize_t mq_receive(mqd_t mqd, char *msg, size_t len, unsigned *prio) 4 | { 5 | return mq_timedreceive(mqd, msg, len, prio, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/mq/mq_send.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mq_send(mqd_t mqd, const char *msg, size_t len, unsigned prio) 4 | { 5 | return mq_timedsend(mqd, msg, len, prio, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/c32rtomb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | size_t c32rtomb(char *restrict s, char32_t c32, mbstate_t *restrict ps) 5 | { 6 | return wcrtomb(s, c32, ps); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/mblen.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mblen(const char *s, size_t n) 4 | { 5 | return mbtowc(0, s, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/mbsinit.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mbsinit(const mbstate_t *st) 4 | { 5 | return !st || !*(unsigned *)st; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/mbstowcs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | size_t mbstowcs(wchar_t *restrict ws, const char *restrict s, size_t wn) 5 | { 6 | return mbsrtowcs(ws, (void*)&s, wn, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/wcstombs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | size_t wcstombs(char *restrict s, const wchar_t *restrict ws, size_t n) 5 | { 6 | return wcsrtombs(s, &(const wchar_t *){ws}, n, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/multibyte/wctomb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int wctomb(char *s, wchar_t wc) 5 | { 6 | if (!s) return 0; 7 | return wcrtomb(s, wc, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/bind.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int bind(int fd, const struct sockaddr *addr, socklen_t len) 5 | { 6 | return socketcall(bind, fd, addr, len, 0, 0, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/connect.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int connect(int fd, const struct sockaddr *addr, socklen_t len) 5 | { 6 | return socketcall_cp(connect, fd, addr, len, 0, 0, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/herror.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | 5 | void herror(const char *msg) 6 | { 7 | fprintf(stderr, "%s%s%s\n", msg?msg:"", msg?": ":"", hstrerror(h_errno)); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/htonl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | uint32_t htonl(uint32_t n) 5 | { 6 | union { int i; char c; } u = { 1 }; 7 | return u.c ? bswap_32(n) : n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/htons.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | uint16_t htons(uint16_t n) 5 | { 6 | union { int i; char c; } u = { 1 }; 7 | return u.c ? bswap_16(n) : n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/if_freenameindex.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void if_freenameindex(struct if_nameindex *idx) 5 | { 6 | free(idx); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/in6addr_any.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/in6addr_loopback.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/listen.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int listen(int fd, int backlog) 5 | { 6 | return socketcall(listen, fd, backlog, 0, 0, 0, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/ntohl.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | uint32_t ntohl(uint32_t n) 5 | { 6 | union { int i; char c; } u = { 1 }; 7 | return u.c ? bswap_32(n) : n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/ntohs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | uint16_t ntohs(uint16_t n) 5 | { 6 | union { int i; char c; } u = { 1 }; 7 | return u.c ? bswap_16(n) : n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/recv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ssize_t recv(int fd, void *buf, size_t len, int flags) 4 | { 5 | return recvfrom(fd, buf, len, flags, 0, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/res_init.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int res_init() 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/send.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ssize_t send(int fd, const void *buf, size_t len, int flags) 4 | { 5 | return sendto(fd, buf, len, flags, 0, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/serv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void endservent(void) 4 | { 5 | } 6 | 7 | void setservent(int stayopen) 8 | { 9 | } 10 | 11 | struct servent *getservent(void) 12 | { 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/shutdown.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int shutdown(int fd, int how) 5 | { 6 | return socketcall(shutdown, fd, how, 0, 0, 0, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/network/sockatmark.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int sockatmark(int s) 5 | { 6 | int ret; 7 | if (ioctl(s, SIOCATMARK, &ret) < 0) 8 | return -1; 9 | return ret; 10 | } 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/passwd/getspent.c: -------------------------------------------------------------------------------- 1 | #include "pwf.h" 2 | 3 | void setspent() 4 | { 5 | } 6 | 7 | void endspent() 8 | { 9 | } 10 | 11 | struct spwd *getspent() 12 | { 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/passwd/lckpwdf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int lckpwdf() 4 | { 5 | return 0; 6 | } 7 | 8 | int ulckpwdf() 9 | { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/prng/__seed48.c: -------------------------------------------------------------------------------- 1 | #include "rand48.h" 2 | 3 | unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb }; 4 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/prng/lcong48.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "rand48.h" 4 | 5 | void lcong48(unsigned short p[7]) 6 | { 7 | memcpy(__seed48, p, sizeof __seed48); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/prng/rand48.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | hidden uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); 5 | extern hidden unsigned short __seed48[7]; 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/prng/srand48.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void srand48(long seed) 4 | { 5 | seed48((unsigned short [3]){ 0x330e, seed, seed>>16 }); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/arm/vfork.s: -------------------------------------------------------------------------------- 1 | .syntax unified 2 | .global vfork 3 | .type vfork,%function 4 | vfork: 5 | mov ip, r7 6 | mov r7, 190 7 | svc 0 8 | mov r7, ip 9 | .hidden __syscall_ret 10 | b __syscall_ret 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawn_file_actions_init.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawn_file_actions_init(posix_spawn_file_actions_t *fa) 4 | { 5 | fa->__actions = 0; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_destroy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_destroy(posix_spawnattr_t *attr) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_getflags.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_getflags(const posix_spawnattr_t *restrict attr, short *restrict flags) 4 | { 5 | *flags = attr->__flags; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_getpgroup.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict attr, pid_t *restrict pgrp) 4 | { 5 | *pgrp = attr->__pgrp; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_getsigmask.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict attr, sigset_t *restrict mask) 4 | { 5 | *mask = attr->__mask; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_init.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_init(posix_spawnattr_t *attr) 4 | { 5 | *attr = (posix_spawnattr_t){ 0 }; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_setpgroup.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgrp) 4 | { 5 | attr->__pgrp = pgrp; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/posix_spawnattr_setsigmask.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict attr, const sigset_t *restrict mask) 4 | { 5 | attr->__mask = *mask; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/process/s390x/vfork.s: -------------------------------------------------------------------------------- 1 | .global vfork 2 | .type vfork,%function 3 | vfork: 4 | svc 190 5 | .hidden __syscall_ret 6 | jg __syscall_ret 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/sched/sched_getparam.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "syscall.h" 4 | 5 | int sched_getparam(pid_t pid, struct sched_param *param) 6 | { 7 | return __syscall_ret(-ENOSYS); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/sched/sched_getscheduler.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "syscall.h" 4 | 5 | int sched_getscheduler(pid_t pid) 6 | { 7 | return __syscall_ret(-ENOSYS); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/sched/sched_setparam.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "syscall.h" 4 | 5 | int sched_setparam(pid_t pid, const struct sched_param *param) 6 | { 7 | return __syscall_ret(-ENOSYS); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/sched/sched_yield.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int sched_yield() 5 | { 6 | return syscall(SYS_sched_yield); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/psiginfo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void psiginfo(const siginfo_t *si, const char *msg) 4 | { 5 | psignal(si->si_signo, msg); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/riscv64/restore.s: -------------------------------------------------------------------------------- 1 | .global __restore 2 | .type __restore, %function 3 | __restore: 4 | .global __restore_rt 5 | .type __restore_rt, %function 6 | __restore_rt: 7 | li a7, 139 # SYS_rt_sigreturn 8 | ecall 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/sigpause.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sigpause(int sig) 4 | { 5 | sigset_t mask; 6 | sigprocmask(0, 0, &mask); 7 | sigdelset(&mask, sig); 8 | return sigsuspend(&mask); 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/sigrtmax.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int __libc_current_sigrtmax() 4 | { 5 | return _NSIG-1; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/sigrtmin.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int __libc_current_sigrtmin() 4 | { 5 | return 35; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/sigsetjmp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/signal/sigsetjmp.c -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/sigwaitinfo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sigwaitinfo(const sigset_t *restrict mask, siginfo_t *restrict si) 4 | { 5 | return sigtimedwait(mask, si, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/x32/getitimer.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int getitimer(int which, struct itimerval *old) 5 | { 6 | return syscall(SYS_getitimer, which, old); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/signal/x86_64/restore.s: -------------------------------------------------------------------------------- 1 | nop 2 | .global __restore_rt 3 | .hidden __restore_rt 4 | .type __restore_rt,@function 5 | __restore_rt: 6 | mov $15, %rax 7 | syscall 8 | .size __restore_rt,.-__restore_rt 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/futimens.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int futimens(int fd, const struct timespec times[2]) 4 | { 5 | return utimensat(fd, 0, times, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/lchmod.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | 5 | int lchmod(const char *path, mode_t mode) 6 | { 7 | return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/mkdirat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int mkdirat(int fd, const char *path, mode_t mode) 5 | { 6 | return syscall(SYS_mkdirat, fd, path, mode); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/mkfifo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mkfifo(const char *path, mode_t mode) 4 | { 5 | return mknod(path, mode | S_IFIFO, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/mkfifoat.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mkfifoat(int fd, const char *path, mode_t mode) 4 | { 5 | return mknodat(fd, path, mode | S_IFIFO, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/mknodat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int mknodat(int fd, const char *path, mode_t mode, dev_t dev) 5 | { 6 | return syscall(SYS_mknodat, fd, path, mode, dev); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stat/umask.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | mode_t umask(mode_t mode) 5 | { 6 | return syscall(SYS_umask, mode); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/__fclose_ca.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | int __fclose_ca(FILE *f) 4 | { 5 | return f->close(f); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/clearerr.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | void clearerr(FILE *f) 4 | { 5 | FLOCK(f); 6 | f->flags &= ~(F_EOF|F_ERR); 7 | FUNLOCK(f); 8 | } 9 | 10 | weak_alias(clearerr, clearerr_unlocked); 11 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/fgetc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "getc.h" 3 | 4 | int fgetc(FILE *f) 5 | { 6 | return do_getc(f); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/fputc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "putc.h" 3 | 4 | int fputc(int c, FILE *f) 5 | { 6 | return do_putc(c, f); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/fsetpos.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | int fsetpos(FILE *f, const fpos_t *pos) 4 | { 5 | return __fseeko(f, *(const long long *)pos, SEEK_SET); 6 | } 7 | 8 | weak_alias(fsetpos, fsetpos64); 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "getc.h" 3 | 4 | int getc(FILE *f) 5 | { 6 | return do_getc(f); 7 | } 8 | 9 | weak_alias(getc, _IO_getc); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getchar.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "getc.h" 3 | 4 | int getchar(void) 5 | { 6 | return do_getc(stdin); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getchar_unlocked.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | int getchar_unlocked(void) 4 | { 5 | return getc_unlocked(stdin); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getline.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ssize_t getline(char **restrict s, size_t *restrict n, FILE *restrict f) 4 | { 5 | return getdelim(s, n, '\n', f); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getw.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | int getw(FILE *f) 5 | { 6 | int x; 7 | return fread(&x, sizeof x, 1, f) ? x : EOF; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getwc.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | #include 3 | 4 | wint_t getwc(FILE *f) 5 | { 6 | return fgetwc(f); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/getwchar.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | #include 3 | 4 | wint_t getwchar(void) 5 | { 6 | return fgetwc(stdin); 7 | } 8 | 9 | weak_alias(getwchar, getwchar_unlocked); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "putc.h" 3 | 4 | int putc(int c, FILE *f) 5 | { 6 | return do_putc(c, f); 7 | } 8 | 9 | weak_alias(putc, _IO_putc); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putchar.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "putc.h" 3 | 4 | int putchar(int c) 5 | { 6 | return do_putc(c, stdout); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putchar_unlocked.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | int putchar_unlocked(int c) 4 | { 5 | return putc_unlocked(c, stdout); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putw.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | int putw(int x, FILE *f) 5 | { 6 | return (int)fwrite(&x, sizeof x, 1, f)-1; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putwc.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | #include 3 | 4 | wint_t putwc(wchar_t c, FILE *f) 5 | { 6 | return fputwc(c, f); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/putwchar.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | #include 3 | 4 | wint_t putwchar(wchar_t c) 5 | { 6 | return fputwc(c, stdout); 7 | } 8 | 9 | weak_alias(putwchar, putwchar_unlocked); 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/rewind.c: -------------------------------------------------------------------------------- 1 | #include "stdio_impl.h" 2 | 3 | void rewind(FILE *f) 4 | { 5 | FLOCK(f); 6 | __fseeko_unlocked(f, 0, SEEK_SET); 7 | f->flags &= ~F_ERR; 8 | FUNLOCK(f); 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/setbuf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void setbuf(FILE *restrict f, char *restrict buf) 4 | { 5 | setvbuf(f, buf, buf ? _IOFBF : _IONBF, BUFSIZ); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/setbuffer.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | void setbuffer(FILE *f, char *buf, size_t size) 5 | { 6 | setvbuf(f, buf, buf ? _IOFBF : _IONBF, size); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/setlinebuf.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | void setlinebuf(FILE *f) 5 | { 6 | setvbuf(f, 0, _IOLBF, 0); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/vprintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int vprintf(const char *restrict fmt, va_list ap) 4 | { 5 | return vfprintf(stdout, fmt, ap); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/vsprintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int vsprintf(char *restrict s, const char *restrict fmt, va_list ap) 5 | { 6 | return vsnprintf(s, INT_MAX, fmt, ap); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdio/vwprintf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int vwprintf(const wchar_t *restrict fmt, va_list ap) 5 | { 6 | return vfwprintf(stdout, fmt, ap); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/abs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int abs(int a) 4 | { 5 | return a>0 ? a : -a; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/atof.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double atof(const char *s) 4 | { 5 | return strtod(s, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/div.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | div_t div(int num, int den) 4 | { 5 | return (div_t){ num/den, num%den }; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/gcvt.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | 5 | char *gcvt(double x, int n, char *b) 6 | { 7 | sprintf(b, "%.*g", n, x); 8 | return b; 9 | } 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/imaxabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | intmax_t imaxabs(intmax_t a) 4 | { 5 | return a>0 ? a : -a; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/imaxdiv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | imaxdiv_t imaxdiv(intmax_t num, intmax_t den) 4 | { 5 | return (imaxdiv_t){ num/den, num%den }; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/labs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long labs(long a) 4 | { 5 | return a>0 ? a : -a; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/ldiv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ldiv_t ldiv(long num, long den) 4 | { 5 | return (ldiv_t){ num/den, num%den }; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/llabs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long llabs(long long a) 4 | { 5 | return a>0 ? a : -a; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/stdlib/lldiv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | lldiv_t lldiv(long long num, long long den) 4 | { 5 | return (lldiv_t){ num/den, num%den }; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/bcmp.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | 5 | int bcmp(const void *s1, const void *s2, size_t n) 6 | { 7 | return memcmp(s1, s2, n); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/bcopy.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | 5 | void bcopy(const void *s1, void *s2, size_t n) 6 | { 7 | memmove(s2, s1, n); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/bzero.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | 5 | void bzero(void *s, size_t n) 6 | { 7 | memset(s, 0, n); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/explicit_bzero.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | 4 | void explicit_bzero(void *d, size_t n) 5 | { 6 | d = memset(d, 0, n); 7 | __asm__ __volatile__ ("" : : "r"(d) : "memory"); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/index.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | 5 | char *index(const char *s, int c) 6 | { 7 | return strchr(s, c); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/mempcpy.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | 4 | void *mempcpy(void *dest, const void *src, size_t n) 5 | { 6 | return (char *)memcpy(dest, src, n) + n; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/rindex.c: -------------------------------------------------------------------------------- 1 | #define _BSD_SOURCE 2 | #include 3 | #include 4 | 5 | char *rindex(const char *s, int c) 6 | { 7 | return strrchr(s, c); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strcat.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strcat(char *restrict dest, const char *restrict src) 4 | { 5 | strcpy(dest + strlen(dest), src); 6 | return dest; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strchr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strchr(const char *s, int c) 4 | { 5 | char *r = __strchrnul(s, c); 6 | return *(unsigned char *)r == (unsigned char)c ? r : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strcmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int strcmp(const char *l, const char *r) 4 | { 5 | for (; *l==*r && *l; l++, r++); 6 | return *(unsigned char *)l - *(unsigned char *)r; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strcpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strcpy(char *restrict dest, const char *restrict src) 4 | { 5 | __stpcpy(dest, src); 6 | return dest; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strncpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strncpy(char *restrict d, const char *restrict s, size_t n) 4 | { 5 | __stpncpy(d, s, n); 6 | return d; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strnlen.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | size_t strnlen(const char *s, size_t n) 4 | { 5 | const char *p = memchr(s, 0, n); 6 | return p ? p-s : n; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strpbrk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strpbrk(const char *s, const char *b) 4 | { 5 | s += strcspn(s, b); 6 | return *s ? (char *)s : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/strrchr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *strrchr(const char *s, int c) 4 | { 5 | return __memrchr(s, c, strlen(s) + 1); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcpcpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcpcpy(wchar_t *restrict d, const wchar_t *restrict s) 4 | { 5 | return wcscpy(d, s) + wcslen(s); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcpncpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcpncpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n) 4 | { 5 | return wcsncpy(d, s, n) + wcsnlen(s, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcscasecmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int wcscasecmp(const wchar_t *l, const wchar_t *r) 5 | { 6 | return wcsncasecmp(l, r, -1); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcscasecmp_l.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wcscasecmp_l(const wchar_t *l, const wchar_t *r, locale_t locale) 4 | { 5 | return wcscasecmp(l, r); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcscat.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcscat(wchar_t *restrict dest, const wchar_t *restrict src) 4 | { 5 | wcscpy(dest + wcslen(dest), src); 6 | return dest; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcscmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wcscmp(const wchar_t *l, const wchar_t *r) 4 | { 5 | for (; *l==*r && *l && *r; l++, r++); 6 | return *l - *r; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcscpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcscpy(wchar_t *restrict d, const wchar_t *restrict s) 4 | { 5 | wchar_t *a = d; 6 | while ((*d++ = *s++)); 7 | return a; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcslen.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | size_t wcslen(const wchar_t *s) 4 | { 5 | const wchar_t *a; 6 | for (a=s; *s; s++); 7 | return s-a; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcsncasecmp_l.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wcsncasecmp_l(const wchar_t *l, const wchar_t *r, size_t n, locale_t locale) 4 | { 5 | return wcsncasecmp(l, r, n); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcsncmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n) 4 | { 5 | for (; n && *l==*r && *l && *r; n--, l++, r++); 6 | return n ? *l - *r : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcsnlen.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | size_t wcsnlen(const wchar_t *s, size_t n) 4 | { 5 | const wchar_t *z = wmemchr(s, 0, n); 6 | if (z) n = z-s; 7 | return n; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcspbrk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcspbrk(const wchar_t *s, const wchar_t *b) 4 | { 5 | s += wcscspn(s, b); 6 | return *s ? (wchar_t *)s : NULL; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcsrchr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcsrchr(const wchar_t *s, wchar_t c) 4 | { 5 | const wchar_t *p; 6 | for (p=s+wcslen(s); p>=s && *p!=c; p--); 7 | return p>=s ? (wchar_t *)p : 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcsspn.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | size_t wcsspn(const wchar_t *s, const wchar_t *c) 4 | { 5 | const wchar_t *a; 6 | for (a=s; *s && wcschr(c, *s); s++); 7 | return s-a; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wcswcs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wcswcs(const wchar_t *haystack, const wchar_t *needle) 4 | { 5 | return wcsstr(haystack, needle); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wmemchr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n) 4 | { 5 | for (; n && *s != c; n--, s++); 6 | return n ? (wchar_t *)s : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wmemcmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int wmemcmp(const wchar_t *l, const wchar_t *r, size_t n) 4 | { 5 | for (; n && *l==*r; n--, l++, r++); 6 | return n ? *l-*r : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wmemcpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wmemcpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n) 4 | { 5 | wchar_t *a = d; 6 | while (n--) *d++ = *s++; 7 | return a; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/string/wmemset.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | wchar_t *wmemset(wchar_t *d, wchar_t c, size_t n) 4 | { 5 | wchar_t *ret = d; 6 | while (n--) *d++ = c; 7 | return ret; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/temp/mkstemp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int mkstemp(char *template) 4 | { 5 | return __mkostemps(template, 0, 0); 6 | } 7 | 8 | weak_alias(mkstemp, mkstemp64); 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/aarch64/__set_thread_area.s: -------------------------------------------------------------------------------- 1 | .global __set_thread_area 2 | .hidden __set_thread_area 3 | .type __set_thread_area,@function 4 | __set_thread_area: 5 | msr tpidr_el0,x0 6 | mov w0,#0 7 | ret 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/aarch64/__unmapself.s: -------------------------------------------------------------------------------- 1 | .global __unmapself 2 | .type __unmapself,%function 3 | __unmapself: 4 | mov x8,#215 // SYS_munmap 5 | svc 0 6 | mov x8,#93 // SYS_exit 7 | svc 0 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/arm/__unmapself.s: -------------------------------------------------------------------------------- 1 | .syntax unified 2 | .text 3 | .global __unmapself 4 | .type __unmapself,%function 5 | __unmapself: 6 | mov r7,#91 7 | svc 0 8 | mov r7,#1 9 | svc 0 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/call_once.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void call_once(once_flag *flag, void (*func)(void)) 5 | { 6 | __pthread_once(flag, func); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/cnd_destroy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void cnd_destroy(cnd_t *c) 4 | { 5 | /* For private cv this is a no-op */ 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/cnd_init.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int cnd_init(cnd_t *c) 4 | { 5 | *c = (cnd_t){ 0 }; 6 | return thrd_success; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/default_attr.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | unsigned __default_stacksize = DEFAULT_STACK_SIZE; 4 | unsigned __default_guardsize = DEFAULT_GUARD_SIZE; 5 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/m68k/__m68k_read_tp.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global __m68k_read_tp 3 | .type __m68k_read_tp,@function 4 | __m68k_read_tp: 5 | move.l #333,%d0 6 | trap #0 7 | move.l %d0,%a0 8 | rts 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/microblaze/__unmapself.s: -------------------------------------------------------------------------------- 1 | .global __unmapself 2 | .type __unmapself,@function 3 | __unmapself: 4 | ori r12, r0, 91 5 | brki r14, 0x8 6 | ori r12, r0, 1 7 | brki r14, 0x8 8 | nop 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/mips64/__unmapself.s: -------------------------------------------------------------------------------- 1 | .set noreorder 2 | .global __unmapself 3 | .type __unmapself, @function 4 | __unmapself: 5 | li $2, 5011 6 | syscall 7 | li $4, 0 8 | li $2, 5058 9 | syscall 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/mipsn32/__unmapself.s: -------------------------------------------------------------------------------- 1 | .set noreorder 2 | .global __unmapself 3 | .type __unmapself,@function 4 | __unmapself: 5 | li $2, 6011 6 | syscall 7 | li $4, 0 8 | li $2, 6058 9 | syscall 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/mtx_destroy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void mtx_destroy(mtx_t *mtx) 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/or1k/__set_thread_area.s: -------------------------------------------------------------------------------- 1 | .global __set_thread_area 2 | .hidden __set_thread_area 3 | .type __set_thread_area,@function 4 | __set_thread_area: 5 | l.ori r10, r3, 0 6 | l.jr r9 7 | l.ori r11, r0, 0 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/powerpc/__unmapself.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global __unmapself 3 | .type __unmapself,%function 4 | __unmapself: 5 | li 0, 91 # __NR_munmap 6 | sc 7 | li 0, 1 #__NR_exit 8 | sc 9 | blr 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/powerpc64/__unmapself.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global __unmapself 3 | .type __unmapself,%function 4 | __unmapself: 5 | li 0, 91 # __NR_munmap 6 | sc 7 | li 0, 1 #__NR_exit 8 | sc 9 | blr 10 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_attr_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_attr_destroy(pthread_attr_t *a) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_attr_setschedpolicy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_attr_setschedpolicy(pthread_attr_t *a, int policy) 4 | { 5 | a->_a_policy = policy; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_barrierattr_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_barrierattr_destroy(pthread_barrierattr_t *a) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_barrierattr_init.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_barrierattr_init(pthread_barrierattr_t *a) 4 | { 5 | *a = (pthread_barrierattr_t){0}; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_cond_wait.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_cond_wait(pthread_cond_t *restrict c, pthread_mutex_t *restrict m) 4 | { 5 | return pthread_cond_timedwait(c, m, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_condattr_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_condattr_destroy(pthread_condattr_t *a) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_condattr_init.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_condattr_init(pthread_condattr_t *a) 4 | { 5 | *a = (pthread_condattr_t){0}; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_getconcurrency.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int pthread_getconcurrency() 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_mutex_getprioceiling.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict m, int *restrict ceiling) 4 | { 5 | return EINVAL; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_mutex_setprioceiling.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_mutex_setprioceiling(pthread_mutex_t *restrict m, int ceiling, int *restrict old) 4 | { 5 | return EINVAL; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_mutexattr_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_mutexattr_destroy(pthread_mutexattr_t *a) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_mutexattr_init.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_mutexattr_init(pthread_mutexattr_t *a) 4 | { 5 | *a = (pthread_mutexattr_t){0}; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_rwlock_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_rwlock_destroy(pthread_rwlock_t *rw) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_rwlockattr_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_rwlockattr_init.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_rwlockattr_init(pthread_rwlockattr_t *a) 4 | { 5 | *a = (pthread_rwlockattr_t){0}; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_spin_destroy.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_spin_destroy(pthread_spinlock_t *s) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_spin_init.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_spin_init(pthread_spinlock_t *s, int shared) 4 | { 5 | return *s = 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_spin_trylock.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | #include 3 | 4 | int pthread_spin_trylock(pthread_spinlock_t *s) 5 | { 6 | return a_cas(s, 0, EBUSY); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/pthread_spin_unlock.c: -------------------------------------------------------------------------------- 1 | #include "pthread_impl.h" 2 | 3 | int pthread_spin_unlock(pthread_spinlock_t *s) 4 | { 5 | a_store(s, 0); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/riscv64/__set_thread_area.s: -------------------------------------------------------------------------------- 1 | .global __set_thread_area 2 | .type __set_thread_area, %function 3 | __set_thread_area: 4 | mv tp, a0 5 | li a0, 0 6 | ret 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/riscv64/__unmapself.s: -------------------------------------------------------------------------------- 1 | .global __unmapself 2 | .type __unmapself, %function 3 | __unmapself: 4 | li a7, 215 # SYS_munmap 5 | ecall 6 | li a7, 93 # SYS_exit 7 | ecall 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/s390x/__unmapself.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global __unmapself 3 | .type __unmapself, @function 4 | __unmapself: 5 | svc 91 # SYS_munmap 6 | svc 1 # SYS_exit 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/sem_destroy.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sem_destroy(sem_t *sem) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/sem_getvalue.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sem_getvalue(sem_t *restrict sem, int *restrict valp) 4 | { 5 | int val = sem->__val[0]; 6 | *valp = val < 0 ? 0 : val; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/sem_wait.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sem_wait(sem_t *sem) 4 | { 5 | return sem_timedwait(sem, 0); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/syscall_cp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/thread/syscall_cp.c -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/thrd_exit.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | _Noreturn void thrd_exit(int result) 6 | { 7 | for (;;) __pthread_exit((void*)(intptr_t)result); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/tls.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libc-top-half/musl/src/thread/tls.c -------------------------------------------------------------------------------- /libc-top-half/musl/src/thread/tss_delete.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void tss_delete(tss_t key) 5 | { 6 | __pthread_key_delete(key); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/asctime.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *asctime(const struct tm *tm) 4 | { 5 | static char buf[26]; 6 | return __asctime_r(tm, buf); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/ctime.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ctime(const time_t *t) 4 | { 5 | struct tm *tm = localtime(t); 6 | if (!tm) return 0; 7 | return asctime(tm); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/ctime_r.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *ctime_r(const time_t *t, char *buf) 4 | { 5 | struct tm tm, *tm_p = localtime_r(t, &tm); 6 | return tm_p ? asctime_r(tm_p, buf) : 0; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/difftime.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double difftime(time_t t1, time_t t0) 4 | { 5 | return t1-t0; 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/gmtime.c: -------------------------------------------------------------------------------- 1 | #include "time_impl.h" 2 | #include 3 | 4 | struct tm *gmtime(const time_t *t) 5 | { 6 | static struct tm tm; 7 | return __gmtime_r(t, &tm); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/time/localtime.c: -------------------------------------------------------------------------------- 1 | #include "time_impl.h" 2 | 3 | struct tm *localtime(const time_t *t) 4 | { 5 | static struct tm tm; 6 | return __localtime_r(t, &tm); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/_exit.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | _Noreturn void _exit(int status) 5 | { 6 | _Exit(status); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/acct.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include "syscall.h" 4 | 5 | int acct(const char *filename) 6 | { 7 | return syscall(SYS_acct, filename); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/chdir.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int chdir(const char *path) 5 | { 6 | return syscall(SYS_chdir, path); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/ctermid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *ctermid(char *s) 5 | { 6 | return s ? strcpy(s, "/dev/tty") : "/dev/tty"; 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/dup.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int dup(int fd) 5 | { 6 | return syscall(SYS_dup, fd); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/fdatasync.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int fdatasync(int fd) 5 | { 6 | return syscall_cp(SYS_fdatasync, fd); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/fsync.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int fsync(int fd) 5 | { 6 | return syscall_cp(SYS_fsync, fd); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getegid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | gid_t getegid(void) 5 | { 6 | return __syscall(SYS_getegid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/geteuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | uid_t geteuid(void) 5 | { 6 | return __syscall(SYS_geteuid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | gid_t getgid(void) 5 | { 6 | return __syscall(SYS_getgid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getgroups.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int getgroups(int count, gid_t list[]) 5 | { 6 | return syscall(SYS_getgroups, count, list); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getlogin.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | char *getlogin(void) 5 | { 6 | return getenv("LOGNAME"); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getpid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | pid_t getpid(void) 5 | { 6 | return __syscall(SYS_getpid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getppid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | pid_t getppid(void) 5 | { 6 | return __syscall(SYS_getppid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/getuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | uid_t getuid(void) 5 | { 6 | return __syscall(SYS_getuid); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/posix_close.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int posix_close(int fd, int flags) 4 | { 5 | return close(fd); 6 | } 7 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/read.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | ssize_t read(int fd, void *buf, size_t count) 5 | { 6 | return syscall_cp(SYS_read, fd, buf, count); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/readv.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | ssize_t readv(int fd, const struct iovec *iov, int count) 5 | { 6 | return syscall_cp(SYS_readv, fd, iov, count); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/setegid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libc.h" 3 | #include "syscall.h" 4 | 5 | int setegid(gid_t egid) 6 | { 7 | return __setxid(SYS_setresgid, -1, egid, -1); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/seteuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #include "libc.h" 4 | 5 | int seteuid(uid_t euid) 6 | { 7 | return __setxid(SYS_setresuid, -1, euid, -1); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/setgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #include "libc.h" 4 | 5 | int setgid(gid_t gid) 6 | { 7 | return __setxid(SYS_setgid, gid, 0, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/setregid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #include "libc.h" 4 | 5 | int setregid(gid_t rgid, gid_t egid) 6 | { 7 | return __setxid(SYS_setregid, rgid, egid, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/setreuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #include "libc.h" 4 | 5 | int setreuid(uid_t ruid, uid_t euid) 6 | { 7 | return __setxid(SYS_setreuid, ruid, euid, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/setuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | #include "libc.h" 4 | 5 | int setuid(uid_t uid) 6 | { 7 | return __setxid(SYS_setuid, uid, 0, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/symlinkat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int symlinkat(const char *existing, int fd, const char *new) 5 | { 6 | return syscall(SYS_symlinkat, existing, fd, new); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/sync.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | void sync(void) 5 | { 6 | __syscall(SYS_sync); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/unlinkat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | int unlinkat(int fd, const char *path, int flag) 5 | { 6 | return syscall(SYS_unlinkat, fd, path, flag); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/write.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | ssize_t write(int fd, const void *buf, size_t count) 5 | { 6 | return syscall_cp(SYS_write, fd, buf, count); 7 | } 8 | -------------------------------------------------------------------------------- /libc-top-half/musl/src/unistd/writev.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "syscall.h" 3 | 4 | ssize_t writev(int fd, const struct iovec *iov, int count) 5 | { 6 | return syscall_cp(SYS_writev, fd, iov, count); 7 | } 8 | -------------------------------------------------------------------------------- /libclang_rt.builtins-wasm32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasix-org/wasix-libc/52956377a4bb3048818ca4d29df17d0e389e5169/libclang_rt.builtins-wasm32.a -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | download 3 | run 4 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # Test 2 | 3 | This directory runs a subset of libc-test using the sysroot produced by 4 | `wasi-libc`. 5 | 6 | [libc-test]: https://wiki.musl-libc.org/libc-test.html 7 | -------------------------------------------------------------------------------- /test/wasix/c_pthreads/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5.0) 2 | project (basic_executable) 3 | 4 | add_executable(main main.c) -------------------------------------------------------------------------------- /test/wasix/cpp_atomic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5.0) 2 | project (basic_executable) 3 | 4 | add_executable(main main.cpp) -------------------------------------------------------------------------------- /test/wasix/cpp_executable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5.0) 2 | project (basic_executable) 3 | 4 | add_executable(main main.cpp) -------------------------------------------------------------------------------- /test/wasix/cpp_executable/main.cpp: -------------------------------------------------------------------------------- 1 | int main(int argc, char** argv) { 2 | return 123; 3 | } -------------------------------------------------------------------------------- /test/wasix/cpp_iostream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5.0) 2 | project (basic_executable) 3 | 4 | add_executable(main main.cpp) -------------------------------------------------------------------------------- /test/wasix/cpp_iostream/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char** argv) { 4 | std::cout << "Hello, world!\n"; 5 | return 0; 6 | } -------------------------------------------------------------------------------- /test/wasix/cpp_threads/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5.0) 2 | project (basic_executable) 3 | 4 | add_executable(main main.cpp) -------------------------------------------------------------------------------- /tools/append-builtins/wasm32-wasi.mri: -------------------------------------------------------------------------------- 1 | create libc.a 2 | addlib libc-old.a 3 | addlib ../../../libclang_rt.builtins-wasm32.a 4 | save 5 | end -------------------------------------------------------------------------------- /tools/wasi-headers/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /tools/wasix-headers/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | --------------------------------------------------------------------------------