mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Explicit ".dll" suffix
* ext/win32/lib/Win32API.rb (Win32API#initialize): Cygwin 2.5.2-1 (perhaps) seems to no longer append ".dll" suffix implicitly. * ext/win32/lib/win32/resolv.rb (Win32::Resolv): ditto. Fix the error reported by yamataka AT u08.itscom.net in [ruby-list:50339], and pointed out and patched by cerberus AT m3.kcn.ne.jp in [ruby-list:50341]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1e03af803c
commit
1f2359000c
3 changed files with 19 additions and 2 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Sun Jun 26 10:20:25 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/win32/lib/Win32API.rb (Win32API#initialize): Cygwin
|
||||
2.5.2-1 (perhaps) seems to no longer append ".dll" suffix
|
||||
implicitly.
|
||||
|
||||
* ext/win32/lib/win32/resolv.rb (Win32::Resolv): ditto. Fix the
|
||||
error reported by yamataka AT u08.itscom.net in
|
||||
[ruby-list:50339], and pointed out and patched by cerberus AT
|
||||
m3.kcn.ne.jp in [ruby-list:50341].
|
||||
|
||||
Sat Jun 25 10:07:52 2016 Kazuki Yamaguchi <k@rhe.jp>
|
||||
|
||||
* test/openssl/test_ocsp.rb: Ignore errors caused by bugs that exist in
|
||||
|
|
|
@ -12,7 +12,13 @@ class Win32API
|
|||
|
||||
def initialize(dllname, func, import, export = "0", calltype = :stdcall)
|
||||
@proto = [import].join.tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1')
|
||||
handle = DLL[dllname] ||= Fiddle.dlopen(dllname)
|
||||
handle = DLL[dllname] ||=
|
||||
begin
|
||||
Fiddle.dlopen(dllname)
|
||||
rescue Fiddle::DLError
|
||||
raise unless File.extname(dllname).empty?
|
||||
Fiddle.dlopen(dllname + ".dll")
|
||||
end
|
||||
|
||||
@func = Fiddle::Function.new(
|
||||
handle[func],
|
||||
|
|
|
@ -38,7 +38,7 @@ module Win32
|
|||
nt = Module.new do
|
||||
break true if [nil].pack("p").size > 4
|
||||
extend Importer
|
||||
dlload "kernel32"
|
||||
dlload "kernel32.dll"
|
||||
getv = extern "int GetVersionExA(void *)", :stdcall
|
||||
info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128
|
||||
getv.call(info)
|
||||
|
|
Loading…
Add table
Reference in a new issue