[前][次][番号順一覧][スレッド一覧]

ruby-changes:10389

From: nobu <ko1@a...>
Date: Mon, 2 Feb 2009 08:13:05 +0900 (JST)
Subject: [ruby-changes:10389] Ruby:r21933 (trunk): * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded

nobu	2009-02-02 08:12:52 +0900 (Mon, 02 Feb 2009)

  New Revision: 21933

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21933

  Log:
    * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
      platform names.
    * lib/resolv.rb (Resolv::Hosts::DefaultFileName),
      (Resolv::DNS::Config.default_config_hash): tries win32/resolv on
      mswin64 too.
    
    * lib/rubygems/specification.rb (Gem::Specification#ruby_code):
      aded mswin64.
    
    * lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command):
      spawn is better to start a process in background.
    
    * ext/extmk.rb: uses FNM_SYSCASE.
    
    * instruby.rb: installs win32.h on mswin64 platform.
      [ruby-core:21722]

  Modified files:
    trunk/ChangeLog
    trunk/ext/extmk.rb
    trunk/ext/win32ole/extconf.rb
    trunk/instruby.rb
    trunk/lib/drb/extservm.rb
    trunk/lib/resolv.rb
    trunk/lib/rubygems/specification.rb
    trunk/lib/xmlrpc/server.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21932)
+++ ChangeLog	(revision 21933)
@@ -1,3 +1,23 @@
+Mon Feb  2 08:12:50 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
+	  platform names.
+
+	* lib/resolv.rb (Resolv::Hosts::DefaultFileName),
+	  (Resolv::DNS::Config.default_config_hash): tries win32/resolv on
+	  mswin64 too.
+
+	* lib/rubygems/specification.rb (Gem::Specification#ruby_code):
+	  aded mswin64.
+
+	* lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command):
+	  spawn is better to start a process in background.
+
+	* ext/extmk.rb: uses FNM_SYSCASE.
+
+	* instruby.rb: installs win32.h on mswin64 platform.
+	  [ruby-core:21722]
+
 Mon Feb  2 07:36:13 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm.c (vm_backtrace_each): now takes an iterator function.
Index: lib/xmlrpc/server.rb
===================================================================
--- lib/xmlrpc/server.rb	(revision 21932)
+++ lib/xmlrpc/server.rb	(revision 21933)
@@ -640,11 +640,7 @@
   end
   
   def serve
-    if RUBY_PLATFORM =~ /mingw|mswin32/
-      signals = [1]
-    else
-      signals = %w[INT TERM HUP]
-    end
+    signals = %w[INT TERM HUP] & Signal.list.keys
     signals.each { |signal| trap(signal) { @server.shutdown } }
 
     @server.start
Index: lib/resolv.rb
===================================================================
--- lib/resolv.rb	(revision 21932)
+++ lib/resolv.rb	(revision 21933)
@@ -165,7 +165,7 @@
   # Resolv::Hosts is a hostname resolver that uses the system hosts file.
 
   class Hosts
-    if /mswin32|mingw|bccwin/ =~ RUBY_PLATFORM
+    if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM
       require 'win32/resolv'
       DefaultFileName = Win32::Resolv.get_hosts_path
     else
@@ -829,7 +829,7 @@
         if File.exist? filename
           config_hash = Config.parse_resolv_conf(filename)
         else
-          if /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
+          if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
             require 'win32/resolv'
             search, nameserver = Win32::Resolv.get_resolv_info
             config_hash = {}
Index: lib/rubygems/specification.rb
===================================================================
--- lib/rubygems/specification.rb	(revision 21932)
+++ lib/rubygems/specification.rb	(revision 21933)
@@ -1153,6 +1153,8 @@
         @new_platform = Gem::Platform::RUBY
       when 'mswin32' then # was Gem::Platform::WIN32
         @new_platform = Gem::Platform.new 'x86-mswin32'
+      when 'mswin64' then
+        @new_platform = Gem::Platform.new 'x86-mswin64'
       when 'i586-linux' then # was Gem::Platform::LINUX_586
         @new_platform = Gem::Platform.new 'x86-linux'
       when 'powerpc-darwin' then # was Gem::Platform::DARWIN
Index: lib/drb/extservm.rb
===================================================================
--- lib/drb/extservm.rb	(revision 21932)
+++ lib/drb/extservm.rb	(revision 21933)
@@ -79,11 +79,7 @@
 	@servers[name] = false
       end
       uri = @uri || DRb.uri
-      if RUBY_PLATFORM =~ /mswin32/ && /NT/ =~ ENV["OS"]
-        system(%Q'cmd /c start "ruby" /b #{command} #{uri} #{name}')
-      else
-	system("#{command} #{uri} #{name} &")
-      end
+      spawn("#{command} #{uri} #{name}")
     end
   end
 end
Index: ext/win32ole/extconf.rb
===================================================================
--- ext/win32ole/extconf.rb	(revision 21932)
+++ ext/win32ole/extconf.rb	(revision 21933)
@@ -36,7 +36,7 @@
 
 
 case RUBY_PLATFORM
-when /mswin32/
+when /mswin/
   $CFLAGS += ' /W3'
 when /cygwin/, /mingw/
   $defs << '-DNONAMELESSUNION'
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 21932)
+++ ext/extmk.rb	(revision 21933)
@@ -351,7 +351,7 @@
 if $extstatic
   $extstatic.each do |t|
     target = t
-    target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
+    target = target.downcase if File::FNM_SYSCASE.nonzero?
     $static_ext[target] = $static_ext.size
   end
 end
@@ -371,7 +371,7 @@
 	end
 	next
       end
-      target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
+      target = target.downcase if File::FNM_SYSCASE.nonzero?
       $static_ext[target] = $static_ext.size
     end
     MTIMES << f.mtime
Index: instruby.rb
===================================================================
--- instruby.rb	(revision 21932)
+++ instruby.rb	(revision 21933)
@@ -419,7 +419,7 @@
   Dir.chdir(srcdir)
   makedirs [rubyhdrdir]
   noinst = []
-  unless RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/
+  unless RUBY_PLATFORM =~ /mswin|mingw|bccwin/
     noinst << "win32.h"
   end
   noinst = nil if noinst.empty?

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]