[#13493] yield *[[]] — Tanaka Akira <akr@...17n.org>

しばらく前に、yield *[[]] の挙動に関して bug report をして、まつもとさ

96 messages 2001/06/07
[#13494] Re: yield *[[]] — nobu.nakada@... 2001/06/07

なかだです。

[#13496] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/08

In article <200106071409.XAA21101@sharui.nakada.kanuma.tochigi.jp>,

[#13503] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/08

まつもと ゆきひろです

[#13506] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/08

In article <991988462.179562.20598.nullmailer@ev.netlab.zetabits.com>,

[#13512] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/08

まつもと ゆきひろです

[#13497] Re: yield *[[]] — Shugo Maeda <shugo@...> 2001/06/08

前田です。

[#13500] Re: yield *[[]] — "K.Kosako" <kosako@...> 2001/06/08

Shugo Maedaさんの<87lmn336s3.wl@localhost.netlab.jp>から

[#13501] Re: yield *[[]] — Shugo Maeda <shugo@...> 2001/06/08

前田です。

[#13504] Re: yield *[[]] — "K.Kosako" <kosako@...> 2001/06/08

Shugo Maedaさんの<87hexr316u.wl@localhost.netlab.jp>から

[#13505] Re: yield *[[]] — Shugo Maeda <shugo@...> 2001/06/08

前田です。

[#13511] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/08

まつもと ゆきひろです

[#13526] Re: yield *[[]] — Shugo Maeda <shugo@...> 2001/06/09

前田です。

[#13530] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/09

In article <m38zj242y9.wl@localhost.localdomain>,

[#13549] Re: yield *[[]] — Shin-ichiro HARA <sinara@...> 2001/06/12

原です。

[#13553] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/12

In article <4.3.2-J.20010612154813.02c89a70@blade.nagaokaut.ac.jp>,

[#13554] Re: yield *[[]] — Shin-ichiro HARA <sinara@...> 2001/06/12

原です。

[#13560] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/13

In article <4.3.2-J.20010612185543.00c8b988@blade.nagaokaut.ac.jp>,

[#13561] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/13

まつもと ゆきひろです

[#13566] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/13

In article <992410104.066682.22743.nullmailer@ev.netlab.zetabits.com>,

[#13591] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/14

In article <hvor8wo501g.fsf@flux.etl.go.jp>,

[#13597] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/14

まつもと ゆきひろです

[#13598] Re: yield *[[]] — Tanaka Akira <akr@...17n.org> 2001/06/15

In article <992533086.935976.4066.nullmailer@ev.netlab.zetabits.com>,

[#13616] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/19

まつもと ゆきひろです

[#13622] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/22

まつもと ゆきひろです

[#13628] Re: yield *[[]] — matz@... (Yukihiro Matsumoto) 2001/06/23

まつもと ゆきひろです

[#13633] Re: yield *[[]] — keiju@... (石塚圭樹) 2001/06/24

けいじゅ@日本ラショナルソフトウェアです.

[#13647] Re: yield *[[]] — "KANEMITSU Masao" <masao-k@...> 2001/06/25

金光です。

[#13567] Parallel Assignment — Shin-ichiro HARA <sinara@...> 2001/06/13

原です。

[#13577] Re: Parallel Assignment — matz@... (Yukihiro Matsumoto) 2001/06/13

まつもと ゆきひろです

[#13650] Re: [ruby-ext:01803] Re: Ruby/SDL on PS2 LinuxKit — WATANABE Hirofumi <eban@...>

わたなべです。

56 messages 2001/06/26
[#13653] Re: [ruby-ext:01803] Re: Ruby/SDL on PS2 LinuxKit — matz@... (Yukihiro Matsumoto) 2001/06/26

まつもと ゆきひろです

[#13659] library search path — matz@... (Yukihiro Matsumoto) 2001/06/26

まつもと ゆきひろです

[#13906] Re: library search path — nobu.nakada@... 2001/07/16

なかだです。

[#13978] Re: library search path — nobu.nakada@... 2001/07/21

なかだです。

[#13990] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/22

まつもと ゆきひろです

[#14002] Re: library search path — nobu.nakada@... 2001/07/23

なかだです。

[#14011] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/23

まつもと ゆきひろです

[#14017] Re: library search path — "U.Nakamura" <usa@...> 2001/07/24

こんにちは、なかむら(う)です。

[#14020] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/24

まつもと ゆきひろです

[#14036] Re: library search path — nobu.nakada@... 2001/07/24

なかだです。

[#14075] Re: library search path — nobu.nakada@... 2001/07/25

なかだです。

[#14079] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/25

まつもと ゆきひろです

[#14090] Re: library search path — nobu.nakada@... 2001/07/25

なかだです。

[#14095] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/26

まつもと ゆきひろです

[#14115] Re: library search path — akira yamada / やまだあきら <akira@...> 2001/07/26

[#14121] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/26

まつもと ゆきひろです

[#14136] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/27

まつもと ゆきひろです

[#14137] Re: library search path — nobu.nakada@... 2001/07/27

なかだです。

[#14138] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/27

まつもと ゆきひろです

[#14141] Re: library search path — nobu.nakada@... 2001/07/27

なかだです。

[#14142] Re: library search path — matz@... (Yukihiro Matsumoto) 2001/07/27

まつもと ゆきひろです

[#14148] Re: library search path — nobu.nakada@... 2001/07/28

なかだです。

[#13666] net/http.rb warnings — nobu.nakada@...

なかだです。

14 messages 2001/06/26

[#13668] ruby_m17n make error — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

43 messages 2001/06/26
[#14038] Re: m17n ruby 特に TRON 文字コード — "TOYOFUKU Chikanobu" <toyofuku@...> 2001/07/24

豊福です。

[#13705] eval(code, true, filename) — Shugo Maeda <shugo@...>

前田です。

14 messages 2001/06/29

[ruby-dev:13491] Re: drive letter on mingw32

From: nobu.nakada@...
Date: 2001-06-07 10:16:31 UTC
List: ruby-dev #13491
なかだです。

At Thu, 7 Jun 2001 13:14:05 +0900,
WATANABE Hirofumi <eban@os.rim.or.jp> wrote:
> 実際に違うドライブで試したらエラー喰らっちゃったんですけど、
> これはあとで調べよう。
> gcc -mno-cygwin -mthreads -DNT -D__MSVCRT__ -Os  main.o dmyext.o librubys.a -lcrypt -lwsock32 -lmsvcrt   -o miniruby.exe
> c:\tmp\mingw\miniruby.exe: No such file or directory -- /pub/ruby/ruby/mkconfig.rb (LoadError)
> make: *** [rbconfig.rb] Error 1

  srcdir が変換されてませんね。なんでだろう。手元では一応
linux, cygwin, mingw, mswin でインストールと拡張ライブラリのコ
ンパイルまでできたんですが。

> 1. -mthreadsをつけるとrubywinでmingwm10.dllが必要になるので、
>    あまりというかかなりうれしくない。
>    grep -w _MT /usr/include/{mingw,w32api}/**/*.h
>    してもなにもヒットしないし要らないと思う。

  以前試したのが残ってたようです。唯一 _MT を使ってる win32.c
でも defined _MT || defined __MSVCRT__ となってるし、不要ですね。

> 2. mkconfig.rbを見るとmswin32でもcygpathが必要になってしまう
>    みたいだけど、 これでいいの?

  @CYGPATH@ を見て必要なときには直接変換するように変えたのに、
過去の残骸が残ってました。

> 3. ex/etc/extconf.rb: なぜcygwinだけpw_commentのcheckをやめ
>    たかというと、pw_comment = 0となっててSEGVになるからなん
>    だけど、ここにmingwを足した意図は?

  /usr/mingw/include/pwd.h にも pw_gecos と pw_comment があるの
に今までは egrep_cpp に引っかかってなかったんですが、これを直し
て gecos と comment を含めるようにしたら場合によって SEGV する
ようになってしまったもので。pw_comment はひょっとしたら大丈夫な
のかもしれませんが、"Mingw32" しか返ってこないようなので要らな
いかなと。

> 4. ここもmswin32のときはcygpathが使われているみたい。

  これも Config["CYGPATH"] を見るように直しました。

> 5. このパッチには主目的とは関係ない変更が含まれている。とい
>    うか中田さんのパッチにはいつもその傾向がある。だから取込
>    み辛い。

  すいません。手元でいじってるのから抜き出すかたちでパッチを作っ
てるんで、ずっと修正したまんまになってるのとか、いらないとこま
で入れてしまうことが多いようです。

  それと芋蔓式に変更が重なってしまったために目的が絡み合ってた
りというのもあったんですが、整理して出し直します。たぶんこれだ
けでいけるでしょう。


Index: configure.in
===================================================================
RCS file: /cvs/ruby/src/ruby/configure.in,v
retrieving revision 1.91
diff -u -2 -p -r1.91 configure.in
--- configure.in	2001/06/01 02:25:28	1.91
+++ configure.in	2001/06/07 07:58:05
@@ -817,4 +817,5 @@ if test "$fat_binary" = yes ; then
 fi
 
+CYGPATH=''
 if test x"$cross_compiling" = xyes; then
   MINIRUBY="ruby -I`pwd` -rfake"
@@ -823,7 +824,13 @@ else
   MINIRUBY='./miniruby$(EXEEXT)'
   PREP=''
+  case $target_os in
+    mingw*)
+      CYGPATH=cygpath
+      ;;
+  esac
 fi
 AC_SUBST(MINIRUBY)
 AC_SUBST(PREP)
+AC_SUBST(CYGPATH)
 
 FIRSTMAKEFILE=""
Index: mkconfig.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/mkconfig.rb,v
retrieving revision 1.15
diff -u -2 -p -r1.15 mkconfig.rb
--- mkconfig.rb	2001/05/31 04:40:37	1.15
+++ mkconfig.rb	2001/06/07 07:58:05
@@ -4,5 +4,5 @@ require File.dirname($0)+"/lib/ftools"
 
 rbconfig_rb = ARGV[0] || 'rbconfig.rb'
-srcdir = $srcdir if $srcdir
+srcdir = $srcdir || '.'
 File.makedirs(File.dirname(rbconfig_rb), true)
 
@@ -25,5 +25,5 @@ print "  DESTDIR = '' if not defined? DE
 v_fast = []
 v_others = []
-has_srcdir = false
+cygpath = nil
 has_version = false
 File.foreach "config.status" do |line|
@@ -39,4 +39,5 @@ File.foreach "config.status" do |line|
     next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name
     next if $so_name and /^RUBY_SO_NAME$/ =~  name
+    cygpath = val if !val.empty? and 'CYGPATH' == name
     v = "  CONFIG[\"" + name + "\"] = " +
       val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?(\w+)\}?/) {
@@ -50,6 +51,5 @@ File.foreach "config.status" do |line|
     has_version = true if name == "MAJOR"
   elsif /^(?:ac_given_)?srcdir=(.*)/ =~ line
-    v_fast << "  CONFIG[\"srcdir\"] = \"" + File.expand_path($1) + "\"\n"
-    has_srcdir = true
+    srcdir = $1
   elsif /^ac_given_INSTALL=(.*)/ =~ line
     v_fast << "  CONFIG[\"INSTALL\"] = " + $1 + "\n"
@@ -58,7 +58,10 @@ File.foreach "config.status" do |line|
 end
 
-if not has_srcdir
-  v_fast << "  CONFIG[\"srcdir\"] = \"" + File.expand_path(srcdir || '.') + "\"\n"
+if cygpath
+  srcdir = `#{cygpath} -w "#{srcdir}"`.chomp.tr("\\", "/")
+else
+  srcdir = File.expand_path(srcdir)
 end
+v_fast.unshift("  CONFIG[\"srcdir\"] = \"#{srcdir}\"\n")
 
 if not has_version
Index: cygwin/GNUmakefile.in
===================================================================
RCS file: /cvs/ruby/src/ruby/cygwin/GNUmakefile.in,v
retrieving revision 1.19
diff -u -2 -p -r1.19 GNUmakefile.in
--- cygwin/GNUmakefile.in	2001/05/28 16:07:34	1.19
+++ cygwin/GNUmakefile.in	2001/06/07 07:58:05
@@ -1,4 +1,12 @@
 include Makefile
 
+cygpath = @CYGPATH@
+ifneq ($(cygpath),)
+winpath = $(subst \,/,$(shell $(cygpath) -w "$(1)"))
+override srcdir := $(call winpath,$(srcdir))
+override DESTDIR := $(call winpath,$(DESTDIR))
+override icondirs := $(foreach d,$(icondirs),$(call winpath,$(d)))
+endif
+
 ENABLE_SHARED=@ENABLE_SHARED@
 
Index: djgpp/config.sed
===================================================================
RCS file: /cvs/ruby/src/ruby/djgpp/config.sed,v
retrieving revision 1.2
diff -u -2 -p -r1.2 config.sed
--- djgpp/config.sed	2000/12/06 09:10:15	1.2
+++ djgpp/config.sed	2001/06/07 09:15:12
@@ -50,4 +50,5 @@ s%@EXTSTATIC@%%g
 s%@binsuffix@%.exe%g
 s%@setup@%Setup.dj%g
+s%@CYGPATH@%%g
 s%@LIBRUBY@%libruby.a%g
 s%@LIBRUBY_A@%libruby.a%g
Index: ext/extmk.rb.in
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb.in,v
retrieving revision 1.47
diff -u -2 -p -r1.47 extmk.rb.in
--- ext/extmk.rb.in	2001/06/05 04:54:52	1.47
+++ ext/extmk.rb.in	2001/06/07 09:13:06
@@ -28,4 +28,17 @@ $extlist = []
 $includedir = "@includedir@".gsub(/\$\{prefix\}|\$\(prefix\)/,'@prefix@')
 
+$CYGPATH = "@CYGPATH@"
+class << File
+  if $CYGPATH.empty?
+    $CYGPATH = nil
+    def extern_path(s); s; end
+    def intern_path(s); s; end
+  else
+    def extern_path(s) `#{$CYGPATH} -w "#{s}"`.chomp.tr("\\", "/"); end
+    def intern_path(s) `#{$CYGPATH} -u "#{s}"`.chomp; end
+    alias expand_path extern_path
+  end
+end
+
 $top_srcdir = "@top_srcdir@"
 if $top_srcdir !~ "^/"
@@ -95,6 +108,7 @@ def try_link0(src, opt="")
   cfile.close
   ldflags = $LDFLAGS
-  if /mswin32/ =~ RUBY_PLATFORM and !$LIBPATH.empty?
-    ENV['LIB'] = ($LIBPATH + [ORIG_LIBPATH]).compact.join(';')
+  if /mswin32/ =~ RUBY_PLATFORM
+    $LIBPATH.empty? or
+      ENV['LIB'] = ($LIBPATH + [ORIG_LIBPATH]).compact.join(';')
   else
     $LDFLAGS = ldflags.dup
@@ -405,5 +419,5 @@ SHELL = /bin/sh
 
 srcdir = #{$srcdir}
-VPATH = #{$srcdir}
+VPATH = #{File.intern_path($srcdir)}
 
 topdir = #{$topdir}
Index: lib/mkmf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.54
diff -u -2 -p -r1.54 mkmf.rb
--- lib/mkmf.rb	2001/06/05 04:54:52	1.54
+++ lib/mkmf.rb	2001/06/07 09:13:06
@@ -20,5 +20,17 @@ $sitelibdir = CONFIG["sitelibdir"]
 $sitearchdir = CONFIG["sitearchdir"]
 
-if File.exist? Config::CONFIG["archdir"] + "/ruby.h"
+if CONFIG["CYGPATH"] and !CONFIG["CYGPATH"].empty?
+  def File.extern_path(s)
+    `cygpath -w "#{s}"`.chomp.tr("\\", "/")
+  end
+  def File.intern_path(s)
+    `cygpath -u "#{s}"`.chomp
+  end
+else
+  def File.extern_path(s); s; end
+  def File.intern_path(s); s; end
+end
+
+if File.exist? File.extern_path(Config::CONFIG["archdir"] + "/ruby.h")
   $hdrdir = $archdir
 elsif File.exist? $srcdir + "/ruby.h"
@@ -420,5 +432,5 @@ SHELL = /bin/sh
 #### Start of system configuration section. ####
 
-srcdir = #{srcdir || $srcdir}
+srcdir = #{File.intern_path(srcdir || $srcdir)}
 topdir = #{$topdir}
 hdrdir = #{$hdrdir}
Index: win32/config.status.in
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/config.status.in,v
retrieving revision 1.9
diff -u -2 -p -r1.9 config.status.in
--- win32/config.status.in	2001/04/14 04:38:19	1.9
+++ win32/config.status.in	2001/06/07 07:58:05
@@ -48,4 +48,5 @@ s%@STRIP@%%g
 s%@EXTSTATIC@%%g
 s%@setup@%Setup%g
+s%@CYGPATH@%%g
 s%@LIBRUBY_LDSHARED@%%g
 s%@LIBRUBY_DLDFLAGS@%%g


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread