mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	stdint.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			624 B
		
	
	
	
		
			Ruby
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			624 B
		
	
	
	
		
			Ruby
		
	
	
		
			Executable file
		
	
	
	
	
#!./miniruby -s
 | 
						|
 | 
						|
$:.unshift(File.expand_path("../..", __FILE__))
 | 
						|
require 'win32/mkexports'
 | 
						|
 | 
						|
class Exports::Bcc < Exports
 | 
						|
  def forwarding(internal, export)
 | 
						|
    internal[/\A_?/]+export
 | 
						|
  end
 | 
						|
 | 
						|
  def each_line(objs, &block)
 | 
						|
    objs.each do |obj|
 | 
						|
      opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32"
 | 
						|
      IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul", &block)
 | 
						|
    end
 | 
						|
  end
 | 
						|
 | 
						|
  def each_export(objs)
 | 
						|
    objdump(objs) do |l|
 | 
						|
      next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l
 | 
						|
      yield $1 if /'(.*?)'/ =~ l
 | 
						|
    end
 | 
						|
    yield "_strcasecmp", "_stricmp"
 | 
						|
    yield "_strncasecmp", "_strnicmp"
 | 
						|
  end
 | 
						|
end
 |