extmk.rb: git rid of post-1.8 features

* ext/extmk.rb (extmake): git rid of post-1.8 features for cross
  compilation.  [ruby-core:50160] [Bug #7439]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-26 19:12:55 +00:00
Родитель 79d42a8831
Коммит 943b664eea
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Nov 27 04:12:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extmake): git rid of post-1.8 features for cross
compilation. [ruby-core:50160] [Bug #7439]
Tue Nov 27 00:13:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com> Tue Nov 27 00:13:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep): * thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep):

Просмотреть файл

@ -1,5 +1,5 @@
#! /usr/local/bin/ruby #! /usr/local/bin/ruby
# -*- ruby -*- # -*- mode: ruby; coding: us-ascii -*-
$extension = nil $extension = nil
$extstatic = nil $extstatic = nil
@ -42,6 +42,12 @@ $" << "mkmf.rb"
load File.expand_path("lib/mkmf.rb", srcdir) load File.expand_path("lib/mkmf.rb", srcdir)
require 'optparse/shellwords' require 'optparse/shellwords'
if defined?(File::NULL)
@null = File::NULL
elsif !File.chardev?(@null = "/dev/null")
@null = "nul"
end
def sysquote(x) def sysquote(x)
@quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM) @quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
@quote ? x.quote : x @quote ? x.quote : x
@ -190,7 +196,7 @@ def extmake(target)
stdout = $stdout.dup stdout = $stdout.dup
stderr = $stderr.dup stderr = $stderr.dup
unless verbose? unless verbose?
$stderr.reopen($stdout.reopen(File::NULL)) $stderr.reopen($stdout.reopen(@null))
end end
begin begin
load $0 = conf load $0 = conf
@ -225,7 +231,7 @@ def extmake(target)
mess = "Failed to configure #{target}. It will not be installed.\n" mess = "Failed to configure #{target}. It will not be installed.\n"
if error if error
mess.prepend(error.to_s + "\n") mess = "#{error}\n#{mess}"
end end
Logging::message(mess) Logging::message(mess)