ruby/ext/fiddle
Yusuke Endoh e1855100e4 ext/fiddle/extconf.rb: check if ffi_closure_alloc is available
to define HAVE_FFI_CLOSURE_ALLOC.
The macro is used in closure.c, so have_func check is needed.

If pkg-config is not installed, extconf.rb fails to detect the version
of libffi, and does not add "-DUSE_FFI_CLOSURE_ALLOC=1" even when system
libffi version is >= 3.2.

If USE_FFI_CLOSURE_ALLOC is not defined, closure.c attempts to check if
HAVE_FFI_CLOSURE_ALLOC is defined or not, but have_func was removed with
528a3a1797, so the macro is always not
defined.

This resulted in this deprecation warning:

20200512T123003Z.log.html.gz
```
compiling closure.c
closure.c: In function 'initialize':
closure.c:265:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
  265 |     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
      |     ^~~~~~
In file included from ./fiddle.h:42,
                 from closure.c:1:
/usr/include/x86_64-linux-gnu/ffi.h:334:1: note: declared here
  334 | ffi_prep_closure (ffi_closure*,
      | ^~~~~~~~~~~~~~~~
```
2020-05-13 01:17:30 +09:00
..
lib fiddle/import.rb: suppress warning 2018-04-19 23:35:39 +00:00
win32 Drop executable bit of *.{yml,h,mk.tmpl} 2020-01-22 16:04:38 +09:00
closure.c Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSD 2020-03-08 17:47:48 -07:00
closure.h ext: protoize no-arguments functions 2014-10-04 23:29:24 +00:00
conversions.c
conversions.h conversions.h: PTR2NUM 2015-12-13 09:35:10 +00:00
depend sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
extconf.rb ext/fiddle/extconf.rb: check if ffi_closure_alloc is available 2020-05-13 01:17:30 +09:00
extlibs fiddle: share the same config tools 2020-05-12 15:57:47 +09:00
fiddle.c use NUM2SIZET instead of NUM2INT 2014-02-25 14:18:13 +00:00
fiddle.gemspec Bump fiddle-1.0.0 for released version. 2017-12-06 08:35:13 +00:00
fiddle.h * ext/dl/*: remove DL as it is replaced by Fiddle. 2014-10-31 21:13:09 +00:00
function.c [ruby/fiddle] Remove taint support (#21) 2019-10-24 19:34:49 +09:00
function.h ext: protoize no-arguments functions 2014-10-04 23:29:24 +00:00
handle.c [ruby/fiddle] Remove taint support (#21) 2019-10-24 19:34:49 +09:00
pointer.c [ruby/fiddle] Remove taint support (#21) 2019-10-24 19:34:49 +09:00