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.
- checksums.yaml +7 -0
- data/LICENSE +35 -0
- data/README.md +196 -0
- data/ext/tcc/extconf.rb +25 -0
- data/ext/tcc/tcc-0.9.26.patch +30 -0
- data/ext/tcc/tcc-0.9.26/COPYING +504 -0
- data/ext/tcc/tcc-0.9.26/Changelog +396 -0
- data/ext/tcc/tcc-0.9.26/Makefile +349 -0
- data/ext/tcc/tcc-0.9.26/README +101 -0
- data/ext/tcc/tcc-0.9.26/TODO +93 -0
- data/ext/tcc/tcc-0.9.26/VERSION +1 -0
- data/ext/tcc/tcc-0.9.26/arm-gen.c +2005 -0
- data/ext/tcc/tcc-0.9.26/c67-gen.c +2560 -0
- data/ext/tcc/tcc-0.9.26/coff.h +446 -0
- data/ext/tcc/tcc-0.9.26/config.h +8 -0
- data/ext/tcc/tcc-0.9.26/config.mak +28 -0
- data/ext/tcc/tcc-0.9.26/config.texi +1 -0
- data/ext/tcc/tcc-0.9.26/configure +540 -0
- data/ext/tcc/tcc-0.9.26/conftest.c +71 -0
- data/ext/tcc/tcc-0.9.26/elf.h +1731 -0
- data/ext/tcc/tcc-0.9.26/examples/ex1.c +8 -0
- data/ext/tcc/tcc-0.9.26/examples/ex2.c +98 -0
- data/ext/tcc/tcc-0.9.26/examples/ex3.c +24 -0
- data/ext/tcc/tcc-0.9.26/examples/ex4.c +26 -0
- data/ext/tcc/tcc-0.9.26/examples/ex5.c +8 -0
- data/ext/tcc/tcc-0.9.26/i386-asm.c +1498 -0
- data/ext/tcc/tcc-0.9.26/i386-asm.h +473 -0
- data/ext/tcc/tcc-0.9.26/i386-gen.c +1096 -0
- data/ext/tcc/tcc-0.9.26/i386-tok.h +243 -0
- data/ext/tcc/tcc-0.9.26/il-gen.c +667 -0
- data/ext/tcc/tcc-0.9.26/il-opcodes.h +251 -0
- data/ext/tcc/tcc-0.9.26/include/float.h +57 -0
- data/ext/tcc/tcc-0.9.26/include/stdarg.h +41 -0
- data/ext/tcc/tcc-0.9.26/include/stdbool.h +10 -0
- data/ext/tcc/tcc-0.9.26/include/stddef.h +28 -0
- data/ext/tcc/tcc-0.9.26/include/tcclib.h +78 -0
- data/ext/tcc/tcc-0.9.26/include/varargs.h +12 -0
- data/ext/tcc/tcc-0.9.26/lib/Makefile +102 -0
- data/ext/tcc/tcc-0.9.26/lib/alloca86-bt.S +47 -0
- data/ext/tcc/tcc-0.9.26/lib/alloca86.S +35 -0
- data/ext/tcc/tcc-0.9.26/lib/alloca86_64.S +42 -0
- data/ext/tcc/tcc-0.9.26/lib/bcheck.c +875 -0
- data/ext/tcc/tcc-0.9.26/lib/libtcc1.c +691 -0
- data/ext/tcc/tcc-0.9.26/libtcc.c +1941 -0
- data/ext/tcc/tcc-0.9.26/libtcc.h +103 -0
- data/ext/tcc/tcc-0.9.26/stab.def +234 -0
- data/ext/tcc/tcc-0.9.26/stab.h +17 -0
- data/ext/tcc/tcc-0.9.26/tcc-doc.html +2332 -0
- data/ext/tcc/tcc-0.9.26/tcc-doc.info +1151 -0
- data/ext/tcc/tcc-0.9.26/tcc-doc.texi +1268 -0
- data/ext/tcc/tcc-0.9.26/tcc.1 +415 -0
- data/ext/tcc/tcc-0.9.26/tcc.c +352 -0
- data/ext/tcc/tcc-0.9.26/tcc.h +1379 -0
- data/ext/tcc/tcc-0.9.26/tccasm.c +1118 -0
- data/ext/tcc/tcc-0.9.26/tcccoff.c +948 -0
- data/ext/tcc/tcc-0.9.26/tccelf.c +3129 -0
- data/ext/tcc/tcc-0.9.26/tccgen.c +5841 -0
- data/ext/tcc/tcc-0.9.26/tccpe.c +1887 -0
- data/ext/tcc/tcc-0.9.26/tccpp.c +3128 -0
- data/ext/tcc/tcc-0.9.26/tccrun.c +737 -0
- data/ext/tcc/tcc-0.9.26/tcctok.h +278 -0
- data/ext/tcc/tcc-0.9.26/tests/Makefile +199 -0
- data/ext/tcc/tcc-0.9.26/tests/asmtest.S +609 -0
- data/ext/tcc/tcc-0.9.26/tests/boundtest.c +233 -0
- data/ext/tcc/tcc-0.9.26/tests/gcctestsuite.sh +33 -0
- data/ext/tcc/tcc-0.9.26/tests/libtcc_test.c +76 -0
- data/ext/tcc/tcc-0.9.26/tests/tcctest.c +2713 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.c +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.c +14 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.expect +5 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.c +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.expect +15 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.c +31 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.expect +6 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.c +15 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.expect +10 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.c +21 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.expect +10 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.c +29 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.expect +8 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.c +30 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.expect +4 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.c +24 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.expect +11 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.c +24 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.expect +11 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.c +40 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.expect +8 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.c +40 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.expect +15 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.c +14 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.c +20 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.expect +5 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.c +21 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.c +21 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.expect +10 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.c +21 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.expect +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.c +29 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.c +12 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.h +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.c +28 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.c +24 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.expect +6 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.c +33 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.expect +7 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.c +50 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.expect +16 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.c +54 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.expect +12 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.c +28 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.expect +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.c +83 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.c +17 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.expect +8 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.c +16 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.c +46 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.expect +19 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.c +13 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.c +122 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.expect +71 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.c +14 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.expect +7 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.c +266 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.expect +4 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.c +15 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.expect +10 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.c +23 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.c +14 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.c +21 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.expect +20 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.c +17 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.expect +20 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.c +32 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.expect +4 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.c +31 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.expect +3 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.c +52 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.expect +27 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.c +85 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.expect +6 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.c +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.expect +2 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.c +15 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.c +17 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.c +18 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.expect +10 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/46_grep.c +564 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.c +24 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.expect +4 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.c +26 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.c +23 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.c +29 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.expect +20 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.c +30 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.expect +8 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.c +27 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.expect +9 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.c +56 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.expect +8 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.c +52 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.expect +1 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/LICENSE +37 -0
- data/ext/tcc/tcc-0.9.26/tests/tests2/Makefile +98 -0
- data/ext/tcc/tcc-0.9.26/texi2pod.pl +427 -0
- data/ext/tcc/tcc-0.9.26/win32/build-tcc.bat +60 -0
- data/ext/tcc/tcc-0.9.26/win32/examples/dll.c +12 -0
- data/ext/tcc/tcc-0.9.26/win32/examples/fib.c +23 -0
- data/ext/tcc/tcc-0.9.26/win32/examples/hello_dll.c +19 -0
- data/ext/tcc/tcc-0.9.26/win32/examples/hello_win.c +163 -0
- data/ext/tcc/tcc-0.9.26/win32/include/_mingw.h +139 -0
- data/ext/tcc/tcc-0.9.26/win32/include/assert.h +54 -0
- data/ext/tcc/tcc-0.9.26/win32/include/conio.h +409 -0
- data/ext/tcc/tcc-0.9.26/win32/include/ctype.h +281 -0
- data/ext/tcc/tcc-0.9.26/win32/include/dir.h +31 -0
- data/ext/tcc/tcc-0.9.26/win32/include/direct.h +68 -0
- data/ext/tcc/tcc-0.9.26/win32/include/dirent.h +135 -0
- data/ext/tcc/tcc-0.9.26/win32/include/dos.h +55 -0
- data/ext/tcc/tcc-0.9.26/win32/include/errno.h +75 -0
- data/ext/tcc/tcc-0.9.26/win32/include/excpt.h +123 -0
- data/ext/tcc/tcc-0.9.26/win32/include/fcntl.h +52 -0
- data/ext/tcc/tcc-0.9.26/win32/include/fenv.h +108 -0
- data/ext/tcc/tcc-0.9.26/win32/include/inttypes.h +297 -0
- data/ext/tcc/tcc-0.9.26/win32/include/io.h +418 -0
- data/ext/tcc/tcc-0.9.26/win32/include/limits.h +111 -0
- data/ext/tcc/tcc-0.9.26/win32/include/locale.h +91 -0
- data/ext/tcc/tcc-0.9.26/win32/include/malloc.h +175 -0
- data/ext/tcc/tcc-0.9.26/win32/include/math.h +777 -0
- data/ext/tcc/tcc-0.9.26/win32/include/mem.h +13 -0
- data/ext/tcc/tcc-0.9.26/win32/include/memory.h +40 -0
- data/ext/tcc/tcc-0.9.26/win32/include/process.h +176 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/conio_s.h +42 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/crtdbg_s.h +19 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/io_s.h +33 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/mbstring_s.h +52 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/search_s.h +25 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdio_s.h +145 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdlib_s.h +67 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stralign_s.h +30 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/string_s.h +41 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/sys/timeb_s.h +34 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/tchar_s.h +266 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/time_s.h +61 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sec_api/wchar_s.h +128 -0
- data/ext/tcc/tcc-0.9.26/win32/include/setjmp.h +160 -0
- data/ext/tcc/tcc-0.9.26/win32/include/share.h +28 -0
- data/ext/tcc/tcc-0.9.26/win32/include/signal.h +63 -0
- data/ext/tcc/tcc-0.9.26/win32/include/stdint.h +209 -0
- data/ext/tcc/tcc-0.9.26/win32/include/stdio.h +429 -0
- data/ext/tcc/tcc-0.9.26/win32/include/stdlib.h +580 -0
- data/ext/tcc/tcc-0.9.26/win32/include/string.h +164 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/fcntl.h +13 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/file.h +14 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/locking.h +30 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/stat.h +290 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/time.h +69 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/timeb.h +133 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/types.h +118 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/unistd.h +14 -0
- data/ext/tcc/tcc-0.9.26/win32/include/sys/utime.h +146 -0
- data/ext/tcc/tcc-0.9.26/win32/include/tchar.h +1102 -0
- data/ext/tcc/tcc-0.9.26/win32/include/time.h +287 -0
- data/ext/tcc/tcc-0.9.26/win32/include/vadefs.h +11 -0
- data/ext/tcc/tcc-0.9.26/win32/include/values.h +4 -0
- data/ext/tcc/tcc-0.9.26/win32/include/wchar.h +871 -0
- data/ext/tcc/tcc-0.9.26/win32/include/wctype.h +172 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetsd.h +149 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetyps.h +85 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/guiddef.h +151 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/intrin.h +11 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/poppack.h +8 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack1.h +8 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack2.h +8 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack4.h +8 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack8.h +8 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/reason.h +80 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/specstrings.h +7 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/stralign.h +154 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/tvout.h +79 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winbase.h +2951 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/wincon.h +301 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/windef.h +293 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/windows.h +123 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winerror.h +3166 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/wingdi.h +4080 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnetwk.h +476 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnls.h +765 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnt.h +5770 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winreg.h +272 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winuser.h +5651 -0
- data/ext/tcc/tcc-0.9.26/win32/include/winapi/winver.h +160 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/chkstk.S +191 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/crt1.c +34 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/dllcrt1.c +13 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/dllmain.c +9 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/gdi32.def +337 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/kernel32.def +765 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/msvcrt.def +1399 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/user32.def +654 -0
- data/ext/tcc/tcc-0.9.26/win32/lib/wincrt1.c +64 -0
- data/ext/tcc/tcc-0.9.26/win32/tcc-win32.txt +156 -0
- data/ext/tcc/tcc-0.9.26/win32/tools/tiny_impdef.c +243 -0
- data/ext/tcc/tcc-0.9.26/win32/tools/tiny_libmaker.c +258 -0
- data/ext/tcc/tcc-0.9.26/x86_64-asm.h +448 -0
- data/ext/tcc/tcc-0.9.26/x86_64-gen.c +1701 -0
- data/lib/tcc.rb +291 -0
- data/tcc.gemspec +15 -0
- metadata +343 -0
@@ -0,0 +1,128 @@
|
|
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 _INC_WCHAR_S
|
7
|
+
#define _INC_WCHAR_S
|
8
|
+
|
9
|
+
#include <wchar.h>
|
10
|
+
|
11
|
+
#if defined(MINGW_HAS_SECURE_API)
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#ifndef _WIO_S_DEFINED
|
18
|
+
#define _WIO_S_DEFINED
|
19
|
+
_CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
|
20
|
+
_CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
|
21
|
+
#endif
|
22
|
+
|
23
|
+
#ifndef _WCONIO_S_DEFINED
|
24
|
+
#define _WCONIO_S_DEFINED
|
25
|
+
_CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
|
26
|
+
_CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
|
27
|
+
_CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
|
28
|
+
_CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
29
|
+
_CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
30
|
+
_CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
31
|
+
_CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
32
|
+
#endif
|
33
|
+
|
34
|
+
#ifndef _WSTDIO_S_DEFINED
|
35
|
+
#define _WSTDIO_S_DEFINED
|
36
|
+
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
|
37
|
+
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
|
38
|
+
int __cdecl wprintf_s(const wchar_t *_Format,...);
|
39
|
+
int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
40
|
+
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
|
41
|
+
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
|
42
|
+
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
|
43
|
+
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
|
44
|
+
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
|
45
|
+
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
46
|
+
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
47
|
+
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
48
|
+
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
49
|
+
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
|
50
|
+
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
51
|
+
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
52
|
+
_CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
|
53
|
+
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
|
54
|
+
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
|
55
|
+
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
|
56
|
+
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
|
57
|
+
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
|
58
|
+
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
|
59
|
+
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
|
60
|
+
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
|
61
|
+
#endif
|
62
|
+
|
63
|
+
#ifndef _WSTDLIB_S_DEFINED
|
64
|
+
#define _WSTDLIB_S_DEFINED
|
65
|
+
_CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
66
|
+
_CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
67
|
+
_CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
68
|
+
_CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
|
69
|
+
_CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
|
70
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
71
|
+
_CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
72
|
+
_CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
|
73
|
+
#endif
|
74
|
+
#endif
|
75
|
+
|
76
|
+
#ifndef _POSIX_
|
77
|
+
#ifndef _WSTDLIBP_S_DEFINED
|
78
|
+
#define _WSTDLIBP_S_DEFINED
|
79
|
+
_CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
|
80
|
+
_CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
|
81
|
+
_CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
|
82
|
+
_CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
|
83
|
+
#endif
|
84
|
+
#endif
|
85
|
+
|
86
|
+
#ifndef _WSTRING_S_DEFINED
|
87
|
+
#define _WSTRING_S_DEFINED
|
88
|
+
_CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
|
89
|
+
_CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
|
90
|
+
_CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
|
91
|
+
_CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
|
92
|
+
_CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
|
93
|
+
_CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
|
94
|
+
_CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
|
95
|
+
_CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
|
96
|
+
_CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
|
97
|
+
#endif
|
98
|
+
|
99
|
+
#ifndef _WTIME_S_DEFINED
|
100
|
+
#define _WTIME_S_DEFINED
|
101
|
+
_CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
|
102
|
+
_CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
|
103
|
+
_CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
|
104
|
+
_CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
|
105
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
106
|
+
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
|
107
|
+
#endif
|
108
|
+
|
109
|
+
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
|
110
|
+
#define _INC_WTIME_S_INL
|
111
|
+
#ifdef _USE_32BIT_TIME_T
|
112
|
+
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
|
113
|
+
#else
|
114
|
+
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
|
115
|
+
#endif
|
116
|
+
#endif
|
117
|
+
#endif
|
118
|
+
|
119
|
+
_CRTIMP errno_t __cdecl mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State);
|
120
|
+
_CRTIMP errno_t __cdecl wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State);
|
121
|
+
_CRTIMP errno_t __cdecl wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State);
|
122
|
+
|
123
|
+
#ifdef __cplusplus
|
124
|
+
}
|
125
|
+
#endif
|
126
|
+
|
127
|
+
#endif
|
128
|
+
#endif
|
@@ -0,0 +1,160 @@
|
|
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 _INC_SETJMP
|
7
|
+
#define _INC_SETJMP
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
#pragma pack(push,_CRT_PACKING)
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#if (defined(_X86_) && !defined(__x86_64))
|
18
|
+
|
19
|
+
#define _JBLEN 16
|
20
|
+
#define _JBTYPE int
|
21
|
+
|
22
|
+
typedef struct __JUMP_BUFFER {
|
23
|
+
unsigned long Ebp;
|
24
|
+
unsigned long Ebx;
|
25
|
+
unsigned long Edi;
|
26
|
+
unsigned long Esi;
|
27
|
+
unsigned long Esp;
|
28
|
+
unsigned long Eip;
|
29
|
+
unsigned long Registration;
|
30
|
+
unsigned long TryLevel;
|
31
|
+
unsigned long Cookie;
|
32
|
+
unsigned long UnwindFunc;
|
33
|
+
unsigned long UnwindData[6];
|
34
|
+
} _JUMP_BUFFER;
|
35
|
+
#elif defined(__ia64__)
|
36
|
+
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
|
37
|
+
__int64 LowPart;
|
38
|
+
__int64 HighPart;
|
39
|
+
} SETJMP_FLOAT128;
|
40
|
+
|
41
|
+
#define _JBLEN 33
|
42
|
+
typedef SETJMP_FLOAT128 _JBTYPE;
|
43
|
+
|
44
|
+
typedef struct __JUMP_BUFFER {
|
45
|
+
|
46
|
+
unsigned long iAReserved[6];
|
47
|
+
|
48
|
+
unsigned long Registration;
|
49
|
+
unsigned long TryLevel;
|
50
|
+
unsigned long Cookie;
|
51
|
+
unsigned long UnwindFunc;
|
52
|
+
|
53
|
+
unsigned long UnwindData[6];
|
54
|
+
|
55
|
+
SETJMP_FLOAT128 FltS0;
|
56
|
+
SETJMP_FLOAT128 FltS1;
|
57
|
+
SETJMP_FLOAT128 FltS2;
|
58
|
+
SETJMP_FLOAT128 FltS3;
|
59
|
+
SETJMP_FLOAT128 FltS4;
|
60
|
+
SETJMP_FLOAT128 FltS5;
|
61
|
+
SETJMP_FLOAT128 FltS6;
|
62
|
+
SETJMP_FLOAT128 FltS7;
|
63
|
+
SETJMP_FLOAT128 FltS8;
|
64
|
+
SETJMP_FLOAT128 FltS9;
|
65
|
+
SETJMP_FLOAT128 FltS10;
|
66
|
+
SETJMP_FLOAT128 FltS11;
|
67
|
+
SETJMP_FLOAT128 FltS12;
|
68
|
+
SETJMP_FLOAT128 FltS13;
|
69
|
+
SETJMP_FLOAT128 FltS14;
|
70
|
+
SETJMP_FLOAT128 FltS15;
|
71
|
+
SETJMP_FLOAT128 FltS16;
|
72
|
+
SETJMP_FLOAT128 FltS17;
|
73
|
+
SETJMP_FLOAT128 FltS18;
|
74
|
+
SETJMP_FLOAT128 FltS19;
|
75
|
+
__int64 FPSR;
|
76
|
+
__int64 StIIP;
|
77
|
+
__int64 BrS0;
|
78
|
+
__int64 BrS1;
|
79
|
+
__int64 BrS2;
|
80
|
+
__int64 BrS3;
|
81
|
+
__int64 BrS4;
|
82
|
+
__int64 IntS0;
|
83
|
+
__int64 IntS1;
|
84
|
+
__int64 IntS2;
|
85
|
+
__int64 IntS3;
|
86
|
+
__int64 RsBSP;
|
87
|
+
__int64 RsPFS;
|
88
|
+
__int64 ApUNAT;
|
89
|
+
__int64 ApLC;
|
90
|
+
__int64 IntSp;
|
91
|
+
__int64 IntNats;
|
92
|
+
__int64 Preds;
|
93
|
+
|
94
|
+
} _JUMP_BUFFER;
|
95
|
+
#elif defined(__x86_64)
|
96
|
+
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
|
97
|
+
unsigned __int64 Part[2];
|
98
|
+
} SETJMP_FLOAT128;
|
99
|
+
|
100
|
+
#define _JBLEN 16
|
101
|
+
typedef SETJMP_FLOAT128 _JBTYPE;
|
102
|
+
|
103
|
+
typedef struct _JUMP_BUFFER {
|
104
|
+
unsigned __int64 Frame;
|
105
|
+
unsigned __int64 Rbx;
|
106
|
+
unsigned __int64 Rsp;
|
107
|
+
unsigned __int64 Rbp;
|
108
|
+
unsigned __int64 Rsi;
|
109
|
+
unsigned __int64 Rdi;
|
110
|
+
unsigned __int64 R12;
|
111
|
+
unsigned __int64 R13;
|
112
|
+
unsigned __int64 R14;
|
113
|
+
unsigned __int64 R15;
|
114
|
+
unsigned __int64 Rip;
|
115
|
+
unsigned __int64 Spare;
|
116
|
+
SETJMP_FLOAT128 Xmm6;
|
117
|
+
SETJMP_FLOAT128 Xmm7;
|
118
|
+
SETJMP_FLOAT128 Xmm8;
|
119
|
+
SETJMP_FLOAT128 Xmm9;
|
120
|
+
SETJMP_FLOAT128 Xmm10;
|
121
|
+
SETJMP_FLOAT128 Xmm11;
|
122
|
+
SETJMP_FLOAT128 Xmm12;
|
123
|
+
SETJMP_FLOAT128 Xmm13;
|
124
|
+
SETJMP_FLOAT128 Xmm14;
|
125
|
+
SETJMP_FLOAT128 Xmm15;
|
126
|
+
} _JUMP_BUFFER;
|
127
|
+
#endif
|
128
|
+
#ifndef _JMP_BUF_DEFINED
|
129
|
+
typedef _JBTYPE jmp_buf[_JBLEN];
|
130
|
+
#define _JMP_BUF_DEFINED
|
131
|
+
#endif
|
132
|
+
|
133
|
+
void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void);
|
134
|
+
|
135
|
+
#ifdef USE_MINGW_SETJMP_TWO_ARGS
|
136
|
+
#ifndef _INC_SETJMPEX
|
137
|
+
#define setjmp(BUF) _setjmp((BUF),mingw_getsp())
|
138
|
+
int __cdecl __attribute__ ((__nothrow__)) _setjmp(jmp_buf _Buf,void *_Ctx);
|
139
|
+
#else
|
140
|
+
#undef setjmp
|
141
|
+
#define setjmp(BUF) _setjmpex((BUF),mingw_getsp())
|
142
|
+
#define setjmpex(BUF) _setjmpex((BUF),mingw_getsp())
|
143
|
+
int __cdecl __attribute__ ((__nothrow__)) _setjmpex(jmp_buf _Buf,void *_Ctx);
|
144
|
+
#endif
|
145
|
+
#else
|
146
|
+
#ifndef _INC_SETJMPEX
|
147
|
+
#define setjmp _setjmp
|
148
|
+
#endif
|
149
|
+
int __cdecl __attribute__ ((__nothrow__)) setjmp(jmp_buf _Buf);
|
150
|
+
#endif
|
151
|
+
|
152
|
+
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/;
|
153
|
+
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl longjmp(jmp_buf _Buf,int _Value);
|
154
|
+
|
155
|
+
#ifdef __cplusplus
|
156
|
+
}
|
157
|
+
#endif
|
158
|
+
|
159
|
+
#pragma pack(pop)
|
160
|
+
#endif
|
@@ -0,0 +1,28 @@
|
|
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 _INC_SHARE
|
7
|
+
#define _INC_SHARE
|
8
|
+
|
9
|
+
#ifndef _WIN32
|
10
|
+
#error Only Win32 target is supported!
|
11
|
+
#endif
|
12
|
+
|
13
|
+
#define _SH_COMPAT 0x00
|
14
|
+
#define _SH_DENYRW 0x10
|
15
|
+
#define _SH_DENYWR 0x20
|
16
|
+
#define _SH_DENYRD 0x30
|
17
|
+
#define _SH_DENYNO 0x40
|
18
|
+
#define _SH_SECURE 0x80
|
19
|
+
|
20
|
+
#ifndef NO_OLDNAMES
|
21
|
+
#define SH_COMPAT _SH_COMPAT
|
22
|
+
#define SH_DENYRW _SH_DENYRW
|
23
|
+
#define SH_DENYWR _SH_DENYWR
|
24
|
+
#define SH_DENYRD _SH_DENYRD
|
25
|
+
#define SH_DENYNO _SH_DENYNO
|
26
|
+
#endif
|
27
|
+
|
28
|
+
#endif
|
@@ -0,0 +1,63 @@
|
|
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 _INC_SIGNAL
|
7
|
+
#define _INC_SIGNAL
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
#ifdef __cplusplus
|
12
|
+
extern "C" {
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#ifndef _SIG_ATOMIC_T_DEFINED
|
16
|
+
#define _SIG_ATOMIC_T_DEFINED
|
17
|
+
typedef int sig_atomic_t;
|
18
|
+
#endif
|
19
|
+
|
20
|
+
#define NSIG 23
|
21
|
+
|
22
|
+
#define SIGHUP 1 /* hangup */
|
23
|
+
#define SIGINT 2
|
24
|
+
#define SIGQUIT 3 /* quit */
|
25
|
+
#define SIGILL 4
|
26
|
+
#define SIGTRAP 5 /* trace trap (not reset when caught) */
|
27
|
+
#define SIGIOT 6 /* IOT instruction */
|
28
|
+
#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
|
29
|
+
#define SIGEMT 7 /* EMT instruction */
|
30
|
+
#define SIGFPE 8
|
31
|
+
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
|
32
|
+
#define SIGBUS 10 /* bus error */
|
33
|
+
#define SIGSEGV 11
|
34
|
+
#define SIGSYS 12 /* bad argument to system call */
|
35
|
+
#define SIGPIPE 13 /* write on a pipe with no one to read it */
|
36
|
+
#ifdef __USE_MINGW_ALARM
|
37
|
+
#define SIGALRM 14 /* alarm clock */
|
38
|
+
#endif
|
39
|
+
#define SIGTERM 15
|
40
|
+
#define SIGBREAK 21
|
41
|
+
#define SIGABRT2 22
|
42
|
+
|
43
|
+
#define SIGABRT_COMPAT 6
|
44
|
+
|
45
|
+
typedef void (*__p_sig_fn_t)(int);
|
46
|
+
|
47
|
+
#define SIG_DFL (__p_sig_fn_t)0
|
48
|
+
#define SIG_IGN (__p_sig_fn_t)1
|
49
|
+
#define SIG_GET (__p_sig_fn_t)2
|
50
|
+
#define SIG_SGE (__p_sig_fn_t)3
|
51
|
+
#define SIG_ACK (__p_sig_fn_t)4
|
52
|
+
#define SIG_ERR (__p_sig_fn_t)-1
|
53
|
+
|
54
|
+
extern void **__cdecl __pxcptinfoptrs(void);
|
55
|
+
#define _pxcptinfoptrs (*__pxcptinfoptrs())
|
56
|
+
|
57
|
+
__p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
|
58
|
+
int __cdecl raise(int _SigNum);
|
59
|
+
|
60
|
+
#ifdef __cplusplus
|
61
|
+
}
|
62
|
+
#endif
|
63
|
+
#endif
|
@@ -0,0 +1,209 @@
|
|
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
|
+
/* ISO C9x 7.18 Integer types <stdint.h>
|
7
|
+
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
|
8
|
+
*
|
9
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
10
|
+
*
|
11
|
+
* Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* Date: 2000-12-02
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
#ifndef _STDINT_H
|
26
|
+
#define _STDINT_H
|
27
|
+
|
28
|
+
#include <_mingw.h>
|
29
|
+
|
30
|
+
#define __need_wint_t
|
31
|
+
#define __need_wchar_t
|
32
|
+
#include "stddef.h"
|
33
|
+
|
34
|
+
/* 7.18.1.1 Exact-width integer types */
|
35
|
+
typedef signed char int8_t;
|
36
|
+
typedef unsigned char uint8_t;
|
37
|
+
typedef short int16_t;
|
38
|
+
typedef unsigned short uint16_t;
|
39
|
+
typedef int int32_t;
|
40
|
+
typedef unsigned uint32_t;
|
41
|
+
typedef long long int64_t;
|
42
|
+
typedef unsigned long long uint64_t;
|
43
|
+
|
44
|
+
/* 7.18.1.2 Minimum-width integer types */
|
45
|
+
typedef signed char int_least8_t;
|
46
|
+
typedef unsigned char uint_least8_t;
|
47
|
+
typedef short int_least16_t;
|
48
|
+
typedef unsigned short uint_least16_t;
|
49
|
+
typedef int int_least32_t;
|
50
|
+
typedef unsigned uint_least32_t;
|
51
|
+
typedef long long int_least64_t;
|
52
|
+
typedef unsigned long long uint_least64_t;
|
53
|
+
|
54
|
+
/* 7.18.1.3 Fastest minimum-width integer types
|
55
|
+
* Not actually guaranteed to be fastest for all purposes
|
56
|
+
* Here we use the exact-width types for 8 and 16-bit ints.
|
57
|
+
*/
|
58
|
+
typedef char int_fast8_t;
|
59
|
+
typedef unsigned char uint_fast8_t;
|
60
|
+
typedef short int_fast16_t;
|
61
|
+
typedef unsigned short uint_fast16_t;
|
62
|
+
typedef int int_fast32_t;
|
63
|
+
typedef unsigned int uint_fast32_t;
|
64
|
+
typedef long long int_fast64_t;
|
65
|
+
typedef unsigned long long uint_fast64_t;
|
66
|
+
|
67
|
+
/* 7.18.1.5 Greatest-width integer types */
|
68
|
+
typedef long long intmax_t;
|
69
|
+
typedef unsigned long long uintmax_t;
|
70
|
+
|
71
|
+
/* 7.18.2 Limits of specified-width integer types */
|
72
|
+
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
|
73
|
+
|
74
|
+
/* 7.18.2.1 Limits of exact-width integer types */
|
75
|
+
#define INT8_MIN (-128)
|
76
|
+
#define INT16_MIN (-32768)
|
77
|
+
#define INT32_MIN (-2147483647 - 1)
|
78
|
+
#define INT64_MIN (-9223372036854775807LL - 1)
|
79
|
+
|
80
|
+
#define INT8_MAX 127
|
81
|
+
#define INT16_MAX 32767
|
82
|
+
#define INT32_MAX 2147483647
|
83
|
+
#define INT64_MAX 9223372036854775807LL
|
84
|
+
|
85
|
+
#define UINT8_MAX 0xff /* 255U */
|
86
|
+
#define UINT16_MAX 0xffff /* 65535U */
|
87
|
+
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
88
|
+
#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
|
89
|
+
|
90
|
+
/* 7.18.2.2 Limits of minimum-width integer types */
|
91
|
+
#define INT_LEAST8_MIN INT8_MIN
|
92
|
+
#define INT_LEAST16_MIN INT16_MIN
|
93
|
+
#define INT_LEAST32_MIN INT32_MIN
|
94
|
+
#define INT_LEAST64_MIN INT64_MIN
|
95
|
+
|
96
|
+
#define INT_LEAST8_MAX INT8_MAX
|
97
|
+
#define INT_LEAST16_MAX INT16_MAX
|
98
|
+
#define INT_LEAST32_MAX INT32_MAX
|
99
|
+
#define INT_LEAST64_MAX INT64_MAX
|
100
|
+
|
101
|
+
#define UINT_LEAST8_MAX UINT8_MAX
|
102
|
+
#define UINT_LEAST16_MAX UINT16_MAX
|
103
|
+
#define UINT_LEAST32_MAX UINT32_MAX
|
104
|
+
#define UINT_LEAST64_MAX UINT64_MAX
|
105
|
+
|
106
|
+
/* 7.18.2.3 Limits of fastest minimum-width integer types */
|
107
|
+
#define INT_FAST8_MIN INT8_MIN
|
108
|
+
#define INT_FAST16_MIN INT16_MIN
|
109
|
+
#define INT_FAST32_MIN INT32_MIN
|
110
|
+
#define INT_FAST64_MIN INT64_MIN
|
111
|
+
|
112
|
+
#define INT_FAST8_MAX INT8_MAX
|
113
|
+
#define INT_FAST16_MAX INT16_MAX
|
114
|
+
#define INT_FAST32_MAX INT32_MAX
|
115
|
+
#define INT_FAST64_MAX INT64_MAX
|
116
|
+
|
117
|
+
#define UINT_FAST8_MAX UINT8_MAX
|
118
|
+
#define UINT_FAST16_MAX UINT16_MAX
|
119
|
+
#define UINT_FAST32_MAX UINT32_MAX
|
120
|
+
#define UINT_FAST64_MAX UINT64_MAX
|
121
|
+
|
122
|
+
/* 7.18.2.4 Limits of integer types capable of holding
|
123
|
+
object pointers */
|
124
|
+
#ifdef _WIN64
|
125
|
+
#define INTPTR_MIN INT64_MIN
|
126
|
+
#define INTPTR_MAX INT64_MAX
|
127
|
+
#define UINTPTR_MAX UINT64_MAX
|
128
|
+
#else
|
129
|
+
#define INTPTR_MIN INT32_MIN
|
130
|
+
#define INTPTR_MAX INT32_MAX
|
131
|
+
#define UINTPTR_MAX UINT32_MAX
|
132
|
+
#endif
|
133
|
+
|
134
|
+
/* 7.18.2.5 Limits of greatest-width integer types */
|
135
|
+
#define INTMAX_MIN INT64_MIN
|
136
|
+
#define INTMAX_MAX INT64_MAX
|
137
|
+
#define UINTMAX_MAX UINT64_MAX
|
138
|
+
|
139
|
+
/* 7.18.3 Limits of other integer types */
|
140
|
+
#ifdef _WIN64
|
141
|
+
#define PTRDIFF_MIN INT64_MIN
|
142
|
+
#define PTRDIFF_MAX INT64_MAX
|
143
|
+
#else
|
144
|
+
#define PTRDIFF_MIN INT32_MIN
|
145
|
+
#define PTRDIFF_MAX INT32_MAX
|
146
|
+
#endif
|
147
|
+
|
148
|
+
#define SIG_ATOMIC_MIN INT32_MIN
|
149
|
+
#define SIG_ATOMIC_MAX INT32_MAX
|
150
|
+
|
151
|
+
#ifndef SIZE_MAX
|
152
|
+
#ifdef _WIN64
|
153
|
+
#define SIZE_MAX UINT64_MAX
|
154
|
+
#else
|
155
|
+
#define SIZE_MAX UINT32_MAX
|
156
|
+
#endif
|
157
|
+
#endif
|
158
|
+
|
159
|
+
#ifndef WCHAR_MIN /* also in wchar.h */
|
160
|
+
#define WCHAR_MIN 0
|
161
|
+
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
|
162
|
+
#endif
|
163
|
+
|
164
|
+
/*
|
165
|
+
* wint_t is unsigned short for compatibility with MS runtime
|
166
|
+
*/
|
167
|
+
#define WINT_MIN 0
|
168
|
+
#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
|
169
|
+
|
170
|
+
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
|
171
|
+
|
172
|
+
|
173
|
+
/* 7.18.4 Macros for integer constants */
|
174
|
+
#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
|
175
|
+
|
176
|
+
/* 7.18.4.1 Macros for minimum-width integer constants
|
177
|
+
|
178
|
+
Accoding to Douglas Gwyn <gwyn@arl.mil>:
|
179
|
+
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
180
|
+
9899:1999 as initially published, the expansion was required
|
181
|
+
to be an integer constant of precisely matching type, which
|
182
|
+
is impossible to accomplish for the shorter types on most
|
183
|
+
platforms, because C99 provides no standard way to designate
|
184
|
+
an integer constant with width less than that of type int.
|
185
|
+
TC1 changed this to require just an integer constant
|
186
|
+
*expression* with *promoted* type."
|
187
|
+
|
188
|
+
The trick used here is from Clive D W Feather.
|
189
|
+
*/
|
190
|
+
|
191
|
+
#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
|
192
|
+
#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
|
193
|
+
#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
|
194
|
+
/* The 'trick' doesn't work in C89 for long long because, without
|
195
|
+
suffix, (val) will be evaluated as int, not intmax_t */
|
196
|
+
#define INT64_C(val) val##LL
|
197
|
+
|
198
|
+
#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
|
199
|
+
#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
|
200
|
+
#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
|
201
|
+
#define UINT64_C(val) val##ULL
|
202
|
+
|
203
|
+
/* 7.18.4.2 Macros for greatest-width integer constants */
|
204
|
+
#define INTMAX_C(val) val##LL
|
205
|
+
#define UINTMAX_C(val) val##ULL
|
206
|
+
|
207
|
+
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
|
208
|
+
|
209
|
+
#endif
|