mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@21933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a7b5c603b4
commit
2478f1caaf
8 changed files with 30 additions and 16 deletions
20
ChangeLog
20
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.
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Mon Feb 2 07:36:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm.c (vm_backtrace_each): now takes an iterator function.
|
* vm.c (vm_backtrace_each): now takes an iterator function.
|
||||||
|
|
|
@ -351,7 +351,7 @@ $static_ext = {}
|
||||||
if $extstatic
|
if $extstatic
|
||||||
$extstatic.each do |t|
|
$extstatic.each do |t|
|
||||||
target = 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
|
$static_ext[target] = $static_ext.size
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -371,7 +371,7 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
|
||||||
end
|
end
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
|
target = target.downcase if File::FNM_SYSCASE.nonzero?
|
||||||
$static_ext[target] = $static_ext.size
|
$static_ext[target] = $static_ext.size
|
||||||
end
|
end
|
||||||
MTIMES << f.mtime
|
MTIMES << f.mtime
|
||||||
|
|
|
@ -36,7 +36,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
case RUBY_PLATFORM
|
case RUBY_PLATFORM
|
||||||
when /mswin32/
|
when /mswin/
|
||||||
$CFLAGS += ' /W3'
|
$CFLAGS += ' /W3'
|
||||||
when /cygwin/, /mingw/
|
when /cygwin/, /mingw/
|
||||||
$defs << '-DNONAMELESSUNION'
|
$defs << '-DNONAMELESSUNION'
|
||||||
|
|
|
@ -419,7 +419,7 @@ install?(:local, :arch, :lib) do
|
||||||
Dir.chdir(srcdir)
|
Dir.chdir(srcdir)
|
||||||
makedirs [rubyhdrdir]
|
makedirs [rubyhdrdir]
|
||||||
noinst = []
|
noinst = []
|
||||||
unless RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/
|
unless RUBY_PLATFORM =~ /mswin|mingw|bccwin/
|
||||||
noinst << "win32.h"
|
noinst << "win32.h"
|
||||||
end
|
end
|
||||||
noinst = nil if noinst.empty?
|
noinst = nil if noinst.empty?
|
||||||
|
|
|
@ -79,11 +79,7 @@ module DRb
|
||||||
@servers[name] = false
|
@servers[name] = false
|
||||||
end
|
end
|
||||||
uri = @uri || DRb.uri
|
uri = @uri || DRb.uri
|
||||||
if RUBY_PLATFORM =~ /mswin32/ && /NT/ =~ ENV["OS"]
|
spawn("#{command} #{uri} #{name}")
|
||||||
system(%Q'cmd /c start "ruby" /b #{command} #{uri} #{name}')
|
|
||||||
else
|
|
||||||
system("#{command} #{uri} #{name} &")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -165,7 +165,7 @@ class Resolv
|
||||||
# Resolv::Hosts is a hostname resolver that uses the system hosts file.
|
# Resolv::Hosts is a hostname resolver that uses the system hosts file.
|
||||||
|
|
||||||
class Hosts
|
class Hosts
|
||||||
if /mswin32|mingw|bccwin/ =~ RUBY_PLATFORM
|
if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM
|
||||||
require 'win32/resolv'
|
require 'win32/resolv'
|
||||||
DefaultFileName = Win32::Resolv.get_hosts_path
|
DefaultFileName = Win32::Resolv.get_hosts_path
|
||||||
else
|
else
|
||||||
|
@ -829,7 +829,7 @@ class Resolv
|
||||||
if File.exist? filename
|
if File.exist? filename
|
||||||
config_hash = Config.parse_resolv_conf(filename)
|
config_hash = Config.parse_resolv_conf(filename)
|
||||||
else
|
else
|
||||||
if /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
|
if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
|
||||||
require 'win32/resolv'
|
require 'win32/resolv'
|
||||||
search, nameserver = Win32::Resolv.get_resolv_info
|
search, nameserver = Win32::Resolv.get_resolv_info
|
||||||
config_hash = {}
|
config_hash = {}
|
||||||
|
|
|
@ -1153,6 +1153,8 @@ module Gem
|
||||||
@new_platform = Gem::Platform::RUBY
|
@new_platform = Gem::Platform::RUBY
|
||||||
when 'mswin32' then # was Gem::Platform::WIN32
|
when 'mswin32' then # was Gem::Platform::WIN32
|
||||||
@new_platform = Gem::Platform.new 'x86-mswin32'
|
@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
|
when 'i586-linux' then # was Gem::Platform::LINUX_586
|
||||||
@new_platform = Gem::Platform.new 'x86-linux'
|
@new_platform = Gem::Platform.new 'x86-linux'
|
||||||
when 'powerpc-darwin' then # was Gem::Platform::DARWIN
|
when 'powerpc-darwin' then # was Gem::Platform::DARWIN
|
||||||
|
|
|
@ -640,11 +640,7 @@ class Server < WEBrickServlet
|
||||||
end
|
end
|
||||||
|
|
||||||
def serve
|
def serve
|
||||||
if RUBY_PLATFORM =~ /mingw|mswin32/
|
signals = %w[INT TERM HUP] & Signal.list.keys
|
||||||
signals = [1]
|
|
||||||
else
|
|
||||||
signals = %w[INT TERM HUP]
|
|
||||||
end
|
|
||||||
signals.each { |signal| trap(signal) { @server.shutdown } }
|
signals.each { |signal| trap(signal) { @server.shutdown } }
|
||||||
|
|
||||||
@server.start
|
@server.start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue