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,75 @@
1
+ """Install the separately distributed C-to-Wasm compiler into a shellsim guest."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import hashlib
6
+ import shlex
7
+ from importlib.resources import files
8
+ from importlib.resources.abc import Traversable
9
+ from typing import Protocol
10
+
11
+ _TREE_SHA256 = {
12
+ "tcc": "6d9aec3bf180d260f9285f6bd63f2aff550f65baf39f62a493ac126f0ec4d203",
13
+ "wasi-sysroot": "c8db6acd30553b74e149cf9bf23387107e7587761cc930933026000af3a03e63",
14
+ }
15
+
16
+
17
+ class _RunResult(Protocol):
18
+ def check_returncode(self) -> None: ...
19
+
20
+
21
+ class _GuestMachine(Protocol):
22
+ def write_file(self, path: str, data: bytes, *, mode: int = 0o644) -> None: ...
23
+
24
+ def run(self, source: str, stdin: bytes = b"") -> _RunResult: ...
25
+
26
+
27
+ def _tree_files(root: Traversable) -> tuple[tuple[str, bytes], ...]:
28
+ pending = [("", root)]
29
+ contents = []
30
+ while pending:
31
+ prefix, directory = pending.pop()
32
+ for entry in sorted(directory.iterdir(), key=lambda child: child.name, reverse=True):
33
+ path = f"{prefix}{entry.name}"
34
+ if entry.is_dir():
35
+ pending.append((f"{path}/", entry))
36
+ else:
37
+ contents.append((path, entry.read_bytes()))
38
+ return tuple(sorted(contents))
39
+
40
+
41
+ def _verified_assets() -> tuple[tuple[str, tuple[tuple[str, bytes], ...]], ...]:
42
+ assets = files("shellsim_c_toolchain").joinpath("_assets")
43
+ bundles = []
44
+ for name, expected_digest in _TREE_SHA256.items():
45
+ contents = _tree_files(assets.joinpath(name))
46
+ digest = hashlib.sha256()
47
+ for path, payload in contents:
48
+ digest.update(path.encode() + b"\0" + payload + b"\0")
49
+ if digest.hexdigest() != expected_digest:
50
+ raise ValueError(f"bundled C toolchain asset digest mismatch: {name}")
51
+ bundles.append((name, contents))
52
+ return tuple(bundles)
53
+
54
+
55
+ def install_c_toolchain(guest: _GuestMachine) -> None:
56
+ """Install ``cc`` and the WASI C sysroot without granting host execution.
57
+
58
+ The pinned files come from this distribution, never an ambient host path. The host stages
59
+ each file directly in the bounded guest VFS.
60
+ """
61
+
62
+ bundles = _verified_assets()
63
+ guest.run("test ! -e /tcc && test ! -e /wasi-sysroot").check_returncode()
64
+ directories = {f"/{name}" for name, _ in bundles}
65
+ for name, contents in bundles:
66
+ for path, _ in contents:
67
+ components = path.split("/")[:-1]
68
+ for depth in range(1, len(components) + 1):
69
+ directories.add(f"/{name}/{'/'.join(components[:depth])}")
70
+ guest.run("mkdir -p " + " ".join(shlex.quote(path) for path in sorted(directories))).check_returncode()
71
+ for name, contents in bundles:
72
+ for path, payload in contents:
73
+ mode = 0o755 if name == "tcc" and path == "tcc-shellsim.wasm" else 0o644
74
+ guest.write_file(f"/{name}/{path}", payload, mode=mode)
75
+ guest.run("rm /usr/bin/cc; ln -s /tcc/tcc-shellsim.wasm /usr/bin/cc").check_returncode()
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 shellsim contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,75 @@
1
+ #ifndef _FLOAT_H_
2
+ #define _FLOAT_H_
3
+
4
+ #define FLT_RADIX 2
5
+
6
+ /* IEEE float */
7
+ #define FLT_MANT_DIG 24
8
+ #define FLT_DIG 6
9
+ #define FLT_ROUNDS 1
10
+ #define FLT_EPSILON 1.19209290e-07F
11
+ #define FLT_MIN_EXP (-125)
12
+ #define FLT_MIN 1.17549435e-38F
13
+ #define FLT_MIN_10_EXP (-37)
14
+ #define FLT_MAX_EXP 128
15
+ #define FLT_MAX 3.40282347e+38F
16
+ #define FLT_MAX_10_EXP 38
17
+
18
+ /* IEEE double */
19
+ #define DBL_MANT_DIG 53
20
+ #define DBL_DIG 15
21
+ #define DBL_EPSILON 2.2204460492503131e-16
22
+ #define DBL_MIN_EXP (-1021)
23
+ #define DBL_MIN 2.2250738585072014e-308
24
+ #define DBL_MIN_10_EXP (-307)
25
+ #define DBL_MAX_EXP 1024
26
+ #define DBL_MAX 1.7976931348623157e+308
27
+ #define DBL_MAX_10_EXP 308
28
+
29
+ /* horrible intel long double */
30
+ #if defined __i386__ || defined __x86_64__
31
+
32
+ #define LDBL_MANT_DIG 64
33
+ #define LDBL_DIG 18
34
+ #define LDBL_EPSILON 1.08420217248550443401e-19L
35
+ #define LDBL_MIN_EXP (-16381)
36
+ #define LDBL_MIN 3.36210314311209350626e-4932L
37
+ #define LDBL_MIN_10_EXP (-4931)
38
+ #define LDBL_MAX_EXP 16384
39
+ #define LDBL_MAX 1.18973149535723176502e+4932L
40
+ #define LDBL_MAX_10_EXP 4932
41
+ #define DECIMAL_DIG 21
42
+
43
+ #elif defined __aarch64__ || defined __riscv
44
+ /*
45
+ * Use values from:
46
+ * gcc -dM -E -xc /dev/null | grep LDBL | sed -e "s/__//g"
47
+ */
48
+ #define LDBL_MANT_DIG 113
49
+ #define LDBL_DIG 33
50
+ #define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
51
+ #define LDBL_MIN_EXP (-16381)
52
+ #define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
53
+ #define LDBL_MIN_10_EXP (-4931)
54
+ #define LDBL_MAX_EXP 16384
55
+ #define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
56
+ #define LDBL_MAX_10_EXP 4932
57
+ #define DECIMAL_DIG 36
58
+
59
+ #else
60
+
61
+ /* same as IEEE double */
62
+ #define LDBL_MANT_DIG 53
63
+ #define LDBL_DIG 15
64
+ #define LDBL_EPSILON 2.2204460492503131e-16L
65
+ #define LDBL_MIN_EXP (-1021)
66
+ #define LDBL_MIN 2.2250738585072014e-308L
67
+ #define LDBL_MIN_10_EXP (-307)
68
+ #define LDBL_MAX_EXP 1024
69
+ #define LDBL_MAX 1.7976931348623157e+308L
70
+ #define LDBL_MAX_10_EXP 308
71
+ #define DECIMAL_DIG 17
72
+
73
+ #endif
74
+
75
+ #endif /* _FLOAT_H_ */
@@ -0,0 +1,16 @@
1
+ #ifndef _STDALIGN_H
2
+ #define _STDALIGN_H
3
+
4
+ #if __STDC_VERSION__ < 201112L && (defined(__GNUC__) || defined(__TINYC__))
5
+ # define _Alignas(t) __attribute__((__aligned__(t)))
6
+ # define _Alignof(t) __alignof__(t)
7
+ #endif
8
+
9
+ #define alignas _Alignas
10
+ #define alignof _Alignof
11
+
12
+ #define __alignas_is_defined 1
13
+ #define __alignof_is_defined 1
14
+
15
+ #endif /* _STDALIGN_H */
16
+
@@ -0,0 +1,14 @@
1
+ #ifndef _STDARG_H
2
+ #define _STDARG_H
3
+
4
+ typedef __builtin_va_list va_list;
5
+ #define va_start __builtin_va_start
6
+ #define va_arg __builtin_va_arg
7
+ #define va_copy __builtin_va_copy
8
+ #define va_end __builtin_va_end
9
+
10
+ /* fix a buggy dependency on GCC in libio.h */
11
+ typedef va_list __gnuc_va_list;
12
+ #define _VA_LIST_DEFINED
13
+
14
+ #endif /* _STDARG_H */
@@ -0,0 +1,171 @@
1
+ /* This file is derived from clang's stdatomic.h */
2
+
3
+ /*===---- stdatomic.h - Standard header for atomic types and operations -----===
4
+ *
5
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6
+ * See https://llvm.org/LICENSE.txt for license information.
7
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8
+ *
9
+ *===-----------------------------------------------------------------------===
10
+ */
11
+
12
+ #ifndef _STDATOMIC_H
13
+ #define _STDATOMIC_H
14
+
15
+ #include <stddef.h>
16
+ #include <stdint.h>
17
+ #include <stdbool.h>
18
+
19
+ #define __ATOMIC_RELAXED 0
20
+ #define __ATOMIC_CONSUME 1
21
+ #define __ATOMIC_ACQUIRE 2
22
+ #define __ATOMIC_RELEASE 3
23
+ #define __ATOMIC_ACQ_REL 4
24
+ #define __ATOMIC_SEQ_CST 5
25
+
26
+ /* Memory ordering */
27
+ typedef enum {
28
+ memory_order_relaxed = __ATOMIC_RELAXED,
29
+ memory_order_consume = __ATOMIC_CONSUME,
30
+ memory_order_acquire = __ATOMIC_ACQUIRE,
31
+ memory_order_release = __ATOMIC_RELEASE,
32
+ memory_order_acq_rel = __ATOMIC_ACQ_REL,
33
+ memory_order_seq_cst = __ATOMIC_SEQ_CST,
34
+ } memory_order;
35
+
36
+ /* Atomic typedefs */
37
+ typedef _Atomic(_Bool) atomic_bool;
38
+ typedef _Atomic(char) atomic_char;
39
+ typedef _Atomic(signed char) atomic_schar;
40
+ typedef _Atomic(unsigned char) atomic_uchar;
41
+ typedef _Atomic(short) atomic_short;
42
+ typedef _Atomic(unsigned short) atomic_ushort;
43
+ typedef _Atomic(int) atomic_int;
44
+ typedef _Atomic(unsigned int) atomic_uint;
45
+ typedef _Atomic(long) atomic_long;
46
+ typedef _Atomic(unsigned long) atomic_ulong;
47
+ typedef _Atomic(long long) atomic_llong;
48
+ typedef _Atomic(unsigned long long) atomic_ullong;
49
+ typedef _Atomic(uint_least16_t) atomic_char16_t;
50
+ typedef _Atomic(uint_least32_t) atomic_char32_t;
51
+ typedef _Atomic(wchar_t) atomic_wchar_t;
52
+ typedef _Atomic(int_least8_t) atomic_int_least8_t;
53
+ typedef _Atomic(uint_least8_t) atomic_uint_least8_t;
54
+ typedef _Atomic(int_least16_t) atomic_int_least16_t;
55
+ typedef _Atomic(uint_least16_t) atomic_uint_least16_t;
56
+ typedef _Atomic(int_least32_t) atomic_int_least32_t;
57
+ typedef _Atomic(uint_least32_t) atomic_uint_least32_t;
58
+ typedef _Atomic(int_least64_t) atomic_int_least64_t;
59
+ typedef _Atomic(uint_least64_t) atomic_uint_least64_t;
60
+ typedef _Atomic(int_fast8_t) atomic_int_fast8_t;
61
+ typedef _Atomic(uint_fast8_t) atomic_uint_fast8_t;
62
+ typedef _Atomic(int_fast16_t) atomic_int_fast16_t;
63
+ typedef _Atomic(uint_fast16_t) atomic_uint_fast16_t;
64
+ typedef _Atomic(int_fast32_t) atomic_int_fast32_t;
65
+ typedef _Atomic(uint_fast32_t) atomic_uint_fast32_t;
66
+ typedef _Atomic(int_fast64_t) atomic_int_fast64_t;
67
+ typedef _Atomic(uint_fast64_t) atomic_uint_fast64_t;
68
+ typedef _Atomic(intptr_t) atomic_intptr_t;
69
+ typedef _Atomic(uintptr_t) atomic_uintptr_t;
70
+ typedef _Atomic(size_t) atomic_size_t;
71
+ typedef _Atomic(ptrdiff_t) atomic_ptrdiff_t;
72
+ typedef _Atomic(intmax_t) atomic_intmax_t;
73
+ typedef _Atomic(uintmax_t) atomic_uintmax_t;
74
+
75
+ /* Atomic flag */
76
+ typedef struct {
77
+ atomic_bool value;
78
+ } atomic_flag;
79
+
80
+ #define ATOMIC_FLAG_INIT {0}
81
+ #define ATOMIC_VAR_INIT(value) (value)
82
+
83
+ /* Generic routines */
84
+ #define atomic_init(object, desired) \
85
+ atomic_store_explicit(object, desired, __ATOMIC_RELAXED)
86
+
87
+ #define __atomic_store_n(ptr, val, order) \
88
+ (*(ptr) = (val), __atomic_store((ptr), &(typeof(*(ptr))){val}, (order)))
89
+ #define atomic_store_explicit(object, desired, order) \
90
+ ({ __typeof__ (object) ptr = (object); \
91
+ __typeof__ (*ptr) tmp = (desired); \
92
+ __atomic_store (ptr, &tmp, (order)); \
93
+ })
94
+ #define atomic_store(object, desired) \
95
+ atomic_store_explicit (object, desired, __ATOMIC_SEQ_CST)
96
+
97
+ #define __atomic_load_n(ptr, order) \
98
+ ({ typeof(*(ptr)) __val; \
99
+ __atomic_load((ptr), &__val, (order)); \
100
+ __val; })
101
+ #define atomic_load_explicit(object, order) \
102
+ ({ __typeof__ (object) ptr = (object); \
103
+ __typeof__ ((void)0,*ptr) tmp; \
104
+ __atomic_load (ptr, &tmp, (order)); \
105
+ tmp; \
106
+ })
107
+ #define atomic_load(object) atomic_load_explicit (object, __ATOMIC_SEQ_CST)
108
+
109
+ #define atomic_exchange_explicit(object, desired, order) \
110
+ ({ __typeof__ (object) ptr = (object); \
111
+ __typeof__ (*ptr) val = (desired); \
112
+ __typeof__ (*ptr) tmp; \
113
+ __atomic_exchange (ptr, &val, &tmp, (order)); \
114
+ tmp; \
115
+ })
116
+ #define atomic_exchange(object, desired) \
117
+ atomic_exchange_explicit (object, desired, __ATOMIC_SEQ_CST)
118
+ #define __atomic_compare_exchange_n(ptr, expected, desired, weak, success, failure) \
119
+ ({ typeof(*(ptr)) __desired = (desired); \
120
+ __atomic_compare_exchange((ptr), (expected), &__desired, \
121
+ (weak), (success), (failure)); })
122
+ #define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \
123
+ ({ __typeof__ (object) ptr = (object); \
124
+ __typeof__ (*ptr) tmp = desired; \
125
+ __atomic_compare_exchange(ptr, expected, &tmp, 0, success, failure); \
126
+ })
127
+ #define atomic_compare_exchange_strong(object, expected, desired) \
128
+ atomic_compare_exchange_strong_explicit (object, expected, desired, \
129
+ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
130
+ #define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \
131
+ ({ __typeof__ (object) ptr = (object); \
132
+ __typeof__ (*ptr) tmp = desired; \
133
+ __atomic_compare_exchange(ptr, expected, &tmp, 1, success, failure); \
134
+ })
135
+ #define atomic_compare_exchange_weak(object, expected, desired) \
136
+ atomic_compare_exchange_weak_explicit (object, expected, desired, \
137
+ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
138
+
139
+ #define atomic_fetch_add(object, operand) \
140
+ __atomic_fetch_add(object, operand, __ATOMIC_SEQ_CST)
141
+ #define atomic_fetch_add_explicit __atomic_fetch_add
142
+
143
+ #define atomic_fetch_sub(object, operand) \
144
+ __atomic_fetch_sub(object, operand, __ATOMIC_SEQ_CST)
145
+ #define atomic_fetch_sub_explicit __atomic_fetch_sub
146
+
147
+ #define atomic_fetch_or(object, operand) \
148
+ __atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST)
149
+ #define atomic_fetch_or_explicit __atomic_fetch_or
150
+
151
+ #define atomic_fetch_xor(object, operand) \
152
+ __atomic_fetch_xor(object, operand, __ATOMIC_SEQ_CST)
153
+ #define atomic_fetch_xor_explicit __atomic_fetch_xor
154
+
155
+ #define atomic_fetch_and(object, operand) \
156
+ __atomic_fetch_and(object, operand, __ATOMIC_SEQ_CST)
157
+ #define atomic_fetch_and_explicit __atomic_fetch_and
158
+
159
+ extern void atomic_thread_fence (memory_order);
160
+ #define __atomic_thread_fence(order) atomic_thread_fence (order)
161
+ extern void atomic_signal_fence (memory_order);
162
+ #define __atomic_signal_fence(order) atomic_signal_fence(order)
163
+ #define atomic_signal_fence(order) __atomic_signal_fence (order)
164
+ extern bool __atomic_is_lock_free(size_t size, void *ptr);
165
+ #define atomic_is_lock_free(OBJ) __atomic_is_lock_free (sizeof (*(OBJ)), (OBJ))
166
+
167
+ extern bool atomic_flag_test_and_set(void *object);
168
+ extern bool atomic_flag_test_and_set_explicit(void *object, memory_order order);
169
+ extern void atomic_flag_clear(void *object);
170
+ extern void atomic_flag_clear_explicit(void *object, memory_order order);
171
+ #endif /* _STDATOMIC_H */
@@ -0,0 +1,11 @@
1
+ #ifndef _STDBOOL_H
2
+ #define _STDBOOL_H
3
+
4
+ /* ISOC99 boolean */
5
+
6
+ #define bool _Bool
7
+ #define true 1
8
+ #define false 0
9
+ #define __bool_true_false_are_defined 1
10
+
11
+ #endif /* _STDBOOL_H */
@@ -0,0 +1,39 @@
1
+ #ifndef _STDDEF_H
2
+ #define _STDDEF_H
3
+
4
+ typedef __SIZE_TYPE__ size_t;
5
+ typedef __PTRDIFF_TYPE__ ssize_t;
6
+ typedef __WCHAR_TYPE__ wchar_t;
7
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
8
+ typedef __PTRDIFF_TYPE__ intptr_t;
9
+ typedef __SIZE_TYPE__ uintptr_t;
10
+
11
+ #if __STDC_VERSION__ >= 201112L
12
+ typedef union { long long __ll; long double __ld; } max_align_t;
13
+ #endif
14
+
15
+ #ifndef NULL
16
+ #define NULL ((void*)0)
17
+ #endif
18
+
19
+ #undef offsetof
20
+ #define offsetof(type, field) __builtin_offsetof(type, field)
21
+
22
+ void *alloca(size_t size);
23
+
24
+ #endif
25
+
26
+ /* Older glibc require a wint_t from <stddef.h> (when requested
27
+ by __need_wint_t, as otherwise stddef.h isn't allowed to
28
+ define this type). Note that this must be outside the normal
29
+ _STDDEF_H guard, so that it works even when we've included the file
30
+ already (without requiring wint_t). Some other libs define _WINT_T
31
+ if they've already provided that type, so we can use that as guard.
32
+ TCC defines __WINT_TYPE__ for us. */
33
+ #if defined (__need_wint_t)
34
+ #ifndef _WINT_T
35
+ #define _WINT_T
36
+ typedef __WINT_TYPE__ wint_t;
37
+ #endif
38
+ #undef __need_wint_t
39
+ #endif
@@ -0,0 +1,7 @@
1
+ #ifndef _STDNORETURN_H
2
+ #define _STDNORETURN_H
3
+
4
+ /* ISOC11 noreturn */
5
+ #define noreturn _Noreturn
6
+
7
+ #endif /* _STDNORETURN_H */