ffi 1.11.1 → 1.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +207 -0
  3. data/Gemfile +3 -4
  4. data/README.md +24 -3
  5. data/Rakefile +65 -69
  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 +6 -22
  9. data/ext/ffi_c/Call.h +2 -2
  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 +43 -43
  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 -9
  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 +0 -8
  31. data/ext/ffi_c/Thread.h +1 -9
  32. data/ext/ffi_c/Type.c +1 -1
  33. data/ext/ffi_c/Types.c +7 -8
  34. data/ext/ffi_c/Types.h +3 -4
  35. data/ext/ffi_c/Variadic.c +14 -9
  36. data/ext/ffi_c/compat.h +4 -0
  37. data/ext/ffi_c/extconf.rb +36 -24
  38. data/ext/ffi_c/libffi/.appveyor.yml +29 -13
  39. data/ext/ffi_c/libffi/.gitattributes +4 -0
  40. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  41. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  42. data/ext/ffi_c/libffi/.travis/build-in-container.sh +12 -0
  43. data/ext/ffi_c/libffi/.travis/build.sh +116 -8
  44. data/ext/ffi_c/libffi/.travis/install.sh +65 -16
  45. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  46. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +1 -1
  47. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  48. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  49. data/ext/ffi_c/libffi/.travis/site.exp +10 -1
  50. data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  51. data/ext/ffi_c/libffi/.travis.yml +51 -2
  52. data/ext/ffi_c/libffi/{ChangeLog.libffi-3.1 → ChangeLog.old} +1407 -0
  53. data/ext/ffi_c/libffi/LICENSE +1 -1
  54. data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +5 -4
  55. data/ext/ffi_c/libffi/Makefile.am +56 -72
  56. data/ext/ffi_c/libffi/Makefile.in +458 -207
  57. data/ext/ffi_c/libffi/README.md +33 -8
  58. data/ext/ffi_c/libffi/config.guess +552 -331
  59. data/ext/ffi_c/libffi/config.sub +1321 -1306
  60. data/ext/ffi_c/libffi/configure +414 -342
  61. data/ext/ffi_c/libffi/configure.ac +32 -11
  62. data/ext/ffi_c/libffi/configure.host +56 -27
  63. data/ext/ffi_c/libffi/doc/Makefile.in +9 -5
  64. data/ext/ffi_c/libffi/doc/libffi.texi +26 -14
  65. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  66. data/ext/ffi_c/libffi/fficonfig.h.in +13 -0
  67. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +2 -4
  68. data/ext/ffi_c/libffi/include/Makefile.in +10 -6
  69. data/ext/ffi_c/libffi/include/ffi.h.in +19 -7
  70. data/ext/ffi_c/libffi/include/ffi_common.h +4 -0
  71. data/ext/ffi_c/libffi/install-sh +23 -13
  72. data/ext/ffi_c/libffi/libffi.map.in +8 -12
  73. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +2 -48
  74. data/ext/ffi_c/libffi/libtool-version +1 -1
  75. data/ext/ffi_c/libffi/ltmain.sh +156 -61
  76. data/ext/ffi_c/libffi/m4/asmcfi.m4 +1 -1
  77. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +5 -26
  78. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +5 -26
  79. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +2 -1
  80. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +5 -26
  81. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +7 -3
  82. data/ext/ffi_c/libffi/make_sunver.pl +333 -0
  83. data/ext/ffi_c/libffi/man/Makefile.in +9 -5
  84. data/ext/ffi_c/libffi/missing +8 -8
  85. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
  86. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
  87. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
  88. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
  89. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +511 -0
  90. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
  91. data/ext/ffi_c/libffi/msvcc.sh +38 -13
  92. data/ext/ffi_c/libffi/src/aarch64/ffi.c +151 -67
  93. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +19 -3
  94. data/ext/ffi_c/libffi/src/aarch64/internal.h +1 -0
  95. data/ext/ffi_c/libffi/src/aarch64/sysv.S +22 -9
  96. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
  97. data/ext/ffi_c/libffi/src/arm/ffi.c +62 -5
  98. data/ext/ffi_c/libffi/src/arm/ffitarget.h +8 -1
  99. data/ext/ffi_c/libffi/src/arm/sysv.S +6 -4
  100. data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
  101. data/ext/ffi_c/libffi/src/closures.c +69 -14
  102. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  103. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  104. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  105. data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
  106. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  107. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  108. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  109. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  110. data/ext/ffi_c/libffi/src/mips/ffi.c +5 -1
  111. data/ext/ffi_c/libffi/src/mips/ffitarget.h +1 -1
  112. data/ext/ffi_c/libffi/src/mips/o32.S +2 -0
  113. data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
  114. data/ext/ffi_c/libffi/src/pa/ffitarget.h +1 -6
  115. data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
  116. data/ext/ffi_c/libffi/src/pa/linux.S +27 -4
  117. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -4
  118. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
  119. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +211 -32
  120. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +18 -7
  121. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +10 -4
  122. data/ext/ffi_c/libffi/src/powerpc/linux64.S +91 -28
  123. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +81 -5
  124. data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
  125. data/ext/ffi_c/libffi/src/prep_cif.c +4 -2
  126. data/ext/ffi_c/libffi/src/x86/ffi.c +28 -12
  127. data/ext/ffi_c/libffi/src/x86/ffi64.c +22 -11
  128. data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
  129. data/ext/ffi_c/libffi/src/x86/ffiw64.c +21 -11
  130. data/ext/ffi_c/libffi/src/x86/sysv.S +17 -8
  131. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +995 -0
  132. data/ext/ffi_c/libffi/src/x86/unix64.S +59 -4
  133. data/ext/ffi_c/libffi/src/x86/win64.S +12 -3
  134. data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
  135. data/ext/ffi_c/libffi/testsuite/Makefile.am +114 -109
  136. data/ext/ffi_c/libffi/testsuite/Makefile.in +124 -84
  137. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +32 -8
  138. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +7 -2
  139. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +4 -4
  140. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
  141. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +12 -1
  142. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +9 -8
  143. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -1
  144. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  145. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  146. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +3 -1
  147. data/ext/ffi_c/libffi.darwin.mk +1 -1
  148. data/ffi.gemspec +5 -6
  149. data/lib/ffi/abstract_memory.rb +44 -0
  150. data/lib/ffi/autopointer.rb +1 -1
  151. data/lib/ffi/ffi.rb +2 -0
  152. data/lib/ffi/io.rb +3 -3
  153. data/lib/ffi/library.rb +13 -9
  154. data/lib/ffi/managedstruct.rb +2 -2
  155. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  156. data/lib/ffi/platform/aarch64-freebsd/types.conf +89 -89
  157. data/lib/ffi/platform/aarch64-freebsd12/types.conf +162 -109
  158. data/lib/ffi/platform/aarch64-linux/types.conf +81 -81
  159. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  160. data/lib/ffi/platform/arm-freebsd/types.conf +87 -87
  161. data/lib/ffi/platform/arm-freebsd12/types.conf +87 -87
  162. data/lib/ffi/platform/arm-linux/types.conf +110 -82
  163. data/lib/ffi/platform/i386-cygwin/types.conf +1 -1
  164. data/lib/ffi/platform/i386-darwin/types.conf +63 -63
  165. data/lib/ffi/platform/i386-freebsd/types.conf +87 -87
  166. data/lib/ffi/platform/i386-freebsd12/types.conf +87 -87
  167. data/lib/ffi/platform/i386-gnu/types.conf +84 -84
  168. data/lib/ffi/platform/i386-linux/types.conf +77 -77
  169. data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
  170. data/lib/ffi/platform/i386-openbsd/types.conf +89 -89
  171. data/lib/ffi/platform/i386-solaris/types.conf +96 -96
  172. data/lib/ffi/platform/i386-windows/types.conf +43 -96
  173. data/lib/ffi/platform/ia64-linux/types.conf +79 -79
  174. data/lib/ffi/platform/mips-linux/types.conf +79 -79
  175. data/lib/ffi/platform/mips64-linux/types.conf +81 -81
  176. data/lib/ffi/platform/mips64el-linux/types.conf +81 -81
  177. data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
  178. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +79 -79
  179. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +79 -79
  180. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +81 -81
  181. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +81 -81
  182. data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
  183. data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
  184. data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
  185. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  186. data/lib/ffi/platform/powerpc64-linux/types.conf +81 -81
  187. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  188. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  189. data/lib/ffi/platform/s390-linux/types.conf +79 -79
  190. data/lib/ffi/platform/s390x-linux/types.conf +79 -79
  191. data/lib/ffi/platform/sparc-linux/types.conf +79 -79
  192. data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
  193. data/lib/ffi/platform/sparc64-linux/types.conf +79 -79
  194. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  195. data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
  196. data/lib/ffi/platform/x86_64-cygwin/types.conf +1 -1
  197. data/lib/ffi/platform/x86_64-darwin/types.conf +88 -84
  198. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  199. data/lib/ffi/platform/x86_64-freebsd/types.conf +89 -89
  200. data/lib/ffi/platform/x86_64-freebsd12/types.conf +139 -109
  201. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  202. data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
  203. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  204. data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -89
  205. data/lib/ffi/platform/x86_64-openbsd/types.conf +86 -86
  206. data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
  207. data/lib/ffi/platform/x86_64-windows/types.conf +42 -110
  208. data/lib/ffi/platform.rb +22 -9
  209. data/lib/ffi/pointer.rb +21 -14
  210. data/lib/ffi/struct.rb +10 -5
  211. data/lib/ffi/tools/const_generator.rb +6 -4
  212. data/lib/ffi/tools/struct_generator.rb +2 -1
  213. data/lib/ffi/tools/types_generator.rb +7 -4
  214. data/lib/ffi/variadic.rb +1 -10
  215. data/lib/ffi/version.rb +1 -1
  216. data/lib/ffi.rb +10 -3
  217. data/rakelib/ffi_gem_helper.rb +65 -0
  218. data/samples/getlogin.rb +1 -1
  219. data/samples/getpid.rb +1 -1
  220. data/samples/gettimeofday.rb +8 -8
  221. data/samples/hello.rb +2 -1
  222. data/samples/inotify.rb +1 -1
  223. data/samples/pty.rb +1 -2
  224. data/samples/qsort.rb +0 -1
  225. metadata +147 -134
  226. data/.gitignore +0 -25
  227. data/.gitmodules +0 -4
  228. data/.travis.yml +0 -42
  229. data/.yardopts +0 -5
  230. data/appveyor.yml +0 -27
  231. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  232. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  233. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
  234. data/ext/ffi_c/win32/stdbool.h +0 -8
  235. data/ext/ffi_c/win32/stdint.h +0 -201
  236. data/samples/sample_helper.rb +0 -6
  237. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
  238. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
  239. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
  240. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
  241. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
  242. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
  243. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
  244. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
  245. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_simple.c +0 -0
  246. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +0 -0
  247. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +0 -0
  248. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +0 -0
  249. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +0 -0
  250. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +0 -0
  251. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +0 -0
  252. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +0 -0
  253. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +0 -0
  254. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +0 -0
  255. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +0 -0
  256. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +0 -0
  257. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +0 -0
  258. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3float.c +0 -0
  259. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +0 -0
  260. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +0 -0
  261. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +0 -0
  262. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +0 -0
  263. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +0 -0
  264. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +0 -0
  265. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +0 -0
  266. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +0 -0
  267. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +0 -0
  268. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +0 -0
  269. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +0 -0
  270. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +0 -0
  271. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +0 -0
  272. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +0 -0
  273. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +0 -0
  274. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +0 -0
  275. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +0 -0
  276. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +0 -0
  277. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +0 -0
  278. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +0 -0
  279. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +0 -0
  280. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +0 -0
  281. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +0 -0
  282. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +0 -0
  283. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +0 -0
  284. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  285. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +0 -0
  286. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
  287. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +0 -0
  288. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +0 -0
  289. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_args.c +0 -0
  290. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_many_mixed_float_double.c +0 -0
  291. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
  292. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
  293. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
  294. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
  295. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
  296. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
  297. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +0 -0
  298. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +0 -0
  299. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
  300. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
  301. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
  302. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_struct_va1.c +0 -0
  303. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
  304. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar_va.c +0 -0
  305. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
  306. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint_va.c +0 -0
  307. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulong_va.c +0 -0
  308. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +0 -0
  309. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
  310. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort_va.c +0 -0
  311. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  312. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +0 -0
  313. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +0 -0
  314. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +0 -0
  315. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct11.c +0 -0
  316. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +0 -0
  317. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +0 -0
  318. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +0 -0
  319. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +0 -0
  320. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +0 -0
  321. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +0 -0
  322. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +0 -0
  323. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +0 -0
  324. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  325. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +0 -0
  326. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +0 -0
  327. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +0 -0
  328. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +0 -0
  329. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +0 -0
  330. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest.cc +0 -0
  331. /data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/unwindtest_ffi_call.cc +0 -0
@@ -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-rc0], [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.*
@@ -6,6 +6,13 @@
6
6
  # THIS TABLE IS SORTED. KEEP IT THAT WAY.
7
7
  # Most of the time we can define all the variables all at once...
8
8
  case "${host}" in
9
+ aarch64*-*-cygwin* | aarch64*-*-mingw* | aarch64*-*-win* )
10
+ TARGET=ARM_WIN64; TARGETDIR=aarch64
11
+ if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
12
+ MSVC=1
13
+ fi
14
+ ;;
15
+
9
16
  aarch64*-*-*)
10
17
  TARGET=AARCH64; TARGETDIR=aarch64
11
18
  SOURCES="ffi.c sysv.S"
@@ -23,6 +30,11 @@ case "${host}" in
23
30
  SOURCES="ffi.c arcompact.S"
24
31
  ;;
25
32
 
33
+ arm*-*-cygwin* | arm*-*-mingw* | arm*-*-win* )
34
+ TARGET=ARM_WIN32; TARGETDIR=arm
35
+ MSVC=1
36
+ ;;
37
+
26
38
  arm*-*-*)
27
39
  TARGET=ARM; TARGETDIR=arm
28
40
  SOURCES="ffi.c sysv.S"
@@ -43,6 +55,11 @@ case "${host}" in
43
55
  SOURCES="ffi.c sysv.S"
44
56
  ;;
45
57
 
58
+ csky-*-*)
59
+ TARGET=CSKY; TARGETDIR=csky
60
+ SOURCES="ffi.c sysv.S"
61
+ ;;
62
+
46
63
  frv-*-*)
47
64
  TARGET=FRV; TARGETDIR=frv
48
65
  SOURCES="ffi.c eabi.S"
@@ -64,7 +81,7 @@ case "${host}" in
64
81
  TARGET=X86_FREEBSD; TARGETDIR=x86
65
82
  ;;
66
83
 
67
- 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* \
68
85
  | x86_64-*-cygwin* | x86_64-*-mingw* | x86_64-*-win* )
69
86
  TARGETDIR=x86
70
87
  if test $ac_cv_sizeof_size_t = 4; then
@@ -74,12 +91,6 @@ case "${host}" in
74
91
  fi
75
92
  if test "${ax_cv_c_compiler_vendor}" = "microsoft"; then
76
93
  MSVC=1
77
- if test $ac_cv_sizeof_size_t = 4; then
78
- # libffi does not support microsoft tools for 32-bit windows
79
- # hosts. Try porting src/x86/sysv.S to intel assembly
80
- # format.
81
- UNSUPPORTED=1
82
- fi
83
94
  fi
84
95
  # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
85
96
  # We must also check with_cross_host to decide if this is a native
@@ -104,22 +115,14 @@ case "${host}" in
104
115
  i?86-*-* | x86_64-*-* | amd64-*)
105
116
  TARGETDIR=x86
106
117
  if test $ac_cv_sizeof_size_t = 4; then
107
- case "$host" in
108
- x86_64-*x32|x86_64-x32-*)
109
- TARGET_X32=yes
110
- TARGET=X86_64
111
- ;;
112
- *)
113
- echo 'int foo (void) { return __x86_64__; }' > conftest.c
114
- if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then
115
- TARGET_X32=yes
116
- TARGET=X86_64
117
- else
118
- TARGET=X86;
119
- fi
120
- rm -f conftest.*
121
- ;;
122
- 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.*
123
126
  else
124
127
  TARGET=X86_64;
125
128
  fi
@@ -130,6 +133,11 @@ case "${host}" in
130
133
  SOURCES="ffi.c unix.S"
131
134
  ;;
132
135
 
136
+ kvx-*-*)
137
+ TARGET=KVX; TARGETDIR=kvx
138
+ SOURCES="ffi.c sysv.S"
139
+ ;;
140
+
133
141
  m32r*-*-*)
134
142
  TARGET=M32R; TARGETDIR=m32r
135
143
  SOURCES="ffi.c sysv.S"
@@ -163,7 +171,7 @@ case "${host}" in
163
171
  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
164
172
  TARGET=MIPS; TARGETDIR=mips
165
173
  ;;
166
- mips*-*linux* | mips*-*-openbsd*)
174
+ mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
167
175
  # Support 128-bit long double for NewABI.
168
176
  HAVE_LONG_DOUBLE='defined(__mips64)'
169
177
  TARGET=MIPS; TARGETDIR=mips
@@ -174,7 +182,7 @@ case "${host}" in
174
182
  SOURCES="ffi.c sysv.S"
175
183
  ;;
176
184
 
177
- or1k*-linux*)
185
+ or1k*-*-*)
178
186
  TARGET=OR1K; TARGETDIR=or1k
179
187
  SOURCES="ffi.c sysv.S"
180
188
  ;;
@@ -186,6 +194,9 @@ case "${host}" in
186
194
  powerpc-*-amigaos*)
187
195
  TARGET=POWERPC; TARGETDIR=powerpc
188
196
  ;;
197
+ powerpc-*-eabi*)
198
+ TARGET=POWERPC; TARGETDIR=powerpc
199
+ ;;
189
200
  powerpc-*-beos*)
190
201
  TARGET=POWERPC; TARGETDIR=powerpc
191
202
  ;;
@@ -199,7 +210,11 @@ case "${host}" in
199
210
  TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
200
211
  HAVE_LONG_DOUBLE_VARIANT=1
201
212
  ;;
202
- powerpc64-*-freebsd*)
213
+ powerpcspe-*-freebsd*)
214
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
215
+ CFLAGS="$CFLAGS -D__NO_FPRS__"
216
+ ;;
217
+ powerpc64-*-freebsd* | powerpc64le-*-freebsd*)
203
218
  TARGET=POWERPC; TARGETDIR=powerpc
204
219
  ;;
205
220
  powerpc*-*-rtems*)
@@ -248,6 +263,16 @@ esac
248
263
 
249
264
  # ... but some of the cases above share configury.
250
265
  case "${TARGET}" in
266
+ ARM_WIN32)
267
+ SOURCES="ffi.c sysv_msvc_arm32.S"
268
+ ;;
269
+ ARM_WIN64)
270
+ if test "$MSVC" = 1; then
271
+ SOURCES="ffi.c win64_armasm.S"
272
+ else
273
+ SOURCES="ffi.c sysv.S"
274
+ fi
275
+ ;;
251
276
  MIPS)
252
277
  SOURCES="ffi.c o32.S n32.S"
253
278
  ;;
@@ -265,7 +290,11 @@ case "${TARGET}" in
265
290
  SOURCES="ffi.c ffi_sysv.c sysv.S ppc_closure.S"
266
291
  ;;
267
292
  X86 | X86_DARWIN | X86_FREEBSD | X86_WIN32)
268
- SOURCES="ffi.c sysv.S"
293
+ if test "$MSVC" = 1; then
294
+ SOURCES="ffi.c sysv_intel.S"
295
+ else
296
+ SOURCES="ffi.c sysv.S"
297
+ fi
269
298
  ;;
270
299
  X86_64)
271
300
  if test x"$TARGET_X32" = xyes; then
@@ -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 2 April 2018
2
- @set UPDATED-MONTH April 2018
3
- @set EDITION 3.3-rc0
4
- @set VERSION 3.3-rc0
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
@@ -283,18 +283,20 @@ FFI_API size_t ffi_raw_size (ffi_cif *cif);
283
283
  packing, even on 64-bit machines. I.e. on 64-bit machines longs
284
284
  and doubles are followed by an empty 64-bit word. */
285
285
 
286
+ #if !FFI_NATIVE_RAW_API
286
287
  FFI_API
287
288
  void ffi_java_raw_call (ffi_cif *cif,
288
289
  void (*fn)(void),
289
290
  void *rvalue,
290
- ffi_java_raw *avalue);
291
+ ffi_java_raw *avalue) __attribute__((deprecated));
292
+ #endif
291
293
 
292
294
  FFI_API
293
- 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));
294
296
  FFI_API
295
- 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));
296
298
  FFI_API
297
- size_t ffi_java_raw_size (ffi_cif *cif);
299
+ size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
298
300
 
299
301
  /* ---- Definitions for closures ----------------------------------------- */
300
302
 
@@ -328,6 +330,14 @@ typedef struct {
328
330
  FFI_API void *ffi_closure_alloc (size_t size, void **code);
329
331
  FFI_API void ffi_closure_free (void *);
330
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
+
331
341
  FFI_API ffi_status
332
342
  ffi_prep_closure (ffi_closure*,
333
343
  ffi_cif *,
@@ -414,18 +424,20 @@ ffi_prep_raw_closure_loc (ffi_raw_closure*,
414
424
  void *user_data,
415
425
  void *codeloc);
416
426
 
427
+ #if !FFI_NATIVE_RAW_API
417
428
  FFI_API ffi_status
418
429
  ffi_prep_java_raw_closure (ffi_java_raw_closure*,
419
430
  ffi_cif *cif,
420
431
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
421
- void *user_data);
432
+ void *user_data) __attribute__((deprecated));
422
433
 
423
434
  FFI_API ffi_status
424
435
  ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
425
436
  ffi_cif *cif,
426
437
  void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
427
438
  void *user_data,
428
- void *codeloc);
439
+ void *codeloc) __attribute__((deprecated));
440
+ #endif
429
441
 
430
442
  #endif /* FFI_CLOSURES */
431
443
 
@@ -99,6 +99,10 @@ ffi_status ffi_prep_cif_core(ffi_cif *cif,
99
99
  ffi_type *rtype,
100
100
  ffi_type **atypes);
101
101
 
102
+ /* Translate a data pointer to a code pointer. Needed for closures on
103
+ some targets. */
104
+ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
105
+
102
106
  /* Extended cif, used in callback from assembly routine */
103
107
  typedef struct
104
108
  {
@@ -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: