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,429 @@
|
|
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_STDIO
|
7
|
+
#define _INC_STDIO
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
|
11
|
+
#pragma pack(push,_CRT_PACKING)
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
#define BUFSIZ 512
|
18
|
+
#define _NFILE _NSTREAM_
|
19
|
+
#define _NSTREAM_ 512
|
20
|
+
#define _IOB_ENTRIES 20
|
21
|
+
#define EOF (-1)
|
22
|
+
|
23
|
+
#ifndef _FILE_DEFINED
|
24
|
+
struct _iobuf {
|
25
|
+
char *_ptr;
|
26
|
+
int _cnt;
|
27
|
+
char *_base;
|
28
|
+
int _flag;
|
29
|
+
int _file;
|
30
|
+
int _charbuf;
|
31
|
+
int _bufsiz;
|
32
|
+
char *_tmpfname;
|
33
|
+
};
|
34
|
+
typedef struct _iobuf FILE;
|
35
|
+
#define _FILE_DEFINED
|
36
|
+
#endif
|
37
|
+
|
38
|
+
#ifdef _POSIX_
|
39
|
+
#define _P_tmpdir "/"
|
40
|
+
#define _wP_tmpdir L"/"
|
41
|
+
#else
|
42
|
+
#define _P_tmpdir "\\"
|
43
|
+
#define _wP_tmpdir L"\\"
|
44
|
+
#endif
|
45
|
+
|
46
|
+
#define L_tmpnam (sizeof(_P_tmpdir) + 12)
|
47
|
+
|
48
|
+
#ifdef _POSIX_
|
49
|
+
#define L_ctermid 9
|
50
|
+
#define L_cuserid 32
|
51
|
+
#endif
|
52
|
+
|
53
|
+
#define SEEK_CUR 1
|
54
|
+
#define SEEK_END 2
|
55
|
+
#define SEEK_SET 0
|
56
|
+
|
57
|
+
#define STDIN_FILENO 0
|
58
|
+
#define STDOUT_FILENO 1
|
59
|
+
#define STDERR_FILENO 2
|
60
|
+
|
61
|
+
#define FILENAME_MAX 260
|
62
|
+
#define FOPEN_MAX 20
|
63
|
+
#define _SYS_OPEN 20
|
64
|
+
#define TMP_MAX 32767
|
65
|
+
|
66
|
+
#ifndef NULL
|
67
|
+
#ifdef __cplusplus
|
68
|
+
#define NULL 0
|
69
|
+
#else
|
70
|
+
#define NULL ((void *)0)
|
71
|
+
#endif
|
72
|
+
#endif
|
73
|
+
|
74
|
+
#ifndef _OFF_T_DEFINED
|
75
|
+
#define _OFF_T_DEFINED
|
76
|
+
#ifndef _OFF_T_
|
77
|
+
#define _OFF_T_
|
78
|
+
typedef long _off_t;
|
79
|
+
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
80
|
+
typedef long off_t;
|
81
|
+
#endif
|
82
|
+
#endif
|
83
|
+
#endif
|
84
|
+
|
85
|
+
#ifndef _OFF64_T_DEFINED
|
86
|
+
#define _OFF64_T_DEFINED
|
87
|
+
typedef long long _off64_t;
|
88
|
+
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
89
|
+
typedef long long off64_t;
|
90
|
+
#endif
|
91
|
+
#endif
|
92
|
+
|
93
|
+
#ifndef _STDIO_DEFINED
|
94
|
+
#ifdef _WIN64
|
95
|
+
_CRTIMP FILE *__cdecl __iob_func(void);
|
96
|
+
#else
|
97
|
+
#ifdef _MSVCRT_
|
98
|
+
extern FILE _iob[]; /* A pointer to an array of FILE */
|
99
|
+
#define __iob_func() (_iob)
|
100
|
+
#else
|
101
|
+
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
|
102
|
+
#define __iob_func() (*_imp___iob)
|
103
|
+
#define _iob __iob_func()
|
104
|
+
#endif
|
105
|
+
#endif
|
106
|
+
#endif
|
107
|
+
|
108
|
+
#ifndef _FPOS_T_DEFINED
|
109
|
+
#define _FPOS_T_DEFINED
|
110
|
+
#undef _FPOSOFF
|
111
|
+
|
112
|
+
#if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64
|
113
|
+
typedef __int64 fpos_t;
|
114
|
+
#define _FPOSOFF(fp) ((long)(fp))
|
115
|
+
#else
|
116
|
+
typedef long long fpos_t;
|
117
|
+
#define _FPOSOFF(fp) ((long)(fp))
|
118
|
+
#endif
|
119
|
+
|
120
|
+
#endif
|
121
|
+
|
122
|
+
#ifndef _STDSTREAM_DEFINED
|
123
|
+
#define _STDSTREAM_DEFINED
|
124
|
+
|
125
|
+
#define stdin (&__iob_func()[0])
|
126
|
+
#define stdout (&__iob_func()[1])
|
127
|
+
#define stderr (&__iob_func()[2])
|
128
|
+
#endif
|
129
|
+
|
130
|
+
#define _IOREAD 0x0001
|
131
|
+
#define _IOWRT 0x0002
|
132
|
+
|
133
|
+
#define _IOFBF 0x0000
|
134
|
+
#define _IOLBF 0x0040
|
135
|
+
#define _IONBF 0x0004
|
136
|
+
|
137
|
+
#define _IOMYBUF 0x0008
|
138
|
+
#define _IOEOF 0x0010
|
139
|
+
#define _IOERR 0x0020
|
140
|
+
#define _IOSTRG 0x0040
|
141
|
+
#define _IORW 0x0080
|
142
|
+
#ifdef _POSIX_
|
143
|
+
#define _IOAPPEND 0x0200
|
144
|
+
#endif
|
145
|
+
|
146
|
+
#define _TWO_DIGIT_EXPONENT 0x1
|
147
|
+
|
148
|
+
#ifndef _STDIO_DEFINED
|
149
|
+
|
150
|
+
_CRTIMP int __cdecl _filbuf(FILE *_File);
|
151
|
+
_CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
|
152
|
+
#ifdef _POSIX_
|
153
|
+
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode);
|
154
|
+
#else
|
155
|
+
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
|
156
|
+
#endif
|
157
|
+
void __cdecl clearerr(FILE *_File);
|
158
|
+
int __cdecl fclose(FILE *_File);
|
159
|
+
_CRTIMP int __cdecl _fcloseall(void);
|
160
|
+
#ifdef _POSIX_
|
161
|
+
FILE *__cdecl fdopen(int _FileHandle,const char *_Mode);
|
162
|
+
#else
|
163
|
+
_CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
|
164
|
+
#endif
|
165
|
+
int __cdecl feof(FILE *_File);
|
166
|
+
int __cdecl ferror(FILE *_File);
|
167
|
+
int __cdecl fflush(FILE *_File);
|
168
|
+
int __cdecl fgetc(FILE *_File);
|
169
|
+
_CRTIMP int __cdecl _fgetchar(void);
|
170
|
+
int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos);
|
171
|
+
char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File);
|
172
|
+
#ifdef _POSIX_
|
173
|
+
int __cdecl fileno(FILE *_File);
|
174
|
+
#else
|
175
|
+
_CRTIMP int __cdecl _fileno(FILE *_File);
|
176
|
+
#endif
|
177
|
+
_CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
|
178
|
+
_CRTIMP int __cdecl _flushall(void);
|
179
|
+
FILE *__cdecl fopen(const char *_Filename,const char *_Mode);
|
180
|
+
FILE *fopen64(const char *filename,const char *mode);
|
181
|
+
int __cdecl fprintf(FILE *_File,const char *_Format,...);
|
182
|
+
int __cdecl fputc(int _Ch,FILE *_File);
|
183
|
+
_CRTIMP int __cdecl _fputchar(int _Ch);
|
184
|
+
int __cdecl fputs(const char *_Str,FILE *_File);
|
185
|
+
size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
|
186
|
+
FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File);
|
187
|
+
int __cdecl fscanf(FILE *_File,const char *_Format,...);
|
188
|
+
int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
|
189
|
+
int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
|
190
|
+
int fseeko64(FILE* stream, _off64_t offset, int whence);
|
191
|
+
long __cdecl ftell(FILE *_File);
|
192
|
+
_off64_t ftello64(FILE * stream);
|
193
|
+
int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
|
194
|
+
__int64 __cdecl _ftelli64(FILE *_File);
|
195
|
+
size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File);
|
196
|
+
int __cdecl getc(FILE *_File);
|
197
|
+
int __cdecl getchar(void);
|
198
|
+
_CRTIMP int __cdecl _getmaxstdio(void);
|
199
|
+
char *__cdecl gets(char *_Buffer);
|
200
|
+
int __cdecl _getw(FILE *_File);
|
201
|
+
#ifndef _CRT_PERROR_DEFINED
|
202
|
+
#define _CRT_PERROR_DEFINED
|
203
|
+
void __cdecl perror(const char *_ErrMsg);
|
204
|
+
#endif
|
205
|
+
_CRTIMP int __cdecl _pclose(FILE *_File);
|
206
|
+
_CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
|
207
|
+
#if !defined(NO_OLDNAMES) && !defined(popen)
|
208
|
+
#define popen _popen
|
209
|
+
#define pclose _pclose
|
210
|
+
#endif
|
211
|
+
int __cdecl printf(const char *_Format,...);
|
212
|
+
int __cdecl putc(int _Ch,FILE *_File);
|
213
|
+
int __cdecl putchar(int _Ch);
|
214
|
+
int __cdecl puts(const char *_Str);
|
215
|
+
_CRTIMP int __cdecl _putw(int _Word,FILE *_File);
|
216
|
+
#ifndef _CRT_DIRECTORY_DEFINED
|
217
|
+
#define _CRT_DIRECTORY_DEFINED
|
218
|
+
int __cdecl remove(const char *_Filename);
|
219
|
+
int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
|
220
|
+
_CRTIMP int __cdecl _unlink(const char *_Filename);
|
221
|
+
#ifndef NO_OLDNAMES
|
222
|
+
int __cdecl unlink(const char *_Filename);
|
223
|
+
#endif
|
224
|
+
#endif
|
225
|
+
void __cdecl rewind(FILE *_File);
|
226
|
+
_CRTIMP int __cdecl _rmtmp(void);
|
227
|
+
int __cdecl scanf(const char *_Format,...);
|
228
|
+
void __cdecl setbuf(FILE *_File,char *_Buffer);
|
229
|
+
_CRTIMP int __cdecl _setmaxstdio(int _Max);
|
230
|
+
_CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
|
231
|
+
_CRTIMP unsigned int __cdecl _get_output_format(void);
|
232
|
+
int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size);
|
233
|
+
_CRTIMP int __cdecl _scprintf(const char *_Format,...);
|
234
|
+
int __cdecl sscanf(const char *_Src,const char *_Format,...);
|
235
|
+
_CRTIMP int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...);
|
236
|
+
FILE *__cdecl tmpfile(void);
|
237
|
+
char *__cdecl tmpnam(char *_Buffer);
|
238
|
+
int __cdecl ungetc(int _Ch,FILE *_File);
|
239
|
+
int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList);
|
240
|
+
int __cdecl vprintf(const char *_Format,va_list _ArgList);
|
241
|
+
/* Make sure macros are not defined. */
|
242
|
+
#pragma push_macro("vsnprintf")
|
243
|
+
#pragma push_macro("snprintf")
|
244
|
+
#undef vsnprintf
|
245
|
+
#undef snprintf
|
246
|
+
extern
|
247
|
+
__attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
|
248
|
+
int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
249
|
+
extern
|
250
|
+
__attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3)))
|
251
|
+
int __mingw_snprintf(char* s, size_t n, const char* format, ...);
|
252
|
+
int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
253
|
+
_CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...);
|
254
|
+
_CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args);
|
255
|
+
int __cdecl sprintf(char *_Dest,const char *_Format,...);
|
256
|
+
int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args);
|
257
|
+
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
258
|
+
int __cdecl snprintf(char* s, size_t n, const char* format, ...);
|
259
|
+
__CRT_INLINE int __cdecl vsnprintf (char* s, size_t n, const char* format,va_list arg) {
|
260
|
+
return _vsnprintf ( s, n, format, arg);
|
261
|
+
}
|
262
|
+
int __cdecl vscanf(const char * Format, va_list argp);
|
263
|
+
int __cdecl vfscanf (FILE * fp, const char * Format,va_list argp);
|
264
|
+
int __cdecl vsscanf (const char * _Str,const char * Format,va_list argp);
|
265
|
+
#endif
|
266
|
+
/* Restore may prior defined macros snprintf/vsnprintf. */
|
267
|
+
#pragma pop_macro("snprintf")
|
268
|
+
#pragma pop_macro("vsnprintf")
|
269
|
+
/* Check if vsnprintf and snprintf are defaulting to gnu-style. */
|
270
|
+
#if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
|
271
|
+
#ifndef vsnprint
|
272
|
+
#define vsnprintf __mingw_vsnprintf
|
273
|
+
#endif
|
274
|
+
#ifndef snprintf
|
275
|
+
#define snprintf __mingw_snprintf
|
276
|
+
#endif
|
277
|
+
#endif
|
278
|
+
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
|
279
|
+
_CRTIMP int __cdecl _set_printf_count_output(int _Value);
|
280
|
+
_CRTIMP int __cdecl _get_printf_count_output(void);
|
281
|
+
|
282
|
+
#ifndef _WSTDIO_DEFINED
|
283
|
+
|
284
|
+
#ifndef WEOF
|
285
|
+
#define WEOF (wint_t)(0xFFFF)
|
286
|
+
#endif
|
287
|
+
|
288
|
+
#ifdef _POSIX_
|
289
|
+
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
|
290
|
+
#else
|
291
|
+
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
|
292
|
+
#endif
|
293
|
+
wint_t __cdecl fgetwc(FILE *_File);
|
294
|
+
_CRTIMP wint_t __cdecl _fgetwchar(void);
|
295
|
+
wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
|
296
|
+
_CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
|
297
|
+
wint_t __cdecl getwc(FILE *_File);
|
298
|
+
wint_t __cdecl getwchar(void);
|
299
|
+
wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
|
300
|
+
wint_t __cdecl putwchar(wchar_t _Ch);
|
301
|
+
wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
|
302
|
+
wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
|
303
|
+
int __cdecl fputws(const wchar_t *_Str,FILE *_File);
|
304
|
+
_CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
|
305
|
+
_CRTIMP int __cdecl _putws(const wchar_t *_Str);
|
306
|
+
int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
|
307
|
+
int __cdecl wprintf(const wchar_t *_Format,...);
|
308
|
+
_CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
|
309
|
+
int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
310
|
+
int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
|
311
|
+
_CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
|
312
|
+
_CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
|
313
|
+
_CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
|
314
|
+
_CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
|
315
|
+
_CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
|
316
|
+
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
|
317
|
+
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
318
|
+
int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
|
319
|
+
__CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
|
320
|
+
int __cdecl vwscanf (const wchar_t *, va_list);
|
321
|
+
int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
|
322
|
+
int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
|
323
|
+
#endif
|
324
|
+
_CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
|
325
|
+
_CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
|
326
|
+
|
327
|
+
#ifndef RC_INVOKED
|
328
|
+
#include <vadefs.h>
|
329
|
+
#endif
|
330
|
+
|
331
|
+
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
|
332
|
+
#ifndef __cplusplus
|
333
|
+
#define swprintf _swprintf
|
334
|
+
#define vswprintf _vswprintf
|
335
|
+
#define _swprintf_l __swprintf_l
|
336
|
+
#define _vswprintf_l __vswprintf_l
|
337
|
+
#endif
|
338
|
+
#endif
|
339
|
+
|
340
|
+
_CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
|
341
|
+
_CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
|
342
|
+
int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
|
343
|
+
int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
|
344
|
+
_CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
|
345
|
+
int __cdecl wscanf(const wchar_t *_Format,...);
|
346
|
+
_CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
|
347
|
+
_CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
|
348
|
+
_CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
|
349
|
+
#ifndef _CRT_WPERROR_DEFINED
|
350
|
+
#define _CRT_WPERROR_DEFINED
|
351
|
+
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
|
352
|
+
#endif
|
353
|
+
_CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
|
354
|
+
#if !defined(NO_OLDNAMES) && !defined(wpopen)
|
355
|
+
#define wpopen _wpopen
|
356
|
+
#endif
|
357
|
+
_CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
|
358
|
+
_CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
|
359
|
+
_CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
|
360
|
+
_CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
|
361
|
+
_CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
|
362
|
+
|
363
|
+
#undef _CRT_GETPUTWCHAR_NOINLINE
|
364
|
+
|
365
|
+
#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
|
366
|
+
#define getwchar() fgetwc(stdin)
|
367
|
+
#define putwchar(_c) fputwc((_c),stdout)
|
368
|
+
#else
|
369
|
+
__CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); }
|
370
|
+
__CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); }
|
371
|
+
#endif
|
372
|
+
|
373
|
+
#define getwc(_stm) fgetwc(_stm)
|
374
|
+
#define putwc(_c,_stm) fputwc(_c,_stm)
|
375
|
+
#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
|
376
|
+
#define _getwc_nolock(_stm) _fgetwc_nolock(_stm)
|
377
|
+
|
378
|
+
#define _WSTDIO_DEFINED
|
379
|
+
#endif
|
380
|
+
|
381
|
+
#define _STDIO_DEFINED
|
382
|
+
#endif
|
383
|
+
|
384
|
+
#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
|
385
|
+
#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
|
386
|
+
#define _getc_nolock(_stream) _fgetc_nolock(_stream)
|
387
|
+
#define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream)
|
388
|
+
#define _getchar_nolock() _getc_nolock(stdin)
|
389
|
+
#define _putchar_nolock(_c) _putc_nolock((_c),stdout)
|
390
|
+
#define _getwchar_nolock() _getwc_nolock(stdin)
|
391
|
+
#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout)
|
392
|
+
|
393
|
+
_CRTIMP void __cdecl _lock_file(FILE *_File);
|
394
|
+
_CRTIMP void __cdecl _unlock_file(FILE *_File);
|
395
|
+
_CRTIMP int __cdecl _fclose_nolock(FILE *_File);
|
396
|
+
_CRTIMP int __cdecl _fflush_nolock(FILE *_File);
|
397
|
+
_CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
|
398
|
+
_CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
|
399
|
+
_CRTIMP long __cdecl _ftell_nolock(FILE *_File);
|
400
|
+
_CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
|
401
|
+
_CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
|
402
|
+
_CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File);
|
403
|
+
_CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
|
404
|
+
|
405
|
+
#if !defined(NO_OLDNAMES) || !defined(_POSIX)
|
406
|
+
#define P_tmpdir _P_tmpdir
|
407
|
+
#define SYS_OPEN _SYS_OPEN
|
408
|
+
|
409
|
+
char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix);
|
410
|
+
int __cdecl fcloseall(void);
|
411
|
+
FILE *__cdecl fdopen(int _FileHandle,const char *_Format);
|
412
|
+
int __cdecl fgetchar(void);
|
413
|
+
int __cdecl fileno(FILE *_File);
|
414
|
+
int __cdecl flushall(void);
|
415
|
+
int __cdecl fputchar(int _Ch);
|
416
|
+
int __cdecl getw(FILE *_File);
|
417
|
+
int __cdecl putw(int _Ch,FILE *_File);
|
418
|
+
int __cdecl rmtmp(void);
|
419
|
+
#endif
|
420
|
+
|
421
|
+
#ifdef __cplusplus
|
422
|
+
}
|
423
|
+
#endif
|
424
|
+
|
425
|
+
#pragma pack(pop)
|
426
|
+
|
427
|
+
#include <sec_api/stdio_s.h>
|
428
|
+
|
429
|
+
#endif
|
@@ -0,0 +1,580 @@
|
|
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_STDLIB
|
7
|
+
#define _INC_STDLIB
|
8
|
+
|
9
|
+
#include <_mingw.h>
|
10
|
+
#include <limits.h>
|
11
|
+
|
12
|
+
#pragma pack(push,_CRT_PACKING)
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#ifndef NULL
|
19
|
+
#ifdef __cplusplus
|
20
|
+
#define NULL 0
|
21
|
+
#else
|
22
|
+
#define NULL ((void *)0)
|
23
|
+
#endif
|
24
|
+
#endif
|
25
|
+
|
26
|
+
#define EXIT_SUCCESS 0
|
27
|
+
#define EXIT_FAILURE 1
|
28
|
+
|
29
|
+
#ifndef _ONEXIT_T_DEFINED
|
30
|
+
#define _ONEXIT_T_DEFINED
|
31
|
+
|
32
|
+
typedef int (__cdecl *_onexit_t)(void);
|
33
|
+
|
34
|
+
#ifndef NO_OLDNAMES
|
35
|
+
#define onexit_t _onexit_t
|
36
|
+
#endif
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef _DIV_T_DEFINED
|
40
|
+
#define _DIV_T_DEFINED
|
41
|
+
|
42
|
+
typedef struct _div_t {
|
43
|
+
int quot;
|
44
|
+
int rem;
|
45
|
+
} div_t;
|
46
|
+
|
47
|
+
typedef struct _ldiv_t {
|
48
|
+
long quot;
|
49
|
+
long rem;
|
50
|
+
} ldiv_t;
|
51
|
+
#endif
|
52
|
+
|
53
|
+
#ifndef _CRT_DOUBLE_DEC
|
54
|
+
#define _CRT_DOUBLE_DEC
|
55
|
+
|
56
|
+
#pragma pack(4)
|
57
|
+
typedef struct {
|
58
|
+
unsigned char ld[10];
|
59
|
+
} _LDOUBLE;
|
60
|
+
#pragma pack()
|
61
|
+
|
62
|
+
#define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
|
63
|
+
|
64
|
+
typedef struct {
|
65
|
+
double x;
|
66
|
+
} _CRT_DOUBLE;
|
67
|
+
|
68
|
+
typedef struct {
|
69
|
+
float f;
|
70
|
+
} _CRT_FLOAT;
|
71
|
+
|
72
|
+
#pragma push_macro("long")
|
73
|
+
#undef long
|
74
|
+
|
75
|
+
typedef struct {
|
76
|
+
long double x;
|
77
|
+
} _LONGDOUBLE;
|
78
|
+
|
79
|
+
#pragma pop_macro("long")
|
80
|
+
|
81
|
+
#pragma pack(4)
|
82
|
+
typedef struct {
|
83
|
+
unsigned char ld12[12];
|
84
|
+
} _LDBL12;
|
85
|
+
#pragma pack()
|
86
|
+
#endif
|
87
|
+
|
88
|
+
#define RAND_MAX 0x7fff
|
89
|
+
|
90
|
+
#ifndef MB_CUR_MAX
|
91
|
+
#define MB_CUR_MAX ___mb_cur_max_func()
|
92
|
+
#ifndef __mb_cur_max
|
93
|
+
#ifdef _MSVCRT_
|
94
|
+
extern int __mb_cur_max;
|
95
|
+
#else
|
96
|
+
#define __mb_cur_max (*_imp____mb_cur_max)
|
97
|
+
extern int *_imp____mb_cur_max;
|
98
|
+
#endif
|
99
|
+
#endif
|
100
|
+
#ifdef _MSVCRT_
|
101
|
+
extern int __mbcur_max;
|
102
|
+
#define ___mb_cur_max_func() (__mb_cur_max)
|
103
|
+
#else
|
104
|
+
extern int* _imp____mbcur_max;
|
105
|
+
#define ___mb_cur_max_func() (*_imp____mb_cur_max)
|
106
|
+
#endif
|
107
|
+
#endif
|
108
|
+
|
109
|
+
#define __max(a,b) (((a) > (b)) ? (a) : (b))
|
110
|
+
#define __min(a,b) (((a) < (b)) ? (a) : (b))
|
111
|
+
|
112
|
+
#define _MAX_PATH 260
|
113
|
+
#define _MAX_DRIVE 3
|
114
|
+
#define _MAX_DIR 256
|
115
|
+
#define _MAX_FNAME 256
|
116
|
+
#define _MAX_EXT 256
|
117
|
+
|
118
|
+
#define _OUT_TO_DEFAULT 0
|
119
|
+
#define _OUT_TO_STDERR 1
|
120
|
+
#define _OUT_TO_MSGBOX 2
|
121
|
+
#define _REPORT_ERRMODE 3
|
122
|
+
|
123
|
+
#define _WRITE_ABORT_MSG 0x1
|
124
|
+
#define _CALL_REPORTFAULT 0x2
|
125
|
+
|
126
|
+
#define _MAX_ENV 32767
|
127
|
+
|
128
|
+
typedef void (__cdecl *_purecall_handler)(void);
|
129
|
+
|
130
|
+
_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
|
131
|
+
_CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
|
132
|
+
|
133
|
+
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
|
134
|
+
_invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
|
135
|
+
_invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
|
136
|
+
|
137
|
+
#ifndef _CRT_ERRNO_DEFINED
|
138
|
+
#define _CRT_ERRNO_DEFINED
|
139
|
+
_CRTIMP extern int *__cdecl _errno(void);
|
140
|
+
#define errno (*_errno())
|
141
|
+
errno_t __cdecl _set_errno(int _Value);
|
142
|
+
errno_t __cdecl _get_errno(int *_Value);
|
143
|
+
#endif
|
144
|
+
_CRTIMP unsigned long *__cdecl __doserrno(void);
|
145
|
+
#define _doserrno (*__doserrno())
|
146
|
+
errno_t __cdecl _set_doserrno(unsigned long _Value);
|
147
|
+
errno_t __cdecl _get_doserrno(unsigned long *_Value);
|
148
|
+
#ifdef _MSVCRT_
|
149
|
+
extern char *_sys_errlist[];
|
150
|
+
extern int _sys_nerr;
|
151
|
+
#else
|
152
|
+
_CRTIMP char *_sys_errlist[1];
|
153
|
+
_CRTIMP int _sys_nerr;
|
154
|
+
#endif
|
155
|
+
#if (defined(_X86_) && !defined(__x86_64))
|
156
|
+
_CRTIMP int *__cdecl __p___argc(void);
|
157
|
+
_CRTIMP char ***__cdecl __p___argv(void);
|
158
|
+
_CRTIMP wchar_t ***__cdecl __p___wargv(void);
|
159
|
+
_CRTIMP char ***__cdecl __p__environ(void);
|
160
|
+
_CRTIMP wchar_t ***__cdecl __p__wenviron(void);
|
161
|
+
_CRTIMP char **__cdecl __p__pgmptr(void);
|
162
|
+
_CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
|
163
|
+
#endif
|
164
|
+
#ifndef __argc
|
165
|
+
#ifdef _MSVCRT_
|
166
|
+
extern int __argc;
|
167
|
+
#else
|
168
|
+
#define __argc (*_imp____argc)
|
169
|
+
extern int *_imp____argc;
|
170
|
+
#endif
|
171
|
+
#endif
|
172
|
+
#ifndef __argv
|
173
|
+
#ifdef _MSVCRT_
|
174
|
+
extern char **__argv;
|
175
|
+
#else
|
176
|
+
#define __argv (*_imp____argv)
|
177
|
+
extern char ***_imp____argv;
|
178
|
+
#endif
|
179
|
+
#endif
|
180
|
+
#ifndef __wargv
|
181
|
+
#ifdef _MSVCRT_
|
182
|
+
extern wchar_t **__wargv;
|
183
|
+
#else
|
184
|
+
#define __wargv (*_imp____wargv)
|
185
|
+
extern wchar_t ***_imp____wargv;
|
186
|
+
#endif
|
187
|
+
#endif
|
188
|
+
|
189
|
+
#ifdef _POSIX_
|
190
|
+
extern char **environ;
|
191
|
+
#else
|
192
|
+
#ifndef _environ
|
193
|
+
#ifdef _MSVCRT_
|
194
|
+
extern char **_environ;
|
195
|
+
#else
|
196
|
+
#define _environ (*_imp___environ)
|
197
|
+
extern char ***_imp___environ;
|
198
|
+
#endif
|
199
|
+
#endif
|
200
|
+
|
201
|
+
#ifndef _wenviron
|
202
|
+
#ifdef _MSVCRT_
|
203
|
+
extern wchar_t **_wenviron;
|
204
|
+
#else
|
205
|
+
#define _wenviron (*_imp___wenviron)
|
206
|
+
extern wchar_t ***_imp___wenviron;
|
207
|
+
#endif
|
208
|
+
#endif
|
209
|
+
#endif
|
210
|
+
#ifndef _pgmptr
|
211
|
+
#ifdef _MSVCRT_
|
212
|
+
extern char *_pgmptr;
|
213
|
+
#else
|
214
|
+
#define _pgmptr (*_imp___pgmptr)
|
215
|
+
extern char **_imp___pgmptr;
|
216
|
+
#endif
|
217
|
+
#endif
|
218
|
+
|
219
|
+
#ifndef _wpgmptr
|
220
|
+
#ifdef _MSVCRT_
|
221
|
+
extern wchar_t *_wpgmptr;
|
222
|
+
#else
|
223
|
+
#define _wpgmptr (*_imp___wpgmptr)
|
224
|
+
extern wchar_t **_imp___wpgmptr;
|
225
|
+
#endif
|
226
|
+
#endif
|
227
|
+
errno_t __cdecl _get_pgmptr(char **_Value);
|
228
|
+
errno_t __cdecl _get_wpgmptr(wchar_t **_Value);
|
229
|
+
#ifndef _fmode
|
230
|
+
#ifdef _MSVCRT_
|
231
|
+
extern int _fmode;
|
232
|
+
#else
|
233
|
+
#define _fmode (*_imp___fmode)
|
234
|
+
extern int *_imp___fmode;
|
235
|
+
#endif
|
236
|
+
#endif
|
237
|
+
_CRTIMP errno_t __cdecl _set_fmode(int _Mode);
|
238
|
+
_CRTIMP errno_t __cdecl _get_fmode(int *_PMode);
|
239
|
+
|
240
|
+
#ifndef _osplatform
|
241
|
+
#ifdef _MSVCRT_
|
242
|
+
extern unsigned int _osplatform;
|
243
|
+
#else
|
244
|
+
#define _osplatform (*_imp___osplatform)
|
245
|
+
extern unsigned int *_imp___osplatform;
|
246
|
+
#endif
|
247
|
+
#endif
|
248
|
+
|
249
|
+
#ifndef _osver
|
250
|
+
#ifdef _MSVCRT_
|
251
|
+
extern unsigned int _osver;
|
252
|
+
#else
|
253
|
+
#define _osver (*_imp___osver)
|
254
|
+
extern unsigned int *_imp___osver;
|
255
|
+
#endif
|
256
|
+
#endif
|
257
|
+
|
258
|
+
#ifndef _winver
|
259
|
+
#ifdef _MSVCRT_
|
260
|
+
extern unsigned int _winver;
|
261
|
+
#else
|
262
|
+
#define _winver (*_imp___winver)
|
263
|
+
extern unsigned int *_imp___winver;
|
264
|
+
#endif
|
265
|
+
#endif
|
266
|
+
|
267
|
+
#ifndef _winmajor
|
268
|
+
#ifdef _MSVCRT_
|
269
|
+
extern unsigned int _winmajor;
|
270
|
+
#else
|
271
|
+
#define _winmajor (*_imp___winmajor)
|
272
|
+
extern unsigned int *_imp___winmajor;
|
273
|
+
#endif
|
274
|
+
#endif
|
275
|
+
|
276
|
+
#ifndef _winminor
|
277
|
+
#ifdef _MSVCRT_
|
278
|
+
extern unsigned int _winminor;
|
279
|
+
#else
|
280
|
+
#define _winminor (*_imp___winminor)
|
281
|
+
extern unsigned int *_imp___winminor;
|
282
|
+
#endif
|
283
|
+
#endif
|
284
|
+
|
285
|
+
errno_t __cdecl _get_osplatform(unsigned int *_Value);
|
286
|
+
errno_t __cdecl _get_osver(unsigned int *_Value);
|
287
|
+
errno_t __cdecl _get_winver(unsigned int *_Value);
|
288
|
+
errno_t __cdecl _get_winmajor(unsigned int *_Value);
|
289
|
+
errno_t __cdecl _get_winminor(unsigned int *_Value);
|
290
|
+
#ifndef _countof
|
291
|
+
#ifndef __cplusplus
|
292
|
+
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
293
|
+
#else
|
294
|
+
extern "C++" {
|
295
|
+
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
296
|
+
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
297
|
+
}
|
298
|
+
#endif
|
299
|
+
#endif
|
300
|
+
|
301
|
+
#ifndef _CRT_TERMINATE_DEFINED
|
302
|
+
#define _CRT_TERMINATE_DEFINED
|
303
|
+
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
304
|
+
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
|
305
|
+
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
306
|
+
/* C99 function name */
|
307
|
+
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
|
308
|
+
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
|
309
|
+
{ _exit(status); }
|
310
|
+
#endif
|
311
|
+
|
312
|
+
#pragma push_macro("abort")
|
313
|
+
#undef abort
|
314
|
+
void __cdecl __declspec(noreturn) abort(void);
|
315
|
+
#pragma pop_macro("abort")
|
316
|
+
|
317
|
+
#endif
|
318
|
+
|
319
|
+
_CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask);
|
320
|
+
|
321
|
+
#ifndef _CRT_ABS_DEFINED
|
322
|
+
#define _CRT_ABS_DEFINED
|
323
|
+
int __cdecl abs(int _X);
|
324
|
+
long __cdecl labs(long _X);
|
325
|
+
#endif
|
326
|
+
|
327
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
328
|
+
__int64 __cdecl _abs64(__int64);
|
329
|
+
#endif
|
330
|
+
int __cdecl atexit(void (__cdecl *)(void));
|
331
|
+
#ifndef _CRT_ATOF_DEFINED
|
332
|
+
#define _CRT_ATOF_DEFINED
|
333
|
+
double __cdecl atof(const char *_String);
|
334
|
+
double __cdecl _atof_l(const char *_String,_locale_t _Locale);
|
335
|
+
#endif
|
336
|
+
int __cdecl atoi(const char *_Str);
|
337
|
+
_CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale);
|
338
|
+
long __cdecl atol(const char *_Str);
|
339
|
+
_CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale);
|
340
|
+
#ifndef _CRT_ALGO_DEFINED
|
341
|
+
#define _CRT_ALGO_DEFINED
|
342
|
+
void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
|
343
|
+
void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
|
344
|
+
#endif
|
345
|
+
unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
|
346
|
+
/*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
|
347
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
348
|
+
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
|
349
|
+
#endif
|
350
|
+
div_t __cdecl div(int _Numerator,int _Denominator);
|
351
|
+
char *__cdecl getenv(const char *_VarName);
|
352
|
+
_CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
|
353
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
354
|
+
_CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix);
|
355
|
+
_CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix);
|
356
|
+
_CRTIMP __int64 __cdecl _atoi64(const char *_String);
|
357
|
+
_CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale);
|
358
|
+
_CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix);
|
359
|
+
_CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
|
360
|
+
_CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix);
|
361
|
+
_CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
|
362
|
+
#endif
|
363
|
+
ldiv_t __cdecl ldiv(long _Numerator,long _Denominator);
|
364
|
+
_CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix);
|
365
|
+
int __cdecl mblen(const char *_Ch,size_t _MaxCount);
|
366
|
+
_CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale);
|
367
|
+
_CRTIMP size_t __cdecl _mbstrlen(const char *_Str);
|
368
|
+
_CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale);
|
369
|
+
_CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount);
|
370
|
+
_CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
|
371
|
+
int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes);
|
372
|
+
_CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale);
|
373
|
+
size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount);
|
374
|
+
_CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale);
|
375
|
+
int __cdecl rand(void);
|
376
|
+
_CRTIMP int __cdecl _set_error_mode(int _Mode);
|
377
|
+
void __cdecl srand(unsigned int _Seed);
|
378
|
+
double __cdecl strtod(const char *_Str,char **_EndPtr);
|
379
|
+
float __cdecl strtof(const char *nptr, char **endptr);
|
380
|
+
#if !defined __NO_ISOCEXT /* in libmingwex.a */
|
381
|
+
float __cdecl strtof (const char * __restrict__, char ** __restrict__);
|
382
|
+
long double __cdecl strtold(const char * __restrict__, char ** __restrict__);
|
383
|
+
#endif /* __NO_ISOCEXT */
|
384
|
+
_CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale);
|
385
|
+
long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix);
|
386
|
+
_CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
|
387
|
+
unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix);
|
388
|
+
_CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
|
389
|
+
#ifndef _CRT_SYSTEM_DEFINED
|
390
|
+
#define _CRT_SYSTEM_DEFINED
|
391
|
+
int __cdecl system(const char *_Command);
|
392
|
+
#endif
|
393
|
+
_CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix);
|
394
|
+
int __cdecl wctomb(char *_MbCh,wchar_t _WCh);
|
395
|
+
_CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale);
|
396
|
+
size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount);
|
397
|
+
_CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale);
|
398
|
+
|
399
|
+
#ifndef _CRT_ALLOCATION_DEFINED
|
400
|
+
#define _CRT_ALLOCATION_DEFINED
|
401
|
+
void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
|
402
|
+
void __cdecl free(void *_Memory);
|
403
|
+
void *__cdecl malloc(size_t _Size);
|
404
|
+
void *__cdecl realloc(void *_Memory,size_t _NewSize);
|
405
|
+
_CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
|
406
|
+
//_CRTIMP void __cdecl _aligned_free(void *_Memory);
|
407
|
+
//_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
|
408
|
+
_CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
|
409
|
+
_CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
|
410
|
+
_CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
|
411
|
+
_CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
|
412
|
+
_CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
|
413
|
+
#endif
|
414
|
+
|
415
|
+
#ifndef _WSTDLIB_DEFINED
|
416
|
+
#define _WSTDLIB_DEFINED
|
417
|
+
|
418
|
+
_CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
|
419
|
+
_CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
|
420
|
+
_CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
|
421
|
+
double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
|
422
|
+
float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr);
|
423
|
+
#if !defined __NO_ISOCEXT /* in libmingwex.a */
|
424
|
+
float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
|
425
|
+
long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
|
426
|
+
#endif /* __NO_ISOCEXT */
|
427
|
+
_CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
|
428
|
+
long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
429
|
+
_CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
430
|
+
unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
431
|
+
_CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
432
|
+
_CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
|
433
|
+
#ifndef _CRT_WSYSTEM_DEFINED
|
434
|
+
#define _CRT_WSYSTEM_DEFINED
|
435
|
+
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
|
436
|
+
#endif
|
437
|
+
_CRTIMP double __cdecl _wtof(const wchar_t *_Str);
|
438
|
+
_CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
|
439
|
+
_CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
|
440
|
+
_CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
|
441
|
+
_CRTIMP long __cdecl _wtol(const wchar_t *_Str);
|
442
|
+
_CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
|
443
|
+
|
444
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
445
|
+
_CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
|
446
|
+
_CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
|
447
|
+
_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
|
448
|
+
_CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
|
449
|
+
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
450
|
+
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
451
|
+
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
|
452
|
+
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
|
453
|
+
#endif
|
454
|
+
#endif
|
455
|
+
|
456
|
+
#ifndef _POSIX_
|
457
|
+
#define _CVTBUFSIZE (309+40)
|
458
|
+
_CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes);
|
459
|
+
_CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
|
460
|
+
_CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
|
461
|
+
_CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
|
462
|
+
_CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str);
|
463
|
+
_CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str);
|
464
|
+
_CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str);
|
465
|
+
_CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale);
|
466
|
+
_CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale);
|
467
|
+
_CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale);
|
468
|
+
unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift);
|
469
|
+
unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift);
|
470
|
+
_CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
|
471
|
+
_onexit_t __cdecl _onexit(_onexit_t _Func);
|
472
|
+
|
473
|
+
#ifndef _CRT_PERROR_DEFINED
|
474
|
+
#define _CRT_PERROR_DEFINED
|
475
|
+
void __cdecl perror(const char *_ErrMsg);
|
476
|
+
#endif
|
477
|
+
_CRTIMP int __cdecl _putenv(const char *_EnvString);
|
478
|
+
unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
|
479
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
480
|
+
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
|
481
|
+
#endif
|
482
|
+
unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
|
483
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
484
|
+
unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
|
485
|
+
#endif
|
486
|
+
_CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
|
487
|
+
_CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);
|
488
|
+
_CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
|
489
|
+
|
490
|
+
#ifndef _WSTDLIBP_DEFINED
|
491
|
+
#define _WSTDLIBP_DEFINED
|
492
|
+
_CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
|
493
|
+
_CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
|
494
|
+
#ifndef _CRT_WPERROR_DEFINED
|
495
|
+
#define _CRT_WPERROR_DEFINED
|
496
|
+
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
|
497
|
+
#endif
|
498
|
+
_CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
|
499
|
+
_CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
|
500
|
+
_CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
|
501
|
+
#endif
|
502
|
+
|
503
|
+
_CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
|
504
|
+
/* Not to be confused with _set_error_mode (int). */
|
505
|
+
_CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
|
506
|
+
_CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
|
507
|
+
#endif
|
508
|
+
|
509
|
+
#ifndef NO_OLDNAMES
|
510
|
+
#ifndef _POSIX_
|
511
|
+
#if 0
|
512
|
+
#ifndef __cplusplus
|
513
|
+
#ifndef NOMINMAX
|
514
|
+
#ifndef max
|
515
|
+
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
516
|
+
#endif
|
517
|
+
#ifndef min
|
518
|
+
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
519
|
+
#endif
|
520
|
+
#endif
|
521
|
+
#endif
|
522
|
+
#endif
|
523
|
+
|
524
|
+
#define sys_errlist _sys_errlist
|
525
|
+
#define sys_nerr _sys_nerr
|
526
|
+
#define environ _environ
|
527
|
+
char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
|
528
|
+
char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
|
529
|
+
char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
|
530
|
+
char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix);
|
531
|
+
char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix);
|
532
|
+
int __cdecl putenv(const char *_EnvString);
|
533
|
+
void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
|
534
|
+
char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix);
|
535
|
+
onexit_t __cdecl onexit(onexit_t _Func);
|
536
|
+
#endif
|
537
|
+
#endif
|
538
|
+
|
539
|
+
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
|
540
|
+
|
541
|
+
typedef struct { long long quot, rem; } lldiv_t;
|
542
|
+
|
543
|
+
lldiv_t __cdecl lldiv(long long, long long);
|
544
|
+
|
545
|
+
__CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
|
546
|
+
|
547
|
+
long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
|
548
|
+
unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int);
|
549
|
+
|
550
|
+
/* these are stubs for MS _i64 versions */
|
551
|
+
long long __cdecl atoll (const char *);
|
552
|
+
|
553
|
+
#ifndef __STRICT_ANSI__
|
554
|
+
long long __cdecl wtoll (const wchar_t *);
|
555
|
+
char *__cdecl lltoa (long long, char *, int);
|
556
|
+
char *__cdecl ulltoa (unsigned long long , char *, int);
|
557
|
+
wchar_t *__cdecl lltow (long long, wchar_t *, int);
|
558
|
+
wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int);
|
559
|
+
|
560
|
+
/* __CRT_INLINE using non-ansi functions */
|
561
|
+
__CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); }
|
562
|
+
__CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); }
|
563
|
+
__CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); }
|
564
|
+
__CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); }
|
565
|
+
__CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); }
|
566
|
+
__CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); }
|
567
|
+
#endif /* (__STRICT_ANSI__) */
|
568
|
+
|
569
|
+
#endif /* !__NO_ISOCEXT */
|
570
|
+
|
571
|
+
#ifdef __cplusplus
|
572
|
+
}
|
573
|
+
#endif
|
574
|
+
|
575
|
+
#pragma pack(pop)
|
576
|
+
|
577
|
+
#include <sec_api/stdlib_s.h>
|
578
|
+
#include <malloc.h>
|
579
|
+
|
580
|
+
#endif
|