[#37959] [Bug:trunk] I can modify literals — Yusuke ENDOH <mame@...>

遠藤です。

13 messages 2009/02/10

[#38005] Is URI.decode() broken? — MOROHASHI Kyosuke <moronatural@...>

もろはしです。いつもお世話になっております。

39 messages 2009/02/14
[#38006] Re: Is URI.decode() broken? — Nobuyoshi Nakada <nobu@...> 2009/02/14

なかだです。

[#38009] Re: Is URI.decode() broken? — "NARUSE, Yui" <naruse@...> 2009/02/14

成瀬です、

[#38016] Re: Is URI.decode() broken? — Fujioka <fuj@...> 2009/02/15

xibbarこと藤岡です。

[#38017] Re: Is URI.decode() broken? — "NARUSE, Yui" <naruse@...> 2009/02/15

成瀬です。

[#38040] Re: Is URI.decode() broken? — akira yamada / やまだあきら <akira@...> 2009/02/17

NARUSE, Yui さんは書きました:

[#38124] Re: Is URI.decode() broken? — "NARUSE, Yui" <naruse@...> 2009/03/03

成瀬です。

[#39214] Re: Is URI.decode() broken? — akira yamada / やまだあきら <akira@...> 2009/09/02

(2009年03月03日 22:45), NARUSE, Yui さんは書きました:

[#39218] Re: Is URI.decode() broken? — "NARUSE, Yui" <naruse@...> 2009/09/02

成瀬です。

[#39236] Re: Is URI.decode() broken? — Tanaka Akira <akr@...> 2009/09/05

In article <4A9E44DD.6050706@airemix.jp>,

[#39242] Re: Is URI.decode() broken? — KOSAKI Motohiro <kosaki.motohiro@...> 2009/09/07

小崎@思いつきを適当に書いてみるテスト

[#39246] Re: Is URI.decode() broken? — Tanaka Akira <akr@...> 2009/09/07

In article <20090907091830.2C7A.A69D9226@jp.fujitsu.com>,

[#38096] 多重代入やメソッド引数の展開でto_aが呼ばれます — nagachika <nagachika00@...>

nagachika と申します。

10 messages 2009/02/26

[#38098] ブロック引数と括弧・引数なしsuper — Shugo Maeda <shugo@...>

前田です。

12 messages 2009/02/27

[ruby-dev:38052] mkmf.rb の C++ 対応

From: "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
Date: 2009-02-19 09:55:32 UTC
List: ruby-dev #38052
きしもとです

C++ のヘッダだと、現在の (have|find)_header ではうまく判定できない
ことがあるので( cc -E だとたとえば #include<cstdio> とかでうまくない)
(have|find)_cxx_header というコマンドを追加してみました。

C++ のプリプロセッサのための config がうまくわからなかったので、
C++ コンパイラにかけてチェックしています。Boost の巨大なヘッダとかで
チェックだけなのに無茶苦茶時間をかけてしまうという問題が出るかも
しれません。

Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 22439)
+++ lib/mkmf.rb	(working copy)
@@ -400,6 +400,14 @@
 		   conf)
 end
 
+def cxx_command(opt="")
+  conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
+                                'arch_hdrdir' => "#$arch_hdrdir",
+                                'top_srcdir' => $top_srcdir.quote)
+  RbConfig::expand("$(CXX) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
+		   conf)
+end
+
 def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
   libpath.map{|x|
     case x
@@ -437,6 +445,12 @@
   alias_method :try_header, (config_string('try_header') || :try_cpp)
 end
 
+def try_cxx(src, opt="", &b)
+  try_do(src, cxx_command(opt), &b)
+ensure
+  rm_f "conftest*"
+end
+
 def cpp_include(header)
   if header
     header = [header] unless header.kind_of? Array
@@ -819,6 +833,17 @@
   end
 end
 
+def have_cxx_header(header, preheaders = nil, &b)
+  checking_for header do
+    if try_cxx(cpp_include(preheaders)+cpp_include(header), &b)
+      $defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___")))
+      true
+    else
+      false
+    end
+  end
+end
+
 # Instructs mkmf to search for the given +header+ in any of the +paths+
 # provided, and returns whether or not it was found in those paths.
 #
@@ -846,6 +871,27 @@
   end
 end
 
+def find_cxx_header(header, *paths)
+  message = checking_message(header, paths)
+  header = cpp_include(header)
+  checking_for message do
+    if try_cxx(header)
+      true
+    else
+      found = false
+      paths.each do |dir|
+        opt = "-I#{dir}".quote
+        if try_cxx(header, opt)
+          $INCFLAGS << " " << opt
+          found = true
+          break
+        end
+      end
+      found
+    end
+  end
+end
+
 # Returns whether or not the struct of type +type+ contains +member+.  If
 # it does not, or the struct type can't be found, then false is returned.  You
 # may optionally specify additional +headers+ in which to look for the struct

In This Thread

Prev Next