1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/fiddle] always use ffi_closure_alloc on Windows

This commit is contained in:
Nobuyoshi Nakada 2020-03-05 11:31:08 +09:00
parent f08cd708b1
commit 261569d4aa
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -116,7 +116,12 @@ if ver
ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
ver = (ver.split('.').map(&:to_i) + [0,0])[0,3]
$defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
$defs << "-DUSE_FFI_CLOSURE_ALLOC=1" if (ver <=> [3, 2]) >= 0
end
warn "libffi_version: #{ver}"
case
when $mswin, $minor, (ver && (ver <=> [3, 2]) >= 0)
$defs << "-DUSE_FFI_CLOSURE_ALLOC=1"
end
have_header 'sys/mman.h'