summaryrefslogtreecommitdiff
path: root/ext/win32/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-26 01:20:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-26 01:20:27 +0000
commit1f2359000c429669f2ba1afc0ffd3186370181ef ()
treeb4e39dbca0efb0dda7d474a6d395cfc87553ee83 /ext/win32/lib
parent1e03af803c3c608f8b261b3272fc1d772863d567 (diff)
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 ed 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
-rw-r--r--ext/win32/lib/Win32API.rb8
-rw-r--r--ext/win32/lib/win32/resolv.rb2
2 files changed, 8 insertions, 2 deletions
@@ -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)
@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"
getv = extern "int GetVersionExA(void *)", :stdcall
info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128
getv.call(info)