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,55 @@
|
|
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_DOS
|
7
|
+
#define _INC_DOS
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
#include <io.h>
|
11
|
+
|
12
|
+
#pragma pack(push,_CRT_PACKING)
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#ifndef _DISKFREE_T_DEFINED
|
19
|
+
#define _DISKFREE_T_DEFINED
|
20
|
+
|
21
|
+
struct _diskfree_t {
|
22
|
+
unsigned total_clusters;
|
23
|
+
unsigned avail_clusters;
|
24
|
+
unsigned sectors_per_cluster;
|
25
|
+
unsigned bytes_per_sector;
|
26
|
+
};
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#define _A_NORMAL 0x00
|
30
|
+
#define _A_RDONLY 0x01
|
31
|
+
#define _A_HIDDEN 0x02
|
32
|
+
#define _A_SYSTEM 0x04
|
33
|
+
#define _A_SUBDIR 0x10
|
34
|
+
#define _A_ARCH 0x20
|
35
|
+
|
36
|
+
#ifndef _GETDISKFREE_DEFINED
|
37
|
+
#define _GETDISKFREE_DEFINED
|
38
|
+
_CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#if (defined(_X86_) && !defined(__x86_64))
|
42
|
+
void __cdecl _disable(void);
|
43
|
+
void __cdecl _enable(void);
|
44
|
+
#endif
|
45
|
+
|
46
|
+
#ifndef NO_OLDNAMES
|
47
|
+
#define diskfree_t _diskfree_t
|
48
|
+
#endif
|
49
|
+
|
50
|
+
#ifdef __cplusplus
|
51
|
+
}
|
52
|
+
#endif
|
53
|
+
|
54
|
+
#pragma pack(pop)
|
55
|
+
#endif
|
@@ -0,0 +1,75 @@
|
|
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_ERRNO
|
7
|
+
#define _INC_ERRNO
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
#ifdef __cplusplus
|
12
|
+
extern "C" {
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#ifndef _CRT_ERRNO_DEFINED
|
16
|
+
#define _CRT_ERRNO_DEFINED
|
17
|
+
_CRTIMP extern int *__cdecl _errno(void);
|
18
|
+
#define errno (*_errno())
|
19
|
+
|
20
|
+
errno_t __cdecl _set_errno(int _Value);
|
21
|
+
errno_t __cdecl _get_errno(int *_Value);
|
22
|
+
#endif
|
23
|
+
|
24
|
+
#define EPERM 1
|
25
|
+
#define ENOENT 2
|
26
|
+
#define ESRCH 3
|
27
|
+
#define EINTR 4
|
28
|
+
#define EIO 5
|
29
|
+
#define ENXIO 6
|
30
|
+
#define E2BIG 7
|
31
|
+
#define ENOEXEC 8
|
32
|
+
#define EBADF 9
|
33
|
+
#define ECHILD 10
|
34
|
+
#define EAGAIN 11
|
35
|
+
#define ENOMEM 12
|
36
|
+
#define EACCES 13
|
37
|
+
#define EFAULT 14
|
38
|
+
#define EBUSY 16
|
39
|
+
#define EEXIST 17
|
40
|
+
#define EXDEV 18
|
41
|
+
#define ENODEV 19
|
42
|
+
#define ENOTDIR 20
|
43
|
+
#define EISDIR 21
|
44
|
+
#define ENFILE 23
|
45
|
+
#define EMFILE 24
|
46
|
+
#define ENOTTY 25
|
47
|
+
#define EFBIG 27
|
48
|
+
#define ENOSPC 28
|
49
|
+
#define ESPIPE 29
|
50
|
+
#define EROFS 30
|
51
|
+
#define EMLINK 31
|
52
|
+
#define EPIPE 32
|
53
|
+
#define EDOM 33
|
54
|
+
#define EDEADLK 36
|
55
|
+
#define ENAMETOOLONG 38
|
56
|
+
#define ENOLCK 39
|
57
|
+
#define ENOSYS 40
|
58
|
+
#define ENOTEMPTY 41
|
59
|
+
|
60
|
+
#ifndef RC_INVOKED
|
61
|
+
#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
|
62
|
+
#define _SECURECRT_ERRCODE_VALUES_DEFINED
|
63
|
+
#define EINVAL 22
|
64
|
+
#define ERANGE 34
|
65
|
+
#define EILSEQ 42
|
66
|
+
#define STRUNCATE 80
|
67
|
+
#endif
|
68
|
+
#endif
|
69
|
+
|
70
|
+
#define EDEADLOCK EDEADLK
|
71
|
+
|
72
|
+
#ifdef __cplusplus
|
73
|
+
}
|
74
|
+
#endif
|
75
|
+
#endif
|
@@ -0,0 +1,123 @@
|
|
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_EXCPT
|
7
|
+
#define _INC_EXCPT
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
#pragma pack(push,_CRT_PACKING)
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
struct _EXCEPTION_POINTERS;
|
18
|
+
|
19
|
+
#ifndef EXCEPTION_DISPOSITION
|
20
|
+
#define EXCEPTION_DISPOSITION int
|
21
|
+
#endif
|
22
|
+
#define ExceptionContinueExecution 0
|
23
|
+
#define ExceptionContinueSearch 1
|
24
|
+
#define ExceptionNestedException 2
|
25
|
+
#define ExceptionCollidedUnwind 3
|
26
|
+
|
27
|
+
#if (defined(_X86_) && !defined(__x86_64))
|
28
|
+
struct _EXCEPTION_RECORD;
|
29
|
+
struct _CONTEXT;
|
30
|
+
|
31
|
+
EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext);
|
32
|
+
#elif defined(__ia64__)
|
33
|
+
|
34
|
+
typedef struct _EXCEPTION_POINTERS *Exception_info_ptr;
|
35
|
+
struct _EXCEPTION_RECORD;
|
36
|
+
struct _CONTEXT;
|
37
|
+
struct _DISPATCHER_CONTEXT;
|
38
|
+
|
39
|
+
_CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,unsigned __int64 _MemoryStackFp,unsigned __int64 _BackingStoreFp,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext,unsigned __int64 _GlobalPointer);
|
40
|
+
#elif defined(__x86_64)
|
41
|
+
|
42
|
+
struct _EXCEPTION_RECORD;
|
43
|
+
struct _CONTEXT;
|
44
|
+
#endif
|
45
|
+
|
46
|
+
#define GetExceptionCode _exception_code
|
47
|
+
#define exception_code _exception_code
|
48
|
+
#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info
|
49
|
+
#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info
|
50
|
+
#define AbnormalTermination _abnormal_termination
|
51
|
+
#define abnormal_termination _abnormal_termination
|
52
|
+
|
53
|
+
unsigned long __cdecl _exception_code(void);
|
54
|
+
void *__cdecl _exception_info(void);
|
55
|
+
int __cdecl _abnormal_termination(void);
|
56
|
+
|
57
|
+
#define EXCEPTION_EXECUTE_HANDLER 1
|
58
|
+
#define EXCEPTION_CONTINUE_SEARCH 0
|
59
|
+
#define EXCEPTION_CONTINUE_EXECUTION -1
|
60
|
+
|
61
|
+
/* CRT stuff */
|
62
|
+
typedef void (__cdecl * _PHNDLR)(int);
|
63
|
+
|
64
|
+
struct _XCPT_ACTION {
|
65
|
+
unsigned long XcptNum;
|
66
|
+
int SigNum;
|
67
|
+
_PHNDLR XcptAction;
|
68
|
+
};
|
69
|
+
|
70
|
+
extern struct _XCPT_ACTION _XcptActTab[];
|
71
|
+
extern int _XcptActTabCount;
|
72
|
+
extern int _XcptActTabSize;
|
73
|
+
extern int _First_FPE_Indx;
|
74
|
+
extern int _Num_FPE;
|
75
|
+
|
76
|
+
int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
|
77
|
+
int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
|
78
|
+
|
79
|
+
/*
|
80
|
+
* The type of function that is expected as an exception handler to be
|
81
|
+
* installed with _try1.
|
82
|
+
*/
|
83
|
+
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
84
|
+
|
85
|
+
#ifndef HAVE_NO_SEH
|
86
|
+
/*
|
87
|
+
* This is not entirely necessary, but it is the structure installed by
|
88
|
+
* the _try1 primitive below.
|
89
|
+
*/
|
90
|
+
typedef struct _EXCEPTION_REGISTRATION {
|
91
|
+
struct _EXCEPTION_REGISTRATION *prev;
|
92
|
+
EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
93
|
+
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
|
94
|
+
|
95
|
+
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
|
96
|
+
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
|
97
|
+
#endif
|
98
|
+
|
99
|
+
#if (defined(_X86_) && !defined(__x86_64))
|
100
|
+
#define __try1(pHandler) \
|
101
|
+
__asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
|
102
|
+
|
103
|
+
#define __except1 \
|
104
|
+
__asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
|
105
|
+
: : : "%eax");
|
106
|
+
#elif defined(__x86_64)
|
107
|
+
#define __try1(pHandler) \
|
108
|
+
__asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler));
|
109
|
+
|
110
|
+
#define __except1 \
|
111
|
+
__asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \
|
112
|
+
: : : "%rax");
|
113
|
+
#else
|
114
|
+
#define __try1(pHandler)
|
115
|
+
#define __except1
|
116
|
+
#endif
|
117
|
+
|
118
|
+
#ifdef __cplusplus
|
119
|
+
}
|
120
|
+
#endif
|
121
|
+
|
122
|
+
#pragma pack(pop)
|
123
|
+
#endif
|
@@ -0,0 +1,52 @@
|
|
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
|
+
#include <io.h>
|
9
|
+
|
10
|
+
#ifndef _INC_FCNTL
|
11
|
+
#define _INC_FCNTL
|
12
|
+
|
13
|
+
#define _O_RDONLY 0x0000
|
14
|
+
#define _O_WRONLY 0x0001
|
15
|
+
#define _O_RDWR 0x0002
|
16
|
+
#define _O_APPEND 0x0008
|
17
|
+
#define _O_CREAT 0x0100
|
18
|
+
#define _O_TRUNC 0x0200
|
19
|
+
#define _O_EXCL 0x0400
|
20
|
+
#define _O_TEXT 0x4000
|
21
|
+
#define _O_BINARY 0x8000
|
22
|
+
#define _O_WTEXT 0x10000
|
23
|
+
#define _O_U16TEXT 0x20000
|
24
|
+
#define _O_U8TEXT 0x40000
|
25
|
+
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
26
|
+
|
27
|
+
#define _O_RAW _O_BINARY
|
28
|
+
#define _O_NOINHERIT 0x0080
|
29
|
+
#define _O_TEMPORARY 0x0040
|
30
|
+
#define _O_SHORT_LIVED 0x1000
|
31
|
+
|
32
|
+
#define _O_SEQUENTIAL 0x0020
|
33
|
+
#define _O_RANDOM 0x0010
|
34
|
+
|
35
|
+
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
36
|
+
#define O_RDONLY _O_RDONLY
|
37
|
+
#define O_WRONLY _O_WRONLY
|
38
|
+
#define O_RDWR _O_RDWR
|
39
|
+
#define O_APPEND _O_APPEND
|
40
|
+
#define O_CREAT _O_CREAT
|
41
|
+
#define O_TRUNC _O_TRUNC
|
42
|
+
#define O_EXCL _O_EXCL
|
43
|
+
#define O_TEXT _O_TEXT
|
44
|
+
#define O_BINARY _O_BINARY
|
45
|
+
#define O_RAW _O_BINARY
|
46
|
+
#define O_TEMPORARY _O_TEMPORARY
|
47
|
+
#define O_NOINHERIT _O_NOINHERIT
|
48
|
+
#define O_SEQUENTIAL _O_SEQUENTIAL
|
49
|
+
#define O_RANDOM _O_RANDOM
|
50
|
+
#define O_ACCMODE _O_ACCMODE
|
51
|
+
#endif
|
52
|
+
#endif
|
@@ -0,0 +1,108 @@
|
|
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 _FENV_H_
|
7
|
+
#define _FENV_H_
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
/* FPU status word exception flags */
|
12
|
+
#define FE_INVALID 0x01
|
13
|
+
#define FE_DENORMAL 0x02
|
14
|
+
#define FE_DIVBYZERO 0x04
|
15
|
+
#define FE_OVERFLOW 0x08
|
16
|
+
#define FE_UNDERFLOW 0x10
|
17
|
+
#define FE_INEXACT 0x20
|
18
|
+
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
|
19
|
+
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
20
|
+
|
21
|
+
/* FPU control word rounding flags */
|
22
|
+
#define FE_TONEAREST 0x0000
|
23
|
+
#define FE_DOWNWARD 0x0400
|
24
|
+
#define FE_UPWARD 0x0800
|
25
|
+
#define FE_TOWARDZERO 0x0c00
|
26
|
+
|
27
|
+
/* The MXCSR exception flags are the same as the
|
28
|
+
FE flags. */
|
29
|
+
#define __MXCSR_EXCEPT_FLAG_SHIFT 0
|
30
|
+
|
31
|
+
/* How much to shift FE status word exception flags
|
32
|
+
to get MXCSR rounding flags, */
|
33
|
+
#define __MXCSR_ROUND_FLAG_SHIFT 3
|
34
|
+
|
35
|
+
#ifndef RC_INVOKED
|
36
|
+
/*
|
37
|
+
For now, support only for the basic abstraction of flags that are
|
38
|
+
either set or clear. fexcept_t could be structure that holds more
|
39
|
+
info about the fp environment.
|
40
|
+
*/
|
41
|
+
typedef unsigned short fexcept_t;
|
42
|
+
|
43
|
+
/* This 32-byte struct represents the entire floating point
|
44
|
+
environment as stored by fnstenv or fstenv, augmented by
|
45
|
+
the contents of the MXCSR register, as stored by stmxcsr
|
46
|
+
(if CPU supports it). */
|
47
|
+
typedef struct
|
48
|
+
{
|
49
|
+
unsigned short __control_word;
|
50
|
+
unsigned short __unused0;
|
51
|
+
unsigned short __status_word;
|
52
|
+
unsigned short __unused1;
|
53
|
+
unsigned short __tag_word;
|
54
|
+
unsigned short __unused2;
|
55
|
+
unsigned int __ip_offset; /* instruction pointer offset */
|
56
|
+
unsigned short __ip_selector;
|
57
|
+
unsigned short __opcode;
|
58
|
+
unsigned int __data_offset;
|
59
|
+
unsigned short __data_selector;
|
60
|
+
unsigned short __unused3;
|
61
|
+
unsigned int __mxcsr; /* contents of the MXCSR register */
|
62
|
+
} fenv_t;
|
63
|
+
|
64
|
+
|
65
|
+
/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
|
66
|
+
different fp environments */
|
67
|
+
|
68
|
+
/* The default Intel x87 floating point environment (64-bit mantissa) */
|
69
|
+
#define FE_PC64_ENV ((const fenv_t *)-1)
|
70
|
+
|
71
|
+
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
|
72
|
+
#define FE_PC53_ENV ((const fenv_t *)-2)
|
73
|
+
|
74
|
+
/* The FE_DFL_ENV macro is required by standard.
|
75
|
+
fesetenv will use the environment set at app startup.*/
|
76
|
+
#define FE_DFL_ENV ((const fenv_t *) 0)
|
77
|
+
|
78
|
+
#ifdef __cplusplus
|
79
|
+
extern "C" {
|
80
|
+
#endif
|
81
|
+
|
82
|
+
/*TODO: Some of these could be inlined */
|
83
|
+
/* 7.6.2 Exception */
|
84
|
+
|
85
|
+
extern int __cdecl feclearexcept (int);
|
86
|
+
extern int __cdecl fegetexceptflag (fexcept_t * flagp, int excepts);
|
87
|
+
extern int __cdecl feraiseexcept (int excepts );
|
88
|
+
extern int __cdecl fesetexceptflag (const fexcept_t *, int);
|
89
|
+
extern int __cdecl fetestexcept (int excepts);
|
90
|
+
|
91
|
+
/* 7.6.3 Rounding */
|
92
|
+
|
93
|
+
extern int __cdecl fegetround (void);
|
94
|
+
extern int __cdecl fesetround (int mode);
|
95
|
+
|
96
|
+
/* 7.6.4 Environment */
|
97
|
+
|
98
|
+
extern int __cdecl fegetenv(fenv_t * envp);
|
99
|
+
extern int __cdecl fesetenv(const fenv_t * );
|
100
|
+
extern int __cdecl feupdateenv(const fenv_t *);
|
101
|
+
extern int __cdecl feholdexcept(fenv_t *);
|
102
|
+
|
103
|
+
#ifdef __cplusplus
|
104
|
+
}
|
105
|
+
#endif
|
106
|
+
#endif /* Not RC_INVOKED */
|
107
|
+
|
108
|
+
#endif /* ndef _FENV_H */
|
@@ -0,0 +1,297 @@
|
|
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
|
+
/* 7.8 Format conversion of integer types <inttypes.h> */
|
7
|
+
|
8
|
+
#ifndef _INTTYPES_H_
|
9
|
+
#define _INTTYPES_H_
|
10
|
+
|
11
|
+
#include <_mingw.h>
|
12
|
+
#include <stdint.h>
|
13
|
+
#define __need_wchar_t
|
14
|
+
#include <stddef.h>
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
typedef struct {
|
21
|
+
intmax_t quot;
|
22
|
+
intmax_t rem;
|
23
|
+
} imaxdiv_t;
|
24
|
+
|
25
|
+
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
26
|
+
|
27
|
+
/* 7.8.1 Macros for format specifiers
|
28
|
+
*
|
29
|
+
* MS runtime does not yet understand C9x standard "ll"
|
30
|
+
* length specifier. It appears to treat "ll" as "l".
|
31
|
+
* The non-standard I64 length specifier causes warning in GCC,
|
32
|
+
* but understood by MS runtime functions.
|
33
|
+
*/
|
34
|
+
|
35
|
+
/* fprintf macros for signed types */
|
36
|
+
#define PRId8 "d"
|
37
|
+
#define PRId16 "d"
|
38
|
+
#define PRId32 "d"
|
39
|
+
#define PRId64 "I64d"
|
40
|
+
|
41
|
+
#define PRIdLEAST8 "d"
|
42
|
+
#define PRIdLEAST16 "d"
|
43
|
+
#define PRIdLEAST32 "d"
|
44
|
+
#define PRIdLEAST64 "I64d"
|
45
|
+
|
46
|
+
#define PRIdFAST8 "d"
|
47
|
+
#define PRIdFAST16 "d"
|
48
|
+
#define PRIdFAST32 "d"
|
49
|
+
#define PRIdFAST64 "I64d"
|
50
|
+
|
51
|
+
#define PRIdMAX "I64d"
|
52
|
+
|
53
|
+
#define PRIi8 "i"
|
54
|
+
#define PRIi16 "i"
|
55
|
+
#define PRIi32 "i"
|
56
|
+
#define PRIi64 "I64i"
|
57
|
+
|
58
|
+
#define PRIiLEAST8 "i"
|
59
|
+
#define PRIiLEAST16 "i"
|
60
|
+
#define PRIiLEAST32 "i"
|
61
|
+
#define PRIiLEAST64 "I64i"
|
62
|
+
|
63
|
+
#define PRIiFAST8 "i"
|
64
|
+
#define PRIiFAST16 "i"
|
65
|
+
#define PRIiFAST32 "i"
|
66
|
+
#define PRIiFAST64 "I64i"
|
67
|
+
|
68
|
+
#define PRIiMAX "I64i"
|
69
|
+
|
70
|
+
#define PRIo8 "o"
|
71
|
+
#define PRIo16 "o"
|
72
|
+
#define PRIo32 "o"
|
73
|
+
#define PRIo64 "I64o"
|
74
|
+
|
75
|
+
#define PRIoLEAST8 "o"
|
76
|
+
#define PRIoLEAST16 "o"
|
77
|
+
#define PRIoLEAST32 "o"
|
78
|
+
#define PRIoLEAST64 "I64o"
|
79
|
+
|
80
|
+
#define PRIoFAST8 "o"
|
81
|
+
#define PRIoFAST16 "o"
|
82
|
+
#define PRIoFAST32 "o"
|
83
|
+
#define PRIoFAST64 "I64o"
|
84
|
+
|
85
|
+
#define PRIoMAX "I64o"
|
86
|
+
|
87
|
+
/* fprintf macros for unsigned types */
|
88
|
+
#define PRIu8 "u"
|
89
|
+
#define PRIu16 "u"
|
90
|
+
#define PRIu32 "u"
|
91
|
+
#define PRIu64 "I64u"
|
92
|
+
|
93
|
+
|
94
|
+
#define PRIuLEAST8 "u"
|
95
|
+
#define PRIuLEAST16 "u"
|
96
|
+
#define PRIuLEAST32 "u"
|
97
|
+
#define PRIuLEAST64 "I64u"
|
98
|
+
|
99
|
+
#define PRIuFAST8 "u"
|
100
|
+
#define PRIuFAST16 "u"
|
101
|
+
#define PRIuFAST32 "u"
|
102
|
+
#define PRIuFAST64 "I64u"
|
103
|
+
|
104
|
+
#define PRIuMAX "I64u"
|
105
|
+
|
106
|
+
#define PRIx8 "x"
|
107
|
+
#define PRIx16 "x"
|
108
|
+
#define PRIx32 "x"
|
109
|
+
#define PRIx64 "I64x"
|
110
|
+
|
111
|
+
#define PRIxLEAST8 "x"
|
112
|
+
#define PRIxLEAST16 "x"
|
113
|
+
#define PRIxLEAST32 "x"
|
114
|
+
#define PRIxLEAST64 "I64x"
|
115
|
+
|
116
|
+
#define PRIxFAST8 "x"
|
117
|
+
#define PRIxFAST16 "x"
|
118
|
+
#define PRIxFAST32 "x"
|
119
|
+
#define PRIxFAST64 "I64x"
|
120
|
+
|
121
|
+
#define PRIxMAX "I64x"
|
122
|
+
|
123
|
+
#define PRIX8 "X"
|
124
|
+
#define PRIX16 "X"
|
125
|
+
#define PRIX32 "X"
|
126
|
+
#define PRIX64 "I64X"
|
127
|
+
|
128
|
+
#define PRIXLEAST8 "X"
|
129
|
+
#define PRIXLEAST16 "X"
|
130
|
+
#define PRIXLEAST32 "X"
|
131
|
+
#define PRIXLEAST64 "I64X"
|
132
|
+
|
133
|
+
#define PRIXFAST8 "X"
|
134
|
+
#define PRIXFAST16 "X"
|
135
|
+
#define PRIXFAST32 "X"
|
136
|
+
#define PRIXFAST64 "I64X"
|
137
|
+
|
138
|
+
#define PRIXMAX "I64X"
|
139
|
+
|
140
|
+
/*
|
141
|
+
* fscanf macros for signed int types
|
142
|
+
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
|
143
|
+
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
|
144
|
+
* no length identifiers
|
145
|
+
*/
|
146
|
+
|
147
|
+
#define SCNd16 "hd"
|
148
|
+
#define SCNd32 "d"
|
149
|
+
#define SCNd64 "I64d"
|
150
|
+
|
151
|
+
#define SCNdLEAST16 "hd"
|
152
|
+
#define SCNdLEAST32 "d"
|
153
|
+
#define SCNdLEAST64 "I64d"
|
154
|
+
|
155
|
+
#define SCNdFAST16 "hd"
|
156
|
+
#define SCNdFAST32 "d"
|
157
|
+
#define SCNdFAST64 "I64d"
|
158
|
+
|
159
|
+
#define SCNdMAX "I64d"
|
160
|
+
|
161
|
+
#define SCNi16 "hi"
|
162
|
+
#define SCNi32 "i"
|
163
|
+
#define SCNi64 "I64i"
|
164
|
+
|
165
|
+
#define SCNiLEAST16 "hi"
|
166
|
+
#define SCNiLEAST32 "i"
|
167
|
+
#define SCNiLEAST64 "I64i"
|
168
|
+
|
169
|
+
#define SCNiFAST16 "hi"
|
170
|
+
#define SCNiFAST32 "i"
|
171
|
+
#define SCNiFAST64 "I64i"
|
172
|
+
|
173
|
+
#define SCNiMAX "I64i"
|
174
|
+
|
175
|
+
#define SCNo16 "ho"
|
176
|
+
#define SCNo32 "o"
|
177
|
+
#define SCNo64 "I64o"
|
178
|
+
|
179
|
+
#define SCNoLEAST16 "ho"
|
180
|
+
#define SCNoLEAST32 "o"
|
181
|
+
#define SCNoLEAST64 "I64o"
|
182
|
+
|
183
|
+
#define SCNoFAST16 "ho"
|
184
|
+
#define SCNoFAST32 "o"
|
185
|
+
#define SCNoFAST64 "I64o"
|
186
|
+
|
187
|
+
#define SCNoMAX "I64o"
|
188
|
+
|
189
|
+
#define SCNx16 "hx"
|
190
|
+
#define SCNx32 "x"
|
191
|
+
#define SCNx64 "I64x"
|
192
|
+
|
193
|
+
#define SCNxLEAST16 "hx"
|
194
|
+
#define SCNxLEAST32 "x"
|
195
|
+
#define SCNxLEAST64 "I64x"
|
196
|
+
|
197
|
+
#define SCNxFAST16 "hx"
|
198
|
+
#define SCNxFAST32 "x"
|
199
|
+
#define SCNxFAST64 "I64x"
|
200
|
+
|
201
|
+
#define SCNxMAX "I64x"
|
202
|
+
|
203
|
+
/* fscanf macros for unsigned int types */
|
204
|
+
|
205
|
+
#define SCNu16 "hu"
|
206
|
+
#define SCNu32 "u"
|
207
|
+
#define SCNu64 "I64u"
|
208
|
+
|
209
|
+
#define SCNuLEAST16 "hu"
|
210
|
+
#define SCNuLEAST32 "u"
|
211
|
+
#define SCNuLEAST64 "I64u"
|
212
|
+
|
213
|
+
#define SCNuFAST16 "hu"
|
214
|
+
#define SCNuFAST32 "u"
|
215
|
+
#define SCNuFAST64 "I64u"
|
216
|
+
|
217
|
+
#define SCNuMAX "I64u"
|
218
|
+
|
219
|
+
#ifdef _WIN64
|
220
|
+
#define PRIdPTR "I64d"
|
221
|
+
#define PRIiPTR "I64i"
|
222
|
+
#define PRIoPTR "I64o"
|
223
|
+
#define PRIuPTR "I64u"
|
224
|
+
#define PRIxPTR "I64x"
|
225
|
+
#define PRIXPTR "I64X"
|
226
|
+
#define SCNdPTR "I64d"
|
227
|
+
#define SCNiPTR "I64i"
|
228
|
+
#define SCNoPTR "I64o"
|
229
|
+
#define SCNxPTR "I64x"
|
230
|
+
#define SCNuPTR "I64u"
|
231
|
+
#else
|
232
|
+
#define PRIdPTR "d"
|
233
|
+
#define PRIiPTR "i"
|
234
|
+
#define PRIoPTR "o"
|
235
|
+
#define PRIuPTR "u"
|
236
|
+
#define PRIxPTR "x"
|
237
|
+
#define PRIXPTR "X"
|
238
|
+
#define SCNdPTR "d"
|
239
|
+
#define SCNiPTR "i"
|
240
|
+
#define SCNoPTR "o"
|
241
|
+
#define SCNxPTR "x"
|
242
|
+
#define SCNuPTR "u"
|
243
|
+
#endif
|
244
|
+
|
245
|
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
246
|
+
/*
|
247
|
+
* no length modifier for char types prior to C9x
|
248
|
+
* MS runtime scanf appears to treat "hh" as "h"
|
249
|
+
*/
|
250
|
+
|
251
|
+
/* signed char */
|
252
|
+
#define SCNd8 "hhd"
|
253
|
+
#define SCNdLEAST8 "hhd"
|
254
|
+
#define SCNdFAST8 "hhd"
|
255
|
+
|
256
|
+
#define SCNi8 "hhi"
|
257
|
+
#define SCNiLEAST8 "hhi"
|
258
|
+
#define SCNiFAST8 "hhi"
|
259
|
+
|
260
|
+
#define SCNo8 "hho"
|
261
|
+
#define SCNoLEAST8 "hho"
|
262
|
+
#define SCNoFAST8 "hho"
|
263
|
+
|
264
|
+
#define SCNx8 "hhx"
|
265
|
+
#define SCNxLEAST8 "hhx"
|
266
|
+
#define SCNxFAST8 "hhx"
|
267
|
+
|
268
|
+
/* unsigned char */
|
269
|
+
#define SCNu8 "hhu"
|
270
|
+
#define SCNuLEAST8 "hhu"
|
271
|
+
#define SCNuFAST8 "hhu"
|
272
|
+
#endif /* __STDC_VERSION__ >= 199901 */
|
273
|
+
|
274
|
+
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
|
275
|
+
|
276
|
+
intmax_t __cdecl imaxabs (intmax_t j);
|
277
|
+
__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j)
|
278
|
+
{return (j >= 0 ? j : -j);}
|
279
|
+
imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom);
|
280
|
+
|
281
|
+
/* 7.8.2 Conversion functions for greatest-width integer types */
|
282
|
+
|
283
|
+
intmax_t __cdecl strtoimax (const char* __restrict__ nptr,
|
284
|
+
char** __restrict__ endptr, int base);
|
285
|
+
uintmax_t __cdecl strtoumax (const char* __restrict__ nptr,
|
286
|
+
char** __restrict__ endptr, int base);
|
287
|
+
|
288
|
+
intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr,
|
289
|
+
wchar_t** __restrict__ endptr, int base);
|
290
|
+
uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr,
|
291
|
+
wchar_t** __restrict__ endptr, int base);
|
292
|
+
|
293
|
+
#ifdef __cplusplus
|
294
|
+
}
|
295
|
+
#endif
|
296
|
+
|
297
|
+
#endif /* ndef _INTTYPES_H */
|