shellsim-c-toolchain 0.1.25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. shellsim_c_toolchain/__init__.py +75 -0
  2. shellsim_c_toolchain/_assets/tcc/SHELLSIM-LIBC-LICENSE +21 -0
  3. shellsim_c_toolchain/_assets/tcc/include/float.h +75 -0
  4. shellsim_c_toolchain/_assets/tcc/include/stdalign.h +16 -0
  5. shellsim_c_toolchain/_assets/tcc/include/stdarg.h +14 -0
  6. shellsim_c_toolchain/_assets/tcc/include/stdatomic.h +171 -0
  7. shellsim_c_toolchain/_assets/tcc/include/stdbool.h +11 -0
  8. shellsim_c_toolchain/_assets/tcc/include/stddef.h +39 -0
  9. shellsim_c_toolchain/_assets/tcc/include/stdnoreturn.h +7 -0
  10. shellsim_c_toolchain/_assets/tcc/include/tccdefs.h +346 -0
  11. shellsim_c_toolchain/_assets/tcc/include/tgmath.h +89 -0
  12. shellsim_c_toolchain/_assets/tcc/include/varargs.h +12 -0
  13. shellsim_c_toolchain/_assets/tcc/shellsim_libc.c +42 -0
  14. shellsim_c_toolchain/_assets/tcc/tcc-shellsim.wasm +0 -0
  15. shellsim_c_toolchain/_assets/tcc/wasm32-libtcc1.a +0 -0
  16. shellsim_c_toolchain/_assets/tinycc-22a2e10-source.tar.gz +0 -0
  17. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__errno_values.h +84 -0
  18. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__fd_set.h +67 -0
  19. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__function___isatty.h +14 -0
  20. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__functions_malloc.h +29 -0
  21. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__functions_memcpy.h +24 -0
  22. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_dirent.h +44 -0
  23. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_fcntl.h +69 -0
  24. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_inttypes.h +184 -0
  25. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_netinet_in.h +32 -0
  26. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_poll.h +33 -0
  27. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_stdlib.h +21 -0
  28. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_string.h +26 -0
  29. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_sys_ioctl.h +17 -0
  30. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_sys_resource.h +19 -0
  31. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_sys_socket.h +81 -0
  32. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_sys_stat.h +15 -0
  33. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_time.h +31 -0
  34. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__header_unistd.h +29 -0
  35. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__macro_FD_SETSIZE.h +6 -0
  36. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__macro_PAGESIZE.h +26 -0
  37. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__mode_t.h +38 -0
  38. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__seek.h +8 -0
  39. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_dirent.h +14 -0
  40. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_in6_addr.h +8 -0
  41. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_in_addr.h +10 -0
  42. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_iovec.h +12 -0
  43. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_msghdr.h +16 -0
  44. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_pollfd.h +10 -0
  45. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_rusage.h +12 -0
  46. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_sockaddr.h +11 -0
  47. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_sockaddr_in.h +14 -0
  48. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_sockaddr_in6.h +16 -0
  49. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_sockaddr_storage.h +11 -0
  50. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_sockaddr_un.h +10 -0
  51. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_stat.h +35 -0
  52. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_timespec.h +12 -0
  53. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_timeval.h +13 -0
  54. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_tm.h +19 -0
  55. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__struct_tms.h +13 -0
  56. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_DIR.h +6 -0
  57. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_blkcnt_t.h +7 -0
  58. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_blksize_t.h +6 -0
  59. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_clock_t.h +7 -0
  60. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_clockid_t.h +6 -0
  61. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_dev_t.h +7 -0
  62. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_fd_set.h +14 -0
  63. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_gid_t.h +6 -0
  64. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_in_addr_t.h +6 -0
  65. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_in_port_t.h +6 -0
  66. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_ino_t.h +7 -0
  67. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_mode_t.h +6 -0
  68. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_nfds_t.h +6 -0
  69. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_nlink_t.h +7 -0
  70. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_off_t.h +7 -0
  71. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_sa_family_t.h +6 -0
  72. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_sigset_t.h +7 -0
  73. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_socklen_t.h +6 -0
  74. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_ssize_t.h +7 -0
  75. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_suseconds_t.h +8 -0
  76. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_time_t.h +7 -0
  77. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/__typedef_uid_t.h +6 -0
  78. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/alloca.h +19 -0
  79. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/ar.h +25 -0
  80. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/ftp.h +35 -0
  81. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/inet.h +31 -0
  82. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/nameser.h +526 -0
  83. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/nameser_compat.h +2 -0
  84. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/telnet.h +251 -0
  85. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/arpa/tftp.h +31 -0
  86. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/assert.h +23 -0
  87. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/alltypes.h +461 -0
  88. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/dirent.h +1 -0
  89. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/fcntl.h +1 -0
  90. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/fenv.h +10 -0
  91. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/float.h +16 -0
  92. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/hwcap.h +0 -0
  93. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/io.h +0 -0
  94. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/ioctl.h +1 -0
  95. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/ioctl_fix.h +0 -0
  96. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/ipcstat.h +1 -0
  97. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/limits.h +1 -0
  98. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/mman.h +0 -0
  99. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/poll.h +0 -0
  100. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/posix.h +2 -0
  101. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/reg.h +0 -0
  102. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/resource.h +0 -0
  103. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/setjmp.h +1 -0
  104. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/signal.h +40 -0
  105. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/socket.h +0 -0
  106. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/stat.h +22 -0
  107. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/bits/stdint.h +29 -0
  108. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/byteswap.h +26 -0
  109. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/complex.h +143 -0
  110. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/cpio.h +29 -0
  111. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/crypt.h +20 -0
  112. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/ctype.h +77 -0
  113. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/dirent.h +103 -0
  114. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/dlfcn.h +56 -0
  115. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/endian.h +80 -0
  116. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/err.h +25 -0
  117. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/errno.h +40 -0
  118. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/fcntl.h +250 -0
  119. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/features.h +40 -0
  120. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/fenv.h +28 -0
  121. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/float.h +56 -0
  122. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/fmtmsg.h +47 -0
  123. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/fnmatch.h +24 -0
  124. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/fts.h +155 -0
  125. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/ftw.h +45 -0
  126. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/getopt.h +30 -0
  127. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/glob.h +54 -0
  128. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/iconv.h +24 -0
  129. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/ifaddrs.h +35 -0
  130. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/inttypes.h +233 -0
  131. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/iso646.h +20 -0
  132. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/langinfo.h +98 -0
  133. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/libgen.h +15 -0
  134. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/limits.h +174 -0
  135. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/locale.h +93 -0
  136. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/malloc.h +33 -0
  137. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/math.h +459 -0
  138. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/memory.h +1 -0
  139. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/monetary.h +23 -0
  140. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/mqueue.h +41 -0
  141. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/icmp6.h +305 -0
  142. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/igmp.h +45 -0
  143. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/in.h +434 -0
  144. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/in_systm.h +9 -0
  145. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/ip.h +199 -0
  146. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/ip6.h +141 -0
  147. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/ip_icmp.h +193 -0
  148. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/tcp.h +305 -0
  149. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netinet/udp.h +46 -0
  150. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/netpacket/packet.h +62 -0
  151. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/nl_types.h +22 -0
  152. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/poll.h +69 -0
  153. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/pthread.h +267 -0
  154. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/regex.h +62 -0
  155. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sched.h +151 -0
  156. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/search.h +63 -0
  157. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/semaphore.h +39 -0
  158. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/setjmp.h +55 -0
  159. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/signal.h +339 -0
  160. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdalign.h +20 -0
  161. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdbool.h +14 -0
  162. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdc-predef.h +18 -0
  163. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdint.h +117 -0
  164. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdio.h +259 -0
  165. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdio_ext.h +34 -0
  166. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdlib.h +217 -0
  167. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stdnoreturn.h +7 -0
  168. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/string.h +123 -0
  169. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/strings.h +40 -0
  170. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/stropts.h +139 -0
  171. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/dir.h +2 -0
  172. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/errno.h +2 -0
  173. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/eventfd.h +26 -0
  174. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/fcntl.h +2 -0
  175. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/file.h +21 -0
  176. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/ioctl.h +124 -0
  177. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/mman.h +161 -0
  178. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/param.h +37 -0
  179. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/poll.h +2 -0
  180. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/random.h +27 -0
  181. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/reg.h +18 -0
  182. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/resource.h +126 -0
  183. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/select.h +54 -0
  184. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/signal.h +2 -0
  185. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/socket.h +454 -0
  186. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/stat.h +223 -0
  187. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/statvfs.h +57 -0
  188. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/stropts.h +1 -0
  189. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/syscall.h +10 -0
  190. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/sysinfo.h +36 -0
  191. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/time.h +84 -0
  192. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/timeb.h +28 -0
  193. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/times.h +34 -0
  194. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/timex.h +103 -0
  195. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/ttydefaults.h +34 -0
  196. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/types.h +85 -0
  197. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/uio.h +58 -0
  198. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/un.h +39 -0
  199. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sys/utsname.h +29 -0
  200. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/syscall.h +1 -0
  201. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/sysexits.h +21 -0
  202. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/tar.h +33 -0
  203. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/tgmath.h +270 -0
  204. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/threads.h +93 -0
  205. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/time.h +204 -0
  206. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/uchar.h +29 -0
  207. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/unistd.h +593 -0
  208. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/utime.h +29 -0
  209. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/values.h +39 -0
  210. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/api.h +34 -0
  211. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/libc-busywait.h +15 -0
  212. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/libc-environ.h +36 -0
  213. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/libc-find-relpath.h +75 -0
  214. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/libc-nocwd.h +61 -0
  215. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/libc.h +136 -0
  216. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/version.h +24 -0
  217. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/wasip1.h +2130 -0
  218. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/wasip2.h +10 -0
  219. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wasi/wasip3.h +10 -0
  220. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wchar.h +214 -0
  221. shellsim_c_toolchain/_assets/wasi-sysroot/include/wasm32-wasip1/wctype.h +79 -0
  222. shellsim_c_toolchain/_assets/wasi-sysroot/lib/wasm32-wasip1/libc-printscan-long-double.a +0 -0
  223. shellsim_c_toolchain/_assets/wasi-sysroot/lib/wasm32-wasip1/libc.a +0 -0
  224. shellsim_c_toolchain/_assets/wasi-sysroot/lib/wasm32-wasip1/libsetjmp.a +0 -0
  225. shellsim_c_toolchain-0.1.25.dist-info/METADATA +33 -0
  226. shellsim_c_toolchain-0.1.25.dist-info/RECORD +239 -0
  227. shellsim_c_toolchain-0.1.25.dist-info/WHEEL +5 -0
  228. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSE +201 -0
  229. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/README.md +31 -0
  230. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/tinycc-LGPL-2.1.txt +502 -0
  231. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/tinycc-shellsim-libc-LICENSE +21 -0
  232. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-CLOUDLIBC-LICENSE +22 -0
  233. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-FTS-COPYING +26 -0
  234. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-LICENSE +17 -0
  235. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-LICENSE-APACHE +201 -0
  236. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-LICENSE-APACHE-LLVM +219 -0
  237. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-LICENSE-MIT +23 -0
  238. shellsim_c_toolchain-0.1.25.dist-info/licenses/LICENSES/wasi-libc-MUSL-COPYRIGHT +193 -0
  239. shellsim_c_toolchain-0.1.25.dist-info/top_level.txt +1 -0
@@ -0,0 +1,346 @@
1
+ /* tccdefs.h
2
+
3
+ Nothing is defined before this file except target machine, target os
4
+ and the few things related to option settings in tccpp.c:tcc_predefs().
5
+
6
+ This file is either included at runtime as is, or converted and
7
+ included as C-strings at compile-time (depending on CONFIG_TCC_PREDEFS).
8
+
9
+ Note that line indent matters:
10
+
11
+ - in lines starting at column 1, platform macros are replaced by
12
+ corresponding TCC target compile-time macros. See conftest.c for
13
+ the list of platform macros supported in lines starting at column 1.
14
+
15
+ - only lines indented >= 4 are actually included into the executable,
16
+ check tccdefs_.h.
17
+ */
18
+
19
+ #if __SIZEOF_POINTER__ == 4
20
+ /* 32bit systems. */
21
+ #if defined __OpenBSD__ || defined __wasm__
22
+ #define __SIZE_TYPE__ unsigned long
23
+ #define __PTRDIFF_TYPE__ long
24
+ #else
25
+ #define __SIZE_TYPE__ unsigned int
26
+ #define __PTRDIFF_TYPE__ int
27
+ #endif
28
+ #define __ILP32__ 1
29
+ #define __INT64_TYPE__ long long
30
+ #elif __SIZEOF_LONG__ == 4
31
+ /* 64bit Windows. */
32
+ #define __SIZE_TYPE__ unsigned long long
33
+ #define __PTRDIFF_TYPE__ long long
34
+ #define __LLP64__ 1
35
+ #define __INT64_TYPE__ long long
36
+ #else
37
+ /* Other 64bit systems. */
38
+ #define __SIZE_TYPE__ unsigned long
39
+ #define __PTRDIFF_TYPE__ long
40
+ #define __LP64__ 1
41
+ # if defined __linux__
42
+ #define __INT64_TYPE__ long
43
+ # else /* APPLE, BSD */
44
+ #define __INT64_TYPE__ long long
45
+ # endif
46
+ #endif
47
+ #define __SIZEOF_INT__ 4
48
+ #define __INT_MAX__ 0x7fffffff
49
+ #if __SIZEOF_LONG__ == 4
50
+ #define __LONG_MAX__ 0x7fffffffL
51
+ #else
52
+ #define __LONG_MAX__ 0x7fffffffffffffffL
53
+ #endif
54
+ #define __SIZEOF_LONG_LONG__ 8
55
+ #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
56
+ #define __CHAR_BIT__ 8
57
+ #define __ORDER_LITTLE_ENDIAN__ 1234
58
+ #define __ORDER_BIG_ENDIAN__ 4321
59
+ #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
60
+ #if defined _WIN32
61
+ #define __WCHAR_TYPE__ unsigned short
62
+ #define __WINT_TYPE__ unsigned short
63
+ #elif defined __linux__
64
+ #define __WCHAR_TYPE__ int
65
+ #define __WINT_TYPE__ unsigned int
66
+ #else
67
+ #define __WCHAR_TYPE__ int
68
+ #define __WINT_TYPE__ int
69
+ #endif
70
+
71
+ #if __STDC_VERSION__ >= 201112L
72
+ # define __STDC_NO_ATOMICS__ 1
73
+ # define __STDC_NO_COMPLEX__ 1
74
+ # define __STDC_NO_THREADS__ 1
75
+ #if !defined _WIN32
76
+ # define __STDC_UTF_16__ 1
77
+ # define __STDC_UTF_32__ 1
78
+ #endif
79
+ #endif
80
+
81
+ #if defined _WIN32
82
+ #define __declspec(x) __attribute__((x))
83
+ #define __cdecl
84
+
85
+ #elif defined __FreeBSD__
86
+ #define __GNUC__ 9
87
+ #define __GNUC_MINOR__ 3
88
+ #define __GNUC_PATCHLEVEL__ 0
89
+ #define __GNUC_STDC_INLINE__ 1
90
+ #define __NO_TLS 1
91
+ #define __RUNETYPE_INTERNAL 1
92
+ # if __SIZEOF_POINTER__ == 8
93
+ #define __SIZEOF_SIZE_T__ 8
94
+ #define __SIZEOF_PTRDIFF_T__ 8
95
+ #else
96
+ #define __SIZEOF_SIZE_T__ 4
97
+ #define __SIZEOF_PTRDIFF_T__ 4
98
+ # endif
99
+
100
+ #elif defined __FreeBSD_kernel__
101
+
102
+ #elif defined __NetBSD__
103
+ #define __GNUC__ 4
104
+ #define __GNUC_MINOR__ 1
105
+ #define __GNUC_PATCHLEVEL__ 0
106
+ #define _Pragma(x)
107
+ #define __ELF__ 1
108
+ #if defined __aarch64__
109
+ #define _LOCORE /* avoids usage of __asm */
110
+ #endif
111
+
112
+ #elif defined __OpenBSD__
113
+ #define __GNUC__ 4
114
+ #define _ANSI_LIBRARY 1
115
+
116
+ #elif defined __APPLE__
117
+ /* emulate APPLE-GCC to make libc's headerfiles compile: */
118
+ #define __GNUC__ 4 /* darwin emits warning on GCC<4 */
119
+ #define __APPLE_CC__ 1 /* for <TargetConditionals.h> */
120
+ #define __LITTLE_ENDIAN__ 1
121
+ #define _DONT_USE_CTYPE_INLINE_ 1
122
+ /* avoids usage of GCC/clang specific builtins in libc-headerfiles: */
123
+ #define __FINITE_MATH_ONLY__ 1
124
+ #define _FORTIFY_SOURCE 0
125
+ //#define __has_builtin(x) 0
126
+ #define _Float16 short unsigned int /* fake type just for size & alignment (macOS Sequoia) */
127
+
128
+ #elif defined __ANDROID__
129
+ #define BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD
130
+
131
+ #else
132
+ /* Linux */
133
+
134
+ #endif
135
+
136
+ /* Some derived integer types needed to get stdint.h to compile correctly on some platforms */
137
+ #ifndef __NetBSD__
138
+ #define __UINTPTR_TYPE__ unsigned __PTRDIFF_TYPE__
139
+ #define __INTPTR_TYPE__ __PTRDIFF_TYPE__
140
+ #endif
141
+ #define __INT32_TYPE__ int
142
+
143
+ #if !defined _WIN32
144
+ /* glibc defines. We do not support __USER_NAME_PREFIX__ */
145
+ #define __REDIRECT(name, proto, alias) name proto __asm__ (#alias)
146
+ #define __REDIRECT_NTH(name, proto, alias) name proto __asm__ (#alias) __THROW
147
+ #define __REDIRECT_NTHNL(name, proto, alias) name proto __asm__ (#alias) __THROWNL
148
+ #endif
149
+
150
+ /* not implemented */
151
+ #define __PRETTY_FUNCTION__ __FUNCTION__
152
+ #define __has_builtin(x) 0
153
+ #define __has_feature(x) 0
154
+ #define __has_attribute(x) 0
155
+ /* C23 Keywords */
156
+ #define _Nonnull
157
+ #define _Nullable
158
+ #define _Nullable_result
159
+ #define _Null_unspecified
160
+
161
+ /* skip __builtin... with -E */
162
+ #ifndef __TCC_PP__
163
+
164
+ #define __builtin_offsetof(type, field) ((__SIZE_TYPE__)&((type*)0)->field)
165
+ #define __builtin_extract_return_addr(x) x
166
+ #if !defined __linux__ && !defined _WIN32
167
+ /* used by math.h */
168
+ #define __builtin_huge_val() 1e500
169
+ #define __builtin_huge_valf() 1e50f
170
+ #define __builtin_huge_vall() 1e5000L
171
+ # if defined __APPLE__
172
+ #define __builtin_nanf(ignored_string) (0.0F/0.0F)
173
+ /* used by floats.h to implement FLT_ROUNDS C99 macro. 1 == to nearest */
174
+ #define __builtin_flt_rounds() 1
175
+ /* used by _fd_def.h */
176
+ #define __builtin_bzero(p, ignored_size) bzero(p, sizeof(*(p)))
177
+ # else
178
+ #define __builtin_nanf(ignored_string) (0.0F/0.0F)
179
+ # endif
180
+ #endif
181
+
182
+ /* GCC's __uint128_t appears in some Linux/OSX header files.
183
+ Just make it some type with same size and alignment. */
184
+ struct __uint128__ { char x[16]; } __attribute((__aligned__(16)));
185
+ #define __int128_t struct __uint128__
186
+ #define __uint128_t struct __uint128__
187
+
188
+ /* __builtin_va_list */
189
+ #if defined __x86_64__
190
+ #if !defined _WIN32
191
+ /* GCC compatible definition of va_list. */
192
+ /* This should be in sync with the declaration in our lib/va_list.c */
193
+ typedef struct {
194
+ unsigned gp_offset, fp_offset;
195
+ union {
196
+ unsigned overflow_offset;
197
+ char *overflow_arg_area;
198
+ };
199
+ char *reg_save_area;
200
+ } __builtin_va_list[1];
201
+
202
+ void *__va_arg(__builtin_va_list ap, int arg_type, int size, int align);
203
+ #define __builtin_va_start(ap, last) \
204
+ (*(ap) = *(__builtin_va_list)((char*)__builtin_frame_address(0) - 24))
205
+ #define __builtin_va_arg(ap, t) \
206
+ (*(t *)(__va_arg(ap, __builtin_va_arg_types(t), sizeof(t), __alignof__(t))))
207
+ #define __builtin_va_copy(dest, src) (*(dest) = *(src))
208
+
209
+ #else /* _WIN64 */
210
+ typedef char *__builtin_va_list;
211
+ #define __builtin_va_arg(ap, t) ((sizeof(t) > 8 || (sizeof(t) & (sizeof(t) - 1))) \
212
+ ? **(t **)((ap += 8) - 8) : *(t *)((ap += 8) - 8))
213
+ #endif
214
+
215
+ #elif defined __arm__
216
+ typedef char *__builtin_va_list;
217
+ #define _tcc_alignof(type) ((int)&((struct {char c;type x;} *)0)->x)
218
+ #define _tcc_align(addr,type) (((unsigned)addr + _tcc_alignof(type) - 1) \
219
+ & ~(_tcc_alignof(type) - 1))
220
+ #define __builtin_va_start(ap,last) (ap = ((char *)&(last)) + ((sizeof(last)+3)&~3))
221
+ #define __builtin_va_arg(ap,type) (ap = (void *) ((_tcc_align(ap,type)+sizeof(type)+3) \
222
+ &~3), *(type *)(ap - ((sizeof(type)+3)&~3)))
223
+
224
+ #elif defined __aarch64__
225
+ #if defined _WIN32
226
+ typedef char *__builtin_va_list;
227
+ #elif defined __APPLE__
228
+ typedef struct {
229
+ void *__stack;
230
+ } __builtin_va_list;
231
+
232
+ #else
233
+ typedef struct {
234
+ void *__stack, *__gr_top, *__vr_top;
235
+ int __gr_offs, __vr_offs;
236
+ } __builtin_va_list;
237
+
238
+ #endif
239
+ #elif defined __riscv
240
+ typedef char *__builtin_va_list;
241
+ #define __va_reg_size (__riscv_xlen >> 3)
242
+ #define _tcc_align(addr,type) (((unsigned long)addr + __alignof__(type) - 1) \
243
+ & -(__alignof__(type)))
244
+ #define __builtin_va_arg(ap,type) (*(sizeof(type) > (2*__va_reg_size) ? *(type **)((ap += __va_reg_size) - __va_reg_size) : (ap = (va_list)(_tcc_align(ap,type) + (sizeof(type)+__va_reg_size - 1)& -__va_reg_size), (type *)(ap - ((sizeof(type)+ __va_reg_size - 1)& -__va_reg_size)))))
245
+
246
+ #elif defined __wasm__
247
+ /* variadic arguments are passed in a buffer, each argument aligned
248
+ to max(4, its alignment) and occupying a multiple of 4 bytes */
249
+ typedef char *__builtin_va_list;
250
+ #define _tcc_va_align(ap,type) (((unsigned)(ap) + __alignof__(type) - 1) & -(__alignof__(type)))
251
+ #define __builtin_va_arg(ap,type) (ap = (char *)(_tcc_va_align(ap,type) + ((sizeof(type)+3)&~3)), \
252
+ *(type *)(ap - ((sizeof(type)+3)&~3)))
253
+
254
+ #else /* __i386__ */
255
+ typedef char *__builtin_va_list;
256
+ #define __builtin_va_start(ap,last) (ap = ((char *)&(last)) + ((sizeof(last)+3)&~3))
257
+ #define __builtin_va_arg(ap,t) (*(t*)((ap+=(sizeof(t)+3)&~3)-((sizeof(t)+3)&~3)))
258
+
259
+ #endif
260
+ #define __builtin_va_end(ap) (void)(ap)
261
+ #ifndef __builtin_va_copy
262
+ # define __builtin_va_copy(dest, src) (dest) = (src)
263
+ #endif
264
+
265
+ /* TCC BBUILTIN AND BOUNDS ALIASES */
266
+ #ifdef __leading_underscore
267
+ # define __RENAME(X) __asm__("_"X)
268
+ #else
269
+ # define __RENAME(X) __asm__(X)
270
+ #endif
271
+
272
+ #ifdef __TCC_BCHECK__
273
+ # define __BUILTINBC(ret,name,params) ret __builtin_##name params __RENAME("__bound_"#name);
274
+ # define __BOUND(ret,name,params) ret name params __RENAME("__bound_"#name);
275
+ #else
276
+ # define __BUILTINBC(ret,name,params) ret __builtin_##name params __RENAME(#name);
277
+ # define __BOUND(ret,name,params)
278
+ #endif
279
+ #ifdef _WIN32
280
+ #define __BOTH __BOUND
281
+ #define __BUILTIN(ret,name,params)
282
+ #else
283
+ #define __BOTH(ret,name,params) __BUILTINBC(ret,name,params)__BOUND(ret,name,params)
284
+ #define __BUILTIN(ret,name,params) ret __builtin_##name params __RENAME(#name);
285
+ #endif
286
+
287
+ __BOTH(void*, memcpy, (void *, const void*, __SIZE_TYPE__))
288
+ __BOTH(void*, memmove, (void *, const void*, __SIZE_TYPE__))
289
+ __BOTH(void*, memset, (void *, int, __SIZE_TYPE__))
290
+ __BOTH(int, memcmp, (const void *, const void*, __SIZE_TYPE__))
291
+ __BOTH(__SIZE_TYPE__, strlen, (const char *))
292
+ __BOTH(char*, strcpy, (char *, const char *))
293
+ __BOTH(char*, strncpy, (char *, const char*, __SIZE_TYPE__))
294
+ __BOTH(int, strcmp, (const char*, const char*))
295
+ __BOTH(int, strncmp, (const char*, const char*, __SIZE_TYPE__))
296
+ __BOTH(char*, strcat, (char*, const char*))
297
+ __BOTH(char*, strncat, (char*, const char*, __SIZE_TYPE__))
298
+ __BOTH(char*, strchr, (const char*, int))
299
+ __BOTH(char*, strrchr, (const char*, int))
300
+ __BOTH(char*, strdup, (const char*))
301
+ #if defined __ARM_EABI__
302
+ __BOUND(void*,__aeabi_memcpy,(void*,const void*,__SIZE_TYPE__))
303
+ __BOUND(void*,__aeabi_memmove,(void*,const void*,__SIZE_TYPE__))
304
+ __BOUND(void*,__aeabi_memmove4,(void*,const void*,__SIZE_TYPE__))
305
+ __BOUND(void*,__aeabi_memmove8,(void*,const void*,__SIZE_TYPE__))
306
+ __BOUND(void*,__aeabi_memset,(void*,int,__SIZE_TYPE__))
307
+ #endif
308
+
309
+ #if defined __linux__ || defined __APPLE__ // HAVE MALLOC_REDIR
310
+ #define __MAYBE_REDIR __BUILTIN
311
+ #else
312
+ #define __MAYBE_REDIR __BOTH
313
+ #endif
314
+ __MAYBE_REDIR(void*, malloc, (__SIZE_TYPE__))
315
+ __MAYBE_REDIR(void*, realloc, (void *, __SIZE_TYPE__))
316
+ __MAYBE_REDIR(void*, calloc, (__SIZE_TYPE__, __SIZE_TYPE__))
317
+ __MAYBE_REDIR(void*, memalign, (__SIZE_TYPE__, __SIZE_TYPE__))
318
+ __MAYBE_REDIR(void, free, (void*))
319
+ __BOTH(void*, alloca, (__SIZE_TYPE__))
320
+ void *alloca(__SIZE_TYPE__);
321
+ __BUILTIN(void, abort, (void))
322
+ __BOUND(void, longjmp, ())
323
+ #if !defined _WIN32
324
+ __BOUND(void*, mmap, ())
325
+ __BOUND(int, munmap, ())
326
+ #endif
327
+ #undef __BUILTINBC
328
+ #undef __BUILTIN
329
+ #undef __BOUND
330
+ #undef __BOTH
331
+ #undef __MAYBE_REDIR
332
+ #undef __RENAME
333
+
334
+ #define __BUILTIN_EXTERN(name,u) \
335
+ int __builtin_##name(u int); \
336
+ int __builtin_##name##l(u long); \
337
+ int __builtin_##name##ll(u long long);
338
+ __BUILTIN_EXTERN(ffs,)
339
+ __BUILTIN_EXTERN(clz, unsigned)
340
+ __BUILTIN_EXTERN(ctz, unsigned)
341
+ __BUILTIN_EXTERN(clrsb,)
342
+ __BUILTIN_EXTERN(popcount, unsigned)
343
+ __BUILTIN_EXTERN(parity, unsigned)
344
+ #undef __BUILTIN_EXTERN
345
+
346
+ #endif /* ndef __TCC_PP__ */
@@ -0,0 +1,89 @@
1
+ /*
2
+ * ISO C Standard: 7.22 Type-generic math <tgmath.h>
3
+ */
4
+
5
+ #ifndef _TGMATH_H
6
+ #define _TGMATH_H
7
+
8
+ #include <math.h>
9
+
10
+ #ifndef __cplusplus
11
+ #define __tgmath_real(x, F) \
12
+ _Generic ((x), float: F##f, long double: F##l, default: F)(x)
13
+ #define __tgmath_real_2_1(x, y, F) \
14
+ _Generic ((x), float: F##f, long double: F##l, default: F)(x, y)
15
+ #define __tgmath_real_2(x, y, F) \
16
+ _Generic ((x)+(y), float: F##f, long double: F##l, default: F)(x, y)
17
+ #define __tgmath_real_3_2(x, y, z, F) \
18
+ _Generic ((x)+(y), float: F##f, long double: F##l, default: F)(x, y, z)
19
+ #define __tgmath_real_3(x, y, z, F) \
20
+ _Generic ((x)+(y)+(z), float: F##f, long double: F##l, default: F)(x, y, z)
21
+
22
+ /* Functions defined in both <math.h> and <complex.h> (7.22p4) */
23
+ #define acos(z) __tgmath_real(z, acos)
24
+ #define asin(z) __tgmath_real(z, asin)
25
+ #define atan(z) __tgmath_real(z, atan)
26
+ #define acosh(z) __tgmath_real(z, acosh)
27
+ #define asinh(z) __tgmath_real(z, asinh)
28
+ #define atanh(z) __tgmath_real(z, atanh)
29
+ #define cos(z) __tgmath_real(z, cos)
30
+ #define sin(z) __tgmath_real(z, sin)
31
+ #define tan(z) __tgmath_real(z, tan)
32
+ #define cosh(z) __tgmath_real(z, cosh)
33
+ #define sinh(z) __tgmath_real(z, sinh)
34
+ #define tanh(z) __tgmath_real(z, tanh)
35
+ #define exp(z) __tgmath_real(z, exp)
36
+ #define log(z) __tgmath_real(z, log)
37
+ #define pow(z1,z2) __tgmath_real_2(z1, z2, pow)
38
+ #define sqrt(z) __tgmath_real(z, sqrt)
39
+ #define fabs(z) __tgmath_real(z, fabs)
40
+
41
+ /* Functions defined in <math.h> only (7.22p5) */
42
+ #define atan2(x,y) __tgmath_real_2(x, y, atan2)
43
+ #define cbrt(x) __tgmath_real(x, cbrt)
44
+ #define ceil(x) __tgmath_real(x, ceil)
45
+ #define copysign(x,y) __tgmath_real_2(x, y, copysign)
46
+ #define erf(x) __tgmath_real(x, erf)
47
+ #define erfc(x) __tgmath_real(x, erfc)
48
+ #define exp2(x) __tgmath_real(x, exp2)
49
+ #define expm1(x) __tgmath_real(x, expm1)
50
+ #define fdim(x,y) __tgmath_real_2(x, y, fdim)
51
+ #define floor(x) __tgmath_real(x, floor)
52
+ #define fma(x,y,z) __tgmath_real_3(x, y, z, fma)
53
+ #define fmax(x,y) __tgmath_real_2(x, y, fmax)
54
+ #define fmin(x,y) __tgmath_real_2(x, y, fmin)
55
+ #define fmod(x,y) __tgmath_real_2(x, y, fmod)
56
+ #define frexp(x,y) __tgmath_real_2_1(x, y, frexp)
57
+ #define hypot(x,y) __tgmath_real_2(x, y, hypot)
58
+ #define ilogb(x) __tgmath_real(x, ilogb)
59
+ #define ldexp(x,y) __tgmath_real_2_1(x, y, ldexp)
60
+ #define lgamma(x) __tgmath_real(x, lgamma)
61
+ #define llrint(x) __tgmath_real(x, llrint)
62
+ #define llround(x) __tgmath_real(x, llround)
63
+ #define log10(x) __tgmath_real(x, log10)
64
+ #define log1p(x) __tgmath_real(x, log1p)
65
+ #define log2(x) __tgmath_real(x, log2)
66
+ #define logb(x) __tgmath_real(x, logb)
67
+ #define lrint(x) __tgmath_real(x, lrint)
68
+ #define lround(x) __tgmath_real(x, lround)
69
+ #define nearbyint(x) __tgmath_real(x, nearbyint)
70
+ #define nextafter(x,y) __tgmath_real_2(x, y, nextafter)
71
+ #define nexttoward(x,y) __tgmath_real_2(x, y, nexttoward)
72
+ #define remainder(x,y) __tgmath_real_2(x, y, remainder)
73
+ #define remquo(x,y,z) __tgmath_real_3_2(x, y, z, remquo)
74
+ #define rint(x) __tgmath_real(x, rint)
75
+ #define round(x) __tgmath_real(x, round)
76
+ #define scalbln(x,y) __tgmath_real_2_1(x, y, scalbln)
77
+ #define scalbn(x,y) __tgmath_real_2_1(x, y, scalbn)
78
+ #define tgamma(x) __tgmath_real(x, tgamma)
79
+ #define trunc(x) __tgmath_real(x, trunc)
80
+
81
+ /* Functions defined in <complex.h> only (7.22p6)
82
+ #define carg(z) __tgmath_cplx_only(z, carg)
83
+ #define cimag(z) __tgmath_cplx_only(z, cimag)
84
+ #define conj(z) __tgmath_cplx_only(z, conj)
85
+ #define cproj(z) __tgmath_cplx_only(z, cproj)
86
+ #define creal(z) __tgmath_cplx_only(z, creal)
87
+ */
88
+ #endif /* __cplusplus */
89
+ #endif /* _TGMATH_H */
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ #ifndef _VARARGS_H
7
+ #define _VARARGS_H
8
+
9
+ #error "TinyCC no longer implements <varargs.h>."
10
+ #error "Revise your code to use <stdarg.h>."
11
+
12
+ #endif
@@ -0,0 +1,42 @@
1
+ /* SPDX-License-Identifier: MIT */
2
+ /* Bridge POSIX calls absent from WASI Preview 1 to shellsim's virtual syscalls. */
3
+
4
+ #include <errno.h>
5
+ #include <limits.h>
6
+ #include <string.h>
7
+ #include <sys/stat.h>
8
+ #include <unistd.h>
9
+
10
+ extern int shellsim_path_chmod(const char *, unsigned, unsigned)
11
+ __asm__("shellsim.path_chmod");
12
+
13
+ int chmod(const char *path, mode_t mode)
14
+ {
15
+ int error;
16
+ char absolute[PATH_MAX];
17
+ const char *target = path;
18
+ if (!path) {
19
+ errno = EFAULT;
20
+ return -1;
21
+ }
22
+ if (path[0] != '/') {
23
+ size_t base_len, path_len;
24
+ if (!getcwd(absolute, sizeof absolute))
25
+ return -1;
26
+ base_len = strlen(absolute);
27
+ path_len = strlen(path);
28
+ if (base_len + 1 + path_len >= sizeof absolute) {
29
+ errno = ENAMETOOLONG;
30
+ return -1;
31
+ }
32
+ absolute[base_len++] = '/';
33
+ memcpy(absolute + base_len, path, path_len + 1);
34
+ target = absolute;
35
+ }
36
+ error = shellsim_path_chmod(target, strlen(target), (unsigned)mode);
37
+ if (error) {
38
+ errno = error;
39
+ return -1;
40
+ }
41
+ return 0;
42
+ }
@@ -0,0 +1,84 @@
1
+ #ifndef __wasilibc___errno_values_h
2
+ #define __wasilibc___errno_values_h
3
+
4
+ #define E2BIG 1
5
+ #define EACCES 2
6
+ #define EADDRINUSE 3
7
+ #define EADDRNOTAVAIL 4
8
+ #define EAFNOSUPPORT 5
9
+ #define EAGAIN 6
10
+ #define EALREADY 7
11
+ #define EBADF 8
12
+ #define EBADMSG 9
13
+ #define EBUSY 10
14
+ #define ECANCELED 11
15
+ #define ECHILD 12
16
+ #define ECONNABORTED 13
17
+ #define ECONNREFUSED 14
18
+ #define ECONNRESET 15
19
+ #define EDEADLK 16
20
+ #define EDESTADDRREQ 17
21
+ #define EDOM 18
22
+ #define EDQUOT 19
23
+ #define EEXIST 20
24
+ #define EFAULT 21
25
+ #define EFBIG 22
26
+ #define EHOSTUNREACH 23
27
+ #define EIDRM 24
28
+ #define EILSEQ 25
29
+ #define EINPROGRESS 26
30
+ #define EINTR 27
31
+ #define EINVAL 28
32
+ #define EIO 29
33
+ #define EISCONN 30
34
+ #define EISDIR 31
35
+ #define ELOOP 32
36
+ #define EMFILE 33
37
+ #define EMLINK 34
38
+ #define EMSGSIZE 35
39
+ #define EMULTIHOP 36
40
+ #define ENAMETOOLONG 37
41
+ #define ENETDOWN 38
42
+ #define ENETRESET 39
43
+ #define ENETUNREACH 40
44
+ #define ENFILE 41
45
+ #define ENOBUFS 42
46
+ #define ENODEV 43
47
+ #define ENOENT 44
48
+ #define ENOEXEC 45
49
+ #define ENOLCK 46
50
+ #define ENOLINK 47
51
+ #define ENOMEM 48
52
+ #define ENOMSG 49
53
+ #define ENOPROTOOPT 50
54
+ #define ENOSPC 51
55
+ #define ENOSYS 52
56
+ #define ENOTCONN 53
57
+ #define ENOTDIR 54
58
+ #define ENOTEMPTY 55
59
+ #define ENOTRECOVERABLE 56
60
+ #define ENOTSOCK 57
61
+ #define ENOTSUP 58
62
+ #define ENOTTY 59
63
+ #define ENXIO 60
64
+ #define EOVERFLOW 61
65
+ #define EOWNERDEAD 62
66
+ #define EPERM 63
67
+ #define EPIPE 64
68
+ #define EPROTO 65
69
+ #define EPROTONOSUPPORT 66
70
+ #define EPROTOTYPE 67
71
+ #define ERANGE 68
72
+ #define EROFS 69
73
+ #define ESPIPE 70
74
+ #define ESRCH 71
75
+ #define ESTALE 72
76
+ #define ETIMEDOUT 73
77
+ #define ETXTBSY 74
78
+ #define EXDEV 75
79
+ #define ENOTCAPABLE 76
80
+
81
+ #define EOPNOTSUPP ENOTSUP
82
+ #define EWOULDBLOCK EAGAIN
83
+
84
+ #endif
@@ -0,0 +1,67 @@
1
+ #ifndef __wasilibc___fd_set_h
2
+ #define __wasilibc___fd_set_h
3
+
4
+ #include <__typedef_fd_set.h>
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ static __inline void FD_CLR(int __fd, fd_set *__set) {
11
+ size_t __n = __set->__nfds;
12
+ for (int *__p = __set->__fds, *__e = __p + __n; __p < __e; ++__p) {
13
+ if (*__p == __fd) {
14
+ *__p = __e[-1];
15
+ __set->__nfds = __n - 1;
16
+ return;
17
+ }
18
+ }
19
+ }
20
+
21
+ static __inline
22
+ #ifdef __cplusplus
23
+ bool
24
+ #else
25
+ _Bool
26
+ #endif
27
+ FD_ISSET(int __fd, const fd_set *__set) {
28
+ size_t __n = __set->__nfds;
29
+ for (const int *__p = __set->__fds, *__e = __p + __n; __p < __e; ++__p) {
30
+ if (*__p == __fd) {
31
+ return 1;
32
+ }
33
+ }
34
+ return 0;
35
+ }
36
+
37
+ static __inline void FD_SET(int __fd, fd_set *__set) {
38
+ size_t __n = __set->__nfds;
39
+ for (const int *__p = __set->__fds, *__e = __p + __n; __p < __e; ++__p) {
40
+ if (*__p == __fd) {
41
+ return;
42
+ }
43
+ }
44
+ __set->__nfds = __n + 1;
45
+ __set->__fds[__n] = __fd;
46
+ }
47
+
48
+ static __inline void FD_ZERO(fd_set *__set) { __set->__nfds = 0; }
49
+
50
+ static __inline void FD_COPY(const fd_set *__restrict __from,
51
+ fd_set *__restrict __to) {
52
+ size_t __n = __from->__nfds;
53
+ __to->__nfds = __n;
54
+ __builtin_memcpy(__to->__fds, __from->__fds, __n * sizeof(int));
55
+ }
56
+
57
+ #define FD_CLR(fd, set) (FD_CLR((fd), (set)))
58
+ #define FD_ISSET(fd, set) (FD_ISSET((fd), (set)))
59
+ #define FD_SET(fd, set) (FD_SET((fd), (set)))
60
+ #define FD_ZERO(set) (FD_ZERO((set)))
61
+ #define FD_COPY(from, to) (FD_COPY((from), (to)))
62
+
63
+ #ifdef __cplusplus
64
+ }
65
+ #endif
66
+
67
+ #endif
@@ -0,0 +1,14 @@
1
+ #ifndef __wasilibc___function___isatty_h
2
+ #define __wasilibc___function___isatty_h
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ int __isatty(int fd);
9
+
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+
14
+ #endif
@@ -0,0 +1,29 @@
1
+ #ifndef __wasilibc___functions_malloc_h
2
+ #define __wasilibc___functions_malloc_h
3
+
4
+ #define __need_size_t
5
+ #define __need_wchar_t
6
+ #define __need_NULL
7
+ #include <stddef.h>
8
+
9
+ #ifdef __cplusplus
10
+ extern "C" {
11
+ #endif
12
+
13
+ void *malloc(size_t __size) __attribute__((__malloc__, __warn_unused_result__));
14
+ void free(void *__ptr);
15
+ void *calloc(size_t __nmemb, size_t __size)
16
+ __attribute__((__malloc__, __warn_unused_result__));
17
+ void *realloc(void *__ptr, size_t __size)
18
+ __attribute__((__warn_unused_result__));
19
+
20
+ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
21
+ void *reallocarray(void *__ptr, size_t __nmemb, size_t __size)
22
+ __attribute__((__warn_unused_result__));
23
+ #endif
24
+
25
+ #ifdef __cplusplus
26
+ }
27
+ #endif
28
+
29
+ #endif