mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/mkexports.rb (Exports#read_substitution): need to read
from subst.h too. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
02f9b4d606
commit
b038172348
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Nov 28 12:15:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/mkexports.rb (Exports#read_substitution): need to read
|
||||
from subst.h too. [Bug #5675]
|
||||
|
||||
Mon Nov 28 11:46:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_flush): release GVL during fsync() on Windows.
|
||||
|
|
|
@ -41,8 +41,17 @@ class Exports
|
|||
syms[internal] = export
|
||||
winapis[$1] = internal if /^_?(rb_w32_\w+)(?:@\d+)?$/ =~ internal
|
||||
end
|
||||
win32h = File.join(File.dirname(File.dirname(__FILE__)), "include/ruby/win32.h")
|
||||
IO.foreach(win32h) do |line|
|
||||
incdir = File.join(File.dirname(File.dirname(__FILE__)), "include/ruby")
|
||||
read_substitution(incdir+"/win32.h", syms, winapis)
|
||||
read_substitution(incdir+"/subst.h", syms, winapis)
|
||||
syms["NtInitialize"] ||= "ruby_sysinit" if syms["ruby_sysinit"]
|
||||
syms["rb_w32_vsnprintf"] ||= "ruby_vsnprintf"
|
||||
syms["rb_w32_snprintf"] ||= "ruby_snprintf"
|
||||
@syms = syms
|
||||
end
|
||||
|
||||
def read_substitution(header, syms, winapis)
|
||||
IO.foreach(header) do |line|
|
||||
if /^#define (\w+)\((.*?)\)\s+(?:\(void\))?(rb_w32_\w+)\((.*?)\)\s*$/ =~ line and
|
||||
$2.delete(" ") == $4.delete(" ")
|
||||
export, internal = $1, $3
|
||||
|
@ -51,10 +60,6 @@ class Exports
|
|||
end
|
||||
end
|
||||
end
|
||||
syms["NtInitialize"] ||= "ruby_sysinit" if syms["ruby_sysinit"]
|
||||
syms["rb_w32_vsnprintf"] ||= "ruby_vsnprintf"
|
||||
syms["rb_w32_snprintf"] ||= "ruby_snprintf"
|
||||
@syms = syms
|
||||
end
|
||||
|
||||
def exports(name = $name, library = $library, description = $description)
|
||||
|
|
Loading…
Reference in a new issue