1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/bcc32/mkexports.rb
nobu 49775b88e9 * configure.in, cygwin/GNUmakefile.in (mingw): use def file to alias
symbols.  [ruby-dev:27532]

* bcc32/mkexports.rb, win32/mkexports.rb: make aliases in DLL.

* win32/win32.c, win32/win32.h: replace symbols only when RUBY_EXPORT
  is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-05 04:43:46 +00:00

24 lines
591 B
Ruby

#!./miniruby -s
$:.unshift(File.expand_path("../..", __FILE__))
require 'win32/mkexports'
class Exports::Bcc < Exports
Forwards = /^rb_w32_(\w+)/
def forwarding(internal, export)
internal[/\A_?/]+export
end
def each_export(objs)
objs.each do |obj|
opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32"
IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul") do |l|
next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l
yield $1 if /'(.*?)'/ =~ l
end
end
yield "_strcasecmp", "_stricmp"
yield "_strncasecmp", "_strnicmp"
end
end