Skip to content

Commit

Permalink
Revert to msvcrt.dll as LIBC on MINGW
Browse files Browse the repository at this point in the history
ffi-1.13.0 switched FFI::Library::LIBC from msvcrt.dll to ucrtbase.dll
as part of ffi#779 in commit c674683 .

As described in ffi#788 ucrtbase.dll has behavioural changes which
shouldn't be released as part of a minor version change of ffi.
While the change makes sense for mswin, we revert it for mingw.

Fixes ffi#788
  • Loading branch information
larskanis committed Jun 5, 2020
1 parent 81dad3c commit f259139
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ffi/platform.rb
Expand Up @@ -129,7 +129,11 @@ def self.is_os(os)
end

LIBC = if IS_WINDOWS
"ucrtbase.dll"
if RbConfig::CONFIG['host_os'] =~ /mingw/i
RbConfig::CONFIG['RUBY_SO_NAME'].split('-')[-2] + '.dll'
else
"ucrtbase.dll"
end
elsif IS_GNU
GNU_LIBC
elsif OS == 'cygwin'
Expand Down

0 comments on commit f259139

Please sign in to comment.