ffi 1.11.3 → 1.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +184 -0
  3. data/Gemfile +3 -4
  4. data/README.md +24 -3
  5. data/Rakefile +64 -69
  6. data/ext/ffi_c/AbstractMemory.c +24 -25
  7. data/ext/ffi_c/Buffer.c +4 -9
  8. data/ext/ffi_c/Call.c +4 -16
  9. data/ext/ffi_c/ClosurePool.c +75 -25
  10. data/ext/ffi_c/ClosurePool.h +3 -1
  11. data/ext/ffi_c/DynamicLibrary.c +1 -6
  12. data/ext/ffi_c/Function.c +38 -38
  13. data/ext/ffi_c/Function.h +0 -4
  14. data/ext/ffi_c/FunctionInfo.c +3 -8
  15. data/ext/ffi_c/LastError.c +2 -6
  16. data/ext/ffi_c/LongDouble.c +5 -3
  17. data/ext/ffi_c/LongDouble.h +0 -4
  18. data/ext/ffi_c/MemoryPointer.c +3 -8
  19. data/ext/ffi_c/MemoryPointer.h +0 -4
  20. data/ext/ffi_c/MethodHandle.c +21 -31
  21. data/ext/ffi_c/MethodHandle.h +3 -2
  22. data/ext/ffi_c/Platform.c +5 -9
  23. data/ext/ffi_c/Pointer.c +25 -26
  24. data/ext/ffi_c/Pointer.h +0 -4
  25. data/ext/ffi_c/Struct.c +49 -56
  26. data/ext/ffi_c/Struct.h +12 -6
  27. data/ext/ffi_c/StructByValue.c +2 -7
  28. data/ext/ffi_c/StructLayout.c +22 -20
  29. data/ext/ffi_c/Thread.c +0 -8
  30. data/ext/ffi_c/Thread.h +1 -9
  31. data/ext/ffi_c/Type.c +1 -1
  32. data/ext/ffi_c/Types.c +6 -7
  33. data/ext/ffi_c/Types.h +3 -4
  34. data/ext/ffi_c/Variadic.c +14 -9
  35. data/ext/ffi_c/compat.h +4 -0
  36. data/ext/ffi_c/extconf.rb +36 -24
  37. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  38. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  39. data/ext/ffi_c/libffi/.travis/build-in-container.sh +2 -12
  40. data/ext/ffi_c/libffi/.travis/build.sh +62 -30
  41. data/ext/ffi_c/libffi/.travis/install.sh +65 -37
  42. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  43. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +1 -1
  44. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  45. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  46. data/ext/ffi_c/libffi/.travis/site.exp +10 -1
  47. data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  48. data/ext/ffi_c/libffi/.travis.yml +32 -12
  49. data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
  50. data/ext/ffi_c/libffi/LICENSE +1 -1
  51. data/ext/ffi_c/libffi/Makefile.am +53 -61
  52. data/ext/ffi_c/libffi/Makefile.in +458 -207
  53. data/ext/ffi_c/libffi/README.md +22 -6
  54. data/ext/ffi_c/libffi/config.guess +552 -331
  55. data/ext/ffi_c/libffi/config.sub +1321 -1306
  56. data/ext/ffi_c/libffi/configure +414 -342
  57. data/ext/ffi_c/libffi/configure.ac +32 -11
  58. data/ext/ffi_c/libffi/configure.host +37 -22
  59. data/ext/ffi_c/libffi/doc/Makefile.in +9 -5
  60. data/ext/ffi_c/libffi/doc/libffi.texi +26 -14
  61. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  62. data/ext/ffi_c/libffi/fficonfig.h.in +13 -0
  63. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +2 -4
  64. data/ext/ffi_c/libffi/include/Makefile.in +10 -6
  65. data/ext/ffi_c/libffi/include/ffi.h.in +15 -7
  66. data/ext/ffi_c/libffi/install-sh +23 -13
  67. data/ext/ffi_c/libffi/libffi.map.in +8 -12
  68. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
  69. data/ext/ffi_c/libffi/libtool-version +1 -1
  70. data/ext/ffi_c/libffi/ltmain.sh +156 -61
  71. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
  72. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
  73. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +2 -1
  74. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
  75. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
  76. data/ext/ffi_c/libffi/man/Makefile.in +9 -5
  77. data/ext/ffi_c/libffi/missing +8 -8
  78. data/ext/ffi_c/libffi/msvcc.sh +11 -11
  79. data/ext/ffi_c/libffi/src/aarch64/ffi.c +51 -35
  80. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +10 -5
  81. data/ext/ffi_c/libffi/src/aarch64/internal.h +1 -0
  82. data/ext/ffi_c/libffi/src/aarch64/sysv.S +14 -3
  83. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +1 -1
  84. data/ext/ffi_c/libffi/src/arm/ffi.c +22 -0
  85. data/ext/ffi_c/libffi/src/arm/sysv.S +4 -4
  86. data/ext/ffi_c/libffi/src/closures.c +43 -12
  87. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  88. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  89. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  90. data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
  91. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  92. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  93. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  94. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  95. data/ext/ffi_c/libffi/src/mips/ffi.c +5 -1
  96. data/ext/ffi_c/libffi/src/mips/ffitarget.h +1 -1
  97. data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
  98. data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
  99. data/ext/ffi_c/libffi/src/pa/ffitarget.h +1 -6
  100. data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
  101. data/ext/ffi_c/libffi/src/pa/linux.S +4 -2
  102. data/ext/ffi_c/libffi/src/powerpc/ffi.c +3 -2
  103. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
  104. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +154 -8
  105. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
  106. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
  107. data/ext/ffi_c/libffi/src/powerpc/linux64.S +91 -28
  108. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +80 -4
  109. data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
  110. data/ext/ffi_c/libffi/src/prep_cif.c +1 -1
  111. data/ext/ffi_c/libffi/src/x86/ffi.c +15 -6
  112. data/ext/ffi_c/libffi/src/x86/ffi64.c +17 -8
  113. data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
  114. data/ext/ffi_c/libffi/src/x86/ffiw64.c +15 -8
  115. data/ext/ffi_c/libffi/src/x86/sysv.S +15 -6
  116. data/ext/ffi_c/libffi/src/x86/unix64.S +59 -4
  117. data/ext/ffi_c/libffi/src/x86/win64.S +7 -3
  118. data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
  119. data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -75
  120. data/ext/ffi_c/libffi/testsuite/Makefile.in +124 -84
  121. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +7 -4
  122. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
  123. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +4 -4
  124. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
  125. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
  126. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  127. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
  128. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
  129. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
  130. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
  131. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
  132. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
  133. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
  134. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
  135. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +0 -0
  136. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +0 -0
  137. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +0 -0
  138. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +0 -0
  139. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +0 -0
  140. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +0 -0
  141. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +0 -0
  142. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +0 -0
  143. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +0 -0
  144. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +0 -0
  145. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +0 -0
  146. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +0 -0
  147. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +0 -0
  148. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +0 -0
  149. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +0 -0
  150. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +0 -0
  151. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +0 -0
  152. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +0 -0
  153. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +0 -0
  154. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +0 -0
  155. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +0 -0
  156. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +0 -0
  157. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +0 -0
  158. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +0 -0
  159. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +0 -0
  160. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +0 -0
  161. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +0 -0
  162. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +0 -0
  163. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +0 -0
  164. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +0 -0
  165. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +0 -0
  166. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +0 -0
  167. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +0 -0
  168. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +0 -0
  169. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +0 -0
  170. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +0 -0
  171. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +0 -0
  172. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +0 -0
  173. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +0 -0
  174. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  175. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +0 -0
  176. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
  177. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +0 -0
  178. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +0 -0
  179. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
  180. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
  181. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
  182. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
  183. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
  184. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
  185. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
  186. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
  187. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +0 -0
  188. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +0 -0
  189. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
  190. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
  191. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
  192. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +0 -0
  193. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
  194. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar_va.c +0 -0
  195. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
  196. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +0 -0
  197. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +0 -0
  198. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +0 -0
  199. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
  200. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort_va.c +0 -0
  201. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  202. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  203. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +3 -1
  204. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +0 -0
  205. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +0 -0
  206. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +0 -0
  207. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +0 -0
  208. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +0 -0
  209. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +0 -0
  210. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +0 -0
  211. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +0 -0
  212. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +0 -0
  213. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +0 -0
  214. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +0 -0
  215. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +0 -0
  216. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  217. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
  218. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
  219. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +0 -0
  220. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +0 -0
  221. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +0 -0
  222. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +0 -0
  223. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +0 -0
  224. data/ffi.gemspec +4 -5
  225. data/lib/ffi/abstract_memory.rb +44 -0
  226. data/lib/ffi/autopointer.rb +1 -1
  227. data/lib/ffi/ffi.rb +2 -0
  228. data/lib/ffi/io.rb +3 -3
  229. data/lib/ffi/library.rb +8 -4
  230. data/lib/ffi/managedstruct.rb +2 -2
  231. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  232. data/lib/ffi/platform/aarch64-freebsd/types.conf +2 -2
  233. data/lib/ffi/platform/aarch64-freebsd12/types.conf +113 -60
  234. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  235. data/lib/ffi/platform/arm-linux/types.conf +32 -4
  236. data/lib/ffi/platform/i386-windows/types.conf +26 -79
  237. data/lib/ffi/platform/powerpc-linux/types.conf +32 -2
  238. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  239. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  240. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  241. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  242. data/lib/ffi/platform/x86_64-darwin/types.conf +4 -0
  243. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +4 -22
  244. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  245. data/lib/ffi/platform/x86_64-linux/types.conf +21 -0
  246. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  247. data/lib/ffi/platform/x86_64-windows/types.conf +10 -78
  248. data/lib/ffi/platform.rb +18 -8
  249. data/lib/ffi/pointer.rb +21 -14
  250. data/lib/ffi/struct.rb +10 -5
  251. data/lib/ffi/tools/const_generator.rb +6 -4
  252. data/lib/ffi/tools/struct_generator.rb +2 -1
  253. data/lib/ffi/tools/types_generator.rb +2 -0
  254. data/lib/ffi/variadic.rb +1 -10
  255. data/lib/ffi/version.rb +1 -1
  256. data/lib/ffi.rb +10 -3
  257. data/rakelib/ffi_gem_helper.rb +65 -0
  258. data/samples/getlogin.rb +1 -1
  259. data/samples/getpid.rb +1 -1
  260. data/samples/gettimeofday.rb +8 -8
  261. data/samples/hello.rb +2 -1
  262. data/samples/inotify.rb +1 -1
  263. data/samples/pty.rb +1 -2
  264. data/samples/qsort.rb +0 -1
  265. metadata +133 -134
  266. data/.appveyor.yml +0 -27
  267. data/.gitignore +0 -25
  268. data/.gitmodules +0 -4
  269. data/.travis.yml +0 -42
  270. data/.yardopts +0 -5
  271. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  272. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  273. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
  274. data/ext/ffi_c/win32/stdbool.h +0 -8
  275. data/ext/ffi_c/win32/stdint.h +0 -201
  276. data/samples/sample_helper.rb +0 -6
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
2
2
 
3
3
  AC_PREREQ(2.68)
4
4
 
5
- AC_INIT([libffi], [3.3-rc2], [http://github.com/libffi/libffi/issues])
5
+ AC_INIT([libffi], [3.3], [http://github.com/libffi/libffi/issues])
6
6
  AC_CONFIG_HEADERS([fficonfig.h])
7
7
 
8
8
  AC_CANONICAL_SYSTEM
@@ -63,6 +63,9 @@ EOF
63
63
 
64
64
  AM_MAINTAINER_MODE
65
65
 
66
+ AC_CHECK_HEADERS(sys/memfd.h)
67
+ AC_CHECK_FUNCS([memfd_create])
68
+
66
69
  AC_CHECK_HEADERS(sys/mman.h)
67
70
  AC_CHECK_FUNCS([mmap mkostemp])
68
71
  AC_FUNC_MMAP_BLACKLIST
@@ -176,6 +179,28 @@ case "$TARGET" in
176
179
  ;;
177
180
  esac
178
181
 
182
+ AC_CACHE_CHECK([whether compiler supports pointer authentication],
183
+ libffi_cv_as_ptrauth, [
184
+ libffi_cv_as_ptrauth=unknown
185
+ AC_TRY_COMPILE(,[
186
+ #ifdef __clang__
187
+ # if __has_feature(ptrauth_calls)
188
+ # define HAVE_PTRAUTH 1
189
+ # endif
190
+ #endif
191
+
192
+ #ifndef HAVE_PTRAUTH
193
+ # error Pointer authentication not supported
194
+ #endif
195
+ ],
196
+ [libffi_cv_as_ptrauth=yes],
197
+ [libffi_cv_as_ptrauth=no])
198
+ ])
199
+ if test "x$libffi_cv_as_ptrauth" = xyes; then
200
+ AC_DEFINE(HAVE_PTRAUTH, 1,
201
+ [Define if your compiler supports pointer authentication.])
202
+ fi
203
+
179
204
  # On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC.
180
205
  AC_ARG_ENABLE(pax_emutramp,
181
206
  [ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC],
@@ -238,19 +263,15 @@ EOF
238
263
  fi
239
264
 
240
265
  if test "x$GCC" = "xyes"; then
266
+ AX_CHECK_COMPILE_FLAG(-fno-lto, libffi_cv_no_lto=-fno-lto)
267
+
241
268
  AC_CACHE_CHECK([whether .eh_frame section should be read-only],
242
269
  libffi_cv_ro_eh_frame, [
243
- libffi_cv_ro_eh_frame=no
270
+ libffi_cv_ro_eh_frame=yes
244
271
  echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
245
- if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
246
- objdump -h conftest.o > conftest.dump 2>&1
247
- libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1`
248
- if test "x$libffi_eh_frame_line" != "x"; then
249
- libffi_test_line=`expr $libffi_eh_frame_line + 1`p
250
- sed -n $libffi_test_line conftest.dump > conftest.line
251
- if grep READONLY conftest.line > /dev/null; then
252
- libffi_cv_ro_eh_frame=yes
253
- fi
272
+ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
273
+ if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
274
+ libffi_cv_ro_eh_frame=no
254
275
  fi
255
276
  fi
256
277
  rm -f conftest.*
@@ -8,7 +8,9 @@
8
8
  case "${host}" in
9
9
  aarch64*-*-cygwin* | aarch64*-*-mingw* | aarch64*-*-win* )
10
10
  TARGET=ARM_WIN64; TARGETDIR=aarch64
11
- MSVC=1
11
+ if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
12
+ MSVC=1
13
+ fi
12
14
  ;;
13
15
 
14
16
  aarch64*-*-*)
@@ -53,6 +55,11 @@ case "${host}" in
53
55
  SOURCES="ffi.c sysv.S"
54
56
  ;;
55
57
 
58
+ csky-*-*)
59
+ TARGET=CSKY; TARGETDIR=csky
60
+ SOURCES="ffi.c sysv.S"
61
+ ;;
62
+
56
63
  frv-*-*)
57
64
  TARGET=FRV; TARGETDIR=frv
58
65
  SOURCES="ffi.c eabi.S"
@@ -74,7 +81,7 @@ case "${host}" in
74
81
  TARGET=X86_FREEBSD; TARGETDIR=x86
75
82
  ;;
76
83
 
77
- i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix* \
84
+ i?86-*-cygwin* | i?86-*-mingw* | i?86-*-win* | i?86-*-os2* | i?86-*-interix* \
78
85
  | x86_64-*-cygwin* | x86_64-*-mingw* | x86_64-*-win* )
79
86
  TARGETDIR=x86
80
87
  if test $ac_cv_sizeof_size_t = 4; then
@@ -108,22 +115,14 @@ case "${host}" in
108
115
  i?86-*-* | x86_64-*-* | amd64-*)
109
116
  TARGETDIR=x86
110
117
  if test $ac_cv_sizeof_size_t = 4; then
111
- case "$host" in
112
- x86_64-*x32|x86_64-x32-*)
113
- TARGET_X32=yes
114
- TARGET=X86_64
115
- ;;
116
- *)
117
- echo 'int foo (void) { return __x86_64__; }' > conftest.c
118
- if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
119
- TARGET_X32=yes
120
- TARGET=X86_64
121
- else
122
- TARGET=X86;
123
- fi
124
- rm -f conftest.*
125
- ;;
126
- esac
118
+ echo 'int foo (void) { return __x86_64__; }' > conftest.c
119
+ if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
120
+ TARGET_X32=yes
121
+ TARGET=X86_64
122
+ else
123
+ TARGET=X86;
124
+ fi
125
+ rm -f conftest.*
127
126
  else
128
127
  TARGET=X86_64;
129
128
  fi
@@ -134,6 +133,11 @@ case "${host}" in
134
133
  SOURCES="ffi.c unix.S"
135
134
  ;;
136
135
 
136
+ kvx-*-*)
137
+ TARGET=KVX; TARGETDIR=kvx
138
+ SOURCES="ffi.c sysv.S"
139
+ ;;
140
+
137
141
  m32r*-*-*)
138
142
  TARGET=M32R; TARGETDIR=m32r
139
143
  SOURCES="ffi.c sysv.S"
@@ -167,7 +171,7 @@ case "${host}" in
167
171
  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
168
172
  TARGET=MIPS; TARGETDIR=mips
169
173
  ;;
170
- mips*-*linux* | mips*-*-openbsd*)
174
+ mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
171
175
  # Support 128-bit long double for NewABI.
172
176
  HAVE_LONG_DOUBLE='defined(__mips64)'
173
177
  TARGET=MIPS; TARGETDIR=mips
@@ -178,7 +182,7 @@ case "${host}" in
178
182
  SOURCES="ffi.c sysv.S"
179
183
  ;;
180
184
 
181
- or1k*-linux*)
185
+ or1k*-*-*)
182
186
  TARGET=OR1K; TARGETDIR=or1k
183
187
  SOURCES="ffi.c sysv.S"
184
188
  ;;
@@ -190,6 +194,9 @@ case "${host}" in
190
194
  powerpc-*-amigaos*)
191
195
  TARGET=POWERPC; TARGETDIR=powerpc
192
196
  ;;
197
+ powerpc-*-eabi*)
198
+ TARGET=POWERPC; TARGETDIR=powerpc
199
+ ;;
193
200
  powerpc-*-beos*)
194
201
  TARGET=POWERPC; TARGETDIR=powerpc
195
202
  ;;
@@ -203,7 +210,11 @@ case "${host}" in
203
210
  TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
204
211
  HAVE_LONG_DOUBLE_VARIANT=1
205
212
  ;;
206
- powerpc64-*-freebsd*)
213
+ powerpcspe-*-freebsd*)
214
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
215
+ CFLAGS="$CFLAGS -D__NO_FPRS__"
216
+ ;;
217
+ powerpc64-*-freebsd* | powerpc64le-*-freebsd*)
207
218
  TARGET=POWERPC; TARGETDIR=powerpc
208
219
  ;;
209
220
  powerpc*-*-rtems*)
@@ -256,7 +267,11 @@ case "${TARGET}" in
256
267
  SOURCES="ffi.c sysv_msvc_arm32.S"
257
268
  ;;
258
269
  ARM_WIN64)
259
- SOURCES="ffi.c win64_armasm.S"
270
+ if test "$MSVC" = 1; then
271
+ SOURCES="ffi.c win64_armasm.S"
272
+ else
273
+ SOURCES="ffi.c sysv.S"
274
+ fi
260
275
  ;;
261
276
  MIPS)
262
277
  SOURCES="ffi.c o32.S n32.S"
@@ -1,7 +1,7 @@
1
- # Makefile.in generated by automake 1.15 from Makefile.am.
1
+ # Makefile.in generated by automake 1.16.1 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
- # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
+ # Copyright (C) 1994-2018 Free Software Foundation, Inc.
5
5
 
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
@@ -100,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
100
100
  $(top_srcdir)/m4/ax_enable_builddir.m4 \
101
101
  $(top_srcdir)/m4/ax_gcc_archflag.m4 \
102
102
  $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
103
+ $(top_srcdir)/m4/ax_require_defined.m4 \
103
104
  $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
104
105
  $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
105
106
  $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
@@ -369,8 +370,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
369
370
  *config.status*) \
370
371
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
371
372
  *) \
372
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
373
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
373
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
374
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
374
375
  esac;
375
376
 
376
377
  $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -555,7 +556,10 @@ ctags CTAGS:
555
556
  cscope cscopelist:
556
557
 
557
558
 
558
- distdir: $(DISTFILES)
559
+ distdir: $(BUILT_SOURCES)
560
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
561
+
562
+ distdir-am: $(DISTFILES)
559
563
  @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
560
564
  topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
561
565
  list='$(DISTFILES)'; \
@@ -1,7 +1,8 @@
1
1
  \input texinfo @c -*-texinfo-*-
2
2
  @c %**start of header
3
3
  @setfilename libffi.info
4
- @settitle libffi
4
+ @include version.texi
5
+ @settitle libffi: the portable foreign function interface library
5
6
  @setchapternewpage off
6
7
  @c %**end of header
7
8
 
@@ -12,32 +13,43 @@
12
13
  @syncodeindex pg cp
13
14
  @syncodeindex tp cp
14
15
 
15
- @include version.texi
16
-
17
16
  @copying
18
17
 
19
- This manual is for Libffi, a portable foreign-function interface
18
+ This manual is for libffi, a portable foreign function interface
20
19
  library.
21
20
 
22
- Copyright @copyright{} 2008, 2010, 2011 Red Hat, Inc.
21
+ Copyright @copyright{} 2008--2019 Anthony Green and Red Hat, Inc.
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining
24
+ a copy of this software and associated documentation files (the
25
+ ``Software''), to deal in the Software without restriction, including
26
+ without limitation the rights to use, copy, modify, merge, publish,
27
+ distribute, sublicense, and/or sell copies of the Software, and to
28
+ permit persons to whom the Software is furnished to do so, subject to
29
+ the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be
32
+ included in all copies or substantial portions of the Software.
23
33
 
24
- @quotation
25
- Permission is granted to copy, distribute and/or modify this document
26
- under the terms of the GNU General Public License as published by the
27
- Free Software Foundation; either version 2, or (at your option) any
28
- later version. A copy of the license is included in the
29
- section entitled ``GNU General Public License''.
34
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
35
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
37
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
38
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
39
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
41
 
31
- @end quotation
32
42
  @end copying
33
43
 
34
44
  @dircategory Development
35
45
  @direntry
36
- * libffi: (libffi). Portable foreign-function interface library.
46
+ * libffi: (libffi). Portable foreign function interface library.
37
47
  @end direntry
38
48
 
39
49
  @titlepage
40
- @title Libffi
50
+ @title libffi: a foreign function interface library
51
+ @subtitle For Version @value{VERSION} of libffi
52
+ @author Anthony Green
41
53
  @page
42
54
  @vskip 0pt plus 1filll
43
55
  @insertcopying
@@ -1,4 +1,4 @@
1
- @set UPDATED 31 October 2019
2
- @set UPDATED-MONTH October 2019
3
- @set EDITION 3.3-rc2
4
- @set VERSION 3.3-rc2
1
+ @set UPDATED 22 November 2019
2
+ @set UPDATED-MONTH November 2019
3
+ @set EDITION 3.3
4
+ @set VERSION 3.3
@@ -76,6 +76,9 @@
76
76
  /* Define to 1 if you have the `memcpy' function. */
77
77
  #undef HAVE_MEMCPY
78
78
 
79
+ /* Define to 1 if you have the `memfd_create' function. */
80
+ #undef HAVE_MEMFD_CREATE
81
+
79
82
  /* Define to 1 if you have the <memory.h> header file. */
80
83
  #undef HAVE_MEMORY_H
81
84
 
@@ -94,6 +97,9 @@
94
97
  /* Define if read-only mmap of a plain file works. */
95
98
  #undef HAVE_MMAP_FILE
96
99
 
100
+ /* Define if your compiler supports pointer authentication. */
101
+ #undef HAVE_PTRAUTH
102
+
97
103
  /* Define if .eh_frame sections should be read-only. */
98
104
  #undef HAVE_RO_EH_FRAME
99
105
 
@@ -109,6 +115,9 @@
109
115
  /* Define to 1 if you have the <string.h> header file. */
110
116
  #undef HAVE_STRING_H
111
117
 
118
+ /* Define to 1 if you have the <sys/memfd.h> header file. */
119
+ #undef HAVE_SYS_MEMFD_H
120
+
112
121
  /* Define to 1 if you have the <sys/mman.h> header file. */
113
122
  #undef HAVE_SYS_MMAN_H
114
123
 
@@ -196,7 +205,11 @@
196
205
 
197
206
  #ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
198
207
  #ifdef LIBFFI_ASM
208
+ #ifdef __APPLE__
209
+ #define FFI_HIDDEN(name) .private_extern name
210
+ #else
199
211
  #define FFI_HIDDEN(name) .hidden name
212
+ #endif
200
213
  #else
201
214
  #define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
202
215
  #endif
@@ -143,7 +143,7 @@ def build_target(platform, platform_headers):
143
143
  mkdir_p(build_dir)
144
144
  env = dict(CC=xcrun_cmd('clang'),
145
145
  LD=xcrun_cmd('ld'),
146
- CFLAGS='%s' % (platform.version_min))
146
+ CFLAGS='%s -fembed-bitcode' % (platform.version_min))
147
147
  working_dir = os.getcwd()
148
148
  try:
149
149
  os.chdir(build_dir)
@@ -173,7 +173,6 @@ def generate_source_and_headers(generate_osx=True, generate_ios=True):
173
173
  copy_src_platform_files(device_platform)
174
174
  copy_src_platform_files(device64_platform)
175
175
  if generate_osx:
176
- copy_src_platform_files(desktop32_platform)
177
176
  copy_src_platform_files(desktop64_platform)
178
177
 
179
178
  platform_headers = collections.defaultdict(set)
@@ -184,11 +183,10 @@ def generate_source_and_headers(generate_osx=True, generate_ios=True):
184
183
  build_target(device_platform, platform_headers)
185
184
  build_target(device64_platform, platform_headers)
186
185
  if generate_osx:
187
- build_target(desktop32_platform, platform_headers)
188
186
  build_target(desktop64_platform, platform_headers)
189
187
 
190
188
  mkdir_p('darwin_common/include')
191
- for header_name, tag_tuples in platform_headers.iteritems():
189
+ for header_name, tag_tuples in platform_headers.items():
192
190
  basename, suffix = os.path.splitext(header_name)
193
191
  with open(os.path.join('darwin_common/include', header_name), 'w') as header:
194
192
  for tag_tuple in tag_tuples:
@@ -1,7 +1,7 @@
1
- # Makefile.in generated by automake 1.15 from Makefile.am.
1
+ # Makefile.in generated by automake 1.16.1 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
- # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
+ # Copyright (C) 1994-2018 Free Software Foundation, Inc.
5
5
 
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
@@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
101
101
  $(top_srcdir)/m4/ax_enable_builddir.m4 \
102
102
  $(top_srcdir)/m4/ax_gcc_archflag.m4 \
103
103
  $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
104
+ $(top_srcdir)/m4/ax_require_defined.m4 \
104
105
  $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
105
106
  $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
106
107
  $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
@@ -111,7 +112,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
111
112
  $(am__DIST_COMMON)
112
113
  mkinstalldirs = $(install_sh) -d
113
114
  CONFIG_HEADER = $(top_builddir)/fficonfig.h
114
- CONFIG_CLEAN_FILES = ffi.h ffitarget.h
115
+ CONFIG_CLEAN_FILES = ffi.h
115
116
  CONFIG_CLEAN_VPATH_FILES =
116
117
  AM_V_P = $(am__v_P_@AM_V@)
117
118
  am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -352,8 +353,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
352
353
  *config.status*) \
353
354
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
354
355
  *) \
355
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
356
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
356
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
357
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
357
358
  esac;
358
359
 
359
360
  $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -446,7 +447,10 @@ cscopelist-am: $(am__tagged_files)
446
447
  distclean-tags:
447
448
  -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
448
449
 
449
- distdir: $(DISTFILES)
450
+ distdir: $(BUILT_SOURCES)
451
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
452
+
453
+ distdir-am: $(DISTFILES)
450
454
  @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
451
455
  topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
452
456
  list='$(DISTFILES)'; \
@@ -1,5 +1,5 @@
1
1
  /* -----------------------------------------------------------------*-C-*-
2
- libffi @VERSION@ - Copyright (c) 2011, 2014 Anthony Green
2
+ libffi @VERSION@ - Copyright (c) 2011, 2014, 2019 Anthony Green
3
3
  - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person
@@ -288,15 +288,15 @@ FFI_API
288
288
  void ffi_java_raw_call (ffi_cif *cif,
289
289
  void (*fn)(void),
290
290
  void *rvalue,
291
- ffi_java_raw *avalue);
291
+ ffi_java_raw *avalue) __attribute__((deprecated));
292
292
  #endif
293
293
 
294
294
  FFI_API
295
- void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
295
+ void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated));
296
296
  FFI_API
297
- void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
297
+ void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) __attribute__((deprecated));
298
298
  FFI_API
299
- size_t ffi_java_raw_size (ffi_cif *cif);
299
+ size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
300
300
 
301
301
  /* ---- Definitions for closures ----------------------------------------- */
302
302
 
@@ -330,6 +330,14 @@ typedef struct {
330
330
  FFI_API void *ffi_closure_alloc (size_t size, void **code);
331
331
  FFI_API void ffi_closure_free (void *);
332
332
 
333
+ #if defined(PA_LINUX) || defined(PA_HPUX)
334
+ #define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2))
335
+ #define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3))
336
+ #else
337
+ #define FFI_CLOSURE_PTR(X) (X)
338
+ #define FFI_RESTORE_PTR(X) (X)
339
+ #endif
340
+
333
341
  FFI_API ffi_status
334
342
  ffi_prep_closure (ffi_closure*,
335
343
  ffi_cif *,
@@ -421,14 +429,14 @@ FFI_API ffi_status
421
429
  ffi_prep_java_raw_closure (ffi_java_raw_closure*,
422
430
  ffi_cif *cif,
423
431
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
424
- void *user_data);
432
+ void *user_data) __attribute__((deprecated));
425
433
 
426
434
  FFI_API ffi_status
427
435
  ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
428
436
  ffi_cif *cif,
429
437
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
430
438
  void *user_data,
431
- void *codeloc);
439
+ void *codeloc) __attribute__((deprecated));
432
440
  #endif
433
441
 
434
442
  #endif /* FFI_CLOSURES */
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # install - install a program, script, or datafile
3
3
 
4
- scriptversion=2014-09-12.12; # UTC
4
+ scriptversion=2018-03-11.20; # UTC
5
5
 
6
6
  # This originates from X11R5 (mit/util/scripts/install.sh), which was
7
7
  # later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
271
271
  fi
272
272
  dst=$dst_arg
273
273
 
274
- # If destination is a directory, append the input filename; won't work
275
- # if double slashes aren't ignored.
274
+ # If destination is a directory, append the input filename.
276
275
  if test -d "$dst"; then
277
276
  if test "$is_target_a_directory" = never; then
278
277
  echo "$0: $dst_arg: Is a directory" >&2
279
278
  exit 1
280
279
  fi
281
280
  dstdir=$dst
282
- dst=$dstdir/`basename "$src"`
281
+ dstbase=`basename "$src"`
282
+ case $dst in
283
+ */) dst=$dst$dstbase;;
284
+ *) dst=$dst/$dstbase;;
285
+ esac
283
286
  dstdir_status=0
284
287
  else
285
288
  dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
288
291
  fi
289
292
  fi
290
293
 
294
+ case $dstdir in
295
+ */) dstdirslash=$dstdir;;
296
+ *) dstdirslash=$dstdir/;;
297
+ esac
298
+
291
299
  obsolete_mkdir_used=false
292
300
 
293
301
  if test $dstdir_status != 0; then
@@ -324,14 +332,16 @@ do
324
332
  # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
325
333
  ;;
326
334
  *)
327
- # $RANDOM is not portable (e.g. dash); use it when possible to
328
- # lower collision chance
335
+ # Note that $RANDOM variable is not portable (e.g. dash); Use it
336
+ # here however when possible just to lower collision chance.
329
337
  tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
338
+
330
339
  trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
331
340
 
332
- # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
333
- # create the $tmpdir first (and fail if unsuccessful) to make sure
334
- # that nobody tries to guess the $tmpdir name.
341
+ # Because "mkdir -p" follows existing symlinks and we likely work
342
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
343
+ # directory is successfully created first before we actually test
344
+ # 'mkdir -p' feature.
335
345
  if (umask $mkdir_umask &&
336
346
  $mkdirprog $mkdir_mode "$tmpdir" &&
337
347
  exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
@@ -434,8 +444,8 @@ do
434
444
  else
435
445
 
436
446
  # Make a couple of temp file names in the proper directory.
437
- dsttmp=$dstdir/_inst.$$_
438
- rmtmp=$dstdir/_rm.$$_
447
+ dsttmp=${dstdirslash}_inst.$$_
448
+ rmtmp=${dstdirslash}_rm.$$_
439
449
 
440
450
  # Trap to clean up those temp files at exit.
441
451
  trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -500,9 +510,9 @@ do
500
510
  done
501
511
 
502
512
  # Local variables:
503
- # eval: (add-hook 'write-file-hooks 'time-stamp)
513
+ # eval: (add-hook 'before-save-hook 'time-stamp)
504
514
  # time-stamp-start: "scriptversion="
505
515
  # time-stamp-format: "%:y-%02m-%02d.%02H"
506
- # time-stamp-time-zone: "UTC"
516
+ # time-stamp-time-zone: "UTC0"
507
517
  # time-stamp-end: "; # UTC"
508
518
  # End:
@@ -6,7 +6,7 @@
6
6
  /* These version numbers correspond to the libtool-version abi numbers,
7
7
  not to the libffi release numbers. */
8
8
 
9
- LIBFFI_BASE_7.0 {
9
+ LIBFFI_BASE_8.0 {
10
10
  global:
11
11
  /* Exported data variables. */
12
12
  ffi_type_void;
@@ -38,27 +38,23 @@ LIBFFI_BASE_7.0 {
38
38
  ffi_java_raw_to_ptrarray;
39
39
  ffi_java_raw_size;
40
40
 
41
+ ffi_get_struct_offsets;
41
42
  local:
42
43
  *;
43
44
  };
44
45
 
45
- LIBFFI_BASE_7.1 {
46
- global:
47
- ffi_get_struct_offsets;
48
- } LIBFFI_BASE_7.0;
49
-
50
46
  #ifdef FFI_TARGET_HAS_COMPLEX_TYPE
51
- LIBFFI_COMPLEX_7.0 {
47
+ LIBFFI_COMPLEX_8.0 {
52
48
  global:
53
49
  /* Exported data variables. */
54
50
  ffi_type_complex_float;
55
51
  ffi_type_complex_double;
56
52
  ffi_type_complex_longdouble;
57
- } LIBFFI_BASE_7.0;
53
+ } LIBFFI_BASE_8.0;
58
54
  #endif
59
55
 
60
56
  #if FFI_CLOSURES
61
- LIBFFI_CLOSURE_7.0 {
57
+ LIBFFI_CLOSURE_8.0 {
62
58
  global:
63
59
  ffi_closure_alloc;
64
60
  ffi_closure_free;
@@ -68,13 +64,13 @@ LIBFFI_CLOSURE_7.0 {
68
64
  ffi_prep_raw_closure_loc;
69
65
  ffi_prep_java_raw_closure;
70
66
  ffi_prep_java_raw_closure_loc;
71
- } LIBFFI_BASE_7.0;
67
+ } LIBFFI_BASE_8.0;
72
68
  #endif
73
69
 
74
70
  #if FFI_GO_CLOSURES
75
- LIBFFI_GO_CLOSURE_7.0 {
71
+ LIBFFI_GO_CLOSURE_8.0 {
76
72
  global:
77
73
  ffi_call_go;
78
74
  ffi_prep_go_closure;
79
- } LIBFFI_CLOSURE_7.0;
75
+ } LIBFFI_CLOSURE_8.0;
80
76
  #endif