ffi 1.15.5 → 1.17.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +118 -0
- data/Gemfile +10 -3
- data/README.md +4 -3
- data/Rakefile +25 -10
- data/ext/ffi_c/AbstractMemory.c +99 -74
- data/ext/ffi_c/AbstractMemory.h +3 -2
- data/ext/ffi_c/ArrayType.c +51 -15
- data/ext/ffi_c/ArrayType.h +1 -0
- data/ext/ffi_c/Buffer.c +90 -33
- data/ext/ffi_c/Call.c +29 -12
- data/ext/ffi_c/Call.h +3 -2
- data/ext/ffi_c/DynamicLibrary.c +90 -27
- data/ext/ffi_c/Function.c +244 -98
- data/ext/ffi_c/Function.h +1 -0
- data/ext/ffi_c/FunctionInfo.c +81 -25
- data/ext/ffi_c/LastError.c +29 -11
- data/ext/ffi_c/MappedType.c +66 -23
- data/ext/ffi_c/MappedType.h +0 -2
- data/ext/ffi_c/MemoryPointer.c +36 -9
- data/ext/ffi_c/MethodHandle.c +3 -1
- data/ext/ffi_c/Pointer.c +82 -40
- data/ext/ffi_c/Pointer.h +1 -0
- data/ext/ffi_c/Struct.c +166 -84
- data/ext/ffi_c/Struct.h +7 -4
- data/ext/ffi_c/StructByValue.c +48 -16
- data/ext/ffi_c/StructLayout.c +130 -61
- data/ext/ffi_c/Type.c +120 -51
- data/ext/ffi_c/Type.h +3 -1
- data/ext/ffi_c/Types.c +8 -2
- data/ext/ffi_c/Types.h +0 -1
- data/ext/ffi_c/Variadic.c +71 -26
- data/ext/ffi_c/compat.h +22 -22
- data/ext/ffi_c/extconf.rb +19 -2
- data/ext/ffi_c/ffi.c +4 -0
- data/ext/ffi_c/libffi/.allow-ai-service +0 -0
- data/ext/ffi_c/libffi/.appveyor/site.exp +16 -0
- data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +7 -0
- data/ext/ffi_c/libffi/.appveyor.yml +27 -9
- data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +18 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/build-in-container.sh +4 -6
- data/ext/ffi_c/libffi/.ci/build.sh +124 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/install.sh +14 -7
- data/ext/ffi_c/libffi/.ci/msvs-detect +1103 -0
- data/ext/ffi_c/libffi/{.travis → .ci}/site.exp +5 -3
- data/ext/ffi_c/libffi/.circleci/config.yml +156 -0
- data/ext/ffi_c/libffi/.github/workflows/build.yml +479 -0
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +172 -0
- data/ext/ffi_c/libffi/.gitignore +10 -2
- data/ext/ffi_c/libffi/LICENSE +1 -1
- data/ext/ffi_c/libffi/Makefile.am +12 -5
- data/ext/ffi_c/libffi/Makefile.in +118 -51
- data/ext/ffi_c/libffi/README.md +150 -105
- data/ext/ffi_c/libffi/acinclude.m4 +10 -112
- data/ext/ffi_c/libffi/compile +348 -0
- data/ext/ffi_c/libffi/config.guess +623 -556
- data/ext/ffi_c/libffi/config.sub +75 -34
- data/ext/ffi_c/libffi/configure +4571 -3830
- data/ext/ffi_c/libffi/configure.ac +64 -28
- data/ext/ffi_c/libffi/configure.host +26 -7
- data/ext/ffi_c/libffi/doc/Makefile.in +9 -6
- data/ext/ffi_c/libffi/doc/libffi.texi +82 -33
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +12 -47
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +163 -52
- data/ext/ffi_c/libffi/include/Makefile.am +1 -1
- data/ext/ffi_c/libffi/include/Makefile.in +10 -9
- data/ext/ffi_c/libffi/include/ffi.h.in +55 -60
- data/ext/ffi_c/libffi/include/ffi_cfi.h +21 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +33 -2
- data/ext/ffi_c/libffi/include/tramp.h +45 -0
- data/ext/ffi_c/libffi/install-sh +92 -69
- data/ext/ffi_c/libffi/libffi.map.in +5 -0
- data/ext/ffi_c/libffi/libtool-version +2 -2
- data/ext/ffi_c/libffi/ltmain.sh +518 -333
- data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +18 -14
- data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +108 -72
- data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +76 -45
- data/ext/ffi_c/libffi/m4/ax_prepend_flag.m4 +51 -0
- data/ext/ffi_c/libffi/man/Makefile.in +9 -6
- data/ext/ffi_c/libffi/missing +1 -1
- data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +2 -2
- data/ext/ffi_c/libffi/msvcc.sh +1 -1
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +172 -55
- data/ext/ffi_c/libffi/src/aarch64/internal.h +32 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +331 -87
- data/ext/ffi_c/libffi/src/arc/arcompact.S +169 -94
- data/ext/ffi_c/libffi/src/arc/ffi.c +325 -148
- data/ext/ffi_c/libffi/src/arc/ffitarget.h +14 -0
- data/ext/ffi_c/libffi/src/arm/ffi.c +62 -17
- data/ext/ffi_c/libffi/src/arm/ffitarget.h +3 -3
- data/ext/ffi_c/libffi/src/arm/internal.h +10 -0
- data/ext/ffi_c/libffi/src/arm/sysv.S +113 -42
- data/ext/ffi_c/libffi/src/closures.c +136 -50
- data/ext/ffi_c/libffi/src/debug.c +2 -2
- data/ext/ffi_c/libffi/src/dlmalloc.c +6 -1
- data/ext/ffi_c/libffi/src/ia64/ffi.c +12 -0
- data/ext/ffi_c/libffi/src/ia64/unix.S +20 -2
- data/ext/ffi_c/libffi/src/loongarch64/ffi.c +624 -0
- data/ext/ffi_c/libffi/src/loongarch64/ffitarget.h +82 -0
- data/ext/ffi_c/libffi/src/loongarch64/sysv.S +327 -0
- data/ext/ffi_c/libffi/src/m32r/ffi.c +31 -14
- data/ext/ffi_c/libffi/src/mips/ffi.c +250 -67
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +7 -0
- data/ext/ffi_c/libffi/src/mips/n32.S +193 -33
- data/ext/ffi_c/libffi/src/mips/o32.S +61 -4
- data/ext/ffi_c/libffi/src/moxie/ffi.c +47 -22
- data/ext/ffi_c/libffi/src/or1k/ffi.c +25 -12
- data/ext/ffi_c/libffi/src/pa/ffi.c +32 -33
- data/ext/ffi_c/libffi/src/pa/ffi64.c +614 -0
- data/ext/ffi_c/libffi/src/pa/ffitarget.h +22 -8
- data/ext/ffi_c/libffi/src/pa/hpux32.S +83 -36
- data/ext/ffi_c/libffi/src/pa/hpux64.S +681 -0
- data/ext/ffi_c/libffi/src/pa/linux.S +82 -35
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +36 -24
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1 -1
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +2 -0
- data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +22 -2
- data/ext/ffi_c/libffi/src/riscv/ffi.c +37 -4
- data/ext/ffi_c/libffi/src/sparc/ffi64.c +23 -1
- data/ext/ffi_c/libffi/src/tramp.c +716 -0
- data/ext/ffi_c/libffi/src/types.c +4 -6
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +947 -0
- data/ext/ffi_c/libffi/src/wasm32/ffitarget.h +62 -0
- data/ext/ffi_c/libffi/src/x86/ffi.c +99 -37
- data/ext/ffi_c/libffi/src/x86/ffi64.c +67 -12
- data/ext/ffi_c/libffi/src/x86/ffitarget.h +9 -5
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +44 -1
- data/ext/ffi_c/libffi/src/x86/internal.h +14 -0
- data/ext/ffi_c/libffi/src/x86/internal64.h +14 -0
- data/ext/ffi_c/libffi/src/x86/sysv.S +172 -38
- data/ext/ffi_c/libffi/src/x86/sysv_intel.S +91 -88
- data/ext/ffi_c/libffi/src/x86/unix64.S +96 -6
- data/ext/ffi_c/libffi/src/x86/win64.S +20 -7
- data/ext/ffi_c/libffi/src/xtensa/ffi.c +16 -8
- data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +4 -0
- data/ext/ffi_c/libffi/src/xtensa/sysv.S +26 -16
- data/ext/ffi_c/libffi/testsuite/Makefile.am +79 -114
- data/ext/ffi_c/libffi/testsuite/Makefile.in +89 -121
- data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +54 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +63 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +86 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +48 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test.html +7 -0
- data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +51 -0
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +43 -21
- data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +5 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +41 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +99 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +108 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +114 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +119 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +28 -3
- data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +5 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +60 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +8 -9
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +65 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +67 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +93 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +61 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +63 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +90 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -119
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +220 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +154 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +15 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +3 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +21 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +7 -6
- data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +6 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +18 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +22 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +24 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +29 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +21 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +35 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +19 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +18 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +22 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +13 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +29 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +24 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +28 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +24 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +39 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +25 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +14 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +14 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +14 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +20 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +40 -25
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +40 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +18 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +18 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +19 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +3 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +11 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +22 -3
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +5 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +6 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +6 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +9 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +5 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +10 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +4 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +2 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +3 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +1 -138
- data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +21 -21
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +32 -9
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +12 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +21 -5
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +115 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +10 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +10 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +9 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +11 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +86 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +102 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +101 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +6 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +2 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +1 -0
- data/ext/ffi_c/libffi.bsd.mk +2 -2
- data/ext/ffi_c/libffi.darwin.mk +2 -2
- data/ext/ffi_c/libffi.gnu.mk +2 -2
- data/ext/ffi_c/rbffi.h +1 -1
- data/ffi.gemspec +3 -3
- data/lib/ffi/autopointer.rb +8 -31
- data/lib/ffi/compat.rb +43 -0
- data/lib/ffi/data_converter.rb +2 -2
- data/lib/ffi/dynamic_library.rb +118 -0
- data/lib/ffi/enum.rb +18 -12
- data/lib/ffi/ffi.rb +3 -0
- data/lib/ffi/function.rb +71 -0
- data/lib/ffi/io.rb +2 -2
- data/lib/ffi/library.rb +72 -88
- data/lib/ffi/library_path.rb +109 -0
- data/lib/ffi/managedstruct.rb +1 -1
- data/lib/ffi/platform/aarch64-linux/types.conf +74 -3
- data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
- data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
- data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
- data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
- data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
- data/lib/ffi/platform.rb +15 -13
- data/lib/ffi/pointer.rb +6 -6
- data/lib/ffi/struct.rb +6 -5
- data/lib/ffi/struct_layout.rb +3 -3
- data/lib/ffi/struct_layout_builder.rb +9 -9
- data/lib/ffi/types.rb +65 -37
- data/lib/ffi/variadic.rb +19 -8
- data/lib/ffi/version.rb +1 -1
- data/samples/hello_ractor.rb +11 -0
- data/samples/qsort_ractor.rb +28 -0
- data/sig/ffi/abstract_memory.rbs +165 -0
- data/sig/ffi/auto_pointer.rbs +27 -0
- data/sig/ffi/buffer.rbs +18 -0
- data/sig/ffi/data_converter.rbs +10 -0
- data/sig/ffi/dynamic_library.rbs +9 -0
- data/sig/ffi/enum.rbs +38 -0
- data/sig/ffi/function.rbs +39 -0
- data/sig/ffi/library.rbs +42 -0
- data/sig/ffi/native_type.rbs +86 -0
- data/sig/ffi/pointer.rbs +42 -0
- data/sig/ffi/struct.rbs +76 -0
- data/sig/ffi/struct_by_reference.rbs +11 -0
- data/sig/ffi/struct_by_value.rbs +7 -0
- data/sig/ffi/struct_layout.rbs +9 -0
- data/sig/ffi/struct_layout_builder.rbs +5 -0
- data/sig/ffi/type.rbs +39 -0
- data/sig/ffi.rbs +26 -0
- data.tar.gz.sig +0 -0
- metadata +122 -28
- metadata.gz.sig +1 -0
- data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +0 -14
- data/ext/ffi_c/libffi/.travis/build.sh +0 -142
- data/ext/ffi_c/libffi/.travis.yml +0 -83
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +0 -44
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +0 -44
- /data/ext/ffi_c/libffi/{.travis → .ci}/ar-lib +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/bfin-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/compile +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/m32r-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/moxie-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/or1k-sim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/powerpc-eabisim.exp +0 -0
- /data/ext/ffi_c/libffi/{.travis → .ci}/wine-sim.exp +0 -0
- /data/ext/ffi_c/libffi/testsuite/libffi.call/{pyobjc-tc.c → pyobjc_tc.c} +0 -0
- /data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +0 -0
data/ext/ffi_c/libffi/README.md
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
Status
|
2
2
|
======
|
3
3
|
|
4
|
-
|
5
|
-
[](https://ci.appveyor.com/project/atgreen/libffi)
|
6
|
-
|
7
|
-
libffi-3.4 was released on TBD. Check the libffi web
|
4
|
+
libffi-3.4.6 was released on February 18, 2024. Check the libffi web
|
8
5
|
page for updates: <URL:http://sourceware.org/libffi/>.
|
9
6
|
|
10
7
|
|
@@ -28,7 +25,7 @@ bridge from the interpreter program to compiled code.
|
|
28
25
|
The libffi library provides a portable, high level programming
|
29
26
|
interface to various calling conventions. This allows a programmer to
|
30
27
|
call any function specified by a call interface description at run
|
31
|
-
time.
|
28
|
+
time.
|
32
29
|
|
33
30
|
FFI stands for Foreign Function Interface. A foreign function
|
34
31
|
interface is the popular name for the interface that allows code
|
@@ -55,6 +52,8 @@ tested:
|
|
55
52
|
| Alpha | Linux | GCC |
|
56
53
|
| Alpha | Tru64 | GCC |
|
57
54
|
| ARC | Linux | GCC |
|
55
|
+
| ARC32 | Linux | GCC |
|
56
|
+
| ARC64 | Linux | GCC |
|
58
57
|
| ARM | Linux | GCC |
|
59
58
|
| ARM | iOS | GCC |
|
60
59
|
| ARM | Windows | MSVC |
|
@@ -62,8 +61,10 @@ tested:
|
|
62
61
|
| Blackfin | uClinux | GCC |
|
63
62
|
| CSKY | Linux | GCC |
|
64
63
|
| HPPA | HPUX | GCC |
|
64
|
+
| HPPA64 | HPUX | GCC |
|
65
65
|
| KVX | Linux | GCC |
|
66
66
|
| IA-64 | Linux | GCC |
|
67
|
+
| LoongArch64 | Linux | GCC |
|
67
68
|
| M68K | FreeMiNT | GCC |
|
68
69
|
| M68K | Linux | GCC |
|
69
70
|
| M68K | RTEMS | GCC |
|
@@ -77,6 +78,7 @@ tested:
|
|
77
78
|
| Moxie | Bare metal | GCC |
|
78
79
|
| Nios II | Linux | GCC |
|
79
80
|
| OpenRISC | Linux | GCC |
|
81
|
+
| PowerPC 32-bit | AIX | GCC |
|
80
82
|
| PowerPC 32-bit | AIX | IBM XL C |
|
81
83
|
| PowerPC 64-bit | AIX | IBM XL C |
|
82
84
|
| PowerPC | AMIGA | GCC |
|
@@ -98,6 +100,7 @@ tested:
|
|
98
100
|
| SPARC64 | Solaris | Oracle Solaris Studio C |
|
99
101
|
| TILE-Gx/TILEPro | Linux | GCC |
|
100
102
|
| VAX | OpenBSD/vax | GCC |
|
103
|
+
| WASM32 | Emscripten | EMCC |
|
101
104
|
| X86 | FreeBSD | GCC |
|
102
105
|
| X86 | GNU HURD | GCC |
|
103
106
|
| X86 | Interix | GCC |
|
@@ -108,14 +111,14 @@ tested:
|
|
108
111
|
| X86 | Solaris | GCC |
|
109
112
|
| X86 | Solaris | Oracle Solaris Studio C |
|
110
113
|
| X86 | Windows/Cygwin | GCC |
|
111
|
-
| X86 | Windows/
|
114
|
+
| X86 | Windows/MinGW | GCC |
|
112
115
|
| X86-64 | FreeBSD | GCC |
|
113
116
|
| X86-64 | Linux | GCC |
|
114
117
|
| X86-64 | Linux/x32 | GCC |
|
115
118
|
| X86-64 | OpenBSD | GCC |
|
116
119
|
| X86-64 | Solaris | Oracle Solaris Studio C |
|
117
120
|
| X86-64 | Windows/Cygwin | GCC |
|
118
|
-
| X86-64 | Windows/
|
121
|
+
| X86-64 | Windows/MinGW | GCC |
|
119
122
|
| X86-64 | Mac OSX | GCC |
|
120
123
|
| Xtensa | Linux | GCC |
|
121
124
|
|
@@ -137,15 +140,15 @@ install autoconf, automake and libtool.
|
|
137
140
|
|
138
141
|
You may want to tell configure where to install the libffi library and
|
139
142
|
header files. To do that, use the ``--prefix`` configure switch. Libffi
|
140
|
-
will install under /usr/local by default.
|
143
|
+
will install under /usr/local by default.
|
141
144
|
|
142
145
|
If you want to enable extra run-time debugging checks use the the
|
143
146
|
``--enable-debug`` configure switch. This is useful when your program dies
|
144
|
-
mysteriously while using libffi.
|
147
|
+
mysteriously while using libffi.
|
145
148
|
|
146
149
|
Another useful configure switch is ``--enable-purify-safety``. Using this
|
147
150
|
will add some extra code which will suppress certain warnings when you
|
148
|
-
are using Purify with libffi. Only use this switch when using
|
151
|
+
are using Purify with libffi. Only use this switch when using
|
149
152
|
Purify, as it will slow down the library.
|
150
153
|
|
151
154
|
If you don't want to build documentation, use the ``--disable-docs``
|
@@ -155,7 +158,7 @@ It's also possible to build libffi on Windows platforms with
|
|
155
158
|
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
|
156
159
|
wrapper script during configuration like so:
|
157
160
|
|
158
|
-
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
|
161
|
+
path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CXXCPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
|
159
162
|
|
160
163
|
For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
|
161
164
|
``CXX="path/to/msvcc.sh -m64"``. You may also need to specify
|
@@ -164,7 +167,7 @@ For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
|
|
164
167
|
It is also possible to build libffi on Windows platforms with the LLVM
|
165
168
|
project's clang-cl compiler, like below:
|
166
169
|
|
167
|
-
path/to/configure CC="path/to/msvcc.sh -clang-cl" CXX="path/to/msvcc.sh -clang-cl" LD=link CPP="clang-cl -EP"
|
170
|
+
path/to/configure CC="path/to/msvcc.sh -clang-cl" CXX="path/to/msvcc.sh -clang-cl" LD=link CPP="clang-cl -EP"
|
168
171
|
|
169
172
|
When building with MSVC under a MingW environment, you may need to
|
170
173
|
remove the line in configure that sets 'fix_srcfile_path' to a 'cygpath'
|
@@ -198,14 +201,46 @@ History
|
|
198
201
|
|
199
202
|
See the git log for details at http://github.com/libffi/libffi.
|
200
203
|
|
201
|
-
3.4
|
202
|
-
|
204
|
+
3.4.6 Feb-18-2024
|
205
|
+
Fix long double regression on mips64 and alpha.
|
206
|
+
|
207
|
+
3.4.5 Feb-15-2024
|
208
|
+
Add support for wasm32.
|
209
|
+
Add support for aarch64 branch target identification (bti).
|
210
|
+
Add support for ARCv3: ARC32 & ARC64.
|
211
|
+
Add support for HPPA64, and many HPPA fixes.
|
212
|
+
Add support for Haikuos on PowerPC.
|
213
|
+
Fixes for AIX, loongson, MIPS, power, sparc64, and x86 Darwin.
|
214
|
+
|
215
|
+
3.4.4 Oct-23-2022
|
216
|
+
Important aarch64 fixes, including support for linux builds
|
217
|
+
with Link Time Optimization (-flto).
|
218
|
+
Fix x86 stdcall stack alignment.
|
219
|
+
Fix x86 Windows msvc assembler compatibility.
|
220
|
+
Fix moxie and or1k small structure args.
|
221
|
+
|
222
|
+
3.4.3 Sep-19-2022
|
223
|
+
All struct args are passed by value, regardless of size, as per ABIs.
|
224
|
+
Enable static trampolines for Cygwin.
|
225
|
+
Add support for Loongson's LoongArch64 architecture.
|
226
|
+
Fix x32 static trampolines.
|
227
|
+
Fix 32-bit x86 stdcall stack corruption.
|
228
|
+
Fix ILP32 aarch64 support.
|
229
|
+
|
230
|
+
3.4.2 Jun-28-2021
|
231
|
+
Add static trampoline support for Linux on x86_64 and ARM64.
|
232
|
+
Add support for Alibaba's CSKY architecture.
|
233
|
+
Add support for Kalray's KVX architecture.
|
203
234
|
Add support for Intel Control-flow Enforcement Technology (CET).
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
235
|
+
Add support for ARM Pointer Authentication (PA).
|
236
|
+
Fix 32-bit PPC regression.
|
237
|
+
Fix MIPS soft-float problem.
|
238
|
+
Enable tmpdir override with the $LIBFFI_TMPDIR environment variable.
|
239
|
+
Enable compatibility with MSVC runtime stack checking.
|
240
|
+
Reject float and small integer argument in ffi_prep_cif_var().
|
241
|
+
Callers must promote these types themselves.
|
242
|
+
|
243
|
+
3.3 Nov-23-2019
|
209
244
|
Add RISC-V support.
|
210
245
|
New API in support of GO closures.
|
211
246
|
Add IEEE754 binary128 long double support for 64-bit Power
|
@@ -216,19 +251,19 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
216
251
|
Raw java (gcj) API deprecated.
|
217
252
|
Add pre-built PDF documentation to source distribution.
|
218
253
|
Many new test cases and bug fixes.
|
219
|
-
|
220
|
-
3.2.1 Nov-12-
|
254
|
+
|
255
|
+
3.2.1 Nov-12-2014
|
221
256
|
Build fix for non-iOS AArch64 targets.
|
222
|
-
|
223
|
-
3.2 Nov-11-
|
257
|
+
|
258
|
+
3.2 Nov-11-2014
|
224
259
|
Add C99 Complex Type support (currently only supported on
|
225
260
|
s390).
|
226
261
|
Add support for PASCAL and REGISTER calling conventions on x86
|
227
262
|
Windows/Linux.
|
228
263
|
Add OpenRISC and Cygwin-64 support.
|
229
264
|
Bug fixes.
|
230
|
-
|
231
|
-
3.1 May-19-
|
265
|
+
|
266
|
+
3.1 May-19-2014
|
232
267
|
Add AArch64 (ARM64) iOS support.
|
233
268
|
Add Nios II support.
|
234
269
|
Add m88k and DEC VAX support.
|
@@ -240,8 +275,8 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
240
275
|
failures, and respect the $CC and $CXX environment variables.
|
241
276
|
Archive off the manually maintained ChangeLog in favor of git
|
242
277
|
log.
|
243
|
-
|
244
|
-
3.0.13 Mar-17-
|
278
|
+
|
279
|
+
3.0.13 Mar-17-2013
|
245
280
|
Add Meta support.
|
246
281
|
Add missing Moxie bits.
|
247
282
|
Fix stack alignment bug on 32-bit x86.
|
@@ -250,8 +285,8 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
250
285
|
Fix the install dir location for some platforms when building
|
251
286
|
with GCC (OS X, Solaris).
|
252
287
|
Fix Cygwin regression.
|
253
|
-
|
254
|
-
3.0.12 Feb-11-
|
288
|
+
|
289
|
+
3.0.12 Feb-11-2013
|
255
290
|
Add Moxie support.
|
256
291
|
Add AArch64 support.
|
257
292
|
Add Blackfin support.
|
@@ -262,8 +297,8 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
262
297
|
Add support for native vendor compilers on
|
263
298
|
Solaris and AIX.
|
264
299
|
Work around LLVM/GCC interoperability issue on x86_64.
|
265
|
-
|
266
|
-
3.0.11 Apr-11-
|
300
|
+
|
301
|
+
3.0.11 Apr-11-2012
|
267
302
|
Lots of build fixes.
|
268
303
|
Add support for variadic functions (ffi_prep_cif_var).
|
269
304
|
Add Linux/x32 support.
|
@@ -273,8 +308,8 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
273
308
|
Integration with iOS' xcode build tools.
|
274
309
|
Fix Octeon and MC68881 support.
|
275
310
|
Fix code pessimizations.
|
276
|
-
|
277
|
-
3.0.10 Aug-23-
|
311
|
+
|
312
|
+
3.0.10 Aug-23-2011
|
278
313
|
Add support for Apple's iOS.
|
279
314
|
Add support for ARM VFP ABI.
|
280
315
|
Add RTEMS support for MIPS and M68K.
|
@@ -287,129 +322,129 @@ See the git log for details at http://github.com/libffi/libffi.
|
|
287
322
|
Solaris compiler.
|
288
323
|
Testsuite fixes for Tru64 Unix.
|
289
324
|
Additional platform support.
|
290
|
-
|
291
|
-
3.0.9 Dec-31-
|
325
|
+
|
326
|
+
3.0.9 Dec-31-2009
|
292
327
|
Add AVR32 and win64 ports. Add ARM softfp support.
|
293
328
|
Many fixes for AIX, Solaris, HP-UX, *BSD.
|
294
329
|
Several PowerPC and x86-64 bug fixes.
|
295
330
|
Build DLL for windows.
|
296
|
-
|
297
|
-
3.0.8 Dec-19-
|
331
|
+
|
332
|
+
3.0.8 Dec-19-2008
|
298
333
|
Add *BSD, BeOS, and PA-Linux support.
|
299
|
-
|
300
|
-
3.0.7 Nov-11-
|
334
|
+
|
335
|
+
3.0.7 Nov-11-2008
|
301
336
|
Fix for ppc FreeBSD.
|
302
337
|
(thanks to Andreas Tobler)
|
303
|
-
|
304
|
-
3.0.6 Jul-17-
|
338
|
+
|
339
|
+
3.0.6 Jul-17-2008
|
305
340
|
Fix for closures on sh.
|
306
341
|
Mark the sh/sh64 stack as non-executable.
|
307
342
|
(both thanks to Kaz Kojima)
|
308
|
-
|
309
|
-
3.0.5 Apr-3-
|
343
|
+
|
344
|
+
3.0.5 Apr-3-2008
|
310
345
|
Fix libffi.pc file.
|
311
346
|
Fix #define ARM for IcedTea users.
|
312
347
|
Fix x86 closure bug.
|
313
|
-
|
314
|
-
3.0.4 Feb-24-
|
348
|
+
|
349
|
+
3.0.4 Feb-24-2008
|
315
350
|
Fix x86 OpenBSD configury.
|
316
|
-
|
317
|
-
3.0.3 Feb-22-
|
351
|
+
|
352
|
+
3.0.3 Feb-22-2008
|
318
353
|
Enable x86 OpenBSD thanks to Thomas Heller, and
|
319
354
|
x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
|
320
355
|
Clean up test instruction in README.
|
321
|
-
|
322
|
-
3.0.2 Feb-21-
|
356
|
+
|
357
|
+
3.0.2 Feb-21-2008
|
323
358
|
Improved x86 FreeBSD support.
|
324
359
|
Thanks to Björn König.
|
325
|
-
|
326
|
-
3.0.1 Feb-15-
|
360
|
+
|
361
|
+
3.0.1 Feb-15-2008
|
327
362
|
Fix instruction cache flushing bug on MIPS.
|
328
363
|
Thanks to David Daney.
|
329
|
-
|
330
|
-
3.0.0 Feb-15-
|
364
|
+
|
365
|
+
3.0.0 Feb-15-2008
|
331
366
|
Many changes, mostly thanks to the GCC project.
|
332
367
|
Cygnus Solutions is now Red Hat.
|
333
|
-
|
368
|
+
|
334
369
|
[10 years go by...]
|
335
|
-
|
336
|
-
1.20 Oct-5-
|
370
|
+
|
371
|
+
1.20 Oct-5-1998
|
337
372
|
Raffaele Sena produces ARM port.
|
338
|
-
|
339
|
-
1.19 Oct-5-
|
373
|
+
|
374
|
+
1.19 Oct-5-1998
|
340
375
|
Fixed x86 long double and long long return support.
|
341
376
|
m68k bug fixes from Andreas Schwab.
|
342
377
|
Patch for DU assembler compatibility for the Alpha from Richard
|
343
378
|
Henderson.
|
344
|
-
|
345
|
-
1.18 Apr-17-
|
379
|
+
|
380
|
+
1.18 Apr-17-1998
|
346
381
|
Bug fixes and MIPS configuration changes.
|
347
|
-
|
348
|
-
1.17 Feb-24-
|
382
|
+
|
383
|
+
1.17 Feb-24-1998
|
349
384
|
Bug fixes and m68k port from Andreas Schwab. PowerPC port from
|
350
385
|
Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
|
351
|
-
|
352
|
-
1.16 Feb-11-
|
386
|
+
|
387
|
+
1.16 Feb-11-1998
|
353
388
|
Richard Henderson produces Alpha port.
|
354
|
-
|
355
|
-
1.15 Dec-4-
|
389
|
+
|
390
|
+
1.15 Dec-4-1997
|
356
391
|
Fixed an n32 ABI bug. New libtool, auto* support.
|
357
|
-
|
392
|
+
|
358
393
|
1.14 May-13-97
|
359
394
|
libtool is now used to generate shared and static libraries.
|
360
395
|
Fixed a minor portability problem reported by Russ McManus
|
361
396
|
<mcmanr@eq.gs.com>.
|
362
|
-
|
363
|
-
1.13 Dec-2-
|
397
|
+
|
398
|
+
1.13 Dec-2-1996
|
364
399
|
Added --enable-purify-safety to keep Purify from complaining
|
365
400
|
about certain low level code.
|
366
401
|
Sparc fix for calling functions with < 6 args.
|
367
402
|
Linux x86 a.out fix.
|
368
|
-
|
369
|
-
1.12 Nov-22-
|
370
|
-
Added missing ffi_type_void, needed for supporting void return
|
371
|
-
types. Fixed test case for non MIPS machines. Cygnus Support
|
372
|
-
is now Cygnus Solutions.
|
373
|
-
|
374
|
-
1.11 Oct-30-
|
403
|
+
|
404
|
+
1.12 Nov-22-1996
|
405
|
+
Added missing ffi_type_void, needed for supporting void return
|
406
|
+
types. Fixed test case for non MIPS machines. Cygnus Support
|
407
|
+
is now Cygnus Solutions.
|
408
|
+
|
409
|
+
1.11 Oct-30-1996
|
375
410
|
Added notes about GNU make.
|
376
|
-
|
377
|
-
1.10 Oct-29-
|
411
|
+
|
412
|
+
1.10 Oct-29-1996
|
378
413
|
Added configuration fix for non GNU compilers.
|
379
|
-
|
380
|
-
1.09 Oct-29-
|
381
|
-
Added --enable-debug configure switch. Clean-ups based on LCLint
|
382
|
-
feedback. ffi_mips.h is always installed. Many configuration
|
414
|
+
|
415
|
+
1.09 Oct-29-1996
|
416
|
+
Added --enable-debug configure switch. Clean-ups based on LCLint
|
417
|
+
feedback. ffi_mips.h is always installed. Many configuration
|
383
418
|
fixes. Fixed ffitest.c for sparc builds.
|
384
|
-
|
385
|
-
1.08 Oct-15-
|
419
|
+
|
420
|
+
1.08 Oct-15-1996
|
386
421
|
Fixed n32 problem. Many clean-ups.
|
387
|
-
|
388
|
-
1.07 Oct-14-
|
422
|
+
|
423
|
+
1.07 Oct-14-1996
|
389
424
|
Gordon Irlam rewrites v8.S again. Bug fixes.
|
390
|
-
|
391
|
-
1.06 Oct-14-
|
392
|
-
Gordon Irlam improved the sparc port.
|
393
|
-
|
394
|
-
1.05 Oct-14-
|
425
|
+
|
426
|
+
1.06 Oct-14-1996
|
427
|
+
Gordon Irlam improved the sparc port.
|
428
|
+
|
429
|
+
1.05 Oct-14-1996
|
395
430
|
Interface changes based on feedback.
|
396
|
-
|
397
|
-
1.04 Oct-11-
|
431
|
+
|
432
|
+
1.04 Oct-11-1996
|
398
433
|
Sparc port complete (modulo struct passing bug).
|
399
|
-
|
400
|
-
1.03 Oct-10-
|
434
|
+
|
435
|
+
1.03 Oct-10-1996
|
401
436
|
Passing struct args, and returning struct values works for
|
402
437
|
all architectures/calling conventions. Expanded tests.
|
403
|
-
|
404
|
-
1.02 Oct-9-
|
438
|
+
|
439
|
+
1.02 Oct-9-1996
|
405
440
|
Added SGI n32 support. Fixed bugs in both o32 and Linux support.
|
406
441
|
Added "make test".
|
407
|
-
|
408
|
-
1.01 Oct-8-
|
442
|
+
|
443
|
+
1.01 Oct-8-1996
|
409
444
|
Fixed float passing bug in mips version. Restructured some
|
410
445
|
of the code. Builds cleanly with SGI tools.
|
411
|
-
|
412
|
-
1.00 Oct-7-
|
446
|
+
|
447
|
+
1.00 Oct-7-1996
|
413
448
|
First release. No public announcement.
|
414
449
|
|
415
450
|
Authors & Credits
|
@@ -437,9 +472,12 @@ developers:
|
|
437
472
|
avr32 Bradley Smith
|
438
473
|
blackfin Alexandre Keunecke I. de Mendonca
|
439
474
|
cris Simon Posnjak, Hans-Peter Nilsson
|
440
|
-
csky
|
475
|
+
csky Ma Jun, Zhang Wenmeng
|
441
476
|
frv Anthony Green
|
442
477
|
ia64 Hans Boehm
|
478
|
+
kvx Yann Sionneau
|
479
|
+
loongarch64 Cheng Lulu, Xi Ruoyao, Xu Hao,
|
480
|
+
Zhang Wenlong, Pan Xuefeng
|
443
481
|
m32r Kazuhiro Inaoka
|
444
482
|
m68k Andreas Schwab
|
445
483
|
m88k Miod Vallat
|
@@ -451,6 +489,7 @@ developers:
|
|
451
489
|
nios ii Sandra Loosemore
|
452
490
|
openrisc Sebastian Macke
|
453
491
|
pa Randolph Chung, Dave Anglin, Andreas Tobler
|
492
|
+
pa64 Dave Anglin
|
454
493
|
powerpc Geoffrey Keating, Andreas Tobler,
|
455
494
|
David Edelsohn, John Hornkvist
|
456
495
|
powerpc64 Jakub Jelinek
|
@@ -461,6 +500,7 @@ developers:
|
|
461
500
|
sparc Anthony Green, Gordon Irlam
|
462
501
|
tile-gx/tilepro Walter Lee
|
463
502
|
vax Miod Vallat
|
503
|
+
wasm32 Hood Chatham, Brion Vibber, Kleis Auke Wolthuizen
|
464
504
|
x86 Anthony Green, Jon Beniston
|
465
505
|
x86-64 Bo Thorsen
|
466
506
|
xtensa Chris Zankel
|
@@ -481,6 +521,11 @@ Alex Oliva solved the executable page problem for SElinux.
|
|
481
521
|
The list above is almost certainly incomplete and inaccurate. I'm
|
482
522
|
happy to make corrections or additions upon request.
|
483
523
|
|
484
|
-
If you have a problem, or have found a bug, please
|
485
|
-
|
486
|
-
|
524
|
+
If you have a problem, or have found a bug, please file an issue on
|
525
|
+
our issue tracker at https://github.com/libffi/libffi/issues.
|
526
|
+
|
527
|
+
The author can be reached at green@moxielogic.com.
|
528
|
+
|
529
|
+
To subscribe/unsubscribe to our mailing lists, visit:
|
530
|
+
https://sourceware.org/mailman/listinfo/libffi-announce
|
531
|
+
https://sourceware.org/mailman/listinfo/libffi-discuss
|
@@ -45,16 +45,16 @@ else
|
|
45
45
|
|
46
46
|
# Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
|
47
47
|
AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon,
|
48
|
-
[
|
49
|
-
[#include <sys/types.h>
|
48
|
+
[AC_COMPILE_IFELSE(
|
49
|
+
[AC_LANG_PROGRAM([[#include <sys/types.h>
|
50
50
|
#include <sys/mman.h>
|
51
51
|
#include <unistd.h>
|
52
52
|
|
53
53
|
#ifndef MAP_ANONYMOUS
|
54
54
|
#define MAP_ANONYMOUS MAP_ANON
|
55
55
|
#endif
|
56
|
-
],
|
57
|
-
[int n = MAP_ANONYMOUS;],
|
56
|
+
]],
|
57
|
+
[[int n = MAP_ANONYMOUS;]])],
|
58
58
|
ac_cv_decl_map_anon=yes,
|
59
59
|
ac_cv_decl_map_anon=no)])
|
60
60
|
|
@@ -104,7 +104,7 @@ dnl See docs/html/17_intro/configury.html#enable for documentation.
|
|
104
104
|
dnl
|
105
105
|
m4_define([LIBFFI_ENABLE],[dnl
|
106
106
|
m4_define([_g_switch],[--enable-$1])dnl
|
107
|
-
m4_define([_g_help],[
|
107
|
+
m4_define([_g_help],[AS_HELP_STRING([_g_switch$3],[$4 @<:@default=$2@:>@])])dnl
|
108
108
|
AC_ARG_ENABLE($1,_g_help,
|
109
109
|
m4_bmatch([$5],
|
110
110
|
[^permit ],
|
@@ -152,109 +152,7 @@ AC_DEFUN([LIBFFI_CHECK_LINKER_FEATURES], [
|
|
152
152
|
# by now (in libtool), but require it now just to be safe...
|
153
153
|
test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
|
154
154
|
test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
|
155
|
-
AC_REQUIRE([
|
156
|
-
AC_REQUIRE([AC_PROG_AWK])
|
157
|
-
|
158
|
-
# The name set by libtool depends on the version of libtool. Shame on us
|
159
|
-
# for depending on an impl detail, but c'est la vie. Older versions used
|
160
|
-
# ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
|
161
|
-
# top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
|
162
|
-
# makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
|
163
|
-
# set (hence we're using an older libtool), then set it.
|
164
|
-
if test x${with_gnu_ld+set} != xset; then
|
165
|
-
if test x${ac_cv_prog_gnu_ld+set} != xset; then
|
166
|
-
# We got through "ac_require(ac_prog_ld)" and still not set? Huh?
|
167
|
-
with_gnu_ld=no
|
168
|
-
else
|
169
|
-
with_gnu_ld=$ac_cv_prog_gnu_ld
|
170
|
-
fi
|
171
|
-
fi
|
172
|
-
|
173
|
-
# Start by getting the version number. I think the libtool test already
|
174
|
-
# does some of this, but throws away the result.
|
175
|
-
libat_ld_is_gold=no
|
176
|
-
if $LD --version 2>/dev/null | grep 'GNU gold'> /dev/null 2>&1; then
|
177
|
-
libat_ld_is_gold=yes
|
178
|
-
fi
|
179
|
-
changequote(,)
|
180
|
-
ldver=`$LD --version 2>/dev/null |
|
181
|
-
sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
|
182
|
-
changequote([,])
|
183
|
-
libat_gnu_ld_version=`echo $ldver | \
|
184
|
-
$AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
|
185
|
-
|
186
|
-
# Set --gc-sections.
|
187
|
-
if test "$with_gnu_ld" = "notbroken"; then
|
188
|
-
# GNU ld it is! Joy and bunny rabbits!
|
189
|
-
|
190
|
-
# All these tests are for C++; save the language and the compiler flags.
|
191
|
-
# Need to do this so that g++ won't try to link in libstdc++
|
192
|
-
ac_test_CFLAGS="${CFLAGS+set}"
|
193
|
-
ac_save_CFLAGS="$CFLAGS"
|
194
|
-
CFLAGS='-x c++ -Wl,--gc-sections'
|
195
|
-
|
196
|
-
# Check for -Wl,--gc-sections
|
197
|
-
# XXX This test is broken at the moment, as symbols required for linking
|
198
|
-
# are now in libsupc++ (not built yet). In addition, this test has
|
199
|
-
# cored on solaris in the past. In addition, --gc-sections doesn't
|
200
|
-
# really work at the moment (keeps on discarding used sections, first
|
201
|
-
# .eh_frame and now some of the glibc sections for iconv).
|
202
|
-
# Bzzzzt. Thanks for playing, maybe next time.
|
203
|
-
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
|
204
|
-
AC_TRY_RUN([
|
205
|
-
int main(void)
|
206
|
-
{
|
207
|
-
try { throw 1; }
|
208
|
-
catch (...) { };
|
209
|
-
return 0;
|
210
|
-
}
|
211
|
-
], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
|
212
|
-
if test "$ac_test_CFLAGS" = set; then
|
213
|
-
CFLAGS="$ac_save_CFLAGS"
|
214
|
-
else
|
215
|
-
# this is the suspicious part
|
216
|
-
CFLAGS=''
|
217
|
-
fi
|
218
|
-
if test "$ac_sectionLDflags" = "yes"; then
|
219
|
-
SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
|
220
|
-
fi
|
221
|
-
AC_MSG_RESULT($ac_sectionLDflags)
|
222
|
-
fi
|
223
|
-
|
224
|
-
# Set linker optimization flags.
|
225
|
-
if test x"$with_gnu_ld" = x"yes"; then
|
226
|
-
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
|
227
|
-
fi
|
228
|
-
|
229
|
-
AC_SUBST(SECTION_LDFLAGS)
|
230
|
-
AC_SUBST(OPT_LDFLAGS)
|
231
|
-
])
|
232
|
-
|
233
|
-
|
234
|
-
dnl
|
235
|
-
dnl If GNU ld is in use, check to see if tricky linker opts can be used. If
|
236
|
-
dnl the native linker is in use, all variables will be defined to something
|
237
|
-
dnl safe (like an empty string).
|
238
|
-
dnl
|
239
|
-
dnl Defines:
|
240
|
-
dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
|
241
|
-
dnl OPT_LDFLAGS='-Wl,-O1' if possible
|
242
|
-
dnl LD (as a side effect of testing)
|
243
|
-
dnl Sets:
|
244
|
-
dnl with_gnu_ld
|
245
|
-
dnl libat_ld_is_gold (possibly)
|
246
|
-
dnl libat_gnu_ld_version (possibly)
|
247
|
-
dnl
|
248
|
-
dnl The last will be a single integer, e.g., version 1.23.45.0.67.89 will
|
249
|
-
dnl set libat_gnu_ld_version to 12345. Zeros cause problems.
|
250
|
-
dnl
|
251
|
-
AC_DEFUN([LIBFFI_CHECK_LINKER_FEATURES], [
|
252
|
-
# If we're not using GNU ld, then there's no point in even trying these
|
253
|
-
# tests. Check for that first. We should have already tested for gld
|
254
|
-
# by now (in libtool), but require it now just to be safe...
|
255
|
-
test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
|
256
|
-
test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
|
257
|
-
AC_REQUIRE([AC_PROG_LD])
|
155
|
+
AC_REQUIRE([LT_PATH_LD])
|
258
156
|
AC_REQUIRE([AC_PROG_AWK])
|
259
157
|
|
260
158
|
# The name set by libtool depends on the version of libtool. Shame on us
|
@@ -307,14 +205,14 @@ AC_DEFUN([LIBFFI_CHECK_LINKER_FEATURES], [
|
|
307
205
|
# .eh_frame and now some of the glibc sections for iconv).
|
308
206
|
# Bzzzzt. Thanks for playing, maybe next time.
|
309
207
|
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
|
310
|
-
|
208
|
+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
311
209
|
int main(void)
|
312
210
|
{
|
313
211
|
try { throw 1; }
|
314
212
|
catch (...) { };
|
315
213
|
return 0;
|
316
214
|
}
|
317
|
-
],
|
215
|
+
]])],[ac_sectionLDflags=yes],[ac_sectionLDflags=no],[ac_sectionLDflags=yes])
|
318
216
|
if test "$ac_test_CFLAGS" = set; then
|
319
217
|
CFLAGS="$ac_save_CFLAGS"
|
320
218
|
else
|
@@ -401,7 +299,7 @@ if test $enable_symvers != no; then
|
|
401
299
|
AC_MSG_CHECKING([for shared libgcc])
|
402
300
|
ac_save_CFLAGS="$CFLAGS"
|
403
301
|
CFLAGS=' -lgcc_s'
|
404
|
-
|
302
|
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[libat_shared_libgcc=yes],[libat_shared_libgcc=no])
|
405
303
|
CFLAGS="$ac_save_CFLAGS"
|
406
304
|
if test $libat_shared_libgcc = no; then
|
407
305
|
cat > conftest.c <<EOF
|
@@ -416,7 +314,7 @@ changequote([,])dnl
|
|
416
314
|
rm -f conftest.c conftest.so
|
417
315
|
if test x${libat_libgcc_s_suffix+set} = xset; then
|
418
316
|
CFLAGS=" -lgcc_s$libat_libgcc_s_suffix"
|
419
|
-
|
317
|
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[libat_shared_libgcc=yes],[])
|
420
318
|
CFLAGS="$ac_save_CFLAGS"
|
421
319
|
fi
|
422
320
|
fi
|