ffi 1.10.0 → 1.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (349) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +240 -0
  3. data/Gemfile +3 -4
  4. data/README.md +42 -18
  5. data/Rakefile +68 -145
  6. data/ext/ffi_c/AbstractMemory.c +29 -34
  7. data/ext/ffi_c/Buffer.c +4 -9
  8. data/ext/ffi_c/Call.c +17 -50
  9. data/ext/ffi_c/Call.h +4 -7
  10. data/ext/ffi_c/ClosurePool.c +75 -25
  11. data/ext/ffi_c/ClosurePool.h +3 -1
  12. data/ext/ffi_c/DynamicLibrary.c +2 -7
  13. data/ext/ffi_c/Function.c +47 -131
  14. data/ext/ffi_c/Function.h +0 -4
  15. data/ext/ffi_c/FunctionInfo.c +3 -8
  16. data/ext/ffi_c/LastError.c +2 -6
  17. data/ext/ffi_c/LongDouble.c +12 -10
  18. data/ext/ffi_c/LongDouble.h +0 -4
  19. data/ext/ffi_c/MemoryPointer.c +3 -8
  20. data/ext/ffi_c/MemoryPointer.h +0 -4
  21. data/ext/ffi_c/MethodHandle.c +21 -31
  22. data/ext/ffi_c/MethodHandle.h +3 -2
  23. data/ext/ffi_c/Platform.c +5 -56
  24. data/ext/ffi_c/Pointer.c +25 -26
  25. data/ext/ffi_c/Pointer.h +0 -4
  26. data/ext/ffi_c/Struct.c +49 -56
  27. data/ext/ffi_c/Struct.h +12 -6
  28. data/ext/ffi_c/StructByValue.c +2 -7
  29. data/ext/ffi_c/StructLayout.c +22 -20
  30. data/ext/ffi_c/Thread.c +4 -228
  31. data/ext/ffi_c/Thread.h +1 -20
  32. data/ext/ffi_c/Type.c +1 -19
  33. data/ext/ffi_c/Type.h +0 -1
  34. data/ext/ffi_c/Types.c +7 -8
  35. data/ext/ffi_c/Types.h +3 -4
  36. data/ext/ffi_c/Variadic.c +23 -24
  37. data/ext/ffi_c/compat.h +4 -0
  38. data/ext/ffi_c/extconf.rb +56 -30
  39. data/ext/ffi_c/ffi.c +3 -8
  40. data/ext/ffi_c/libffi/.appveyor.yml +29 -13
  41. data/ext/ffi_c/libffi/.gitattributes +4 -0
  42. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  43. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  44. data/ext/ffi_c/libffi/.travis/build-in-container.sh +12 -0
  45. data/ext/ffi_c/libffi/.travis/build.sh +116 -8
  46. data/ext/ffi_c/libffi/.travis/install.sh +65 -16
  47. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  48. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +1 -1
  49. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  50. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  51. data/ext/ffi_c/libffi/.travis/site.exp +10 -1
  52. data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  53. data/ext/ffi_c/libffi/.travis.yml +51 -2
  54. data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
  55. data/ext/ffi_c/libffi/LICENSE +1 -1
  56. data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +5 -4
  57. data/ext/ffi_c/libffi/Makefile.am +56 -72
  58. data/ext/ffi_c/libffi/Makefile.in +458 -207
  59. data/ext/ffi_c/libffi/README.md +33 -8
  60. data/ext/ffi_c/libffi/config.guess +552 -331
  61. data/ext/ffi_c/libffi/config.sub +1321 -1306
  62. data/ext/ffi_c/libffi/configure +414 -342
  63. data/ext/ffi_c/libffi/configure.ac +37 -12
  64. data/ext/ffi_c/libffi/configure.host +56 -27
  65. data/ext/ffi_c/libffi/doc/Makefile.in +9 -5
  66. data/ext/ffi_c/libffi/doc/libffi.texi +26 -14
  67. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  68. data/ext/ffi_c/libffi/fficonfig.h.in +13 -0
  69. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +2 -4
  70. data/ext/ffi_c/libffi/include/Makefile.in +10 -6
  71. data/ext/ffi_c/libffi/include/ffi.h.in +19 -7
  72. data/ext/ffi_c/libffi/include/ffi_common.h +5 -1
  73. data/ext/ffi_c/libffi/install-sh +23 -13
  74. data/ext/ffi_c/libffi/libffi.map.in +8 -12
  75. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
  76. data/ext/ffi_c/libffi/libtool-version +1 -1
  77. data/ext/ffi_c/libffi/ltmain.sh +156 -61
  78. data/ext/ffi_c/libffi/m4/asmcfi.m4 +1 -1
  79. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
  80. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
  81. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +2 -1
  82. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
  83. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
  84. data/ext/ffi_c/libffi/make_sunver.pl +333 -0
  85. data/ext/ffi_c/libffi/man/Makefile.in +9 -5
  86. data/ext/ffi_c/libffi/missing +8 -8
  87. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
  88. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
  89. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
  90. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
  91. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +511 -0
  92. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
  93. data/ext/ffi_c/libffi/msvcc.sh +38 -13
  94. data/ext/ffi_c/libffi/src/aarch64/ffi.c +153 -69
  95. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +19 -3
  96. data/ext/ffi_c/libffi/src/aarch64/internal.h +1 -0
  97. data/ext/ffi_c/libffi/src/aarch64/sysv.S +22 -9
  98. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
  99. data/ext/ffi_c/libffi/src/arm/ffi.c +62 -5
  100. data/ext/ffi_c/libffi/src/arm/ffitarget.h +8 -1
  101. data/ext/ffi_c/libffi/src/arm/sysv.S +6 -4
  102. data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
  103. data/ext/ffi_c/libffi/src/closures.c +69 -14
  104. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  105. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  106. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  107. data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
  108. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  109. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  110. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  111. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  112. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  113. data/ext/ffi_c/libffi/src/metag/ffi.c +1 -1
  114. data/ext/ffi_c/libffi/src/mips/ffi.c +5 -1
  115. data/ext/ffi_c/libffi/src/mips/ffitarget.h +1 -1
  116. data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
  117. data/ext/ffi_c/libffi/src/moxie/ffi.c +1 -1
  118. data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
  119. data/ext/ffi_c/libffi/src/pa/ffitarget.h +1 -6
  120. data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
  121. data/ext/ffi_c/libffi/src/pa/linux.S +27 -4
  122. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -4
  123. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
  124. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +211 -32
  125. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
  126. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
  127. data/ext/ffi_c/libffi/src/powerpc/linux64.S +91 -28
  128. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +81 -5
  129. data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
  130. data/ext/ffi_c/libffi/src/prep_cif.c +4 -2
  131. data/ext/ffi_c/libffi/src/riscv/ffi.c +42 -6
  132. data/ext/ffi_c/libffi/src/riscv/ffitarget.h +1 -0
  133. data/ext/ffi_c/libffi/src/riscv/sysv.S +86 -7
  134. data/ext/ffi_c/libffi/src/x86/ffi.c +29 -12
  135. data/ext/ffi_c/libffi/src/x86/ffi64.c +22 -11
  136. data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
  137. data/ext/ffi_c/libffi/src/x86/ffiw64.c +20 -10
  138. data/ext/ffi_c/libffi/src/x86/sysv.S +105 -10
  139. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +995 -0
  140. data/ext/ffi_c/libffi/src/x86/unix64.S +100 -4
  141. data/ext/ffi_c/libffi/src/x86/win64.S +12 -3
  142. data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
  143. data/ext/ffi_c/libffi/testsuite/Makefile.am +114 -109
  144. data/ext/ffi_c/libffi/testsuite/Makefile.in +124 -84
  145. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +32 -8
  146. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
  147. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +4 -4
  148. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
  149. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
  150. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +9 -8
  151. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -1
  152. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  153. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  154. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +3 -1
  155. data/ext/ffi_c/libffi.darwin.mk +1 -1
  156. data/ext/ffi_c/rbffi.h +0 -2
  157. data/ffi.gemspec +13 -7
  158. data/lib/ffi/abstract_memory.rb +44 -0
  159. data/lib/ffi/autopointer.rb +1 -1
  160. data/lib/ffi/data_converter.rb +67 -0
  161. data/lib/ffi/ffi.rb +3 -0
  162. data/lib/ffi/io.rb +3 -3
  163. data/lib/ffi/library.rb +13 -9
  164. data/lib/ffi/managedstruct.rb +2 -2
  165. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  166. data/lib/ffi/platform/aarch64-freebsd/types.conf +89 -89
  167. data/lib/ffi/platform/aarch64-freebsd12/types.conf +162 -109
  168. data/lib/ffi/platform/aarch64-linux/types.conf +81 -81
  169. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  170. data/lib/ffi/platform/arm-freebsd/types.conf +87 -87
  171. data/lib/ffi/platform/arm-freebsd12/types.conf +87 -87
  172. data/lib/ffi/platform/arm-linux/types.conf +110 -82
  173. data/lib/ffi/platform/i386-cygwin/types.conf +1 -1
  174. data/lib/ffi/platform/i386-darwin/types.conf +63 -63
  175. data/lib/ffi/platform/i386-freebsd/types.conf +87 -87
  176. data/lib/ffi/platform/i386-freebsd12/types.conf +87 -87
  177. data/lib/ffi/platform/i386-gnu/types.conf +84 -84
  178. data/lib/ffi/platform/i386-linux/types.conf +77 -77
  179. data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
  180. data/lib/ffi/platform/i386-openbsd/types.conf +89 -89
  181. data/lib/ffi/platform/i386-solaris/types.conf +96 -96
  182. data/lib/ffi/platform/i386-windows/types.conf +43 -96
  183. data/lib/ffi/platform/ia64-linux/types.conf +79 -79
  184. data/lib/ffi/platform/mips-linux/types.conf +79 -79
  185. data/lib/ffi/platform/mips64-linux/types.conf +81 -81
  186. data/lib/ffi/platform/mips64el-linux/types.conf +81 -81
  187. data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
  188. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +79 -79
  189. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +79 -79
  190. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +81 -81
  191. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +81 -81
  192. data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
  193. data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
  194. data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
  195. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  196. data/lib/ffi/platform/powerpc64-linux/types.conf +81 -81
  197. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  198. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  199. data/lib/ffi/platform/s390-linux/types.conf +79 -79
  200. data/lib/ffi/platform/s390x-linux/types.conf +79 -79
  201. data/lib/ffi/platform/sparc-linux/types.conf +79 -79
  202. data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
  203. data/lib/ffi/platform/sparc64-linux/types.conf +79 -79
  204. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  205. data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
  206. data/lib/ffi/platform/x86_64-cygwin/types.conf +1 -1
  207. data/lib/ffi/platform/x86_64-darwin/types.conf +88 -84
  208. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  209. data/lib/ffi/platform/x86_64-freebsd/types.conf +89 -89
  210. data/lib/ffi/platform/x86_64-freebsd12/types.conf +139 -109
  211. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  212. data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
  213. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  214. data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -89
  215. data/lib/ffi/platform/x86_64-openbsd/types.conf +86 -86
  216. data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
  217. data/lib/ffi/platform/x86_64-windows/types.conf +42 -110
  218. data/lib/ffi/platform.rb +24 -9
  219. data/lib/ffi/pointer.rb +22 -15
  220. data/lib/ffi/struct.rb +13 -68
  221. data/lib/ffi/struct_by_reference.rb +72 -0
  222. data/lib/ffi/struct_layout.rb +96 -0
  223. data/lib/ffi/tools/const_generator.rb +11 -8
  224. data/lib/ffi/tools/generator.rb +47 -2
  225. data/lib/ffi/tools/generator_task.rb +13 -17
  226. data/lib/ffi/tools/struct_generator.rb +6 -5
  227. data/lib/ffi/tools/types_generator.rb +7 -4
  228. data/lib/ffi/types.rb +1 -1
  229. data/lib/ffi/variadic.rb +1 -10
  230. data/lib/ffi/version.rb +1 -1
  231. data/lib/ffi.rb +10 -3
  232. data/rakelib/ffi_gem_helper.rb +65 -0
  233. data/samples/getlogin.rb +1 -1
  234. data/samples/getpid.rb +1 -1
  235. data/samples/gettimeofday.rb +8 -8
  236. data/samples/hello.rb +2 -1
  237. data/samples/inotify.rb +1 -1
  238. data/samples/pty.rb +1 -2
  239. data/samples/qsort.rb +0 -1
  240. metadata +157 -139
  241. data/.gitignore +0 -22
  242. data/.gitmodules +0 -3
  243. data/.travis.yml +0 -43
  244. data/.yardopts +0 -5
  245. data/appveyor.yml +0 -22
  246. data/ext/ffi_c/DataConverter.c +0 -91
  247. data/ext/ffi_c/StructByReference.c +0 -190
  248. data/ext/ffi_c/StructByReference.h +0 -50
  249. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  250. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  251. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
  252. data/ext/ffi_c/win32/stdbool.h +0 -8
  253. data/ext/ffi_c/win32/stdint.h +0 -201
  254. data/samples/sample_helper.rb +0 -6
  255. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
  256. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
  257. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
  258. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
  259. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
  260. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
  261. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
  262. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
  263. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +0 -0
  264. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +0 -0
  265. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +0 -0
  266. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +0 -0
  267. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +0 -0
  268. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +0 -0
  269. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +0 -0
  270. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +0 -0
  271. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +0 -0
  272. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +0 -0
  273. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +0 -0
  274. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +0 -0
  275. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +0 -0
  276. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +0 -0
  277. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +0 -0
  278. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +0 -0
  279. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +0 -0
  280. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +0 -0
  281. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +0 -0
  282. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +0 -0
  283. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +0 -0
  284. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +0 -0
  285. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +0 -0
  286. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +0 -0
  287. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +0 -0
  288. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +0 -0
  289. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +0 -0
  290. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +0 -0
  291. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +0 -0
  292. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +0 -0
  293. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +0 -0
  294. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +0 -0
  295. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +0 -0
  296. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +0 -0
  297. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +0 -0
  298. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +0 -0
  299. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +0 -0
  300. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +0 -0
  301. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +0 -0
  302. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  303. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +0 -0
  304. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
  305. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +0 -0
  306. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +0 -0
  307. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
  308. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
  309. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
  310. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
  311. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
  312. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
  313. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
  314. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
  315. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +0 -0
  316. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +0 -0
  317. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
  318. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
  319. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
  320. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +0 -0
  321. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
  322. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar_va.c +0 -0
  323. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
  324. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +0 -0
  325. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +0 -0
  326. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +0 -0
  327. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
  328. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort_va.c +0 -0
  329. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  330. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +0 -0
  331. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +0 -0
  332. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +0 -0
  333. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +0 -0
  334. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +0 -0
  335. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +0 -0
  336. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +0 -0
  337. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +0 -0
  338. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +0 -0
  339. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +0 -0
  340. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +0 -0
  341. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +0 -0
  342. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  343. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
  344. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
  345. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +0 -0
  346. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +0 -0
  347. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +0 -0
  348. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +0 -0
  349. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 108ea9d730d92bf5994912324af1cd21b23256c575d0344a7884990d8307baa7
4
- data.tar.gz: be60f268828396e8b67d1329ac95b136f4f03a229d37f95f73d35dcd1fb8908c
3
+ metadata.gz: d6f15f4e38ad34949be88341216eed2ea132c4e5763d333c20c240491b033ff6
4
+ data.tar.gz: deefb7285ccae7d7248ee2697709e859d4c0017e3aab7e183ce7fc2a824bd395
5
5
  SHA512:
6
- metadata.gz: eed04778f789f4216f78466bc8fb3f30efa96f3da66720fe3fcce1f5eba01213387c20fe0eb1bcd73146931cefdc68133a3d6a1723b921e1ce00adb58e8e6440
7
- data.tar.gz: 8c8c96560189bce8d0a95513872028692b89d181ed8ba68752085cbcac2cf957bde9b00c6666946646849acea167b300c28727fd9669098cfb83514fbcf29474
6
+ metadata.gz: 7b2c32adb0af3689632c9b6113389245dba13d5f9e622efd2f322b0226933185ae0fbc128cb33c278dd2ef7fddda106fe8158904e95d1fa7d53b14ff72722ff6
7
+ data.tar.gz: 60ca6ad01c3d977b8b6efe0329683d4105cae8147848c9fcb0cabe643f5957e7a6ab6a06716e1f579ada6e0c3795f4fd4c0f16bda783342310a305423a5d7a60
data/CHANGELOG.md CHANGED
@@ -1,3 +1,243 @@
1
+ 1.15.5 / 2022-01-10
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Fix long double argument or return values on 32bit i686. #849
6
+ * FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929
7
+
8
+ Added:
9
+ * Add Windows fat binary gem for Ruby-3.1
10
+
11
+ Removed:
12
+ * Remove Windows fat binary gem for Ruby < 2.4
13
+
14
+
15
+ 1.15.4 / 2021-09-01
16
+ -------------------
17
+
18
+ Fixed:
19
+ * Fix build for uClibc. #913
20
+ * Correct module lookup when including `ffi-module` gem. #912
21
+
22
+ Changed:
23
+ * Use ruby code of the ffi gem in JRuby-9.2.20+. #915
24
+
25
+
26
+ 1.15.3 / 2021-06-16
27
+ -------------------
28
+
29
+ Fixed:
30
+ * Fix temporary packaging issue with libffi. #904
31
+
32
+
33
+ 1.15.2 / 2021-06-16
34
+ -------------------
35
+
36
+ Added:
37
+ * Add support for Windows MINGW-UCRT build. #903
38
+ * Add `/opt/homebrew/lib/` to fallback search paths to improve homebrew support. #880 #882
39
+
40
+ Changed:
41
+ * Regenerate `types.conf` for FreeBSD12 aarch64. #902
42
+
43
+
44
+ 1.15.1 / 2021-05-22
45
+ -------------------
46
+
47
+ Fixed:
48
+ * Append -pthread to linker options. #893
49
+ * Use arm or aarch64 to identify Apple ARM CPU arch. #899
50
+ * Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897
51
+
52
+
53
+ 1.15.0 / 2021-03-05
54
+ -------------------
55
+
56
+ Fixed:
57
+ * Fix MSVC build
58
+ * Fix async callbacks in conjunction with fork(). #884
59
+
60
+ Added:
61
+ * Allow to pass callbacks in varargs. #885
62
+ * Name the threads for FFI callback dispatcher and async thread calls for easier debugging. #883
63
+ The name can be retrieved by Thread.name and is shown by Thread.list.inspect etc.
64
+ Even gdb shows the thread name on supported operating systems.
65
+ * Add types.conf for powerpc64le-linux
66
+ * Add types.conf for riscv64-linux
67
+ * More release automation of ffi gems
68
+
69
+ Changed:
70
+ * Switch from rubygems-tasks to bundler/gem_helper
71
+
72
+ Removed:
73
+ * Remove unused VariadicInvoker#init
74
+
75
+
76
+ 1.14.2 / 2020-12-21
77
+ -------------------
78
+
79
+ Fixed:
80
+ * Fix builtin libffi on newer Ubuntu caused by an outdated Makefile.in . #863
81
+
82
+
83
+ 1.14.1 / 2020-12-19
84
+ -------------------
85
+
86
+ Changed:
87
+ * Revert changes to FFI::Pointer#write_string made in ffi-1.14.0.
88
+ It breaks compatibilty in a way that can cause hard to find errors. #857
89
+
90
+
91
+ 1.14.0 / 2020-12-18
92
+ -------------------
93
+
94
+ Added:
95
+ * Add types.conf for x86_64-msys, x86_64-haiku, aarch64-openbsd and aarch64-darwin (alias arm64-darwin)
96
+ * Add method AbstractMemory#size_limit? . #829
97
+ * Add new extconf option --enable-libffi-alloc which is enabled per default on Apple M1 (arm64-darwin).
98
+
99
+ Changed:
100
+ * Do NULL pointer check only when array length > 0 . #305
101
+ * Raise an error on an unknown order argument. #830
102
+ * Change FFI::Pointer#write_string to terminate with a NUL byte like other string methods. #805
103
+ * Update bundled libffi to latest master.
104
+
105
+ Removed:
106
+ * Remove win32/stdint.h and stdbool.h because of copyright issue. #693
107
+
108
+ Fixed:
109
+ * Fix possible UTF-8 load error in loader script interpretation. #792
110
+ * Fix segfault on non-array argument to #write_array_of_*
111
+ * Fix memory leak in MethodHandle . #815
112
+ * Fix possible segfault in combination with fiddle or other libffi using gems . #835
113
+ * Fix possibility to use ffi ruby gem with JRuby-9.3 . #763
114
+ * Fix a GC issue, when a callback Proc is used on more than 2 callback signatures. #820
115
+
116
+
117
+ 1.13.1 / 2020-06-09
118
+ -------------------
119
+
120
+ Changed:
121
+ * Revert use of `ucrtbase.dll` as default C library on Windows-MINGW.
122
+ `ucrtbase.dll` is still used on MSWIN target. #790
123
+ * Test for `ffi_prep_closure_loc()` to make sure we can use this function.
124
+ This fixes incorrect use of system libffi on MacOS Mojave (10.14). #787
125
+ * Update types.conf on x86_64-dragonflybsd
126
+
127
+
128
+ 1.13.0 / 2020-06-01
129
+ -------------------
130
+
131
+ Added:
132
+ * Add TruffleRuby support. Almost all specs are running on TruffleRuby and succeed. #768
133
+ * Add ruby source files to the java gem. This allows to ship the Ruby library code per platform java gem and add it as a default gem to JRuby. #763
134
+ * Add FFI::Platform::LONG_DOUBLE_SIZE
135
+ * Add bounds checks for writing to an inline char[] . #756
136
+ * Add long double as callback return value. #771
137
+ * Update type definitions and add types from stdint.h and stddef.h on i386-windows, x86_64-windows, x86_64-darwin, x86_64-linux, arm-linux, powerpc-linux. #749
138
+ * Add new type definitions for powerpc-openbsd and sparcv9-openbsd. #775, #778
139
+
140
+ Changed:
141
+ * Raise required ruby version to >= 2.3.
142
+ * Lots of cleanups and improvements in library, specs and benchmarks.
143
+ * Fix a lot of compiler warnings at the C-extension
144
+ * Fix several install issues on MacOS:
145
+ * Look for libffi in SDK paths, since recent versions of macOS removed it from `/usr/include` . #757
146
+ * Fix error `ld: library not found for -lgcc_s.10.4`
147
+ * Don't built for i386 architecture as it is deprecated
148
+ * Several fixes for MSVC build on Windows. #779
149
+ * Use `ucrtbase.dll` as default C library on Windows instead of old `msvcrt.dll`. #779
150
+ * Update builtin libffi to fix a Powerpc issue with parameters of type long
151
+ * Allow unmodified sourcing of (the ruby code of) this gem in JRuby and TruffleRuby as a default gem. #747
152
+ * Improve check to detect if a module has a #find_type method suitable for FFI. This fixes compatibility with stdlib `mkmf` . #776
153
+
154
+ Removed:
155
+ * Reject callback with `:string` return type at definition, because it didn't work so far and is not save to use. #751, #782
156
+
157
+
158
+ 1.12.2 / 2020-02-01
159
+ -------------------
160
+
161
+ * Fix possible segfault at FFI::Struct#[] and []= after GC.compact . #742
162
+
163
+
164
+ 1.12.1 / 2020-01-14
165
+ -------------------
166
+
167
+ Added:
168
+ * Add binary gem support for ruby-2.7 on Windows
169
+
170
+
171
+ 1.12.0 / 2020-01-14
172
+ -------------------
173
+
174
+ Added:
175
+ * FFI::VERSION is defined as part of `require 'ffi'` now.
176
+ It is no longer necessary to `require 'ffi/version'` .
177
+
178
+ Changed:
179
+ * Update libffi to latest master.
180
+
181
+ Deprecated:
182
+ * Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735
183
+
184
+
185
+ 1.11.3 / 2019-11-25
186
+ -------------------
187
+
188
+ Removed:
189
+ * Remove support for tainted objects which cause deprecation warnings in ruby-2.7. #730
190
+
191
+
192
+ 1.11.2 / 2019-11-11
193
+ -------------------
194
+
195
+ Added:
196
+ * Add DragonFlyBSD as a platform. #724
197
+
198
+ Changed:
199
+ * Sort all types.conf files, so that files and changes are easier to compare.
200
+ * Regenerated type conf for freebsd12 and x86_64-linux targets. #722
201
+ * Remove MACOSX_DEPLOYMENT_TARGET that was targeting very old version 10.4. #647
202
+ * Fix library name mangling for non glibc Linux/UNIX. #727
203
+ * Fix compiler warnings raised by ruby-2.7
204
+ * Update libffi to latest master.
205
+
206
+
207
+ 1.11.1 / 2019-05-20
208
+ -------------------
209
+
210
+ Changed:
211
+ * Raise required ruby version to >=2.0. #699, #700
212
+ * Fix a possible linker error on ruby < 2.3 on Linux.
213
+
214
+
215
+ 1.11.0 / 2019-05-17
216
+ -------------------
217
+ This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. #700
218
+
219
+ Added:
220
+ * Add ability to disable or force use of system libffi. #669
221
+ Use like `gem inst ffi -- --enable-system-libffi` .
222
+ * Add ability to call FFI callbacks from outside of FFI call frame. #584
223
+ * Add proper documentation to FFI::Generator and ::Task
224
+ * Add gemspec metadata. #696, #698
225
+
226
+ Changed:
227
+ * Fix stdcall on Win32. #649, #669
228
+ * Fix load paths for FFI::Generator::Task
229
+ * Fix FFI::Pointer#read_string(0) to return a binary String. #692
230
+ * Fix benchmark suite so that it runs on ruby-2.x
231
+ * Move FFI::Platform::CPU from C to Ruby. #663
232
+ * Move FFI::StructByReference to Ruby. #681
233
+ * Move FFI::DataConverter to Ruby (#661)
234
+ * Various cleanups and improvements of specs and benchmarks
235
+
236
+ Removed:
237
+ * Remove ruby-1.8 and 1.9 compatibility code. #683
238
+ * Remove unused spec files. #684
239
+
240
+
1
241
  1.10.0 / 2019-01-06
2
242
  -------------------
3
243
 
data/Gemfile CHANGED
@@ -1,12 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem 'rake', '~> 10.1'
4
+ gem 'rake', '~> 13.0'
5
5
  gem 'rake-compiler', '~> 1.0.3'
6
- gem 'rake-compiler-dock', '~> 0.7.0'
6
+ gem 'rake-compiler-dock', '~> 1.0'
7
7
  gem 'rspec', '~> 3.0'
8
- gem 'rubygems-tasks', '~> 0.2.4', :require => 'rubygems/tasks'
9
- gem "rubysl", "~> 2.0", :platforms => 'rbx'
8
+ gem 'bundler', '>= 1.16', '< 3'
10
9
  end
11
10
 
12
11
  group :doc do
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # ruby-ffi https://wiki.github.com/ffi/ffi [![Build Status](https://travis-ci.org/ffi/ffi.png?branch=master)](https://travis-ci.org/ffi/ffi) [![Build status Windows](https://ci.appveyor.com/api/projects/status/r8wxn1sd4s794gg1/branch/master?svg=true)](https://ci.appveyor.com/project/larskanis/ffi-aofqa/branch/master)
1
+ # Ruby-FFI https://github.com/ffi/ffi/wiki [![Build Status](https://travis-ci.com/ffi/ffi.svg?branch=master)](https://travis-ci.com/ffi/ffi) [![Build status Windows](https://ci.appveyor.com/api/projects/status/r8wxn1sd4s794gg1/branch/master?svg=true)](https://ci.appveyor.com/project/larskanis/ffi-aofqa/branch/master)
2
2
 
3
3
  ## Description
4
4
 
5
- Ruby-FFI is a ruby extension for programmatically loading dynamic
5
+ Ruby-FFI is a gem for programmatically loading dynamically-linked native
6
6
  libraries, binding functions within them, and calling those functions
7
7
  from Ruby code. Moreover, a Ruby-FFI extension works without changes
8
- on Ruby and JRuby. [Discover why you should write your next extension
9
- using Ruby-FFI](https://wiki.github.com/ffi/ffi/why-use-ffi).
8
+ on CRuby (MRI), JRuby, Rubinius and TruffleRuby. [Discover why you should write your next extension
9
+ using Ruby-FFI](https://github.com/ffi/ffi/wiki/why-use-ffi).
10
10
 
11
- ## Features/problems
11
+ ## Features
12
12
 
13
13
  * Intuitive DSL
14
14
  * Supports all C native types
15
15
  * C structs (also nested), enums and global variables
16
- * Callbacks from C to ruby
16
+ * Callbacks from C to Ruby
17
17
  * Automatic garbage collection of native memory
18
18
 
19
19
  ## Synopsis
@@ -30,39 +30,62 @@ end
30
30
  MyLib.puts 'Hello, World using libc!'
31
31
  ```
32
32
 
33
- For less minimalistic and more sane examples you may look at:
33
+ For less minimalistic and more examples you may look at:
34
34
 
35
- * the samples/ folder
36
- * the examples on the [wiki](https://wiki.github.com/ffi/ffi)
37
- * the projects using FFI listed on this page (https://wiki.github.com/ffi/ffi/projects-using-ffi)
35
+ * the `samples/` folder
36
+ * the examples on the [wiki](https://github.com/ffi/ffi/wiki)
37
+ * the projects using FFI listed on the wiki: https://github.com/ffi/ffi/wiki/projects-using-ffi
38
38
 
39
39
  ## Requirements
40
40
 
41
- You need a sane building environment in order to compile the extension.
42
- At a minimum, you will need:
43
- * A C compiler (e.g. Xcode on OSX, gcc on everything else)
44
- * libffi development library - this is commonly in the libffi-dev or libffi-devel
41
+ When installing the gem on CRuby (MRI), you will need:
42
+ * A C compiler (e.g., Xcode on macOS, `gcc` or `clang` on everything else)
43
+ Optionally (speeds up installation):
44
+ * The `libffi` library and development headers - this is commonly in the `libffi-dev` or `libffi-devel` packages
45
45
 
46
- On Linux systems running with [PaX](https://en.wikipedia.org/wiki/PaX) (Gentoo, Alpine, etc.) FFI may trigger `mprotect` errors. You may need to disable [mprotect](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Restrict_mprotect.28.29) for ruby (`paxctl -m [/path/to/ruby]`) for the time being until a solution is found.
46
+ The ffi gem comes with a builtin libffi version, which is used, when the system libffi library is not available or too old.
47
+ Use of the system libffi can be enforced by:
48
+ ```
49
+ gem install ffi -- --enable-system-libffi # to install the gem manually
50
+ bundle config build.ffi --enable-system-libffi # for bundle install
51
+ ```
52
+ or prevented by `--disable-system-libffi`.
53
+
54
+ On Linux systems running with [PaX](https://en.wikipedia.org/wiki/PaX) (Gentoo, Alpine, etc.), FFI may trigger `mprotect` errors. You may need to disable [mprotect](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Restrict_mprotect.28.29) for ruby (`paxctl -m [/path/to/ruby]`) for the time being until a solution is found.
55
+
56
+ On FreeBSD systems pkgconf must be installed for the gem to be able to compile using clang. Install either via packages `pkg install pkgconf` or from ports via `devel/pkgconf`.
57
+
58
+ On JRuby and TruffleRuby, there are no requirements to install the FFI gem, and `require 'ffi'` works even without installing the gem (i.e., the gem is preinstalled on these implementations).
47
59
 
48
60
  ## Installation
49
61
 
50
62
  From rubygems:
51
63
 
52
64
  [sudo] gem install ffi
65
+
66
+ From a Gemfile using git or GitHub
67
+
68
+ gem 'ffi', github: 'ffi/ffi', submodules: true
53
69
 
54
70
  or from the git repository on github:
55
71
 
56
72
  git clone git://github.com/ffi/ffi.git
57
- git submodule update --init --recursive
58
73
  cd ffi
74
+ git submodule update --init --recursive
75
+ bundle install
59
76
  rake install
60
77
 
78
+ ### Install options:
79
+
80
+ * `--enable-system-libffi` : Force usage of system libffi
81
+ * `--disable-system-libffi` : Force usage of builtin libffi
82
+ * `--enable-libffi-alloc` : Force closure allocation by libffi
83
+ * `--disable-libffi-alloc` : Force closure allocation by builtin method
84
+
61
85
  ## License
62
86
 
63
87
  The ffi library is covered by the BSD license, also see the LICENSE file.
64
- The specs are shared with Rubyspec and are licensed by the same license
65
- as Rubyspec, see the LICENSE.SPECS file.
88
+ The specs are covered by the same license as [ruby/spec](https://github.com/ruby/spec), the MIT license.
66
89
 
67
90
  ## Credits
68
91
 
@@ -74,6 +97,7 @@ The following people have submitted code, bug reports, or otherwise contributed
74
97
  * Andreas Niederl <rico32@gmx.net>
75
98
  * Andrew Cholakian <andrew@andrewvc.com>
76
99
  * Antonio Terceiro <terceiro@softwarelivre.org>
100
+ * Benoit Daloze <eregontp@gmail.com>
77
101
  * Brian Candler <B.Candler@pobox.com>
78
102
  * Brian D. Burns <burns180@gmail.com>
79
103
  * Bryan Kearney <bkearney@redhat.com>