summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 08:07:47 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 08:07:47 +0000
commitf4c3951e7139a9c6cbd8df91fd970c485bdc6498 (patch)
treea0e6c3788c84328a276c7274c6c66322549c204d
parent9d2c121e6a6644addf2bc2c0984b0f8e32693f7f (diff)
merges r21933 from trunk into ruby_1_9_1. win64 support.
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog20
-rw-r--r--ext/extmk.rb4
-rw-r--r--ext/win32ole/extconf.rb2
-rwxr-xr-xinstruby.rb2
-rw-r--r--lib/drb/extservm.rb6
-rw-r--r--lib/resolv.rb4
-rw-r--r--lib/rubygems/specification.rb2
-rw-r--r--lib/xmlrpc/server.rb6
8 files changed, 30 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 978f61b719..7bd91c4d50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+Mon Feb 2 08:12:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
+ platform names. (win64 support)
+
+ * lib/resolv.rb (Resolv::Hosts::DefaultFileName),
+ (Resolv::DNS::Config.default_config_hash): tries win32/resolv on
+ mswin64 too. (win64 support)
+
+ * lib/rubygems/specification.rb (Gem::Specification#ruby_code):
+ aded mswin64. (win64 support)
+
+ * lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command):
+ spawn is better to start a process in background.
+
+ * ext/extmk.rb: uses FNM_SYSCASE. (win64 support)
+
+ * instruby.rb: installs win32.h on mswin64 platform. (win64 support)
+ [ruby-core:21722]
+
Mon Feb 2 12:41:52 2009 Shugo Maeda <shugo@ruby-lang.org>
* complex.c (f_signbit): regard NaN as a positive value.
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 406695f9da..5a99f323d8 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -351,7 +351,7 @@ $static_ext = {}
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 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
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
diff --git a/ext/win32ole/extconf.rb b/ext/win32ole/extconf.rb
index 06a3f14c43..500bd3dd3a 100644
--- a/ext/win32ole/extconf.rb
+++ b/ext/win32ole/extconf.rb
@@ -36,7 +36,7 @@ end
case RUBY_PLATFORM
-when /mswin32/
+when /mswin/
$CFLAGS += ' /W3'
when /cygwin/, /mingw/
$defs << '-DNONAMELESSUNION'
diff --git a/instruby.rb b/instruby.rb
index 40d21ee59a..c496d89b04 100755
--- a/instruby.rb
+++ b/instruby.rb
@@ -358,7 +358,7 @@ install?(:local, :arch, :lib) do
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?
diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb
index be40aea9f5..7af644a0b1 100644
--- a/lib/drb/extservm.rb
+++ b/lib/drb/extservm.rb
@@ -79,11 +79,7 @@ module DRb
@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
diff --git a/lib/resolv.rb b/lib/resolv.rb
index fc3c78215b..b201fcfabf 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -165,7 +165,7 @@ class Resolv
# DNS::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
@@ -817,7 +817,7 @@ class Resolv
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 = {}
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 2e6cdc1b04..b3a42cf902 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1153,6 +1153,8 @@ module Gem
@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
diff --git a/lib/xmlrpc/server.rb b/lib/xmlrpc/server.rb
index 0ee88c8c8f..131173fa70 100644
--- a/lib/xmlrpc/server.rb
+++ b/lib/xmlrpc/server.rb
@@ -640,11 +640,7 @@ class Server < WEBrickServlet
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