tcc 0.1.0

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 (283) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +35 -0
  3. data/README.md +196 -0
  4. data/ext/tcc/extconf.rb +25 -0
  5. data/ext/tcc/tcc-0.9.26.patch +30 -0
  6. data/ext/tcc/tcc-0.9.26/COPYING +504 -0
  7. data/ext/tcc/tcc-0.9.26/Changelog +396 -0
  8. data/ext/tcc/tcc-0.9.26/Makefile +349 -0
  9. data/ext/tcc/tcc-0.9.26/README +101 -0
  10. data/ext/tcc/tcc-0.9.26/TODO +93 -0
  11. data/ext/tcc/tcc-0.9.26/VERSION +1 -0
  12. data/ext/tcc/tcc-0.9.26/arm-gen.c +2005 -0
  13. data/ext/tcc/tcc-0.9.26/c67-gen.c +2560 -0
  14. data/ext/tcc/tcc-0.9.26/coff.h +446 -0
  15. data/ext/tcc/tcc-0.9.26/config.h +8 -0
  16. data/ext/tcc/tcc-0.9.26/config.mak +28 -0
  17. data/ext/tcc/tcc-0.9.26/config.texi +1 -0
  18. data/ext/tcc/tcc-0.9.26/configure +540 -0
  19. data/ext/tcc/tcc-0.9.26/conftest.c +71 -0
  20. data/ext/tcc/tcc-0.9.26/elf.h +1731 -0
  21. data/ext/tcc/tcc-0.9.26/examples/ex1.c +8 -0
  22. data/ext/tcc/tcc-0.9.26/examples/ex2.c +98 -0
  23. data/ext/tcc/tcc-0.9.26/examples/ex3.c +24 -0
  24. data/ext/tcc/tcc-0.9.26/examples/ex4.c +26 -0
  25. data/ext/tcc/tcc-0.9.26/examples/ex5.c +8 -0
  26. data/ext/tcc/tcc-0.9.26/i386-asm.c +1498 -0
  27. data/ext/tcc/tcc-0.9.26/i386-asm.h +473 -0
  28. data/ext/tcc/tcc-0.9.26/i386-gen.c +1096 -0
  29. data/ext/tcc/tcc-0.9.26/i386-tok.h +243 -0
  30. data/ext/tcc/tcc-0.9.26/il-gen.c +667 -0
  31. data/ext/tcc/tcc-0.9.26/il-opcodes.h +251 -0
  32. data/ext/tcc/tcc-0.9.26/include/float.h +57 -0
  33. data/ext/tcc/tcc-0.9.26/include/stdarg.h +41 -0
  34. data/ext/tcc/tcc-0.9.26/include/stdbool.h +10 -0
  35. data/ext/tcc/tcc-0.9.26/include/stddef.h +28 -0
  36. data/ext/tcc/tcc-0.9.26/include/tcclib.h +78 -0
  37. data/ext/tcc/tcc-0.9.26/include/varargs.h +12 -0
  38. data/ext/tcc/tcc-0.9.26/lib/Makefile +102 -0
  39. data/ext/tcc/tcc-0.9.26/lib/alloca86-bt.S +47 -0
  40. data/ext/tcc/tcc-0.9.26/lib/alloca86.S +35 -0
  41. data/ext/tcc/tcc-0.9.26/lib/alloca86_64.S +42 -0
  42. data/ext/tcc/tcc-0.9.26/lib/bcheck.c +875 -0
  43. data/ext/tcc/tcc-0.9.26/lib/libtcc1.c +691 -0
  44. data/ext/tcc/tcc-0.9.26/libtcc.c +1941 -0
  45. data/ext/tcc/tcc-0.9.26/libtcc.h +103 -0
  46. data/ext/tcc/tcc-0.9.26/stab.def +234 -0
  47. data/ext/tcc/tcc-0.9.26/stab.h +17 -0
  48. data/ext/tcc/tcc-0.9.26/tcc-doc.html +2332 -0
  49. data/ext/tcc/tcc-0.9.26/tcc-doc.info +1151 -0
  50. data/ext/tcc/tcc-0.9.26/tcc-doc.texi +1268 -0
  51. data/ext/tcc/tcc-0.9.26/tcc.1 +415 -0
  52. data/ext/tcc/tcc-0.9.26/tcc.c +352 -0
  53. data/ext/tcc/tcc-0.9.26/tcc.h +1379 -0
  54. data/ext/tcc/tcc-0.9.26/tccasm.c +1118 -0
  55. data/ext/tcc/tcc-0.9.26/tcccoff.c +948 -0
  56. data/ext/tcc/tcc-0.9.26/tccelf.c +3129 -0
  57. data/ext/tcc/tcc-0.9.26/tccgen.c +5841 -0
  58. data/ext/tcc/tcc-0.9.26/tccpe.c +1887 -0
  59. data/ext/tcc/tcc-0.9.26/tccpp.c +3128 -0
  60. data/ext/tcc/tcc-0.9.26/tccrun.c +737 -0
  61. data/ext/tcc/tcc-0.9.26/tcctok.h +278 -0
  62. data/ext/tcc/tcc-0.9.26/tests/Makefile +199 -0
  63. data/ext/tcc/tcc-0.9.26/tests/asmtest.S +609 -0
  64. data/ext/tcc/tcc-0.9.26/tests/boundtest.c +233 -0
  65. data/ext/tcc/tcc-0.9.26/tests/gcctestsuite.sh +33 -0
  66. data/ext/tcc/tcc-0.9.26/tests/libtcc_test.c +76 -0
  67. data/ext/tcc/tcc-0.9.26/tests/tcctest.c +2713 -0
  68. data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.c +18 -0
  69. data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.expect +3 -0
  70. data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.c +14 -0
  71. data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.expect +5 -0
  72. data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.c +18 -0
  73. data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.expect +15 -0
  74. data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.c +31 -0
  75. data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.expect +6 -0
  76. data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.c +15 -0
  77. data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.expect +10 -0
  78. data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.c +21 -0
  79. data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.expect +10 -0
  80. data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.c +29 -0
  81. data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.expect +8 -0
  82. data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.c +30 -0
  83. data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.expect +4 -0
  84. data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.c +24 -0
  85. data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.expect +11 -0
  86. data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.c +24 -0
  87. data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.expect +11 -0
  88. data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.c +40 -0
  89. data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.expect +8 -0
  90. data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.c +40 -0
  91. data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.expect +15 -0
  92. data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.c +14 -0
  93. data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.expect +2 -0
  94. data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.c +20 -0
  95. data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.expect +5 -0
  96. data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.c +21 -0
  97. data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.expect +2 -0
  98. data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.c +21 -0
  99. data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.expect +10 -0
  100. data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.c +21 -0
  101. data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.expect +18 -0
  102. data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.c +29 -0
  103. data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.expect +3 -0
  104. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.c +12 -0
  105. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.expect +3 -0
  106. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.h +1 -0
  107. data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.c +28 -0
  108. data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.expect +3 -0
  109. data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.c +24 -0
  110. data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.expect +6 -0
  111. data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.c +33 -0
  112. data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.expect +7 -0
  113. data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.c +50 -0
  114. data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.expect +16 -0
  115. data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.c +54 -0
  116. data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.expect +12 -0
  117. data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.c +28 -0
  118. data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.expect +18 -0
  119. data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.c +83 -0
  120. data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.expect +2 -0
  121. data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.c +17 -0
  122. data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.expect +8 -0
  123. data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.c +16 -0
  124. data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.expect +3 -0
  125. data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.c +46 -0
  126. data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.expect +19 -0
  127. data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.c +13 -0
  128. data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.expect +1 -0
  129. data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.c +122 -0
  130. data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.expect +71 -0
  131. data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.c +14 -0
  132. data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.expect +7 -0
  133. data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.c +266 -0
  134. data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.expect +4 -0
  135. data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.c +15 -0
  136. data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.expect +10 -0
  137. data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.c +23 -0
  138. data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.expect +2 -0
  139. data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.c +14 -0
  140. data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.expect +2 -0
  141. data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.c +21 -0
  142. data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.expect +20 -0
  143. data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.c +17 -0
  144. data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.expect +20 -0
  145. data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.c +32 -0
  146. data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.expect +4 -0
  147. data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.c +31 -0
  148. data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.expect +3 -0
  149. data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.c +52 -0
  150. data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.expect +27 -0
  151. data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.c +85 -0
  152. data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.expect +6 -0
  153. data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.c +18 -0
  154. data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.expect +2 -0
  155. data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.c +15 -0
  156. data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.expect +1 -0
  157. data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.c +17 -0
  158. data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.expect +1 -0
  159. data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.c +18 -0
  160. data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.expect +10 -0
  161. data/ext/tcc/tcc-0.9.26/tests/tests2/46_grep.c +564 -0
  162. data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.c +24 -0
  163. data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.expect +4 -0
  164. data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.c +26 -0
  165. data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.expect +1 -0
  166. data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.c +23 -0
  167. data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.expect +1 -0
  168. data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.c +29 -0
  169. data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.expect +20 -0
  170. data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.c +30 -0
  171. data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.expect +8 -0
  172. data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.c +27 -0
  173. data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.expect +9 -0
  174. data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.c +56 -0
  175. data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.expect +8 -0
  176. data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.c +52 -0
  177. data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.expect +1 -0
  178. data/ext/tcc/tcc-0.9.26/tests/tests2/LICENSE +37 -0
  179. data/ext/tcc/tcc-0.9.26/tests/tests2/Makefile +98 -0
  180. data/ext/tcc/tcc-0.9.26/texi2pod.pl +427 -0
  181. data/ext/tcc/tcc-0.9.26/win32/build-tcc.bat +60 -0
  182. data/ext/tcc/tcc-0.9.26/win32/examples/dll.c +12 -0
  183. data/ext/tcc/tcc-0.9.26/win32/examples/fib.c +23 -0
  184. data/ext/tcc/tcc-0.9.26/win32/examples/hello_dll.c +19 -0
  185. data/ext/tcc/tcc-0.9.26/win32/examples/hello_win.c +163 -0
  186. data/ext/tcc/tcc-0.9.26/win32/include/_mingw.h +139 -0
  187. data/ext/tcc/tcc-0.9.26/win32/include/assert.h +54 -0
  188. data/ext/tcc/tcc-0.9.26/win32/include/conio.h +409 -0
  189. data/ext/tcc/tcc-0.9.26/win32/include/ctype.h +281 -0
  190. data/ext/tcc/tcc-0.9.26/win32/include/dir.h +31 -0
  191. data/ext/tcc/tcc-0.9.26/win32/include/direct.h +68 -0
  192. data/ext/tcc/tcc-0.9.26/win32/include/dirent.h +135 -0
  193. data/ext/tcc/tcc-0.9.26/win32/include/dos.h +55 -0
  194. data/ext/tcc/tcc-0.9.26/win32/include/errno.h +75 -0
  195. data/ext/tcc/tcc-0.9.26/win32/include/excpt.h +123 -0
  196. data/ext/tcc/tcc-0.9.26/win32/include/fcntl.h +52 -0
  197. data/ext/tcc/tcc-0.9.26/win32/include/fenv.h +108 -0
  198. data/ext/tcc/tcc-0.9.26/win32/include/inttypes.h +297 -0
  199. data/ext/tcc/tcc-0.9.26/win32/include/io.h +418 -0
  200. data/ext/tcc/tcc-0.9.26/win32/include/limits.h +111 -0
  201. data/ext/tcc/tcc-0.9.26/win32/include/locale.h +91 -0
  202. data/ext/tcc/tcc-0.9.26/win32/include/malloc.h +175 -0
  203. data/ext/tcc/tcc-0.9.26/win32/include/math.h +777 -0
  204. data/ext/tcc/tcc-0.9.26/win32/include/mem.h +13 -0
  205. data/ext/tcc/tcc-0.9.26/win32/include/memory.h +40 -0
  206. data/ext/tcc/tcc-0.9.26/win32/include/process.h +176 -0
  207. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/conio_s.h +42 -0
  208. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/crtdbg_s.h +19 -0
  209. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/io_s.h +33 -0
  210. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/mbstring_s.h +52 -0
  211. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/search_s.h +25 -0
  212. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdio_s.h +145 -0
  213. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdlib_s.h +67 -0
  214. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stralign_s.h +30 -0
  215. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/string_s.h +41 -0
  216. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/sys/timeb_s.h +34 -0
  217. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/tchar_s.h +266 -0
  218. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/time_s.h +61 -0
  219. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/wchar_s.h +128 -0
  220. data/ext/tcc/tcc-0.9.26/win32/include/setjmp.h +160 -0
  221. data/ext/tcc/tcc-0.9.26/win32/include/share.h +28 -0
  222. data/ext/tcc/tcc-0.9.26/win32/include/signal.h +63 -0
  223. data/ext/tcc/tcc-0.9.26/win32/include/stdint.h +209 -0
  224. data/ext/tcc/tcc-0.9.26/win32/include/stdio.h +429 -0
  225. data/ext/tcc/tcc-0.9.26/win32/include/stdlib.h +580 -0
  226. data/ext/tcc/tcc-0.9.26/win32/include/string.h +164 -0
  227. data/ext/tcc/tcc-0.9.26/win32/include/sys/fcntl.h +13 -0
  228. data/ext/tcc/tcc-0.9.26/win32/include/sys/file.h +14 -0
  229. data/ext/tcc/tcc-0.9.26/win32/include/sys/locking.h +30 -0
  230. data/ext/tcc/tcc-0.9.26/win32/include/sys/stat.h +290 -0
  231. data/ext/tcc/tcc-0.9.26/win32/include/sys/time.h +69 -0
  232. data/ext/tcc/tcc-0.9.26/win32/include/sys/timeb.h +133 -0
  233. data/ext/tcc/tcc-0.9.26/win32/include/sys/types.h +118 -0
  234. data/ext/tcc/tcc-0.9.26/win32/include/sys/unistd.h +14 -0
  235. data/ext/tcc/tcc-0.9.26/win32/include/sys/utime.h +146 -0
  236. data/ext/tcc/tcc-0.9.26/win32/include/tchar.h +1102 -0
  237. data/ext/tcc/tcc-0.9.26/win32/include/time.h +287 -0
  238. data/ext/tcc/tcc-0.9.26/win32/include/vadefs.h +11 -0
  239. data/ext/tcc/tcc-0.9.26/win32/include/values.h +4 -0
  240. data/ext/tcc/tcc-0.9.26/win32/include/wchar.h +871 -0
  241. data/ext/tcc/tcc-0.9.26/win32/include/wctype.h +172 -0
  242. data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetsd.h +149 -0
  243. data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetyps.h +85 -0
  244. data/ext/tcc/tcc-0.9.26/win32/include/winapi/guiddef.h +151 -0
  245. data/ext/tcc/tcc-0.9.26/win32/include/winapi/intrin.h +11 -0
  246. data/ext/tcc/tcc-0.9.26/win32/include/winapi/poppack.h +8 -0
  247. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack1.h +8 -0
  248. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack2.h +8 -0
  249. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack4.h +8 -0
  250. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack8.h +8 -0
  251. data/ext/tcc/tcc-0.9.26/win32/include/winapi/reason.h +80 -0
  252. data/ext/tcc/tcc-0.9.26/win32/include/winapi/specstrings.h +7 -0
  253. data/ext/tcc/tcc-0.9.26/win32/include/winapi/stralign.h +154 -0
  254. data/ext/tcc/tcc-0.9.26/win32/include/winapi/tvout.h +79 -0
  255. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winbase.h +2951 -0
  256. data/ext/tcc/tcc-0.9.26/win32/include/winapi/wincon.h +301 -0
  257. data/ext/tcc/tcc-0.9.26/win32/include/winapi/windef.h +293 -0
  258. data/ext/tcc/tcc-0.9.26/win32/include/winapi/windows.h +123 -0
  259. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winerror.h +3166 -0
  260. data/ext/tcc/tcc-0.9.26/win32/include/winapi/wingdi.h +4080 -0
  261. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnetwk.h +476 -0
  262. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnls.h +765 -0
  263. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnt.h +5770 -0
  264. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winreg.h +272 -0
  265. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winuser.h +5651 -0
  266. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winver.h +160 -0
  267. data/ext/tcc/tcc-0.9.26/win32/lib/chkstk.S +191 -0
  268. data/ext/tcc/tcc-0.9.26/win32/lib/crt1.c +34 -0
  269. data/ext/tcc/tcc-0.9.26/win32/lib/dllcrt1.c +13 -0
  270. data/ext/tcc/tcc-0.9.26/win32/lib/dllmain.c +9 -0
  271. data/ext/tcc/tcc-0.9.26/win32/lib/gdi32.def +337 -0
  272. data/ext/tcc/tcc-0.9.26/win32/lib/kernel32.def +765 -0
  273. data/ext/tcc/tcc-0.9.26/win32/lib/msvcrt.def +1399 -0
  274. data/ext/tcc/tcc-0.9.26/win32/lib/user32.def +654 -0
  275. data/ext/tcc/tcc-0.9.26/win32/lib/wincrt1.c +64 -0
  276. data/ext/tcc/tcc-0.9.26/win32/tcc-win32.txt +156 -0
  277. data/ext/tcc/tcc-0.9.26/win32/tools/tiny_impdef.c +243 -0
  278. data/ext/tcc/tcc-0.9.26/win32/tools/tiny_libmaker.c +258 -0
  279. data/ext/tcc/tcc-0.9.26/x86_64-asm.h +448 -0
  280. data/ext/tcc/tcc-0.9.26/x86_64-gen.c +1701 -0
  281. data/lib/tcc.rb +291 -0
  282. data/tcc.gemspec +15 -0
  283. metadata +343 -0
@@ -0,0 +1,418 @@
1
+
2
+ /**
3
+ * This file has no copyright assigned and is placed in the Public Domain.
4
+ * This file is part of the w64 mingw-runtime package.
5
+ * No warranty is given; refer to the file DISCLAIMER within this package.
6
+ */
7
+ #ifndef _IO_H_
8
+ #define _IO_H_
9
+
10
+ #include <_mingw.h>
11
+ #include <string.h>
12
+
13
+ #pragma pack(push,_CRT_PACKING)
14
+
15
+ #ifndef _POSIX_
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ _CRTIMP char* __cdecl _getcwd (char*, int);
22
+ #ifndef _FSIZE_T_DEFINED
23
+ typedef unsigned long _fsize_t;
24
+ #define _FSIZE_T_DEFINED
25
+ #endif
26
+
27
+ #ifndef _FINDDATA_T_DEFINED
28
+
29
+ struct _finddata32_t {
30
+ unsigned attrib;
31
+ __time32_t time_create;
32
+ __time32_t time_access;
33
+ __time32_t time_write;
34
+ _fsize_t size;
35
+ char name[260];
36
+ };
37
+
38
+ /*#if _INTEGRAL_MAX_BITS >= 64*/
39
+
40
+ struct _finddata32i64_t {
41
+ unsigned attrib;
42
+ __time32_t time_create;
43
+ __time32_t time_access;
44
+ __time32_t time_write;
45
+ __int64 size;
46
+ char name[260];
47
+ };
48
+
49
+ struct _finddata64i32_t {
50
+ unsigned attrib;
51
+ __time64_t time_create;
52
+ __time64_t time_access;
53
+ __time64_t time_write;
54
+ _fsize_t size;
55
+ char name[260];
56
+ };
57
+
58
+ struct __finddata64_t {
59
+ unsigned attrib;
60
+ __time64_t time_create;
61
+ __time64_t time_access;
62
+ __time64_t time_write;
63
+ __int64 size;
64
+ char name[260];
65
+ };
66
+ /* #endif */
67
+
68
+ #ifdef _USE_32BIT_TIME_T
69
+ #define _finddata_t _finddata32_t
70
+ #define _finddatai64_t _finddata32i64_t
71
+
72
+ #ifdef _WIN64
73
+ #define _findfirst _findfirst32
74
+ #define _findnext _findnext32
75
+ #else
76
+ #define _findfirst32 _findfirst
77
+ #define _findnext32 _findnext
78
+ #endif
79
+ #define _findfirsti64 _findfirst32i64
80
+ #define _findnexti64 _findnext32i64
81
+ #else
82
+ #define _finddata_t _finddata64i32_t
83
+ #define _finddatai64_t __finddata64_t
84
+
85
+ #define _findfirst _findfirst64i32
86
+ #define _findnext _findnext64i32
87
+ #define _findfirsti64 _findfirst64
88
+ #define _findnexti64 _findnext64
89
+ #endif
90
+
91
+ #define _FINDDATA_T_DEFINED
92
+ #endif
93
+
94
+ #ifndef _WFINDDATA_T_DEFINED
95
+
96
+ struct _wfinddata32_t {
97
+ unsigned attrib;
98
+ __time32_t time_create;
99
+ __time32_t time_access;
100
+ __time32_t time_write;
101
+ _fsize_t size;
102
+ wchar_t name[260];
103
+ };
104
+
105
+ /* #if _INTEGRAL_MAX_BITS >= 64 */
106
+
107
+ struct _wfinddata32i64_t {
108
+ unsigned attrib;
109
+ __time32_t time_create;
110
+ __time32_t time_access;
111
+ __time32_t time_write;
112
+ __int64 size;
113
+ wchar_t name[260];
114
+ };
115
+
116
+ struct _wfinddata64i32_t {
117
+ unsigned attrib;
118
+ __time64_t time_create;
119
+ __time64_t time_access;
120
+ __time64_t time_write;
121
+ _fsize_t size;
122
+ wchar_t name[260];
123
+ };
124
+
125
+ struct _wfinddata64_t {
126
+ unsigned attrib;
127
+ __time64_t time_create;
128
+ __time64_t time_access;
129
+ __time64_t time_write;
130
+ __int64 size;
131
+ wchar_t name[260];
132
+ };
133
+ /* #endif */
134
+
135
+ #ifdef _USE_32BIT_TIME_T
136
+ #define _wfinddata_t _wfinddata32_t
137
+ #define _wfinddatai64_t _wfinddata32i64_t
138
+
139
+ #define _wfindfirst _wfindfirst32
140
+ #define _wfindnext _wfindnext32
141
+ #define _wfindfirsti64 _wfindfirst32i64
142
+ #define _wfindnexti64 _wfindnext32i64
143
+ #else
144
+ #define _wfinddata_t _wfinddata64i32_t
145
+ #define _wfinddatai64_t _wfinddata64_t
146
+
147
+ #define _wfindfirst _wfindfirst64i32
148
+ #define _wfindnext _wfindnext64i32
149
+ #define _wfindfirsti64 _wfindfirst64
150
+ #define _wfindnexti64 _wfindnext64
151
+ #endif
152
+
153
+ #define _WFINDDATA_T_DEFINED
154
+ #endif
155
+
156
+ #define _A_NORMAL 0x00
157
+ #define _A_RDONLY 0x01
158
+ #define _A_HIDDEN 0x02
159
+ #define _A_SYSTEM 0x04
160
+ #define _A_SUBDIR 0x10
161
+ #define _A_ARCH 0x20
162
+
163
+ #ifndef _SIZE_T_DEFINED
164
+ #define _SIZE_T_DEFINED
165
+ #undef size_t
166
+ #ifdef _WIN64
167
+ #if defined(__GNUC__) && defined(__STRICT_ANSI__)
168
+ typedef unsigned int size_t __attribute__ ((mode (DI)));
169
+ #else
170
+ typedef unsigned __int64 size_t;
171
+ #endif
172
+ #else
173
+ typedef unsigned int size_t;
174
+ #endif
175
+ #endif
176
+
177
+ #ifndef _SSIZE_T_DEFINED
178
+ #define _SSIZE_T_DEFINED
179
+ #undef ssize_t
180
+ #ifdef _WIN64
181
+ #if defined(__GNUC__) && defined(__STRICT_ANSI__)
182
+ typedef int ssize_t __attribute__ ((mode (DI)));
183
+ #else
184
+ typedef __int64 ssize_t;
185
+ #endif
186
+ #else
187
+ typedef int ssize_t;
188
+ #endif
189
+ #endif
190
+
191
+ #ifndef _OFF_T_DEFINED
192
+ #define _OFF_T_DEFINED
193
+ #ifndef _OFF_T_
194
+ #define _OFF_T_
195
+ typedef long _off_t;
196
+ #if !defined(NO_OLDNAMES) || defined(_POSIX)
197
+ typedef long off_t;
198
+ #endif
199
+ #endif
200
+ #endif
201
+
202
+ #ifndef _OFF64_T_DEFINED
203
+ #define _OFF64_T_DEFINED
204
+ #if defined(__GNUC__) && defined(__STRICT_ANSI__)
205
+ typedef int _off64_t __attribute__ ((mode (DI)));
206
+ #if !defined(NO_OLDNAMES) || defined(_POSIX)
207
+ typedef int off64_t __attribute__ ((mode (DI)));
208
+ #endif
209
+ #else
210
+ typedef long long _off64_t;
211
+ #if !defined(NO_OLDNAMES) || defined(_POSIX)
212
+ typedef long long off64_t;
213
+ #endif
214
+ #endif
215
+ #endif
216
+
217
+ /* Some defines for _access nAccessMode (MS doesn't define them, but
218
+ * it doesn't seem to hurt to add them). */
219
+ #define F_OK 0 /* Check for file existence */
220
+ #define X_OK 1 /* Check for execute permission. */
221
+ #define W_OK 2 /* Check for write permission */
222
+ #define R_OK 4 /* Check for read permission */
223
+
224
+ _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode);
225
+ _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode);
226
+ _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size);
227
+ _CRTIMP int __cdecl _close(int _FileHandle);
228
+ _CRTIMP int __cdecl _commit(int _FileHandle);
229
+ _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode);
230
+ _CRTIMP int __cdecl _dup(int _FileHandle);
231
+ _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst);
232
+ _CRTIMP int __cdecl _eof(int _FileHandle);
233
+ _CRTIMP long __cdecl _filelength(int _FileHandle);
234
+ _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData);
235
+ _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData);
236
+ _CRTIMP int __cdecl _findclose(intptr_t _FindHandle);
237
+ _CRTIMP int __cdecl _isatty(int _FileHandle);
238
+ _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes);
239
+ _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin);
240
+ _off64_t lseek64(int fd,_off64_t offset, int whence);
241
+ _CRTIMP char *__cdecl _mktemp(char *_TemplateName);
242
+ _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode);
243
+ _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
244
+
245
+ #ifndef _CRT_DIRECTORY_DEFINED
246
+ #define _CRT_DIRECTORY_DEFINED
247
+ int __cdecl remove(const char *_Filename);
248
+ int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
249
+ _CRTIMP int __cdecl _unlink(const char *_Filename);
250
+ #ifndef NO_OLDNAMES
251
+ int __cdecl unlink(const char *_Filename);
252
+ #endif
253
+ #endif
254
+
255
+ _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode);
256
+ _CRTIMP long __cdecl _tell(int _FileHandle);
257
+ _CRTIMP int __cdecl _umask(int _Mode);
258
+ _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount);
259
+
260
+ #if _INTEGRAL_MAX_BITS >= 64
261
+ _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle);
262
+ _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData);
263
+ _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
264
+ #ifdef __cplusplus
265
+ #include <string.h>
266
+ #endif
267
+ intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
268
+ __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
269
+ {
270
+ struct __finddata64_t fd;
271
+ intptr_t ret = _findfirst64(_Filename,&fd);
272
+ _FindData->attrib=fd.attrib;
273
+ _FindData->time_create=fd.time_create;
274
+ _FindData->time_access=fd.time_access;
275
+ _FindData->time_write=fd.time_write;
276
+ _FindData->size=(_fsize_t) fd.size;
277
+ strncpy(_FindData->name,fd.name,260);
278
+ return ret;
279
+ }
280
+ _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
281
+ _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
282
+ int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
283
+ __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
284
+ {
285
+ struct __finddata64_t fd;
286
+ int ret = _findnext64(_FindHandle,&fd);
287
+ _FindData->attrib=fd.attrib;
288
+ _FindData->time_create=fd.time_create;
289
+ _FindData->time_access=fd.time_access;
290
+ _FindData->time_write=fd.time_write;
291
+ _FindData->size=(_fsize_t) fd.size;
292
+ strncpy(_FindData->name,fd.name,260);
293
+ return ret;
294
+ }
295
+ __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
296
+ __int64 __cdecl _telli64(int _FileHandle);
297
+ #endif
298
+ #ifndef NO_OLDNAMES
299
+
300
+ #ifndef _UWIN
301
+ int __cdecl chdir (const char *);
302
+ char *__cdecl getcwd (char *, int);
303
+ int __cdecl mkdir (const char *);
304
+ char *__cdecl mktemp(char *);
305
+ int __cdecl rmdir (const char*);
306
+ int __cdecl chmod (const char *, int);
307
+ #endif /* _UWIN */
308
+
309
+ #endif /* Not NO_OLDNAMES */
310
+
311
+ _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
312
+
313
+ #ifndef __cplusplus
314
+ _CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...);
315
+ _CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
316
+ #else
317
+ extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0);
318
+ extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0);
319
+ #endif
320
+
321
+ #ifndef _WIO_DEFINED
322
+ #define _WIO_DEFINED
323
+ _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
324
+ _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
325
+ _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
326
+ _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
327
+ _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
328
+ _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
329
+ _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
330
+ _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
331
+
332
+ #if _INTEGRAL_MAX_BITS >= 64
333
+ _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
334
+ intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
335
+ _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
336
+ _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
337
+ int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
338
+ _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
339
+ #endif
340
+
341
+ _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
342
+
343
+ #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
344
+ _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
345
+ _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
346
+ #else
347
+ extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
348
+ extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
349
+ #endif
350
+
351
+ #endif
352
+
353
+ int __cdecl __lock_fhandle(int _Filehandle);
354
+ void __cdecl _unlock_fhandle(int _Filehandle);
355
+ _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle);
356
+ _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags);
357
+
358
+ #ifndef NO_OLDNAMES
359
+ int __cdecl access(const char *_Filename,int _AccessMode);
360
+ int __cdecl chmod(const char *_Filename,int _AccessMode);
361
+ int __cdecl chsize(int _FileHandle,long _Size);
362
+ int __cdecl close(int _FileHandle);
363
+ int __cdecl creat(const char *_Filename,int _PermissionMode);
364
+ int __cdecl dup(int _FileHandle);
365
+ int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst);
366
+ int __cdecl eof(int _FileHandle);
367
+ long __cdecl filelength(int _FileHandle);
368
+ int __cdecl isatty(int _FileHandle);
369
+ int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes);
370
+ long __cdecl lseek(int _FileHandle,long _Offset,int _Origin);
371
+ char *__cdecl mktemp(char *_TemplateName);
372
+ int __cdecl open(const char *_Filename,int _OpenFlag,...);
373
+ int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
374
+ int __cdecl setmode(int _FileHandle,int _Mode);
375
+ int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
376
+ long __cdecl tell(int _FileHandle);
377
+ int __cdecl umask(int _Mode);
378
+ int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount);
379
+ #endif
380
+
381
+ #ifdef __cplusplus
382
+ }
383
+ #endif
384
+ #endif
385
+
386
+ #ifdef __cplusplus
387
+ extern "C" {
388
+ #endif
389
+
390
+ /* Misc stuff */
391
+ char *getlogin(void);
392
+ #ifdef __USE_MINGW_ALARM
393
+ unsigned int alarm(unsigned int seconds);
394
+ #endif
395
+
396
+ #ifdef __USE_MINGW_ACCESS
397
+ /* Old versions of MSVCRT access() just ignored X_OK, while the version
398
+ shipped with Vista, returns an error code. This will restore the
399
+ old behaviour */
400
+ static inline int __mingw_access (const char *__fname, int __mode) {
401
+ return _access (__fname, __mode & ~X_OK);
402
+ }
403
+
404
+ #define access(__f,__m) __mingw_access (__f, __m)
405
+ #endif
406
+
407
+
408
+ #ifdef __cplusplus
409
+ }
410
+ #endif
411
+
412
+
413
+ #pragma pack(pop)
414
+
415
+ #include <sec_api/io_s.h>
416
+
417
+ #endif /* End _IO_H_ */
418
+
@@ -0,0 +1,111 @@
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
+ #include <_mingw.h>
7
+
8
+ #ifndef _INC_LIMITS
9
+ #define _INC_LIMITS
10
+
11
+ /*
12
+ * File system limits
13
+ *
14
+ * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
15
+ * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
16
+ * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
17
+ * required for the NUL. TODO: Test?
18
+ */
19
+ #define PATH_MAX (259)
20
+
21
+ #define CHAR_BIT 8
22
+ #define SCHAR_MIN (-128)
23
+ #define SCHAR_MAX 127
24
+ #define UCHAR_MAX 0xff
25
+
26
+ #define CHAR_MIN SCHAR_MIN
27
+ #define CHAR_MAX SCHAR_MAX
28
+
29
+ #define MB_LEN_MAX 5
30
+ #define SHRT_MIN (-32768)
31
+ #define SHRT_MAX 32767
32
+ #define USHRT_MAX 0xffff
33
+ #define INT_MIN (-2147483647 - 1)
34
+ #define INT_MAX 2147483647
35
+ #define UINT_MAX 0xffffffff
36
+ #define LONG_MIN (-2147483647L - 1)
37
+ #define LONG_MAX 2147483647L
38
+ #define ULONG_MAX 0xffffffffUL
39
+ #define LLONG_MAX 9223372036854775807ll
40
+ #define LLONG_MIN (-9223372036854775807ll - 1)
41
+ #define ULLONG_MAX 0xffffffffffffffffull
42
+
43
+ #if _INTEGRAL_MAX_BITS >= 8
44
+ #define _I8_MIN (-127 - 1)
45
+ #define _I8_MAX 127i8
46
+ #define _UI8_MAX 0xffu
47
+ #endif
48
+
49
+ #if _INTEGRAL_MAX_BITS >= 16
50
+ #define _I16_MIN (-32767 - 1)
51
+ #define _I16_MAX 32767i16
52
+ #define _UI16_MAX 0xffffu
53
+ #endif
54
+
55
+ #if _INTEGRAL_MAX_BITS >= 32
56
+ #define _I32_MIN (-2147483647 - 1)
57
+ #define _I32_MAX 2147483647
58
+ #define _UI32_MAX 0xffffffffu
59
+ #endif
60
+
61
+ #if defined(__GNUC__)
62
+ #undef LONG_LONG_MAX
63
+ #define LONG_LONG_MAX 9223372036854775807ll
64
+ #undef LONG_LONG_MIN
65
+ #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
66
+ #undef ULONG_LONG_MAX
67
+ #define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull)
68
+ #endif
69
+
70
+ #if _INTEGRAL_MAX_BITS >= 64
71
+ #define _I64_MIN (-9223372036854775807ll - 1)
72
+ #define _I64_MAX 9223372036854775807ll
73
+ #define _UI64_MAX 0xffffffffffffffffull
74
+ #endif
75
+
76
+ #ifndef SIZE_MAX
77
+ #ifdef _WIN64
78
+ #define SIZE_MAX _UI64_MAX
79
+ #else
80
+ #define SIZE_MAX UINT_MAX
81
+ #endif
82
+ #endif
83
+
84
+ #ifdef _POSIX_
85
+ #define _POSIX_ARG_MAX 4096
86
+ #define _POSIX_CHILD_MAX 6
87
+ #define _POSIX_LINK_MAX 8
88
+ #define _POSIX_MAX_CANON 255
89
+ #define _POSIX_MAX_INPUT 255
90
+ #define _POSIX_NAME_MAX 14
91
+ #define _POSIX_NGROUPS_MAX 0
92
+ #define _POSIX_OPEN_MAX 16
93
+ #define _POSIX_PATH_MAX 255
94
+ #define _POSIX_PIPE_BUF 512
95
+ #define _POSIX_SSIZE_MAX 32767
96
+ #define _POSIX_STREAM_MAX 8
97
+ #define _POSIX_TZNAME_MAX 3
98
+ #define ARG_MAX 14500
99
+ #define LINK_MAX 1024
100
+ #define MAX_CANON _POSIX_MAX_CANON
101
+ #define MAX_INPUT _POSIX_MAX_INPUT
102
+ #define NAME_MAX 255
103
+ #define NGROUPS_MAX 16
104
+ #define OPEN_MAX 32
105
+ #define PATH_MAX 512
106
+ #define PIPE_BUF _POSIX_PIPE_BUF
107
+ #define SSIZE_MAX _POSIX_SSIZE_MAX
108
+ #define STREAM_MAX 20
109
+ #define TZNAME_MAX 10
110
+ #endif
111
+ #endif