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

ruby-changes:25813

From: nobu <ko1@a...>
Date: Tue, 27 Nov 2012 04:13:08 +0900 (JST)
Subject: [ruby-changes:25813] nobu:r37870 (trunk): extmk.rb: git rid of post-1.8 features

nobu	2012-11-27 04:12:55 +0900 (Tue, 27 Nov 2012)

  New Revision: 37870

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

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/ext/extmk.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37869)
+++ ChangeLog	(revision 37870)
@@ -1,3 +1,8 @@
+Tue Nov 27 04:12:49 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@g...>
 
 	* thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep):
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 37869)
+++ ext/extmk.rb	(revision 37870)
@@ -1,5 +1,5 @@
 #! /usr/local/bin/ruby
-# -*- ruby -*-
+# -*- mode: ruby; coding: us-ascii -*-
 
 $extension = nil
 $extstatic = nil
@@ -42,6 +42,12 @@
 load File.expand_path("lib/mkmf.rb", srcdir)
 require 'optparse/shellwords'
 
+if defined?(File::NULL)
+  @null = File::NULL
+elsif !File.chardev?(@null = "/dev/null")
+  @null = "nul"
+end
+
 def sysquote(x)
   @quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
   @quote ? x.quote : x
@@ -190,7 +196,7 @@
             stdout = $stdout.dup
             stderr = $stderr.dup
             unless verbose?
-              $stderr.reopen($stdout.reopen(File::NULL))
+              $stderr.reopen($stdout.reopen(@null))
             end
             begin
               load $0 = conf
@@ -225,7 +231,7 @@
 
       mess = "Failed to configure #{target}. It will not be installed.\n"
       if error
-        mess.prepend(error.to_s + "\n")
+        mess = "#{error}\n#{mess}"
       end
 
       Logging::message(mess)

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

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