mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/fiddle] ffi_closure_free is available in the bundled libffi
This commit is contained in:
parent
633a1f15d8
commit
95f387f61a
1 changed files with 3 additions and 1 deletions
|
@ -135,7 +135,6 @@ elsif have_header "windows.h"
|
||||||
end
|
end
|
||||||
|
|
||||||
have_const('FFI_STDCALL', ffi_header)
|
have_const('FFI_STDCALL', ffi_header)
|
||||||
have_func('ffi_closure_alloc', ffi_header)
|
|
||||||
|
|
||||||
config = File.read(RbConfig.expand(File.join($arch_hdrdir, "ruby/config.h")))
|
config = File.read(RbConfig.expand(File.join($arch_hdrdir, "ruby/config.h")))
|
||||||
types = {"SIZE_T"=>"SSIZE_T", "PTRDIFF_T"=>nil, "INTPTR_T"=>nil}
|
types = {"SIZE_T"=>"SSIZE_T", "PTRDIFF_T"=>nil, "INTPTR_T"=>nil}
|
||||||
|
@ -154,6 +153,9 @@ end
|
||||||
if libffi
|
if libffi
|
||||||
$LOCAL_LIBS.prepend("./#{libffi.a} ").strip! # to exts.mk
|
$LOCAL_LIBS.prepend("./#{libffi.a} ").strip! # to exts.mk
|
||||||
$INCFLAGS.gsub!(/-I#{libffi.dir}/, '-I$(LIBFFI_DIR)')
|
$INCFLAGS.gsub!(/-I#{libffi.dir}/, '-I$(LIBFFI_DIR)')
|
||||||
|
$defs << "-DUSE_FFI_CLOSURE_ALLOC=1"
|
||||||
|
else
|
||||||
|
have_func('ffi_closure_alloc', ffi_header)
|
||||||
end
|
end
|
||||||
$INCFLAGS << " -I$(top_srcdir)"
|
$INCFLAGS << " -I$(top_srcdir)"
|
||||||
create_makefile 'fiddle' do |conf|
|
create_makefile 'fiddle' do |conf|
|
||||||
|
|
Loading…
Reference in a new issue