ffi 1.17.0.rc1-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +442 -0
  3. data/COPYING +49 -0
  4. data/Gemfile +21 -0
  5. data/LICENSE +24 -0
  6. data/LICENSE.SPECS +22 -0
  7. data/README.md +137 -0
  8. data/Rakefile +206 -0
  9. data/ffi.gemspec +42 -0
  10. data/lib/2.5/ffi_c.so +0 -0
  11. data/lib/2.6/ffi_c.so +0 -0
  12. data/lib/2.7/ffi_c.so +0 -0
  13. data/lib/3.0/ffi_c.so +0 -0
  14. data/lib/3.1/ffi_c.so +0 -0
  15. data/lib/3.2/ffi_c.so +0 -0
  16. data/lib/3.3/ffi_c.so +0 -0
  17. data/lib/ffi/abstract_memory.rb +44 -0
  18. data/lib/ffi/autopointer.rb +188 -0
  19. data/lib/ffi/buffer.rb +4 -0
  20. data/lib/ffi/callback.rb +4 -0
  21. data/lib/ffi/compat.rb +43 -0
  22. data/lib/ffi/data_converter.rb +67 -0
  23. data/lib/ffi/dynamic_library.rb +118 -0
  24. data/lib/ffi/enum.rb +302 -0
  25. data/lib/ffi/errno.rb +43 -0
  26. data/lib/ffi/ffi.rb +50 -0
  27. data/lib/ffi/function.rb +71 -0
  28. data/lib/ffi/io.rb +62 -0
  29. data/lib/ffi/library.rb +576 -0
  30. data/lib/ffi/library_path.rb +109 -0
  31. data/lib/ffi/managedstruct.rb +84 -0
  32. data/lib/ffi/memorypointer.rb +1 -0
  33. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  34. data/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  35. data/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  36. data/lib/ffi/platform/aarch64-linux/types.conf +175 -0
  37. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  38. data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
  39. data/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  40. data/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  41. data/lib/ffi/platform/arm-linux/types.conf +132 -0
  42. data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
  43. data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
  44. data/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  45. data/lib/ffi/platform/i386-darwin/types.conf +100 -0
  46. data/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  47. data/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  48. data/lib/ffi/platform/i386-gnu/types.conf +107 -0
  49. data/lib/ffi/platform/i386-linux/types.conf +103 -0
  50. data/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  51. data/lib/ffi/platform/i386-openbsd/types.conf +128 -0
  52. data/lib/ffi/platform/i386-solaris/types.conf +122 -0
  53. data/lib/ffi/platform/i386-windows/types.conf +52 -0
  54. data/lib/ffi/platform/ia64-linux/types.conf +104 -0
  55. data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
  56. data/lib/ffi/platform/mips-linux/types.conf +102 -0
  57. data/lib/ffi/platform/mips64-linux/types.conf +104 -0
  58. data/lib/ffi/platform/mips64el-linux/types.conf +104 -0
  59. data/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  60. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  61. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  62. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  63. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  64. data/lib/ffi/platform/powerpc-aix/types.conf +180 -0
  65. data/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
  66. data/lib/ffi/platform/powerpc-linux/types.conf +130 -0
  67. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  68. data/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
  69. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  70. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  71. data/lib/ffi/platform/s390-linux/types.conf +102 -0
  72. data/lib/ffi/platform/s390x-linux/types.conf +102 -0
  73. data/lib/ffi/platform/sparc-linux/types.conf +102 -0
  74. data/lib/ffi/platform/sparc-solaris/types.conf +128 -0
  75. data/lib/ffi/platform/sparcv9-linux/types.conf +102 -0
  76. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  77. data/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
  78. data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
  79. data/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  80. data/lib/ffi/platform/x86_64-darwin/types.conf +130 -0
  81. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  82. data/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
  83. data/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  84. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  85. data/lib/ffi/platform/x86_64-linux/types.conf +132 -0
  86. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  87. data/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
  88. data/lib/ffi/platform/x86_64-openbsd/types.conf +134 -0
  89. data/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
  90. data/lib/ffi/platform/x86_64-windows/types.conf +52 -0
  91. data/lib/ffi/platform.rb +187 -0
  92. data/lib/ffi/pointer.rb +167 -0
  93. data/lib/ffi/struct.rb +317 -0
  94. data/lib/ffi/struct_by_reference.rb +72 -0
  95. data/lib/ffi/struct_layout.rb +96 -0
  96. data/lib/ffi/struct_layout_builder.rb +227 -0
  97. data/lib/ffi/tools/const_generator.rb +232 -0
  98. data/lib/ffi/tools/generator.rb +105 -0
  99. data/lib/ffi/tools/generator_task.rb +32 -0
  100. data/lib/ffi/tools/struct_generator.rb +195 -0
  101. data/lib/ffi/tools/types_generator.rb +137 -0
  102. data/lib/ffi/types.rb +222 -0
  103. data/lib/ffi/union.rb +43 -0
  104. data/lib/ffi/variadic.rb +80 -0
  105. data/lib/ffi/version.rb +3 -0
  106. data/lib/ffi.rb +27 -0
  107. data/rakelib/ffi_gem_helper.rb +65 -0
  108. data/samples/getlogin.rb +8 -0
  109. data/samples/getpid.rb +8 -0
  110. data/samples/gettimeofday.rb +18 -0
  111. data/samples/hello.rb +8 -0
  112. data/samples/hello_ractor.rb +11 -0
  113. data/samples/inotify.rb +60 -0
  114. data/samples/pty.rb +75 -0
  115. data/samples/qsort.rb +20 -0
  116. data/samples/qsort_ractor.rb +28 -0
  117. data/sig/ffi/abstract_memory.rbs +164 -0
  118. data/sig/ffi/auto_pointer.rbs +27 -0
  119. data/sig/ffi/buffer.rbs +18 -0
  120. data/sig/ffi/data_converter.rbs +10 -0
  121. data/sig/ffi/dynamic_library.rbs +9 -0
  122. data/sig/ffi/enum.rbs +38 -0
  123. data/sig/ffi/function.rbs +39 -0
  124. data/sig/ffi/library.rbs +42 -0
  125. data/sig/ffi/native_type.rbs +86 -0
  126. data/sig/ffi/pointer.rbs +42 -0
  127. data/sig/ffi/struct.rbs +76 -0
  128. data/sig/ffi/struct_by_reference.rbs +11 -0
  129. data/sig/ffi/struct_by_value.rbs +7 -0
  130. data/sig/ffi/struct_layout.rbs +9 -0
  131. data/sig/ffi/struct_layout_builder.rbs +5 -0
  132. data/sig/ffi/type.rbs +39 -0
  133. data/sig/ffi.rbs +26 -0
  134. metadata +244 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ade68941c99c7ca0bd64a1982491b5821ac0e190b2a98d16661161157010f5c0
4
+ data.tar.gz: 51e03194eea6b80172c2dd16d562dc3034f73343252f423ba5a44e0830ab6629
5
+ SHA512:
6
+ metadata.gz: 96be2e6ac4113754c3090faa141147443618edd7515e34c4237b74b19d18b05924ba604fe20f9e9fb44259222a61d0d73921c2f92d7887ebadc9cd2da391f435
7
+ data.tar.gz: a6efa32b48c1ed876fb428fadc1c67e231d5c7e8e8fd38149c6b086db22f972dc89ec3f8133626f280471924dffe37d4abadcf34316934b75320fcc293548c67
data/CHANGELOG.md ADDED
@@ -0,0 +1,442 @@
1
+ 1.17.0.rc1 / 2024-04-08
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Fix type definitions on `aarch64-linux`. #1067, #1066
6
+ * Use RB_TEST for `Pointer.autorelease=` . #1065
7
+ So that `false` and `nil` are treated as falsey and anything else as truthy.
8
+ * Replace Fixnum by Integer. #1064
9
+ Fixnum is no longer present in the ruby language.
10
+ * Update `FFI::NativeType` doc. #1061
11
+ * Store FFI::Type::Mapped of FFI::StrPtrConverter in global instead of custom type map
12
+ * Various documentation fixes. #1042
13
+ * Update `FFI::Pointer#==` to return `false` if a pointer is compared to a non-pointer object, which is the expected behavior. #1083
14
+ * Avoid warning about undefined wariable `@ffi_functions` #1085
15
+ * Fix a very unlikely GC bug when using a callback block. # 1089
16
+
17
+ Added:
18
+ * Provide binary gems for many platforms. #990
19
+ * Add Windows fat binary gem for Ruby-3.3
20
+ * Add RBS type definitions for many user facing parts of the FFI API. #1042
21
+ * Improve fallback search path logic. #1088
22
+ Respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH on Macos.
23
+ * Update libffi to current git master branch.
24
+
25
+ Removed:
26
+ * Remove `enum CHAR_ARRAY` which is no longer used. #1063
27
+
28
+
29
+ 1.16.3 / 2023-10-04
30
+ -------------------
31
+
32
+ Fixed:
33
+ * Fix gcc error when building on CentOS 7. #1052
34
+ * Avoid trying to store new DataConverter type in frozen TypeDefs hash. #1057
35
+
36
+
37
+ 1.16.2 / 2023-09-25
38
+ -------------------
39
+
40
+ Fixed:
41
+ * Handle null pointer crash after fork. #1051
42
+
43
+
44
+ 1.16.1 / 2023-09-24
45
+ -------------------
46
+
47
+ Fixed:
48
+ * Fix compiling the builtin libffi. #1049
49
+
50
+
51
+ 1.16.0 / 2023-09-23
52
+ -------------------
53
+
54
+ Fixed:
55
+ * Fix an issue with signed bitmasks when using flags on the most significant bit. #949
56
+ * Fix FFI::Pointer#initialize using NUM2LL instead of NUM2ULL.
57
+ * Fix FFI::Type#inspect to properly display the constant name. #1002
58
+ * Use libffi closure allocations on hppa-Linux. #1017
59
+ Previously they would segfault.
60
+ * Fix class name of Symbol#inspect.
61
+ * Fix MSVC support of libtest. #1028
62
+ * Fix attach_function of functions ending in ? or ! #971
63
+
64
+ Added:
65
+ * Convert all C-based classes to TypedData and use write barriers. #994, #995, #996, #997, #998, #999, #1000, #1001, #1003, #1004, #1005, #1006, #1007, #1008, #1009, #1010, #1011, #1012
66
+ This results in less pressure on the garbage collector, since the objects can be promoted to the old generation, which means they only get marked on major GC.
67
+ * Implement `ObjectSpace.memsize_of()` of all C-based classes.
68
+ * Make FFI Ractor compatible. #1023
69
+ Modules extended per `extend FFI::Library` need to be frozen in order to be used by non-main Ractors.
70
+ This can be done by calling `freeze` below of all C interface definitions.
71
+ * In a Ractor it's possible to:
72
+ * load DLLs and call its functions, access its global variables
73
+ * use builtin typedefs
74
+ * use and modify ractor local typedefs
75
+ * define callbacks
76
+ * receive async callbacks from non-ruby threads
77
+ * use frozen FFI::Library based modules with all attributes (enums, structs, typedefs, functions, callbacks)
78
+ * invoke frozen functions and callbacks defined in the main Ractor
79
+ * use FFI::Struct definitions from the main Ractor
80
+ * In a Ractor it's impossible to:
81
+ * create new FFI::Library based modules
82
+ * create new FFI::Struct definitions
83
+ * use custom global typedefs
84
+ * use non-frozen FFI::Library based modules
85
+ * Allow type retrieval of attached functions+variables. #1023
86
+ * Make FFI classes `GC.compact` friendly. #1021
87
+ * Update libffi and disable custom trampoline when using libffi closure allocation. #1020
88
+ This is because libffi changed the way how closures are allocated to static trampolines.
89
+ * Add types.conf for loongarch64-linux. #943
90
+ * Add types.conf for sw_64-linux (Shen Wei 64-bit, based on Alpha). #1018
91
+ * Add support for aarch64-windows. #1035
92
+ * Windows: Update LoadLibrary error message to include error code. #1026
93
+ * Allow private release method for FFI::ManagedStruct and FFI::AutoPointer. #1029
94
+ * Add support for passing ABI version to FFI.map_library_name. #963
95
+ This adds the new class FFI::LibraryPath .
96
+ * Add support for ruby-3.2 to windows binary gem. #1047
97
+ * Enable debug symbols for `rake compile` builds to ease debugging. #1048
98
+
99
+ Removed:
100
+ * Remove allocator of AbstractMemory. #1013
101
+ This disables AbstractMemory.new, which has no practical use.
102
+ * Remove unused FFI::SizeTypes. #1022
103
+
104
+
105
+ 1.15.5 / 2022-01-10
106
+ -------------------
107
+
108
+ Fixed:
109
+ * Fix long double argument or return values on 32bit i686. #849
110
+ * FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929
111
+
112
+ Added:
113
+ * Add Windows fat binary gem for Ruby-3.1
114
+
115
+ Removed:
116
+ * Remove Windows fat binary gem for Ruby < 2.4
117
+
118
+
119
+ 1.15.4 / 2021-09-01
120
+ -------------------
121
+
122
+ Fixed:
123
+ * Fix build for uClibc. #913
124
+ * Correct module lookup when including `ffi-module` gem. #912
125
+
126
+ Changed:
127
+ * Use ruby code of the ffi gem in JRuby-9.2.20+. #915
128
+
129
+
130
+ 1.15.3 / 2021-06-16
131
+ -------------------
132
+
133
+ Fixed:
134
+ * Fix temporary packaging issue with libffi. #904
135
+
136
+
137
+ 1.15.2 / 2021-06-16
138
+ -------------------
139
+
140
+ Added:
141
+ * Add support for Windows MINGW-UCRT build. #903
142
+ * Add `/opt/homebrew/lib/` to fallback search paths to improve homebrew support. #880 #882
143
+
144
+ Changed:
145
+ * Regenerate `types.conf` for FreeBSD12 aarch64. #902
146
+
147
+
148
+ 1.15.1 / 2021-05-22
149
+ -------------------
150
+
151
+ Fixed:
152
+ * Append -pthread to linker options. #893
153
+ * Use arm or aarch64 to identify Apple ARM CPU arch. #899
154
+ * Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897
155
+
156
+
157
+ 1.15.0 / 2021-03-05
158
+ -------------------
159
+
160
+ Fixed:
161
+ * Fix MSVC build
162
+ * Fix async callbacks in conjunction with fork(). #884
163
+
164
+ Added:
165
+ * Allow to pass callbacks in varargs. #885
166
+ * Name the threads for FFI callback dispatcher and async thread calls for easier debugging. #883
167
+ The name can be retrieved by Thread.name and is shown by Thread.list.inspect etc.
168
+ Even gdb shows the thread name on supported operating systems.
169
+ * Add types.conf for powerpc64le-linux
170
+ * Add types.conf for riscv64-linux
171
+ * More release automation of ffi gems
172
+
173
+ Changed:
174
+ * Switch from rubygems-tasks to bundler/gem_helper
175
+
176
+ Removed:
177
+ * Remove unused VariadicInvoker#init
178
+
179
+
180
+ 1.14.2 / 2020-12-21
181
+ -------------------
182
+
183
+ Fixed:
184
+ * Fix builtin libffi on newer Ubuntu caused by an outdated Makefile.in . #863
185
+
186
+
187
+ 1.14.1 / 2020-12-19
188
+ -------------------
189
+
190
+ Changed:
191
+ * Revert changes to FFI::Pointer#write_string made in ffi-1.14.0.
192
+ It breaks compatibilty in a way that can cause hard to find errors. #857
193
+
194
+
195
+ 1.14.0 / 2020-12-18
196
+ -------------------
197
+
198
+ Added:
199
+ * Add types.conf for x86_64-msys, x86_64-haiku, aarch64-openbsd and aarch64-darwin (alias arm64-darwin)
200
+ * Add method AbstractMemory#size_limit? . #829
201
+ * Add new extconf option --enable-libffi-alloc which is enabled per default on Apple M1 (arm64-darwin).
202
+
203
+ Changed:
204
+ * Do NULL pointer check only when array length > 0 . #305
205
+ * Raise an error on an unknown order argument. #830
206
+ * Change FFI::Pointer#write_string to terminate with a NUL byte like other string methods. #805
207
+ * Update bundled libffi to latest master.
208
+
209
+ Removed:
210
+ * Remove win32/stdint.h and stdbool.h because of copyright issue. #693
211
+
212
+ Fixed:
213
+ * Fix possible UTF-8 load error in loader script interpretation. #792
214
+ * Fix segfault on non-array argument to #write_array_of_*
215
+ * Fix memory leak in MethodHandle . #815
216
+ * Fix possible segfault in combination with fiddle or other libffi using gems . #835
217
+ * Fix possibility to use ffi ruby gem with JRuby-9.3 . #763
218
+ * Fix a GC issue, when a callback Proc is used on more than 2 callback signatures. #820
219
+
220
+
221
+ 1.13.1 / 2020-06-09
222
+ -------------------
223
+
224
+ Changed:
225
+ * Revert use of `ucrtbase.dll` as default C library on Windows-MINGW.
226
+ `ucrtbase.dll` is still used on MSWIN target. #790
227
+ * Test for `ffi_prep_closure_loc()` to make sure we can use this function.
228
+ This fixes incorrect use of system libffi on MacOS Mojave (10.14). #787
229
+ * Update types.conf on x86_64-dragonflybsd
230
+
231
+
232
+ 1.13.0 / 2020-06-01
233
+ -------------------
234
+
235
+ Added:
236
+ * Add TruffleRuby support. Almost all specs are running on TruffleRuby and succeed. #768
237
+ * 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
238
+ * Add FFI::Platform::LONG_DOUBLE_SIZE
239
+ * Add bounds checks for writing to an inline char[] . #756
240
+ * Add long double as callback return value. #771
241
+ * 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
242
+ * Add new type definitions for powerpc-openbsd and sparcv9-openbsd. #775, #778
243
+
244
+ Changed:
245
+ * Raise required ruby version to >= 2.3.
246
+ * Lots of cleanups and improvements in library, specs and benchmarks.
247
+ * Fix a lot of compiler warnings at the C-extension
248
+ * Fix several install issues on MacOS:
249
+ * Look for libffi in SDK paths, since recent versions of macOS removed it from `/usr/include` . #757
250
+ * Fix error `ld: library not found for -lgcc_s.10.4`
251
+ * Don't built for i386 architecture as it is deprecated
252
+ * Several fixes for MSVC build on Windows. #779
253
+ * Use `ucrtbase.dll` as default C library on Windows instead of old `msvcrt.dll`. #779
254
+ * Update builtin libffi to fix a Powerpc issue with parameters of type long
255
+ * Allow unmodified sourcing of (the ruby code of) this gem in JRuby and TruffleRuby as a default gem. #747
256
+ * Improve check to detect if a module has a #find_type method suitable for FFI. This fixes compatibility with stdlib `mkmf` . #776
257
+
258
+ Removed:
259
+ * Reject callback with `:string` return type at definition, because it didn't work so far and is not save to use. #751, #782
260
+
261
+
262
+ 1.12.2 / 2020-02-01
263
+ -------------------
264
+
265
+ * Fix possible segfault at FFI::Struct#[] and []= after GC.compact . #742
266
+
267
+
268
+ 1.12.1 / 2020-01-14
269
+ -------------------
270
+
271
+ Added:
272
+ * Add binary gem support for ruby-2.7 on Windows
273
+
274
+
275
+ 1.12.0 / 2020-01-14
276
+ -------------------
277
+
278
+ Added:
279
+ * FFI::VERSION is defined as part of `require 'ffi'` now.
280
+ It is no longer necessary to `require 'ffi/version'` .
281
+
282
+ Changed:
283
+ * Update libffi to latest master.
284
+
285
+ Deprecated:
286
+ * Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735
287
+
288
+
289
+ 1.11.3 / 2019-11-25
290
+ -------------------
291
+
292
+ Removed:
293
+ * Remove support for tainted objects which cause deprecation warnings in ruby-2.7. #730
294
+
295
+
296
+ 1.11.2 / 2019-11-11
297
+ -------------------
298
+
299
+ Added:
300
+ * Add DragonFlyBSD as a platform. #724
301
+
302
+ Changed:
303
+ * Sort all types.conf files, so that files and changes are easier to compare.
304
+ * Regenerated type conf for freebsd12 and x86_64-linux targets. #722
305
+ * Remove MACOSX_DEPLOYMENT_TARGET that was targeting very old version 10.4. #647
306
+ * Fix library name mangling for non glibc Linux/UNIX. #727
307
+ * Fix compiler warnings raised by ruby-2.7
308
+ * Update libffi to latest master.
309
+
310
+
311
+ 1.11.1 / 2019-05-20
312
+ -------------------
313
+
314
+ Changed:
315
+ * Raise required ruby version to >=2.0. #699, #700
316
+ * Fix a possible linker error on ruby < 2.3 on Linux.
317
+
318
+
319
+ 1.11.0 / 2019-05-17
320
+ -------------------
321
+ This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. #700
322
+
323
+ Added:
324
+ * Add ability to disable or force use of system libffi. #669
325
+ Use like `gem inst ffi -- --enable-system-libffi` .
326
+ * Add ability to call FFI callbacks from outside of FFI call frame. #584
327
+ * Add proper documentation to FFI::Generator and ::Task
328
+ * Add gemspec metadata. #696, #698
329
+
330
+ Changed:
331
+ * Fix stdcall on Win32. #649, #669
332
+ * Fix load paths for FFI::Generator::Task
333
+ * Fix FFI::Pointer#read_string(0) to return a binary String. #692
334
+ * Fix benchmark suite so that it runs on ruby-2.x
335
+ * Move FFI::Platform::CPU from C to Ruby. #663
336
+ * Move FFI::StructByReference to Ruby. #681
337
+ * Move FFI::DataConverter to Ruby (#661)
338
+ * Various cleanups and improvements of specs and benchmarks
339
+
340
+ Removed:
341
+ * Remove ruby-1.8 and 1.9 compatibility code. #683
342
+ * Remove unused spec files. #684
343
+
344
+
345
+ 1.10.0 / 2019-01-06
346
+ -------------------
347
+
348
+ Added:
349
+ * Add /opt/local/lib/ to ffi's fallback library search path. #638
350
+ * Add binary gem support for ruby-2.6 on Windows
351
+ * Add FreeBSD on AArch64 and ARM support. #644
352
+ * Add FFI::LastError.winapi_error on Windows native or Cygwin. #633
353
+
354
+ Changed:
355
+ * Update to rake-compiler-dock-0.7.0
356
+ * Use 64-bit inodes on FreeBSD >= 12. #644
357
+ * Switch time_t and suseconds_t types to long on FreeBSD. #627
358
+ * Make register_t long_long on 64-bit FreeBSD. #644
359
+ * Fix Pointer#write_array_of_type #637
360
+
361
+ Removed:
362
+ * Drop binary gem support for ruby-2.0 and 2.1 on Windows
363
+
364
+
365
+ 1.9.25 / 2018-06-03
366
+ -------------------
367
+
368
+ Changed:
369
+ * Revert closures via libffi.
370
+ This re-adds ClosurePool and fixes compat with SELinux enabled systems. #621
371
+
372
+
373
+ 1.9.24 / 2018-06-02
374
+ -------------------
375
+
376
+ Security Note:
377
+
378
+ This update addresses vulnerability CVE-2018-1000201: DLL loading issue which can be hijacked on Windows OS, when a Symbol is used as DLL name instead of a String. Found by Matthew Bush.
379
+
380
+ Added:
381
+ * Added a CHANGELOG file
382
+ * Add mips64(eb) support, and mips r6 support. (#601)
383
+
384
+ Changed:
385
+ * Update libffi to latest changes on master.
386
+ * Don't search in hardcoded /usr paths on Windows.
387
+ * Don't treat Symbol args different to Strings in ffi_lib.
388
+ * Make sure size_t is defined in Thread.c. Fixes #609
389
+
390
+
391
+ 1.9.23 / 2018-02-25
392
+ -------------------
393
+
394
+ Changed:
395
+ * Fix unnecessary rebuild of configure in darwin multi arch. Fixes #605
396
+
397
+
398
+ 1.9.22 / 2018-02-22
399
+ -------------------
400
+
401
+ Changed:
402
+ * Update libffi to latest changes on master.
403
+ * Update detection of system libffi to match new requirements. Fixes #617
404
+ * Prefer bundled libffi over system libffi on Mac OS.
405
+ * Do closures via libffi. This removes ClosurePool and fixes compat with PaX. #540
406
+ * Use a more deterministic gem packaging.
407
+ * Fix unnecessary update of autoconf files at gem install.
408
+
409
+
410
+ 1.9.21 / 2018-02-06
411
+ -------------------
412
+
413
+ Added:
414
+ * Ruby-2.5 support by Windows binary gems. Fixes #598
415
+ * Add missing win64 types.
416
+ * Added support for Bitmask. (#573)
417
+ * Add support for MSYS2 (#572) and Sparc64 Linux. (#574)
418
+
419
+ Changed:
420
+ * Fix read_string to not throw an error on length 0.
421
+ * Don't use absolute paths for sh and env. Fixes usage on Adroid #528
422
+ * Use Ruby implementation for `which` for better compat with Windows. Fixes #315
423
+ * Fix compatibility with PPC64LE platform. (#577)
424
+ * Normalize sparc64 to sparcv9. (#575)
425
+
426
+ Removed:
427
+ * Drop Ruby 1.8.7 support (#480)
428
+
429
+
430
+ 1.9.18 / 2017-03-03
431
+ -------------------
432
+
433
+ Added:
434
+ * Add compatibility with Ruby-2.4.
435
+
436
+ Changed:
437
+ * Add missing shlwapi.h include to fix Windows build.
438
+ * Avoid undefined behaviour of LoadLibrary() on Windows. #553
439
+
440
+
441
+ 1.9.17 / 2017-01-13
442
+ -------------------
data/COPYING ADDED
@@ -0,0 +1,49 @@
1
+ Copyright (c) 2008-2013, Ruby FFI project contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ruby FFI project nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ libffi, used by this project, is licensed under the MIT license:
27
+
28
+ libffi - Copyright (c) 1996-2011 Anthony Green, Red Hat, Inc and others.
29
+ See source files for details.
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ ``Software''), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'bigdecimal' unless RUBY_VERSION =~ /^2\.[4567]|^3\.[012]\./ # necessary on ruby-3.3+
5
+ gem 'bundler', '>= 1.16', '< 3'
6
+ gem 'rake', '~> 13.0'
7
+ gem 'rake-compiler', '~> 1.1'
8
+ gem 'rake-compiler-dock', '~> 1.0.pre'
9
+ gem 'rspec', '~> 3.0'
10
+ end
11
+
12
+ group :doc do
13
+ gem 'kramdown'
14
+ gem 'yard', '~> 0.9'
15
+ end
16
+
17
+ group :type_check do
18
+ if RUBY_VERSION >= "2.6" && %w[ ruby truffleruby ].include?(RUBY_ENGINE)
19
+ gem 'rbs', '~> 3.0'
20
+ end
21
+ end
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2008-2016, Ruby FFI project contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ruby FFI project nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/LICENSE.SPECS ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2008-2012 Ruby-FFI contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.