ruby-changes:10439
From: nobu <ko1@a...>
Date: Tue, 3 Feb 2009 08:18:42 +0900 (JST)
Subject: [ruby-changes:10439] Ruby:r21989 (trunk): * cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too.
nobu 2009-02-03 08:18:30 +0900 (Tue, 03 Feb 2009) New Revision: 21989 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21989 Log: * cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too. * win32/mkexports.rb (Exports::Cygwin): added. Modified files: trunk/ChangeLog trunk/cygwin/GNUmakefile.in trunk/win32/mkexports.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 21988) +++ ChangeLog (revision 21989) @@ -1,3 +1,9 @@ +Tue Feb 3 08:18:26 2009 Nobuyoshi Nakada <nobu@r...> + + * cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too. + + * win32/mkexports.rb (Exports::Cygwin): added. + Tue Feb 3 08:10:23 2009 Nobuyoshi Nakada <nobu@r...> * common.mk (Doxyfile): moved from Makefile.in. Index: cygwin/GNUmakefile.in =================================================================== --- cygwin/GNUmakefile.in (revision 21988) +++ cygwin/GNUmakefile.in (revision 21989) @@ -69,14 +69,8 @@ $(LIBRUBY_SO): $(RUBYDEF) -$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG) GNUmakefile -ifeq (@target_os@,cygwin) - @NM@ --extern --defined $(LIBRUBY_A) | \ - $(MINIRUBY) -n -e 'BEGIN{puts "VERSION $(MAJOR).$(MINOR)","EXPORTS"}' \ - -e 'if / (?:(T)|[A-Z]) _((?!Init_).*)$$/; puts "#{$$2}#{" DATA" if !$$1}"; end' > $@ -else +$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG) $(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A) -endif clean-local:: @$(RM) $(RUBYDEF) Index: win32/mkexports.rb =================================================================== --- win32/mkexports.rb (revision 21988) +++ win32/mkexports.rb (revision 21989) @@ -7,14 +7,14 @@ 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 @@ end end -class Exports::Mingw < Exports +class Exports::Cygwin < Exports def self.nm @@nm ||= RbConfig::CONFIG["NM"] end @@ -145,6 +145,12 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/