ffi 1.9.24 → 1.16.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (457) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +348 -0
  4. data/Gemfile +4 -5
  5. data/README.md +44 -17
  6. data/Rakefile +74 -148
  7. data/ext/ffi_c/AbstractMemory.c +89 -70
  8. data/ext/ffi_c/AbstractMemory.h +3 -2
  9. data/ext/ffi_c/ArrayType.c +49 -13
  10. data/ext/ffi_c/ArrayType.h +1 -0
  11. data/ext/ffi_c/Buffer.c +90 -38
  12. data/ext/ffi_c/Call.c +55 -56
  13. data/ext/ffi_c/Call.h +12 -6
  14. data/ext/ffi_c/ClosurePool.c +333 -0
  15. data/ext/ffi_c/{Closure.h → ClosurePool.h} +25 -13
  16. data/ext/ffi_c/DynamicLibrary.c +91 -33
  17. data/ext/ffi_c/Function.c +306 -235
  18. data/ext/ffi_c/Function.h +3 -5
  19. data/ext/ffi_c/FunctionInfo.c +87 -32
  20. data/ext/ffi_c/LastError.c +74 -15
  21. data/ext/ffi_c/LongDouble.c +12 -10
  22. data/ext/ffi_c/LongDouble.h +0 -4
  23. data/ext/ffi_c/MappedType.c +66 -23
  24. data/ext/ffi_c/MappedType.h +0 -2
  25. data/ext/ffi_c/MemoryPointer.c +37 -15
  26. data/ext/ffi_c/MemoryPointer.h +0 -4
  27. data/ext/ffi_c/MethodHandle.c +265 -38
  28. data/ext/ffi_c/MethodHandle.h +3 -2
  29. data/ext/ffi_c/Platform.c +5 -56
  30. data/ext/ffi_c/Pointer.c +93 -55
  31. data/ext/ffi_c/Pointer.h +1 -4
  32. data/ext/ffi_c/Struct.c +202 -134
  33. data/ext/ffi_c/Struct.h +18 -9
  34. data/ext/ffi_c/StructByValue.c +50 -23
  35. data/ext/ffi_c/StructLayout.c +135 -64
  36. data/ext/ffi_c/Thread.c +4 -228
  37. data/ext/ffi_c/Thread.h +1 -20
  38. data/ext/ffi_c/Type.c +105 -55
  39. data/ext/ffi_c/Type.h +3 -2
  40. data/ext/ffi_c/Types.c +8 -9
  41. data/ext/ffi_c/Types.h +3 -4
  42. data/ext/ffi_c/Variadic.c +88 -47
  43. data/ext/ffi_c/compat.h +26 -22
  44. data/ext/ffi_c/extconf.rb +75 -32
  45. data/ext/ffi_c/ffi.c +9 -10
  46. data/ext/ffi_c/libffi/.appveyor/site.exp +16 -0
  47. data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +7 -0
  48. data/ext/ffi_c/libffi/.appveyor.yml +53 -19
  49. data/ext/ffi_c/libffi/.ci/bfin-sim.exp +58 -0
  50. data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +18 -0
  51. data/ext/ffi_c/libffi/.ci/build-in-container.sh +10 -0
  52. data/ext/ffi_c/libffi/.ci/build.sh +124 -0
  53. data/ext/ffi_c/libffi/.ci/install.sh +78 -0
  54. data/ext/ffi_c/libffi/.ci/m32r-sim.exp +58 -0
  55. data/ext/ffi_c/libffi/{.travis → .ci}/moxie-sim.exp +1 -1
  56. data/ext/ffi_c/libffi/.ci/msvs-detect +1103 -0
  57. data/ext/ffi_c/libffi/.ci/or1k-sim.exp +58 -0
  58. data/ext/ffi_c/libffi/.ci/powerpc-eabisim.exp +58 -0
  59. data/ext/ffi_c/libffi/.ci/site.exp +29 -0
  60. data/ext/ffi_c/libffi/.ci/wine-sim.exp +55 -0
  61. data/ext/ffi_c/libffi/.circleci/config.yml +156 -0
  62. data/ext/ffi_c/libffi/.gitattributes +4 -0
  63. data/ext/ffi_c/libffi/.github/workflows/build.yml +460 -0
  64. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +171 -0
  65. data/ext/ffi_c/libffi/.gitignore +10 -2
  66. data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
  67. data/ext/ffi_c/libffi/LICENSE +1 -1
  68. data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +5 -4
  69. data/ext/ffi_c/libffi/Makefile.am +64 -73
  70. data/ext/ffi_c/libffi/Makefile.in +553 -235
  71. data/ext/ffi_c/libffi/README.md +165 -100
  72. data/ext/ffi_c/libffi/acinclude.m4 +10 -112
  73. data/ext/ffi_c/libffi/compile +348 -0
  74. data/ext/ffi_c/libffi/config.guess +950 -662
  75. data/ext/ffi_c/libffi/config.sub +1362 -1306
  76. data/ext/ffi_c/libffi/configure +4909 -4096
  77. data/ext/ffi_c/libffi/configure.ac +93 -32
  78. data/ext/ffi_c/libffi/configure.host +76 -28
  79. data/ext/ffi_c/libffi/doc/Makefile.in +15 -8
  80. data/ext/ffi_c/libffi/doc/libffi.texi +107 -46
  81. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  82. data/ext/ffi_c/libffi/fficonfig.h.in +22 -44
  83. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +165 -56
  84. data/ext/ffi_c/libffi/include/Makefile.am +1 -1
  85. data/ext/ffi_c/libffi/include/Makefile.in +17 -12
  86. data/ext/ffi_c/libffi/include/ffi.h.in +64 -48
  87. data/ext/ffi_c/libffi/include/ffi_cfi.h +21 -0
  88. data/ext/ffi_c/libffi/include/ffi_common.h +34 -1
  89. data/ext/ffi_c/libffi/include/tramp.h +45 -0
  90. data/ext/ffi_c/libffi/install-sh +107 -74
  91. data/ext/ffi_c/libffi/libffi.map.in +8 -12
  92. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
  93. data/ext/ffi_c/libffi/libtool-version +2 -2
  94. data/ext/ffi_c/libffi/ltmain.sh +576 -284
  95. data/ext/ffi_c/libffi/m4/asmcfi.m4 +1 -1
  96. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
  97. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +18 -14
  98. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +108 -72
  99. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
  100. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +76 -44
  101. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
  102. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
  103. data/ext/ffi_c/libffi/m4/ax_prepend_flag.m4 +51 -0
  104. data/ext/ffi_c/libffi/make_sunver.pl +333 -0
  105. data/ext/ffi_c/libffi/man/Makefile.in +15 -8
  106. data/ext/ffi_c/libffi/missing +8 -8
  107. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
  108. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
  109. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
  110. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
  111. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +511 -0
  112. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
  113. data/ext/ffi_c/libffi/msvcc.sh +39 -14
  114. data/ext/ffi_c/libffi/src/aarch64/ffi.c +286 -98
  115. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +19 -3
  116. data/ext/ffi_c/libffi/src/aarch64/internal.h +33 -0
  117. data/ext/ffi_c/libffi/src/aarch64/sysv.S +142 -37
  118. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
  119. data/ext/ffi_c/libffi/src/arc/arcompact.S +169 -94
  120. data/ext/ffi_c/libffi/src/arc/ffi.c +325 -148
  121. data/ext/ffi_c/libffi/src/arc/ffitarget.h +14 -0
  122. data/ext/ffi_c/libffi/src/arm/ffi.c +112 -10
  123. data/ext/ffi_c/libffi/src/arm/ffitarget.h +8 -1
  124. data/ext/ffi_c/libffi/src/arm/internal.h +10 -0
  125. data/ext/ffi_c/libffi/src/arm/sysv.S +117 -44
  126. data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
  127. data/ext/ffi_c/libffi/src/closures.c +189 -48
  128. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  129. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  130. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  131. data/ext/ffi_c/libffi/src/dlmalloc.c +6 -1
  132. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  133. data/ext/ffi_c/libffi/src/ia64/ffi.c +12 -0
  134. data/ext/ffi_c/libffi/src/ia64/unix.S +20 -2
  135. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  136. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  137. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  138. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  139. data/ext/ffi_c/libffi/src/loongarch64/ffi.c +621 -0
  140. data/ext/ffi_c/libffi/src/loongarch64/ffitarget.h +82 -0
  141. data/ext/ffi_c/libffi/src/loongarch64/sysv.S +327 -0
  142. data/ext/ffi_c/libffi/src/m32r/ffi.c +31 -14
  143. data/ext/ffi_c/libffi/src/metag/ffi.c +1 -1
  144. data/ext/ffi_c/libffi/src/mips/ffi.c +245 -66
  145. data/ext/ffi_c/libffi/src/mips/ffitarget.h +8 -1
  146. data/ext/ffi_c/libffi/src/mips/n32.S +137 -28
  147. data/ext/ffi_c/libffi/src/mips/o32.S +63 -4
  148. data/ext/ffi_c/libffi/src/moxie/ffi.c +48 -23
  149. data/ext/ffi_c/libffi/src/or1k/ffi.c +25 -12
  150. data/ext/ffi_c/libffi/src/pa/ffi.c +62 -108
  151. data/ext/ffi_c/libffi/src/pa/ffi64.c +614 -0
  152. data/ext/ffi_c/libffi/src/pa/ffitarget.h +20 -11
  153. data/ext/ffi_c/libffi/src/pa/hpux32.S +87 -38
  154. data/ext/ffi_c/libffi/src/pa/hpux64.S +681 -0
  155. data/ext/ffi_c/libffi/src/pa/linux.S +109 -39
  156. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -4
  157. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
  158. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +211 -32
  159. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
  160. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
  161. data/ext/ffi_c/libffi/src/powerpc/linux64.S +93 -28
  162. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +83 -5
  163. data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
  164. data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
  165. data/ext/ffi_c/libffi/src/prep_cif.c +26 -4
  166. data/ext/ffi_c/libffi/src/riscv/ffi.c +79 -10
  167. data/ext/ffi_c/libffi/src/riscv/ffitarget.h +1 -0
  168. data/ext/ffi_c/libffi/src/riscv/sysv.S +86 -7
  169. data/ext/ffi_c/libffi/src/sparc/ffi64.c +16 -0
  170. data/ext/ffi_c/libffi/src/tramp.c +716 -0
  171. data/ext/ffi_c/libffi/src/wasm32/ffi.c +934 -0
  172. data/ext/ffi_c/libffi/src/wasm32/ffitarget.h +62 -0
  173. data/ext/ffi_c/libffi/src/x86/ffi.c +128 -49
  174. data/ext/ffi_c/libffi/src/x86/ffi64.c +89 -23
  175. data/ext/ffi_c/libffi/src/x86/ffitarget.h +21 -4
  176. data/ext/ffi_c/libffi/src/x86/ffiw64.c +63 -10
  177. data/ext/ffi_c/libffi/src/x86/internal.h +14 -0
  178. data/ext/ffi_c/libffi/src/x86/internal64.h +14 -0
  179. data/ext/ffi_c/libffi/src/x86/sysv.S +274 -45
  180. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +998 -0
  181. data/ext/ffi_c/libffi/src/x86/unix64.S +190 -4
  182. data/ext/ffi_c/libffi/src/x86/win64.S +32 -10
  183. data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
  184. data/ext/ffi_c/libffi/src/xtensa/ffi.c +16 -8
  185. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +4 -0
  186. data/ext/ffi_c/libffi/src/xtensa/sysv.S +26 -16
  187. data/ext/ffi_c/libffi/testsuite/Makefile.am +127 -109
  188. data/ext/ffi_c/libffi/testsuite/Makefile.in +144 -88
  189. data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +54 -0
  190. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +63 -0
  191. data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +80 -0
  192. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +48 -0
  193. data/ext/ffi_c/libffi/testsuite/emscripten/test.html +7 -0
  194. data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +51 -0
  195. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +71 -25
  196. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +2 -2
  197. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
  198. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +5 -4
  199. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
  200. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +5 -1
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +41 -0
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +28 -3
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +9 -8
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +3 -0
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +5 -0
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +4 -0
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +4 -0
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +60 -0
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +8 -9
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +2 -2
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +2 -2
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +2 -2
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +1 -1
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +63 -0
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +65 -0
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +65 -0
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +67 -0
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +67 -0
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +93 -0
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +61 -0
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +63 -0
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +90 -0
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -119
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +220 -0
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +154 -0
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +13 -0
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +11 -0
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +15 -0
  230. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  231. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +3 -2
  232. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +2 -0
  233. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +2 -0
  234. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +21 -1
  235. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +2 -0
  236. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +2 -0
  237. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +2 -0
  238. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +7 -6
  239. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +6 -0
  240. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +18 -0
  241. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +22 -0
  242. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +24 -0
  243. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +29 -0
  244. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +4 -0
  245. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +19 -1
  246. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +21 -1
  247. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +35 -3
  248. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +13 -0
  249. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +19 -0
  250. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +13 -0
  251. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +13 -0
  252. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +18 -0
  253. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +22 -0
  254. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +13 -0
  255. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +29 -1
  256. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +19 -1
  257. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +24 -0
  258. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +28 -1
  259. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +24 -2
  260. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +39 -1
  261. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +25 -1
  262. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +14 -0
  263. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +14 -1
  264. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +14 -2
  265. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +19 -1
  266. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +19 -1
  267. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +20 -1
  268. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +40 -25
  269. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +40 -3
  270. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +19 -1
  271. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +18 -1
  272. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +18 -3
  273. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +18 -1
  274. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +18 -1
  275. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +19 -1
  276. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +19 -1
  277. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +3 -1
  278. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +9 -1
  279. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +4 -0
  280. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +11 -1
  281. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +22 -3
  282. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +5 -1
  283. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +6 -1
  284. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +9 -1
  285. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +9 -1
  286. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +6 -2
  287. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +9 -1
  288. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +5 -0
  289. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +10 -0
  290. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +3 -0
  291. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +2 -0
  292. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +3 -0
  293. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +11 -0
  294. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +3 -0
  295. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +4 -0
  296. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +4 -0
  297. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +4 -0
  298. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +2 -0
  299. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +3 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +1 -0
  301. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +24 -22
  302. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +32 -9
  303. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +1 -1
  304. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +12 -0
  305. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +21 -5
  306. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +86 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +115 -0
  308. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +10 -1
  309. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +10 -1
  310. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +9 -0
  311. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +9 -0
  312. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +11 -0
  313. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +9 -0
  314. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +11 -0
  315. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +11 -0
  316. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +86 -0
  317. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +102 -0
  318. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +101 -0
  319. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +1 -1
  320. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +1 -1
  321. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +6 -1
  322. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +2 -1
  323. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +1 -0
  324. data/ext/ffi_c/libffi.bsd.mk +2 -2
  325. data/ext/ffi_c/libffi.darwin.mk +1 -1
  326. data/ext/ffi_c/libffi.gnu.mk +2 -2
  327. data/ext/ffi_c/rbffi.h +1 -3
  328. data/ffi.gemspec +15 -9
  329. data/lib/ffi/abstract_memory.rb +44 -0
  330. data/lib/ffi/autopointer.rb +8 -23
  331. data/lib/ffi/compat.rb +43 -0
  332. data/lib/ffi/data_converter.rb +67 -0
  333. data/lib/ffi/dynamic_library.rb +89 -0
  334. data/lib/ffi/enum.rb +18 -11
  335. data/lib/ffi/ffi.rb +6 -0
  336. data/lib/ffi/function.rb +71 -0
  337. data/lib/ffi/io.rb +3 -3
  338. data/lib/ffi/library.rb +65 -77
  339. data/lib/ffi/library_path.rb +109 -0
  340. data/lib/ffi/managedstruct.rb +3 -3
  341. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  342. data/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  343. data/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  344. data/lib/ffi/platform/aarch64-linux/types.conf +81 -81
  345. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  346. data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
  347. data/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  348. data/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  349. data/lib/ffi/platform/arm-linux/types.conf +110 -82
  350. data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
  351. data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
  352. data/lib/ffi/platform/i386-cygwin/types.conf +1 -1
  353. data/lib/ffi/platform/i386-darwin/types.conf +63 -63
  354. data/lib/ffi/platform/i386-freebsd/types.conf +89 -89
  355. data/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  356. data/lib/ffi/platform/i386-gnu/types.conf +84 -84
  357. data/lib/ffi/platform/i386-linux/types.conf +77 -77
  358. data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
  359. data/lib/ffi/platform/i386-openbsd/types.conf +89 -89
  360. data/lib/ffi/platform/i386-solaris/types.conf +96 -96
  361. data/lib/ffi/platform/i386-windows/types.conf +43 -96
  362. data/lib/ffi/platform/ia64-linux/types.conf +79 -79
  363. data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
  364. data/lib/ffi/platform/mips-linux/types.conf +79 -79
  365. data/lib/ffi/platform/mips64-linux/types.conf +81 -81
  366. data/lib/ffi/platform/mips64el-linux/types.conf +81 -81
  367. data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
  368. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +79 -79
  369. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +79 -79
  370. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +81 -81
  371. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +81 -81
  372. data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
  373. data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
  374. data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
  375. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  376. data/lib/ffi/platform/powerpc64-linux/types.conf +81 -81
  377. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  378. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  379. data/lib/ffi/platform/s390-linux/types.conf +79 -79
  380. data/lib/ffi/platform/s390x-linux/types.conf +79 -79
  381. data/lib/ffi/platform/sparc-linux/types.conf +79 -79
  382. data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
  383. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  384. data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
  385. data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
  386. data/lib/ffi/platform/x86_64-cygwin/types.conf +1 -1
  387. data/lib/ffi/platform/x86_64-darwin/types.conf +88 -84
  388. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  389. data/lib/ffi/platform/x86_64-freebsd/types.conf +90 -90
  390. data/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  391. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  392. data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
  393. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  394. data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -89
  395. data/lib/ffi/platform/x86_64-openbsd/types.conf +86 -86
  396. data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
  397. data/lib/ffi/platform/x86_64-windows/types.conf +42 -110
  398. data/lib/ffi/platform.rb +43 -20
  399. data/lib/ffi/pointer.rb +26 -20
  400. data/lib/ffi/struct.rb +14 -68
  401. data/lib/ffi/struct_by_reference.rb +72 -0
  402. data/lib/ffi/struct_layout.rb +96 -0
  403. data/lib/ffi/struct_layout_builder.rb +1 -1
  404. data/lib/ffi/tools/const_generator.rb +11 -8
  405. data/lib/ffi/tools/generator.rb +47 -2
  406. data/lib/ffi/tools/generator_task.rb +13 -17
  407. data/lib/ffi/tools/struct_generator.rb +6 -5
  408. data/lib/ffi/tools/types_generator.rb +7 -4
  409. data/lib/ffi/types.rb +33 -7
  410. data/lib/ffi/variadic.rb +20 -18
  411. data/lib/ffi/version.rb +1 -1
  412. data/lib/ffi.rb +10 -3
  413. data/rakelib/ffi_gem_helper.rb +65 -0
  414. data/samples/getlogin.rb +1 -1
  415. data/samples/getpid.rb +1 -1
  416. data/samples/gettimeofday.rb +8 -8
  417. data/samples/hello.rb +2 -1
  418. data/samples/hello_ractor.rb +11 -0
  419. data/samples/inotify.rb +1 -1
  420. data/samples/pty.rb +1 -2
  421. data/samples/qsort.rb +0 -1
  422. data/samples/qsort_ractor.rb +28 -0
  423. data.tar.gz.sig +0 -0
  424. metadata +252 -153
  425. metadata.gz.sig +0 -0
  426. data/.gitignore +0 -22
  427. data/.gitmodules +0 -3
  428. data/.travis.yml +0 -52
  429. data/.yardopts +0 -5
  430. data/appveyor.yml +0 -22
  431. data/ext/ffi_c/Closure.c +0 -54
  432. data/ext/ffi_c/DataConverter.c +0 -91
  433. data/ext/ffi_c/StructByReference.c +0 -190
  434. data/ext/ffi_c/StructByReference.h +0 -50
  435. data/ext/ffi_c/libffi/.travis/build.sh +0 -34
  436. data/ext/ffi_c/libffi/.travis/install.sh +0 -22
  437. data/ext/ffi_c/libffi/.travis/site.exp +0 -18
  438. data/ext/ffi_c/libffi/.travis.yml +0 -34
  439. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  440. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  441. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
  442. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar_va.c +0 -44
  443. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort_va.c +0 -44
  444. data/ext/ffi_c/win32/stdbool.h +0 -8
  445. data/ext/ffi_c/win32/stdint.h +0 -201
  446. data/samples/sample_helper.rb +0 -6
  447. data/ext/ffi_c/libffi/{.travis → .ci}/ar-lib +0 -0
  448. data/ext/ffi_c/libffi/{.travis → .ci}/compile +0 -0
  449. data/ext/ffi_c/libffi/testsuite/libffi.call/{pyobjc-tc.c → pyobjc_tc.c} +0 -0
  450. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  451. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
  452. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
  453. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  454. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  455. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
  456. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
  457. data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +79 -79
@@ -1,10 +1,7 @@
1
1
  Status
2
2
  ======
3
3
 
4
- [![Build Status](https://travis-ci.org/libffi/libffi.svg?branch=master)](https://travis-ci.org/libffi/libffi)
5
- [![Build status](https://ci.appveyor.com/api/projects/status/8lko9vagbx4w2kxq?svg=true)](https://ci.appveyor.com/project/atgreen/libffi)
6
-
7
- libffi-3.3-rc0 was released on April 2, 2018. Check the libffi web
4
+ libffi-3.4.4 was released on October 23, 2022. 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
@@ -51,15 +48,23 @@ tested:
51
48
  | --------------- | ---------------- | ----------------------- |
52
49
  | AArch64 (ARM64) | iOS | Clang |
53
50
  | AArch64 | Linux | GCC |
51
+ | AArch64 | Windows | MSVC |
54
52
  | Alpha | Linux | GCC |
55
53
  | Alpha | Tru64 | GCC |
56
54
  | ARC | Linux | GCC |
55
+ | ARC32 | Linux | GCC |
56
+ | ARC64 | Linux | GCC |
57
57
  | ARM | Linux | GCC |
58
58
  | ARM | iOS | GCC |
59
+ | ARM | Windows | MSVC |
59
60
  | AVR32 | Linux | GCC |
60
61
  | Blackfin | uClinux | GCC |
62
+ | CSKY | Linux | GCC |
61
63
  | HPPA | HPUX | GCC |
64
+ | HPPA64 | HPUX | GCC |
65
+ | KVX | Linux | GCC |
62
66
  | IA-64 | Linux | GCC |
67
+ | LoongArch64 | Linux | GCC |
63
68
  | M68K | FreeMiNT | GCC |
64
69
  | M68K | Linux | GCC |
65
70
  | M68K | RTEMS | GCC |
@@ -73,6 +78,7 @@ tested:
73
78
  | Moxie | Bare metal | GCC |
74
79
  | Nios II | Linux | GCC |
75
80
  | OpenRISC | Linux | GCC |
81
+ | PowerPC 32-bit | AIX | GCC |
76
82
  | PowerPC 32-bit | AIX | IBM XL C |
77
83
  | PowerPC 64-bit | AIX | IBM XL C |
78
84
  | PowerPC | AMIGA | GCC |
@@ -94,25 +100,25 @@ tested:
94
100
  | SPARC64 | Solaris | Oracle Solaris Studio C |
95
101
  | TILE-Gx/TILEPro | Linux | GCC |
96
102
  | VAX | OpenBSD/vax | GCC |
103
+ | WASM32 | Emscripten | EMCC |
97
104
  | X86 | FreeBSD | GCC |
98
105
  | X86 | GNU HURD | GCC |
99
106
  | X86 | Interix | GCC |
100
107
  | X86 | kFreeBSD | GCC |
101
108
  | X86 | Linux | GCC |
102
- | X86 | Mac OSX | GCC |
103
109
  | X86 | OpenBSD | GCC |
104
110
  | X86 | OS/2 | GCC |
105
111
  | X86 | Solaris | GCC |
106
112
  | X86 | Solaris | Oracle Solaris Studio C |
107
113
  | X86 | Windows/Cygwin | GCC |
108
- | X86 | Windows/MingW | GCC |
114
+ | X86 | Windows/MinGW | GCC |
109
115
  | X86-64 | FreeBSD | GCC |
110
116
  | X86-64 | Linux | GCC |
111
117
  | X86-64 | Linux/x32 | GCC |
112
118
  | X86-64 | OpenBSD | GCC |
113
119
  | X86-64 | Solaris | Oracle Solaris Studio C |
114
120
  | X86-64 | Windows/Cygwin | GCC |
115
- | X86-64 | Windows/MingW | GCC |
121
+ | X86-64 | Windows/MinGW | GCC |
116
122
  | X86-64 | Mac OSX | GCC |
117
123
  | Xtensa | Linux | GCC |
118
124
 
@@ -134,15 +140,15 @@ install autoconf, automake and libtool.
134
140
 
135
141
  You may want to tell configure where to install the libffi library and
136
142
  header files. To do that, use the ``--prefix`` configure switch. Libffi
137
- will install under /usr/local by default.
143
+ will install under /usr/local by default.
138
144
 
139
145
  If you want to enable extra run-time debugging checks use the the
140
146
  ``--enable-debug`` configure switch. This is useful when your program dies
141
- mysteriously while using libffi.
147
+ mysteriously while using libffi.
142
148
 
143
149
  Another useful configure switch is ``--enable-purify-safety``. Using this
144
150
  will add some extra code which will suppress certain warnings when you
145
- are using Purify with libffi. Only use this switch when using
151
+ are using Purify with libffi. Only use this switch when using
146
152
  Purify, as it will slow down the library.
147
153
 
148
154
  If you don't want to build documentation, use the ``--disable-docs``
@@ -152,7 +158,7 @@ It's also possible to build libffi on Windows platforms with
152
158
  Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
153
159
  wrapper script during configuration like so:
154
160
 
155
- path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP"
161
+ path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" CPPFLAGS="-DFFI_BUILDING_DLL"
156
162
 
157
163
  For 64-bit Windows builds, use ``CC="path/to/msvcc.sh -m64"`` and
158
164
  ``CXX="path/to/msvcc.sh -m64"``. You may also need to specify
@@ -168,6 +174,11 @@ remove the line in configure that sets 'fix_srcfile_path' to a 'cygpath'
168
174
  command. ('cygpath' is not present in MingW, and is not required when
169
175
  using MingW-style paths.)
170
176
 
177
+ To build static library for ARM64 with MSVC using visual studio solution, msvc_build folder have
178
+ aarch64/Ffi_staticLib.sln
179
+ required header files in aarch64/aarch64_include/
180
+
181
+
171
182
  SPARC Solaris builds require the use of the GNU assembler and linker.
172
183
  Point ``AS`` and ``LD`` environment variables at those tool prior to
173
184
  configuration.
@@ -190,25 +201,64 @@ History
190
201
 
191
202
  See the git log for details at http://github.com/libffi/libffi.
192
203
 
193
- 3.3 TBD
204
+ TBD - TBD
205
+ Add support for wasm32.
206
+ Add support for HPPA64, and many HPPA fixes.
207
+ Add support for ARCv3: ARC32 & ARC64.
208
+ Many x86 Darwin fixes.
209
+
210
+ 3.4.4 Oct-23-2022
211
+ Important aarch64 fixes, including support for linux builds
212
+ with Link Time Optimization (-flto).
213
+ Fix x86 stdcall stack alignment.
214
+ Fix x86 Windows msvc assembler compatibility.
215
+ Fix moxie and or1k small structure args.
216
+
217
+ 3.4.3 Sep-19-2022
218
+ All struct args are passed by value, regardless of size, as per ABIs.
219
+ Enable static trampolines for Cygwin.
220
+ Add support for Loongson's LoongArch64 architecture.
221
+ Fix x32 static trampolines.
222
+ Fix 32-bit x86 stdcall stack corruption.
223
+ Fix ILP32 aarch64 support.
224
+
225
+ 3.4.2 Jun-28-2021
226
+ Add static trampoline support for Linux on x86_64 and ARM64.
227
+ Add support for Alibaba's CSKY architecture.
228
+ Add support for Kalray's KVX architecture.
229
+ Add support for Intel Control-flow Enforcement Technology (CET).
230
+ Add support for ARM Pointer Authentication (PA).
231
+ Fix 32-bit PPC regression.
232
+ Fix MIPS soft-float problem.
233
+ Enable tmpdir override with the $LIBFFI_TMPDIR environment variable.
234
+ Enable compatibility with MSVC runtime stack checking.
235
+ Reject float and small integer argument in ffi_prep_cif_var().
236
+ Callers must promote these types themselves.
237
+
238
+ 3.3 Nov-23-2019
194
239
  Add RISC-V support.
195
240
  New API in support of GO closures.
241
+ Add IEEE754 binary128 long double support for 64-bit Power
196
242
  Default to Microsoft's 64 bit long double ABI with Visual C++.
197
- GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
198
- Many new tests cases and bug fixes.
199
-
200
- 3.2.1 Nov-12-14
243
+ GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
244
+ Add Windows on ARM64 (WOA) support.
245
+ Add Windows 32-bit ARM support.
246
+ Raw java (gcj) API deprecated.
247
+ Add pre-built PDF documentation to source distribution.
248
+ Many new test cases and bug fixes.
249
+
250
+ 3.2.1 Nov-12-2014
201
251
  Build fix for non-iOS AArch64 targets.
202
-
203
- 3.2 Nov-11-14
252
+
253
+ 3.2 Nov-11-2014
204
254
  Add C99 Complex Type support (currently only supported on
205
255
  s390).
206
256
  Add support for PASCAL and REGISTER calling conventions on x86
207
257
  Windows/Linux.
208
258
  Add OpenRISC and Cygwin-64 support.
209
259
  Bug fixes.
210
-
211
- 3.1 May-19-14
260
+
261
+ 3.1 May-19-2014
212
262
  Add AArch64 (ARM64) iOS support.
213
263
  Add Nios II support.
214
264
  Add m88k and DEC VAX support.
@@ -220,8 +270,8 @@ See the git log for details at http://github.com/libffi/libffi.
220
270
  failures, and respect the $CC and $CXX environment variables.
221
271
  Archive off the manually maintained ChangeLog in favor of git
222
272
  log.
223
-
224
- 3.0.13 Mar-17-13
273
+
274
+ 3.0.13 Mar-17-2013
225
275
  Add Meta support.
226
276
  Add missing Moxie bits.
227
277
  Fix stack alignment bug on 32-bit x86.
@@ -230,8 +280,8 @@ See the git log for details at http://github.com/libffi/libffi.
230
280
  Fix the install dir location for some platforms when building
231
281
  with GCC (OS X, Solaris).
232
282
  Fix Cygwin regression.
233
-
234
- 3.0.12 Feb-11-13
283
+
284
+ 3.0.12 Feb-11-2013
235
285
  Add Moxie support.
236
286
  Add AArch64 support.
237
287
  Add Blackfin support.
@@ -242,8 +292,8 @@ See the git log for details at http://github.com/libffi/libffi.
242
292
  Add support for native vendor compilers on
243
293
  Solaris and AIX.
244
294
  Work around LLVM/GCC interoperability issue on x86_64.
245
-
246
- 3.0.11 Apr-11-12
295
+
296
+ 3.0.11 Apr-11-2012
247
297
  Lots of build fixes.
248
298
  Add support for variadic functions (ffi_prep_cif_var).
249
299
  Add Linux/x32 support.
@@ -253,8 +303,8 @@ See the git log for details at http://github.com/libffi/libffi.
253
303
  Integration with iOS' xcode build tools.
254
304
  Fix Octeon and MC68881 support.
255
305
  Fix code pessimizations.
256
-
257
- 3.0.10 Aug-23-11
306
+
307
+ 3.0.10 Aug-23-2011
258
308
  Add support for Apple's iOS.
259
309
  Add support for ARM VFP ABI.
260
310
  Add RTEMS support for MIPS and M68K.
@@ -267,129 +317,129 @@ See the git log for details at http://github.com/libffi/libffi.
267
317
  Solaris compiler.
268
318
  Testsuite fixes for Tru64 Unix.
269
319
  Additional platform support.
270
-
271
- 3.0.9 Dec-31-09
320
+
321
+ 3.0.9 Dec-31-2009
272
322
  Add AVR32 and win64 ports. Add ARM softfp support.
273
323
  Many fixes for AIX, Solaris, HP-UX, *BSD.
274
324
  Several PowerPC and x86-64 bug fixes.
275
325
  Build DLL for windows.
276
-
277
- 3.0.8 Dec-19-08
326
+
327
+ 3.0.8 Dec-19-2008
278
328
  Add *BSD, BeOS, and PA-Linux support.
279
-
280
- 3.0.7 Nov-11-08
329
+
330
+ 3.0.7 Nov-11-2008
281
331
  Fix for ppc FreeBSD.
282
332
  (thanks to Andreas Tobler)
283
-
284
- 3.0.6 Jul-17-08
333
+
334
+ 3.0.6 Jul-17-2008
285
335
  Fix for closures on sh.
286
336
  Mark the sh/sh64 stack as non-executable.
287
337
  (both thanks to Kaz Kojima)
288
-
289
- 3.0.5 Apr-3-08
338
+
339
+ 3.0.5 Apr-3-2008
290
340
  Fix libffi.pc file.
291
341
  Fix #define ARM for IcedTea users.
292
342
  Fix x86 closure bug.
293
-
294
- 3.0.4 Feb-24-08
343
+
344
+ 3.0.4 Feb-24-2008
295
345
  Fix x86 OpenBSD configury.
296
-
297
- 3.0.3 Feb-22-08
346
+
347
+ 3.0.3 Feb-22-2008
298
348
  Enable x86 OpenBSD thanks to Thomas Heller, and
299
349
  x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
300
350
  Clean up test instruction in README.
301
-
302
- 3.0.2 Feb-21-08
351
+
352
+ 3.0.2 Feb-21-2008
303
353
  Improved x86 FreeBSD support.
304
354
  Thanks to Björn König.
305
-
306
- 3.0.1 Feb-15-08
355
+
356
+ 3.0.1 Feb-15-2008
307
357
  Fix instruction cache flushing bug on MIPS.
308
358
  Thanks to David Daney.
309
-
310
- 3.0.0 Feb-15-08
359
+
360
+ 3.0.0 Feb-15-2008
311
361
  Many changes, mostly thanks to the GCC project.
312
362
  Cygnus Solutions is now Red Hat.
313
-
363
+
314
364
  [10 years go by...]
315
-
316
- 1.20 Oct-5-98
365
+
366
+ 1.20 Oct-5-1998
317
367
  Raffaele Sena produces ARM port.
318
-
319
- 1.19 Oct-5-98
368
+
369
+ 1.19 Oct-5-1998
320
370
  Fixed x86 long double and long long return support.
321
371
  m68k bug fixes from Andreas Schwab.
322
372
  Patch for DU assembler compatibility for the Alpha from Richard
323
373
  Henderson.
324
-
325
- 1.18 Apr-17-98
374
+
375
+ 1.18 Apr-17-1998
326
376
  Bug fixes and MIPS configuration changes.
327
-
328
- 1.17 Feb-24-98
377
+
378
+ 1.17 Feb-24-1998
329
379
  Bug fixes and m68k port from Andreas Schwab. PowerPC port from
330
380
  Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
331
-
332
- 1.16 Feb-11-98
381
+
382
+ 1.16 Feb-11-1998
333
383
  Richard Henderson produces Alpha port.
334
-
335
- 1.15 Dec-4-97
384
+
385
+ 1.15 Dec-4-1997
336
386
  Fixed an n32 ABI bug. New libtool, auto* support.
337
-
387
+
338
388
  1.14 May-13-97
339
389
  libtool is now used to generate shared and static libraries.
340
390
  Fixed a minor portability problem reported by Russ McManus
341
391
  <mcmanr@eq.gs.com>.
342
-
343
- 1.13 Dec-2-96
392
+
393
+ 1.13 Dec-2-1996
344
394
  Added --enable-purify-safety to keep Purify from complaining
345
395
  about certain low level code.
346
396
  Sparc fix for calling functions with < 6 args.
347
397
  Linux x86 a.out fix.
348
-
349
- 1.12 Nov-22-96
350
- Added missing ffi_type_void, needed for supporting void return
351
- types. Fixed test case for non MIPS machines. Cygnus Support
352
- is now Cygnus Solutions.
353
-
354
- 1.11 Oct-30-96
398
+
399
+ 1.12 Nov-22-1996
400
+ Added missing ffi_type_void, needed for supporting void return
401
+ types. Fixed test case for non MIPS machines. Cygnus Support
402
+ is now Cygnus Solutions.
403
+
404
+ 1.11 Oct-30-1996
355
405
  Added notes about GNU make.
356
-
357
- 1.10 Oct-29-96
406
+
407
+ 1.10 Oct-29-1996
358
408
  Added configuration fix for non GNU compilers.
359
-
360
- 1.09 Oct-29-96
361
- Added --enable-debug configure switch. Clean-ups based on LCLint
362
- feedback. ffi_mips.h is always installed. Many configuration
409
+
410
+ 1.09 Oct-29-1996
411
+ Added --enable-debug configure switch. Clean-ups based on LCLint
412
+ feedback. ffi_mips.h is always installed. Many configuration
363
413
  fixes. Fixed ffitest.c for sparc builds.
364
-
365
- 1.08 Oct-15-96
414
+
415
+ 1.08 Oct-15-1996
366
416
  Fixed n32 problem. Many clean-ups.
367
-
368
- 1.07 Oct-14-96
417
+
418
+ 1.07 Oct-14-1996
369
419
  Gordon Irlam rewrites v8.S again. Bug fixes.
370
-
371
- 1.06 Oct-14-96
372
- Gordon Irlam improved the sparc port.
373
-
374
- 1.05 Oct-14-96
420
+
421
+ 1.06 Oct-14-1996
422
+ Gordon Irlam improved the sparc port.
423
+
424
+ 1.05 Oct-14-1996
375
425
  Interface changes based on feedback.
376
-
377
- 1.04 Oct-11-96
426
+
427
+ 1.04 Oct-11-1996
378
428
  Sparc port complete (modulo struct passing bug).
379
-
380
- 1.03 Oct-10-96
429
+
430
+ 1.03 Oct-10-1996
381
431
  Passing struct args, and returning struct values works for
382
432
  all architectures/calling conventions. Expanded tests.
383
-
384
- 1.02 Oct-9-96
433
+
434
+ 1.02 Oct-9-1996
385
435
  Added SGI n32 support. Fixed bugs in both o32 and Linux support.
386
436
  Added "make test".
387
-
388
- 1.01 Oct-8-96
437
+
438
+ 1.01 Oct-8-1996
389
439
  Fixed float passing bug in mips version. Restructured some
390
440
  of the code. Builds cleanly with SGI tools.
391
-
392
- 1.00 Oct-7-96
441
+
442
+ 1.00 Oct-7-1996
393
443
  First release. No public announcement.
394
444
 
395
445
  Authors & Credits
@@ -412,14 +462,21 @@ developers:
412
462
 
413
463
  aarch64 Marcus Shawcroft, James Greenhalgh
414
464
  alpha Richard Henderson
465
+ arc Hackers at Synopsis
415
466
  arm Raffaele Sena
467
+ avr32 Bradley Smith
416
468
  blackfin Alexandre Keunecke I. de Mendonca
417
469
  cris Simon Posnjak, Hans-Peter Nilsson
470
+ csky Ma Jun, Zhang Wenmeng
418
471
  frv Anthony Green
419
472
  ia64 Hans Boehm
473
+ kvx Yann Sionneau
474
+ loongarch64 Cheng Lulu, Xi Ruoyao, Xu Hao,
475
+ Zhang Wenlong, Pan Xuefeng
420
476
  m32r Kazuhiro Inaoka
421
477
  m68k Andreas Schwab
422
478
  m88k Miod Vallat
479
+ metag Hackers at Imagination Technologies
423
480
  microblaze Nathan Rossi
424
481
  mips Anthony Green, Casey Marshall
425
482
  mips64 David Daney
@@ -427,15 +484,18 @@ developers:
427
484
  nios ii Sandra Loosemore
428
485
  openrisc Sebastian Macke
429
486
  pa Randolph Chung, Dave Anglin, Andreas Tobler
487
+ pa64 Dave Anglin
430
488
  powerpc Geoffrey Keating, Andreas Tobler,
431
489
  David Edelsohn, John Hornkvist
432
490
  powerpc64 Jakub Jelinek
491
+ riscv Michael Knyszek, Andrew Waterman, Stef O'Rear
433
492
  s390 Gerhard Tonn, Ulrich Weigand
434
493
  sh Kaz Kojima
435
494
  sh64 Kaz Kojima
436
495
  sparc Anthony Green, Gordon Irlam
437
496
  tile-gx/tilepro Walter Lee
438
497
  vax Miod Vallat
498
+ wasm32 Hood Chatham, Brion Vibber, Kleis Auke Wolthuizen
439
499
  x86 Anthony Green, Jon Beniston
440
500
  x86-64 Bo Thorsen
441
501
  xtensa Chris Zankel
@@ -456,6 +516,11 @@ Alex Oliva solved the executable page problem for SElinux.
456
516
  The list above is almost certainly incomplete and inaccurate. I'm
457
517
  happy to make corrections or additions upon request.
458
518
 
459
- If you have a problem, or have found a bug, please send a note to the
460
- author at green@moxielogic.com, or the project mailing list at
461
- libffi-discuss@sourceware.org.
519
+ If you have a problem, or have found a bug, please file an issue on
520
+ our issue tracker at https://github.com/libffi/libffi/issues.
521
+
522
+ The author can be reached at green@moxielogic.com.
523
+
524
+ To subscribe/unsubscribe to our mailing lists, visit:
525
+ https://sourceware.org/mailman/listinfo/libffi-announce
526
+ 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
- [AC_TRY_COMPILE(
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],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
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([AC_PROG_LD])
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
- AC_TRY_RUN([
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
- ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
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
- AC_TRY_LINK(, [return 0;], libat_shared_libgcc=yes, libat_shared_libgcc=no)
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
- AC_TRY_LINK(, [return 0;], libat_shared_libgcc=yes)
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