summaryrefslogtreecommitdiff
path: root/win32/mkexports.rb
diff options
context:
space:
mode:
Diffstat (limited to 'win32/mkexports.rb')
-rwxr-xr-xwin32/mkexports.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index 70b7f3f228..dd0fbf6313 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -26,7 +26,7 @@ class Exports
def self.output(output = $output, &block)
if output
- open(output, 'wb', &block)
+ File.open(output, 'wb', &block)
else
yield STDOUT
end
@@ -49,7 +49,7 @@ class Exports
end
def read_substitution(header, syms, winapis)
- IO.foreach(header) do |line|
+ File.foreach(header) do |line|
if /^#define (\w+)\((.*?)\)\s+(?:\(void\))?(rb_w32_\w+)\((.*?)\)\s*$/ =~ line and
$2.delete(" ") == $4.delete(" ")
export, internal = $1, $3
@@ -113,6 +113,7 @@ class Exports::Mswin < Exports
end
case filetype
when /OBJECT/, /LIBRARY/
+ l.chomp!
next if /^[[:xdigit:]]+ 0+ UNDEF / =~ l
next unless /External/ =~ l
next if /(?:_local_stdio_printf_options|v(f|sn?)printf(_s)?_l)\Z/ =~ l
@@ -150,7 +151,7 @@ class Exports::Cygwin < Exports
end
def each_line(objs, &block)
- IO.foreach("|#{self.class.nm} --extern --defined #{objs.join(' ')}", &block)
+ IO.foreach("|#{self.class.nm} --extern-only --defined-only #{objs.join(' ')}", &block)
end
def each_export(objs)