ffi 1.17.2 → 1.17.4

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.
Files changed (327) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +34 -0
  4. data/Gemfile +7 -4
  5. data/README.md +1 -0
  6. data/Rakefile +7 -4
  7. data/Steepfile +8 -0
  8. data/ext/ffi_c/DynamicLibrary.c +1 -1
  9. data/ext/ffi_c/Function.c +2 -0
  10. data/ext/ffi_c/MethodHandle.c +4 -2
  11. data/ext/ffi_c/StructLayout.c +129 -12
  12. data/ext/ffi_c/libffi/LICENSE +1 -1
  13. data/ext/ffi_c/libffi/Makefile.am +17 -13
  14. data/ext/ffi_c/libffi/Makefile.in +37 -30
  15. data/ext/ffi_c/libffi/README.md +22 -3
  16. data/ext/ffi_c/libffi/configure +105 -121
  17. data/ext/ffi_c/libffi/configure.ac +21 -8
  18. data/ext/ffi_c/libffi/configure.host +6 -1
  19. data/ext/ffi_c/libffi/doc/Makefile.in +3 -0
  20. data/ext/ffi_c/libffi/doc/libffi.texi +24 -1
  21. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  22. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -28
  23. data/ext/ffi_c/libffi/include/Makefile.in +3 -0
  24. data/ext/ffi_c/libffi/include/ffi.h.in +19 -1
  25. data/ext/ffi_c/libffi/libffi.map.in +13 -1
  26. data/ext/ffi_c/libffi/libtool-version +1 -1
  27. data/ext/ffi_c/libffi/m4/asmcfi.m4 +28 -11
  28. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +13 -3
  29. data/ext/ffi_c/libffi/man/Makefile.in +3 -0
  30. data/ext/ffi_c/libffi/src/aarch64/sysv.S +7 -1
  31. data/ext/ffi_c/libffi/src/arm/sysv.S +1 -1
  32. data/ext/ffi_c/libffi/src/pa/linux.S +4 -0
  33. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -0
  34. data/ext/ffi_c/libffi/src/riscv/ffi.c +39 -16
  35. data/ext/ffi_c/libffi/src/riscv/internal.h +7 -0
  36. data/ext/ffi_c/libffi/src/riscv/sysv.S +24 -0
  37. data/ext/ffi_c/libffi/src/tramp.c +6 -1
  38. data/ext/ffi_c/libffi/src/types.c +23 -1
  39. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffi.c +157 -54
  40. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffitarget.h +17 -0
  41. data/ext/ffi_c/libffi/src/x86/ffitarget.h +0 -3
  42. data/ext/ffi_c/libffi/src/x86/sysv.S +1 -3
  43. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +1 -3
  44. data/ext/ffi_c/libffi/testsuite/Makefile.in +6 -2
  45. data/ext/ffi_c/libffi.mk +5 -0
  46. data/ffi.gemspec +7 -6
  47. data/lib/ffi/autopointer.rb +6 -0
  48. data/lib/ffi/compat.rb +11 -0
  49. data/lib/ffi/function.rb +23 -0
  50. data/lib/ffi/library.rb +19 -3
  51. data/lib/ffi/struct_by_reference.rb +1 -1
  52. data/lib/ffi/version.rb +1 -1
  53. data/samples/hello_ractor.rb +9 -1
  54. data/samples/qsort_ractor.rb +9 -1
  55. data/sig/ffi/auto_pointer.rbs +1 -1
  56. data/sig/ffi/errno.rbs +8 -0
  57. data/sig/ffi/platform.rbs +49 -0
  58. data/sig/ffi/struct.rbs +2 -2
  59. data/sig/ffi/struct_by_reference.rbs +1 -1
  60. data/sig/ffi.rbs +4 -1
  61. data.tar.gz.sig +0 -0
  62. metadata +24 -338
  63. metadata.gz.sig +0 -0
  64. data/ext/ffi_c/libffi/.allow-ai-service +0 -0
  65. data/ext/ffi_c/libffi/.appveyor/site.exp +0 -16
  66. data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +0 -7
  67. data/ext/ffi_c/libffi/.appveyor.yml +0 -84
  68. data/ext/ffi_c/libffi/.ci/ar-lib +0 -270
  69. data/ext/ffi_c/libffi/.ci/bfin-sim.exp +0 -58
  70. data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +0 -18
  71. data/ext/ffi_c/libffi/.ci/build-in-container.sh +0 -10
  72. data/ext/ffi_c/libffi/.ci/build.sh +0 -124
  73. data/ext/ffi_c/libffi/.ci/compile +0 -351
  74. data/ext/ffi_c/libffi/.ci/install.sh +0 -78
  75. data/ext/ffi_c/libffi/.ci/m32r-sim.exp +0 -58
  76. data/ext/ffi_c/libffi/.ci/moxie-sim.exp +0 -60
  77. data/ext/ffi_c/libffi/.ci/msvs-detect +0 -1103
  78. data/ext/ffi_c/libffi/.ci/or1k-sim.exp +0 -58
  79. data/ext/ffi_c/libffi/.ci/powerpc-eabisim.exp +0 -58
  80. data/ext/ffi_c/libffi/.ci/site.exp +0 -29
  81. data/ext/ffi_c/libffi/.ci/wine-sim.exp +0 -55
  82. data/ext/ffi_c/libffi/.gitattributes +0 -4
  83. data/ext/ffi_c/libffi/.github/issue_template.md +0 -10
  84. data/ext/ffi_c/libffi/.github/workflows/build.yml +0 -479
  85. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +0 -160
  86. data/ext/ffi_c/libffi/.gitignore +0 -46
  87. data/ext/ffi_c/libffi/testsuite/Makefile.am +0 -88
  88. data/ext/ffi_c/libffi/testsuite/config/default.exp +0 -1
  89. data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +0 -34
  90. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +0 -46
  91. data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +0 -86
  92. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +0 -23
  93. data/ext/ffi_c/libffi/testsuite/emscripten/test.html +0 -7
  94. data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +0 -51
  95. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +0 -682
  96. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +0 -283
  97. data/ext/ffi_c/libffi/testsuite/lib/wrapper.exp +0 -45
  98. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +0 -28
  99. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +0 -78
  100. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +0 -50
  101. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +0 -63
  102. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +0 -1746
  103. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +0 -2885
  104. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +0 -747
  105. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +0 -46
  106. data/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +0 -46
  107. data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +0 -41
  108. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +0 -54
  109. data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +0 -99
  110. data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +0 -108
  111. data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +0 -114
  112. data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +0 -119
  113. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +0 -26
  114. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +0 -163
  115. data/ext/ffi_c/libffi/testsuite/libffi.call/float.c +0 -59
  116. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +0 -60
  117. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +0 -61
  118. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +0 -74
  119. data/ext/ffi_c/libffi/testsuite/libffi.call/float4.c +0 -62
  120. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +0 -110
  121. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +0 -59
  122. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +0 -57
  123. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +0 -70
  124. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +0 -78
  125. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -52
  126. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +0 -46
  127. data/ext/ffi_c/libffi/testsuite/libffi.call/overread.c +0 -54
  128. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +0 -127
  129. data/ext/ffi_c/libffi/testsuite/libffi.call/promotion.c +0 -59
  130. data/ext/ffi_c/libffi/testsuite/libffi.call/pyobjc_tc.c +0 -114
  131. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +0 -36
  132. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c +0 -43
  133. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c +0 -42
  134. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c +0 -35
  135. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c +0 -36
  136. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c +0 -49
  137. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c +0 -42
  138. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +0 -34
  139. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c +0 -41
  140. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +0 -48
  141. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +0 -36
  142. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +0 -42
  143. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +0 -38
  144. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +0 -42
  145. data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +0 -60
  146. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +0 -43
  147. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +0 -49
  148. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +0 -49
  149. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +0 -55
  150. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +0 -67
  151. data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +0 -57
  152. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +0 -67
  153. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +0 -60
  154. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +0 -64
  155. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +0 -66
  156. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +0 -64
  157. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +0 -74
  158. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +0 -81
  159. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +0 -68
  160. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +0 -63
  161. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +0 -65
  162. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +0 -65
  163. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +0 -67
  164. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +0 -67
  165. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +0 -93
  166. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +0 -61
  167. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_int_float.c +0 -88
  168. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +0 -63
  169. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +0 -90
  170. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +0 -61
  171. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +0 -78
  172. data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +0 -220
  173. data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +0 -154
  174. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +0 -134
  175. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +0 -135
  176. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +0 -141
  177. data/ext/ffi_c/libffi/testsuite/libffi.call/x32.c +0 -31
  178. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +0 -67
  179. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +0 -90
  180. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +0 -83
  181. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +0 -83
  182. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +0 -102
  183. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +0 -91
  184. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +0 -94
  185. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +0 -92
  186. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +0 -96
  187. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +0 -61
  188. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +0 -112
  189. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +0 -117
  190. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +0 -120
  191. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +0 -131
  192. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +0 -93
  193. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +0 -109
  194. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +0 -113
  195. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +0 -145
  196. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +0 -103
  197. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +0 -114
  198. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +0 -103
  199. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +0 -103
  200. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +0 -113
  201. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +0 -120
  202. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +0 -103
  203. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +0 -137
  204. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +0 -116
  205. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +0 -148
  206. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +0 -140
  207. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +0 -121
  208. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +0 -155
  209. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +0 -121
  210. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +0 -102
  211. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +0 -103
  212. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +0 -103
  213. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +0 -111
  214. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +0 -109
  215. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +0 -111
  216. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +0 -147
  217. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +0 -152
  218. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +0 -113
  219. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +0 -108
  220. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +0 -106
  221. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +0 -109
  222. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +0 -108
  223. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +0 -109
  224. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +0 -111
  225. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +0 -68
  226. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double.c +0 -43
  227. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +0 -69
  228. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +0 -46
  229. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +0 -115
  230. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +0 -80
  231. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_args.c +0 -70
  232. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_float_double.c +0 -55
  233. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +0 -78
  234. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +0 -79
  235. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +0 -94
  236. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +0 -99
  237. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +0 -78
  238. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +0 -94
  239. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +0 -79
  240. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +0 -152
  241. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +0 -47
  242. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +0 -44
  243. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +0 -45
  244. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +0 -125
  245. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +0 -45
  246. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +0 -47
  247. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +0 -49
  248. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +0 -49
  249. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +0 -49
  250. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +0 -46
  251. data/ext/ffi_c/libffi/testsuite/libffi.closures/err_bad_abi.c +0 -36
  252. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +0 -1
  253. data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +0 -343
  254. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +0 -175
  255. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +0 -161
  256. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +0 -146
  257. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +0 -137
  258. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +0 -86
  259. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +0 -115
  260. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +0 -119
  261. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +0 -120
  262. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +0 -120
  263. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +0 -121
  264. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +0 -142
  265. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +0 -120
  266. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +0 -142
  267. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +0 -142
  268. data/ext/ffi_c/libffi/testsuite/libffi.closures/problem1.c +0 -90
  269. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +0 -86
  270. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +0 -102
  271. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +0 -101
  272. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large.c +0 -145
  273. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_large2.c +0 -148
  274. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +0 -124
  275. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +0 -125
  276. data/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +0 -75
  277. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +0 -118
  278. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +0 -55
  279. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +0 -91
  280. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +0 -10
  281. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +0 -10
  282. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +0 -10
  283. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +0 -42
  284. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +0 -10
  285. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +0 -10
  286. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +0 -10
  287. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +0 -71
  288. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +0 -10
  289. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +0 -10
  290. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +0 -10
  291. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +0 -80
  292. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +0 -10
  293. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +0 -16
  294. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +0 -10
  295. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.exp +0 -36
  296. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +0 -51
  297. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +0 -7
  298. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +0 -7
  299. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +0 -7
  300. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +0 -10
  301. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +0 -10
  302. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +0 -86
  303. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +0 -10
  304. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +0 -1
  305. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +0 -78
  306. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +0 -10
  307. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +0 -10
  308. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +0 -10
  309. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +0 -37
  310. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +0 -41
  311. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +0 -10
  312. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +0 -10
  313. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +0 -10
  314. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +0 -44
  315. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +0 -10
  316. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +0 -10
  317. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +0 -10
  318. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +0 -10
  319. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +0 -10
  320. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +0 -10
  321. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +0 -34
  322. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +0 -28
  323. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +0 -1
  324. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +0 -36
  325. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +0 -19
  326. data/lib/ffi/tools/types_generator.rb +0 -137
  327. data/rakelib/ffi_gem_helper.rb +0 -65
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '058d816e4da0c93950ccb7181f82c310f9faf3e934948e77f574d01ffcdf7aaa'
4
- data.tar.gz: 0553df9cff19ffb4404dac629dac314f43f70f3cb647899e0cae687dd48631d7
3
+ metadata.gz: d5e14157e145e6fcd1024a5dbe0a77e6ea78df08b38cf61d95426cc5f4287c13
4
+ data.tar.gz: 6634a6296c5c34028f0e0d952ea402b0d7a5a5234f0197b80e42ef89c944eb98
5
5
  SHA512:
6
- metadata.gz: ff675e518022c92374772bdfb8594e07940d0765c134ae076235c6e1c2fe886c091e736415ee0ba28ddd7c4aaf3768929fe27366aa43aaa2f3c250e4eaa7d2cd
7
- data.tar.gz: 7fb6dd8b66f31369863914000c9484eb6cbf813195e25aeaf0a72a3a3eb3e8895f85c8c240686e744ee1bbe90492641e7ef65a1ebcc7d17195c58125c2138c8d
6
+ metadata.gz: d088e31edfa168f488881583d6a97e77e080d54374bc7b91dc91e6bdef93648cc5375451f12379e20c6cf5e26756330fd9fbfd8805c986b85ebb94687cfb6d99
7
+ data.tar.gz: 6057264da88292e8fffe1d88faa6043ffc92e36ea84ac2d07f698c5d13b5358e04a69921d9aceff56ce6d63438751177cfa5070d31a9a2ffb1fa8b36f3e0a9fc
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,37 @@
1
+ 1.17.4 / 2026-03-26
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Fix union by-value ABI mismatch with float and double types on ARM64 and X86_64.
6
+ See #1177 and #1178 for details.
7
+ * Exclude libffi files, which are unnecessary. #1176
8
+
9
+
10
+ 1.17.3 / 2025-12-29
11
+ -------------------
12
+
13
+ Fixed:
14
+ * Opt-in for MFA requirement explicitly. #1159
15
+ * Fix type signature for FFI::AutoPointer#initialize, FFI::StructByReference#native_type and FFI::Struct#auto_ptr . #1158
16
+ * Fix function signature of function_call in FFI trampoline. #1154
17
+ It failed on `aarch64-mingw-ucrt`.
18
+ * Add workaround for segmentation faults on `aarch64-mingw-ucrt`. #1154
19
+ * Call super in `Library#freeze` . #1154
20
+ * Deny duplication of AutoPointer per #dup and #clone . #1173
21
+ They led to double free before.
22
+
23
+ Added:
24
+ * Add binary gems for Ruby-4.0, now providing binary gems for Ruby-3.0 to 4.0.
25
+ * Add msys2_mingw_dependencies for Windows Mingw for automatic installation of libffi. #1143
26
+ * Mark callback dispatcher thread as fork safe for Puma. #1156
27
+ * Add missing FFI::Platform module and LastError signatures. #1169
28
+
29
+ Removed:
30
+ * Drop fat binary gems for Ruby < 3.0
31
+ * Remove `FFI::TypesGenerator` from distributed gems. #1164
32
+ * Remove libffi build dir after install, safing some install space. #1157
33
+
34
+
1
35
  1.17.2 / 2025-04-15
2
36
  -------------------
3
37
 
data/Gemfile CHANGED
@@ -1,13 +1,15 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gemspec
4
+
3
5
  group :development do
4
6
  gem 'benchmark' # necessary on ruby-3.5+
5
7
  gem 'bigdecimal' # necessary on ruby-3.3+
6
- gem 'bundler', '>= 1.16', '< 3'
7
- gem 'fiddle', platforms: %i[mri windows] # necessary on ruby-3.5+
8
+ gem 'bundler', '>= 1.16', '< 5.dev'
9
+ gem 'fiddle' # necessary on ruby-4.0+
8
10
  gem 'rake', '~> 13.0'
9
11
  gem 'rake-compiler', '~> 1.1'
10
- gem 'rake-compiler-dock', '~> 1.9.0'
12
+ gem 'rake-compiler-dock', '~> 1.11.0'
11
13
  gem 'rspec', '~> 3.0'
12
14
  end
13
15
 
@@ -17,7 +19,8 @@ group :doc do
17
19
  end
18
20
 
19
21
  group :type_check do
20
- if RUBY_VERSION >= "2.6" && %w[ ruby truffleruby ].include?(RUBY_ENGINE)
22
+ if RUBY_VERSION >= "3.0" && %w[ ruby truffleruby ].include?(RUBY_ENGINE)
21
23
  gem 'rbs', '~> 3.0'
24
+ gem 'steep', '~> 1.6'
22
25
  end
23
26
  end
data/README.md CHANGED
@@ -33,6 +33,7 @@ MyLib.puts 'Hello, World using libc!'
33
33
 
34
34
  For less minimalistic and more examples you may look at:
35
35
 
36
+ * The [documentation](https://www.rubydoc.info/gems/ffi)
36
37
  * the `samples/` folder
37
38
  * the examples on the [wiki](https://github.com/ffi/ffi/wiki)
38
39
  * the projects using FFI listed on the wiki: https://github.com/ffi/ffi/wiki/projects-using-ffi
data/Rakefile CHANGED
@@ -97,6 +97,7 @@ Bundler::GemHelper.instance.cross_platforms = %w[
97
97
  arm-linux-musl
98
98
  aarch64-linux-gnu
99
99
  aarch64-linux-musl
100
+ aarch64-mingw-ucrt
100
101
  x86_64-darwin
101
102
  arm64-darwin
102
103
  ]
@@ -111,6 +112,8 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
111
112
  ext.cross_platform = Bundler::GemHelper.instance.cross_platforms
112
113
  ext.cross_compiling do |spec|
113
114
  spec.files.reject! { |path| File.fnmatch?('ext/*', path) }
115
+ # Binary gems don't need libffi header+lib files
116
+ spec.metadata.delete("msys2_mingw_dependencies")
114
117
  end
115
118
  # Enable debug info for 'rake compile' but not for 'gem install'
116
119
  ext.config_options << "--enable-debug"
@@ -126,7 +129,7 @@ end
126
129
  namespace "gem" do
127
130
  task 'prepare' do
128
131
  require 'rake_compiler_dock'
129
- sh "bundle package --all"
132
+ sh "bundle package"
130
133
  end
131
134
 
132
135
  Bundler::GemHelper.instance.cross_platforms.each do |plat|
@@ -137,8 +140,8 @@ namespace "gem" do
137
140
  task plat => ['prepare', 'build'] do
138
141
  RakeCompilerDock.sh <<-EOT, platform: plat
139
142
  sudo apt-get update && sudo apt-get install -y libltdl-dev &&
140
- bundle --local &&
141
- rake native:#{plat} pkg/#{gem_spec.full_name}-#{plat}.gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.5", "~>3.0")}
143
+ bundle install --local &&
144
+ rake native:#{plat} pkg/#{gem_spec.full_name}-#{plat}.gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>4.0", "~>3.0")}
142
145
  EOT
143
146
  end
144
147
  end
@@ -180,7 +183,7 @@ logfile = File.join(File.dirname(__FILE__), 'types_log')
180
183
 
181
184
  task types_conf do |task|
182
185
  require 'fileutils'
183
- require_relative "lib/ffi/tools/types_generator"
186
+ require_relative "rakelib/types_generator"
184
187
  options = {}
185
188
  FileUtils.mkdir_p(File.dirname(task.name), mode: 0755 )
186
189
  File.open(task.name, File::CREAT|File::TRUNC|File::RDWR, 0644) do |f|
data/Steepfile ADDED
@@ -0,0 +1,8 @@
1
+ target :lib do
2
+ signature "sig"
3
+
4
+ check "lib"
5
+
6
+ # ignore whole of lib, to just validate RBS in sig
7
+ ignore "lib"
8
+ end
@@ -236,7 +236,7 @@ dl_error(char* buf, int size)
236
236
  NULL, error, 0, (LPSTR)&message, 0, NULL);
237
237
 
238
238
  // Update the passed in buffer
239
- snprintf(buf, size, "Failed with error %d: %s", error, message);
239
+ snprintf(buf, size, "Failed with error %lu: %s", error, message);
240
240
 
241
241
  // Free the allocated message
242
242
  LocalFree(message);
data/ext/ffi_c/Function.c CHANGED
@@ -237,6 +237,8 @@ async_cb_dispatcher_initialize(struct async_cb_dispatcher *ctx)
237
237
 
238
238
  /* Name thread, for better debugging */
239
239
  rb_funcall(ctx->thread, rb_intern("name="), 1, rb_str_new2("FFI Callback Dispatcher"));
240
+ /* Advise multi-threaded app servers to ignore this thread for the purposes of fork safety warnings */
241
+ rb_funcall(ctx->thread, rb_intern("thread_variable_set"), 2, ID2SYM(rb_intern("fork_safe")), Qtrue);
240
242
  }
241
243
 
242
244
  static struct async_cb_dispatcher *
@@ -336,11 +336,13 @@ rbffi_MethodHandle_Init(VALUE module)
336
336
  rb_raise(rb_eFatal, "Could not locate offsets in trampoline code");
337
337
  }
338
338
  #else
339
+
340
+ /* static VALUE function_call(int argc, VALUE* argv, VALUE self) */
339
341
  methodHandleParamTypes[0] = &ffi_type_sint;
340
342
  methodHandleParamTypes[1] = &ffi_type_pointer;
341
- methodHandleParamTypes[2] = &ffi_type_ulong;
343
+ methodHandleParamTypes[2] = &ffi_type_pointer;
342
344
 
343
- ffiStatus = ffi_prep_cif(&mh_cif, FFI_DEFAULT_ABI, 3, &ffi_type_ulong,
345
+ ffiStatus = ffi_prep_cif(&mh_cif, FFI_DEFAULT_ABI, 3, &ffi_type_pointer,
344
346
  methodHandleParamTypes);
345
347
  if (ffiStatus != FFI_OK) {
346
348
  rb_raise(rb_eFatal, "ffi_prep_cif failed. status=%#x", ffiStatus);
@@ -548,29 +548,141 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align)
548
548
  return self;
549
549
  }
550
550
 
551
+ static const ffi_type * const *
552
+ get_int_types(void)
553
+ {
554
+ static const ffi_type *types[5];
555
+ types[0] = &ffi_type_sint8;
556
+ types[1] = &ffi_type_sint16;
557
+ types[2] = &ffi_type_sint32;
558
+ types[3] = &ffi_type_sint64;
559
+ types[4] = NULL;
560
+ return types;
561
+ }
562
+
563
+ static const ffi_type * const *
564
+ get_float_types(void)
565
+ {
566
+ static const ffi_type *types[4];
567
+ types[0] = &ffi_type_float;
568
+ types[1] = &ffi_type_double;
569
+ types[2] = &ffi_type_longdouble;
570
+ types[3] = NULL;
571
+ return types;
572
+ }
573
+
574
+ static const ffi_type *
575
+ find_type_by_alignment(const ffi_type * const *types, unsigned short alignment)
576
+ {
577
+ int i;
578
+ for (i = 0; types[i] != NULL; i++) {
579
+ if (types[i]->alignment == alignment) return types[i];
580
+ }
581
+ return NULL;
582
+ }
583
+
584
+ static bool
585
+ is_float_type(const ffi_type *type)
586
+ {
587
+ int i;
588
+ const ffi_type * const *ftypes = get_float_types();
589
+ for (i = 0; ftypes[i] != NULL; i++) {
590
+ if (type->type == ftypes[i]->type) return true;
591
+ }
592
+ return false;
593
+ }
594
+
551
595
  /*
552
- * call-seq: [](field)
553
- * @param [Symbol] field
554
- * @return [StructLayout::Field]
555
- * Get a field from the layout.
596
+ * Recursively inspect the leaf elements of an ffi_type.
597
+ *
598
+ * Returns the leaf type if all leaves are the same primitive type, or NULL
599
+ * if mixed. Sets float_only to false when any non-float leaf is encountered.
600
+ *
601
+ * Examples (float_only initially true):
602
+ * {double, double} -> &ffi_type_double, float_only = true
603
+ * {float, double} -> NULL, float_only = true
604
+ * {float, int} -> NULL, float_only = false
556
605
  */
606
+ static const ffi_type *
607
+ find_homogeneous_leaf_type(const ffi_type *type, bool *float_only)
608
+ {
609
+ const ffi_type *result = NULL;
610
+ int i;
611
+
612
+ if (type->type != FFI_TYPE_STRUCT || type->elements == NULL) {
613
+ if (!is_float_type(type)) {
614
+ *float_only = false;
615
+ }
616
+ return type;
617
+ }
618
+
619
+ for (i = 0; type->elements[i] != NULL; i++) {
620
+ const ffi_type *elem = find_homogeneous_leaf_type(type->elements[i], float_only);
621
+
622
+ if (result == NULL) {
623
+ result = elem;
624
+ } else if (elem == NULL || result != elem) {
625
+ result = NULL;
626
+ }
627
+ }
628
+
629
+ return result;
630
+ }
631
+
557
632
  static VALUE
558
633
  struct_layout_union_bang(VALUE self)
559
634
  {
560
- const ffi_type *alignment_types[] = { &ffi_type_sint8, &ffi_type_sint16, &ffi_type_sint32, &ffi_type_sint64,
561
- &ffi_type_float, &ffi_type_double, &ffi_type_longdouble, NULL };
562
635
  StructLayout* layout;
563
636
  ffi_type *t = NULL;
564
637
  int count, i;
638
+ bool float_only = true;
639
+ const ffi_type *homogeneous = NULL;
565
640
 
566
641
  TypedData_Get_Struct(self, StructLayout, &rbffi_struct_layout_data_type, layout);
567
642
 
568
- for (i = 0; alignment_types[i] != NULL; ++i) {
569
- if (alignment_types[i]->alignment == layout->align) {
570
- t = (ffi_type *) alignment_types[i];
571
- break;
572
- }
643
+ /*
644
+ * __union! replaces the real field types with a repeated filler type.
645
+ * The filler must be chosen so that libffi uses the same calling convention
646
+ * as the C compiler would for the real union.
647
+ *
648
+ * The rules vary by architecture:
649
+ *
650
+ * ARM64: A "Homogeneous Floating-point Aggregate" (HFA) is
651
+ * passed in floating-point registers (d0-d3). An HFA requires all members
652
+ * to be the *same* float type. {double, double} is an HFA; {float, double}
653
+ * is NOT. Non-HFAs use integer registers.
654
+ *
655
+ * x86_64 targets using the System V ABI (Linux/macOS/BSD, not Windows):
656
+ * an eightbyte containing only float/double fields is classified as SSE
657
+ * and passed in XMM registers, regardless of whether the float types are
658
+ * mixed. {float, double} is SSE; {int, double} is INTEGER.
659
+ *
660
+ * Strategy:
661
+ * 1. If all fields are the same float type, use that type directly.
662
+ * Correct on all platforms.
663
+ * 2. If fields are mixed float types (e.g. {float, double}):
664
+ * - On ARM64: not an HFA, use integer filler.
665
+ * - On x86_64 System V targets: still SSE class, use float filler.
666
+ * 3. Otherwise: use integer filler.
667
+ */
668
+ homogeneous = find_homogeneous_leaf_type(layout->base.ffiType, &float_only);
669
+
670
+ if (homogeneous != NULL && float_only) {
671
+ /* Case 1: all fields are the same float type. */
672
+ t = (ffi_type *) homogeneous;
673
+ }
674
+ #if defined(__x86_64__) && !defined(_WIN32)
675
+ else if (float_only) {
676
+ /* Case 2: mixed float types use float filler on SysV x86_64. */
677
+ t = (ffi_type *) find_type_by_alignment(get_float_types(), layout->align);
573
678
  }
679
+ #endif
680
+
681
+ if (t == NULL) {
682
+ /* Case 3: integer or mixed int/float — use integer filler */
683
+ t = (ffi_type *) find_type_by_alignment(get_int_types(), layout->align);
684
+ }
685
+
574
686
  if (t == NULL) {
575
687
  rb_raise(rb_eRuntimeError, "cannot create libffi union representation for alignment %d", layout->align);
576
688
  return Qnil;
@@ -588,6 +700,12 @@ struct_layout_union_bang(VALUE self)
588
700
  return self;
589
701
  }
590
702
 
703
+ /*
704
+ * call-seq: [](field)
705
+ * @param [Symbol] field
706
+ * @return [StructLayout::Field]
707
+ * Get a field from the layout.
708
+ */
591
709
  static VALUE
592
710
  struct_layout_aref(VALUE self, VALUE field)
593
711
  {
@@ -766,4 +884,3 @@ rbffi_StructLayout_Init(VALUE moduleFFI)
766
884
  rb_define_method(rbffi_StructLayoutClass, "__union!", struct_layout_union_bang, 0);
767
885
 
768
886
  }
769
-
@@ -1,4 +1,4 @@
1
- libffi - Copyright (c) 1996-2024 Anthony Green, Red Hat, Inc and others.
1
+ libffi - Copyright (c) 1996-2025 Anthony Green, Red Hat, Inc and others.
2
2
  See source files for details.
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
@@ -4,6 +4,10 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
4
4
 
5
5
  ACLOCAL_AMFLAGS = -I m4
6
6
 
7
+ # Alias required by AX_ENABLE_BUILDDIR / config-ml
8
+ .PHONY: all-configured
9
+ all-configured: all
10
+
7
11
  SUBDIRS = include testsuite man
8
12
  if BUILD_DOCS
9
13
  ## This hack is needed because it doesn't seem possible to make a
@@ -14,15 +18,15 @@ if BUILD_DOCS
14
18
  SUBDIRS += doc
15
19
  endif
16
20
 
17
- EXTRA_DIST = LICENSE ChangeLog.old \
18
- m4/libtool.m4 m4/lt~obsolete.m4 \
19
- m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
20
- m4/ltversion.m4 src/debug.c msvcc.sh \
21
- generate-darwin-source-and-headers.py \
22
- libffi.xcodeproj/project.pbxproj \
23
- src/powerpc/t-aix \
24
- libtool-ldflags libtool-version configure.host README.md \
25
- libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
21
+ EXTRA_DIST = LICENSE ChangeLog.old \
22
+ m4/libtool.m4 m4/lt~obsolete.m4 \
23
+ m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
24
+ m4/ltversion.m4 src/debug.c msvcc.sh \
25
+ generate-darwin-source-and-headers.py \
26
+ libffi.xcodeproj/project.pbxproj \
27
+ src/powerpc/t-aix \
28
+ libtool-ldflags libtool-version configure.host README.md \
29
+ libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
26
30
 
27
31
  # local.exp is generated by configure
28
32
  DISTCLEANFILES = local.exp
@@ -59,11 +63,11 @@ noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h \
59
63
  src/or1k/ffitarget.h src/pa/ffitarget.h \
60
64
  src/powerpc/ffitarget.h src/powerpc/asm.h \
61
65
  src/powerpc/ffi_powerpc.h src/powerpc/internal.h \
62
- src/riscv/ffitarget.h \
66
+ src/riscv/ffitarget.h src/riscv/internal.h \
63
67
  src/s390/ffitarget.h src/s390/internal.h src/sh/ffitarget.h \
64
68
  src/sh64/ffitarget.h src/sparc/ffitarget.h \
65
69
  src/sparc/internal.h src/tile/ffitarget.h src/vax/ffitarget.h \
66
- src/wasm32/ffitarget.h \
70
+ src/wasm/ffitarget.h \
67
71
  src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
68
72
  src/x86/asmnames.h src/xtensa/ffitarget.h src/dlmalloc.c \
69
73
  src/kvx/ffitarget.h src/kvx/asm.h \
@@ -94,7 +98,7 @@ EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
94
98
  src/sh64/sysv.S src/sparc/ffi.c src/sparc/ffi64.c \
95
99
  src/sparc/v8.S src/sparc/v9.S src/tile/ffi.c src/tile/tile.S \
96
100
  src/vax/ffi.c src/vax/elfbsd.S src/x86/ffi.c src/x86/sysv.S \
97
- src/wasm32/ffi.c \
101
+ src/wasm/ffi.c \
98
102
  src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c \
99
103
  src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S \
100
104
  src/xtensa/ffi.c src/xtensa/sysv.S src/kvx/ffi.c \
@@ -147,7 +151,7 @@ libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script
147
151
  libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
148
152
 
149
153
  AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
150
- AM_CCASFLAGS = $(AM_CPPFLAGS)
154
+ AM_CCASFLAGS = '$(AM_CPPFLAGS)'
151
155
 
152
156
  dist-hook:
153
157
  d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc)
@@ -243,7 +243,7 @@ am__depfiles_remade = src/$(DEPDIR)/closures.Plo \
243
243
  src/sparc/$(DEPDIR)/ffi64.Plo src/sparc/$(DEPDIR)/v8.Plo \
244
244
  src/sparc/$(DEPDIR)/v9.Plo src/tile/$(DEPDIR)/ffi.Plo \
245
245
  src/tile/$(DEPDIR)/tile.Plo src/vax/$(DEPDIR)/elfbsd.Plo \
246
- src/vax/$(DEPDIR)/ffi.Plo src/wasm32/$(DEPDIR)/ffi.Plo \
246
+ src/vax/$(DEPDIR)/ffi.Plo src/wasm/$(DEPDIR)/ffi.Plo \
247
247
  src/x86/$(DEPDIR)/ffi.Plo src/x86/$(DEPDIR)/ffi64.Plo \
248
248
  src/x86/$(DEPDIR)/ffiw64.Plo src/x86/$(DEPDIR)/sysv.Plo \
249
249
  src/x86/$(DEPDIR)/sysv_intel.Plo src/x86/$(DEPDIR)/unix64.Plo \
@@ -411,6 +411,8 @@ EGREP = @EGREP@
411
411
  ETAGS = @ETAGS@
412
412
  EXEEXT = @EXEEXT@
413
413
  FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
414
+ FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
415
+ FFI_VERSION_STRING = @FFI_VERSION_STRING@
414
416
  FGREP = @FGREP@
415
417
  FILECMD = @FILECMD@
416
418
  GREP = @GREP@
@@ -461,6 +463,7 @@ TARGET = @TARGET@
461
463
  TARGETDIR = @TARGETDIR@
462
464
  TARGET_OBJ = @TARGET_OBJ@
463
465
  VERSION = @VERSION@
466
+ WASM64_MEMORY64 = @WASM64_MEMORY64@
464
467
  abs_builddir = @abs_builddir@
465
468
  abs_srcdir = @abs_srcdir@
466
469
  abs_top_builddir = @abs_top_builddir@
@@ -528,15 +531,15 @@ top_srcdir = @top_srcdir@
528
531
  AUTOMAKE_OPTIONS = foreign subdir-objects
529
532
  ACLOCAL_AMFLAGS = -I m4
530
533
  SUBDIRS = include testsuite man $(am__append_1)
531
- EXTRA_DIST = LICENSE ChangeLog.old \
532
- m4/libtool.m4 m4/lt~obsolete.m4 \
533
- m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
534
- m4/ltversion.m4 src/debug.c msvcc.sh \
535
- generate-darwin-source-and-headers.py \
536
- libffi.xcodeproj/project.pbxproj \
537
- src/powerpc/t-aix \
538
- libtool-ldflags libtool-version configure.host README.md \
539
- libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
534
+ EXTRA_DIST = LICENSE ChangeLog.old \
535
+ m4/libtool.m4 m4/lt~obsolete.m4 \
536
+ m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
537
+ m4/ltversion.m4 src/debug.c msvcc.sh \
538
+ generate-darwin-source-and-headers.py \
539
+ libffi.xcodeproj/project.pbxproj \
540
+ src/powerpc/t-aix \
541
+ libtool-ldflags libtool-version configure.host README.md \
542
+ libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
540
543
 
541
544
 
542
545
  # local.exp is generated by configure
@@ -564,11 +567,11 @@ noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h \
564
567
  src/or1k/ffitarget.h src/pa/ffitarget.h \
565
568
  src/powerpc/ffitarget.h src/powerpc/asm.h \
566
569
  src/powerpc/ffi_powerpc.h src/powerpc/internal.h \
567
- src/riscv/ffitarget.h \
570
+ src/riscv/ffitarget.h src/riscv/internal.h \
568
571
  src/s390/ffitarget.h src/s390/internal.h src/sh/ffitarget.h \
569
572
  src/sh64/ffitarget.h src/sparc/ffitarget.h \
570
573
  src/sparc/internal.h src/tile/ffitarget.h src/vax/ffitarget.h \
571
- src/wasm32/ffitarget.h \
574
+ src/wasm/ffitarget.h \
572
575
  src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
573
576
  src/x86/asmnames.h src/xtensa/ffitarget.h src/dlmalloc.c \
574
577
  src/kvx/ffitarget.h src/kvx/asm.h \
@@ -599,7 +602,7 @@ EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
599
602
  src/sh64/sysv.S src/sparc/ffi.c src/sparc/ffi64.c \
600
603
  src/sparc/v8.S src/sparc/v9.S src/tile/ffi.c src/tile/tile.S \
601
604
  src/vax/ffi.c src/vax/elfbsd.S src/x86/ffi.c src/x86/sysv.S \
602
- src/wasm32/ffi.c \
605
+ src/wasm/ffi.c \
603
606
  src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c \
604
607
  src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S \
605
608
  src/xtensa/ffi.c src/xtensa/sysv.S src/kvx/ffi.c \
@@ -623,7 +626,7 @@ libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
623
626
  libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
624
627
  libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
625
628
  AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
626
- AM_CCASFLAGS = $(AM_CPPFLAGS)
629
+ AM_CCASFLAGS = '$(AM_CPPFLAGS)'
627
630
  all: fficonfig.h
628
631
  $(MAKE) $(AM_MAKEFLAGS) all-recursive
629
632
 
@@ -1050,14 +1053,14 @@ src/x86/ffi.lo: src/x86/$(am__dirstamp) \
1050
1053
  src/x86/$(DEPDIR)/$(am__dirstamp)
1051
1054
  src/x86/sysv.lo: src/x86/$(am__dirstamp) \
1052
1055
  src/x86/$(DEPDIR)/$(am__dirstamp)
1053
- src/wasm32/$(am__dirstamp):
1054
- @$(MKDIR_P) src/wasm32
1055
- @: > src/wasm32/$(am__dirstamp)
1056
- src/wasm32/$(DEPDIR)/$(am__dirstamp):
1057
- @$(MKDIR_P) src/wasm32/$(DEPDIR)
1058
- @: > src/wasm32/$(DEPDIR)/$(am__dirstamp)
1059
- src/wasm32/ffi.lo: src/wasm32/$(am__dirstamp) \
1060
- src/wasm32/$(DEPDIR)/$(am__dirstamp)
1056
+ src/wasm/$(am__dirstamp):
1057
+ @$(MKDIR_P) src/wasm
1058
+ @: > src/wasm/$(am__dirstamp)
1059
+ src/wasm/$(DEPDIR)/$(am__dirstamp):
1060
+ @$(MKDIR_P) src/wasm/$(DEPDIR)
1061
+ @: > src/wasm/$(DEPDIR)/$(am__dirstamp)
1062
+ src/wasm/ffi.lo: src/wasm/$(am__dirstamp) \
1063
+ src/wasm/$(DEPDIR)/$(am__dirstamp)
1061
1064
  src/x86/ffiw64.lo: src/x86/$(am__dirstamp) \
1062
1065
  src/x86/$(DEPDIR)/$(am__dirstamp)
1063
1066
  src/x86/win64.lo: src/x86/$(am__dirstamp) \
@@ -1169,8 +1172,8 @@ mostlyclean-compile:
1169
1172
  -rm -f src/tile/*.lo
1170
1173
  -rm -f src/vax/*.$(OBJEXT)
1171
1174
  -rm -f src/vax/*.lo
1172
- -rm -f src/wasm32/*.$(OBJEXT)
1173
- -rm -f src/wasm32/*.lo
1175
+ -rm -f src/wasm/*.$(OBJEXT)
1176
+ -rm -f src/wasm/*.lo
1174
1177
  -rm -f src/x86/*.$(OBJEXT)
1175
1178
  -rm -f src/x86/*.lo
1176
1179
  -rm -f src/xtensa/*.$(OBJEXT)
@@ -1261,7 +1264,7 @@ distclean-compile:
1261
1264
  @AMDEP_TRUE@@am__include@ @am__quote@src/tile/$(DEPDIR)/tile.Plo@am__quote@ # am--include-marker
1262
1265
  @AMDEP_TRUE@@am__include@ @am__quote@src/vax/$(DEPDIR)/elfbsd.Plo@am__quote@ # am--include-marker
1263
1266
  @AMDEP_TRUE@@am__include@ @am__quote@src/vax/$(DEPDIR)/ffi.Plo@am__quote@ # am--include-marker
1264
- @AMDEP_TRUE@@am__include@ @am__quote@src/wasm32/$(DEPDIR)/ffi.Plo@am__quote@ # am--include-marker
1267
+ @AMDEP_TRUE@@am__include@ @am__quote@src/wasm/$(DEPDIR)/ffi.Plo@am__quote@ # am--include-marker
1265
1268
  @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi.Plo@am__quote@ # am--include-marker
1266
1269
  @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi64.Plo@am__quote@ # am--include-marker
1267
1270
  @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffiw64.Plo@am__quote@ # am--include-marker
@@ -1362,7 +1365,7 @@ clean-libtool:
1362
1365
  -rm -rf src/sparc/.libs src/sparc/_libs
1363
1366
  -rm -rf src/tile/.libs src/tile/_libs
1364
1367
  -rm -rf src/vax/.libs src/vax/_libs
1365
- -rm -rf src/wasm32/.libs src/wasm32/_libs
1368
+ -rm -rf src/wasm/.libs src/wasm/_libs
1366
1369
  -rm -rf src/x86/.libs src/x86/_libs
1367
1370
  -rm -rf src/xtensa/.libs src/xtensa/_libs
1368
1371
 
@@ -1789,8 +1792,8 @@ distclean-generic:
1789
1792
  -rm -f src/tile/$(am__dirstamp)
1790
1793
  -rm -f src/vax/$(DEPDIR)/$(am__dirstamp)
1791
1794
  -rm -f src/vax/$(am__dirstamp)
1792
- -rm -f src/wasm32/$(DEPDIR)/$(am__dirstamp)
1793
- -rm -f src/wasm32/$(am__dirstamp)
1795
+ -rm -f src/wasm/$(DEPDIR)/$(am__dirstamp)
1796
+ -rm -f src/wasm/$(am__dirstamp)
1794
1797
  -rm -f src/x86/$(DEPDIR)/$(am__dirstamp)
1795
1798
  -rm -f src/x86/$(am__dirstamp)
1796
1799
  -rm -f src/xtensa/$(DEPDIR)/$(am__dirstamp)
@@ -1889,7 +1892,7 @@ distclean: distclean-recursive
1889
1892
  -rm -f src/tile/$(DEPDIR)/tile.Plo
1890
1893
  -rm -f src/vax/$(DEPDIR)/elfbsd.Plo
1891
1894
  -rm -f src/vax/$(DEPDIR)/ffi.Plo
1892
- -rm -f src/wasm32/$(DEPDIR)/ffi.Plo
1895
+ -rm -f src/wasm/$(DEPDIR)/ffi.Plo
1893
1896
  -rm -f src/x86/$(DEPDIR)/ffi.Plo
1894
1897
  -rm -f src/x86/$(DEPDIR)/ffi64.Plo
1895
1898
  -rm -f src/x86/$(DEPDIR)/ffiw64.Plo
@@ -2029,7 +2032,7 @@ maintainer-clean: maintainer-clean-recursive
2029
2032
  -rm -f src/tile/$(DEPDIR)/tile.Plo
2030
2033
  -rm -f src/vax/$(DEPDIR)/elfbsd.Plo
2031
2034
  -rm -f src/vax/$(DEPDIR)/ffi.Plo
2032
- -rm -f src/wasm32/$(DEPDIR)/ffi.Plo
2035
+ -rm -f src/wasm/$(DEPDIR)/ffi.Plo
2033
2036
  -rm -f src/x86/$(DEPDIR)/ffi.Plo
2034
2037
  -rm -f src/x86/$(DEPDIR)/ffi64.Plo
2035
2038
  -rm -f src/x86/$(DEPDIR)/ffiw64.Plo
@@ -2083,6 +2086,10 @@ uninstall-am: uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
2083
2086
 
2084
2087
  .PRECIOUS: Makefile
2085
2088
 
2089
+
2090
+ # Alias required by AX_ENABLE_BUILDDIR / config-ml
2091
+ .PHONY: all-configured
2092
+ all-configured: all
2086
2093
  @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi.map-sun : libffi.map $(top_srcdir)/make_sunver.pl \
2087
2094
  @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
2088
2095
  @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ perl $(top_srcdir)/make_sunver.pl libffi.map \