diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 23:18:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 23:18:30 +0000 |
commit | 13cefe5fdd4b7360fe61d7fb902f4f65f5c2953e (patch) | |
tree | 66de2937670853bca9fadcc801034f3d3635ae37 /win32/mkexports.rb | |
parent | 5011960bac30de715904095a1d4c65d621d94280 (diff) | |
download | ruby-13cefe5fdd4b7360fe61d7fb902f4f65f5c2953e.tar.gz ruby-13cefe5fdd4b7360fe61d7fb902f4f65f5c2953e.tar.xz ruby-13cefe5fdd4b7360fe61d7fb902f4f65f5c2953e.zip |
* cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too.
* win32/mkexports.rb (Exports::Cygwin): added.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/mkexports.rb')
-rwxr-xr-x | win32/mkexports.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb index 4d7eeb57e..22bb2a193 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -7,14 +7,14 @@ module RbConfig end class Exports - @subclass = [] + @@subclass = [] def self.inherited(klass) - @subclass << [/#{klass.name.sub(/.*::/, '').downcase}/i, klass] + @@subclass << [/#{klass.name.sub(/.*::/, '').downcase}/i, klass] end def self.create(*args, &block) platform = RUBY_PLATFORM - pat, klass = @subclass.find {|p, k| p =~ platform} + pat, klass = @@subclass.find {|p, k| p =~ platform} unless klass raise ArgumentError, "unsupported platform: #{platform}" end @@ -128,7 +128,7 @@ class Exports::Mswin < Exports end end -class Exports::Mingw < Exports +class Exports::Cygwin < Exports def self.nm @@nm ||= RbConfig::CONFIG["NM"] end @@ -145,6 +145,12 @@ class Exports::Mingw < Exports objdump(objs) do |l| yield $2, !$1 if /\s(?:(T)|[[:upper:]])\s_((?!Init_).*)$/ =~ l end + end +end + +class Exports::Mingw < Exports::Cygwin + def each_export(objs) + super yield "strcasecmp", "_stricmp" yield "strncasecmp", "_strnicmp" end |