[#22195] IO::for_io and TCPServer#bind — GOTOU Yuuzou <gotoyuzo@...>

test_drb が IPv4 射影アドレスが有効な環境でないと動かないこ

16 messages 2003/12/09
[#22198] Re: IO::for_io and TCPServer#bind — matz@... (Yukihiro Matsumoto) 2003/12/09

まつもと ゆきひろです

[#22205] yet another inconsistency about EOF between StringIO and IO — Tanaka Akira <akr@...17n.org>

StringIO の

24 messages 2003/12/10
[#22206] Re: yet another inconsistency about EOF between StringIO and IO — nobu.nakada@... 2003/12/10

なかだです。

[#22214] Re: yet another inconsistency about EOF between StringIO and IO — Tanaka Akira <akr@...17n.org> 2003/12/10

In article <200312100725.hBA7P8Ac011112@sharui.nakada.kanuma.tochigi.jp>,

[#22222] Re: yet another inconsistency about EOF between StringIO and IO — nobu.nakada@... 2003/12/10

なかだです。

[#22234] Re: yet another inconsistency about EOF between StringIO and IO — Masahiro Sakai (酒井政裕) <sakai@...> 2003/12/11

さかいといいます。

[#22262] Re: yet another inconsistency about EOF between StringIO and IO — Tanaka Akira <akr@...17n.org> 2003/12/13

In article <20031211.214041.71090239.sakai@tom.sfc.keio.ac.jp>,

[#22328] Re: yet another inconsistency about EOF between StringIO and IO — Tanaka Akira <akr@...17n.org> 2003/12/23

In article <87k751dzyf.fsf@serein.a02.aist.go.jp>,

[#22331] Re: yet another inconsistency about EOF between StringIO and IO — matz@... (Yukihiro Matsumoto) 2003/12/23

まつもと ゆきひろです

[#22334] Re: yet another inconsistency about EOF between StringIO and IO — Tanaka Akira <akr@...17n.org> 2003/12/23

In article <1072167374.096702.13473.nullmailer@picachu.netlab.jp>,

[#22343] Re: yet another inconsistency about EOF between StringIO and IO — matz@... (Yukihiro Matsumoto) 2003/12/23

まつもと ゆきひろです

[#22330] core dump with ungetc — Tanaka Akira <akr@...17n.org>

次のように ungetc を使うと core を吐く場合があります。

14 messages 2003/12/23
[#22332] Re: core dump with ungetc — nobu.nakada@... 2003/12/23

なかだです。

[#22366] `to_s': method `to_s' overridden (TypeError) — Tanaka Akira <akr@...17n.org>

そういえば、次の `to_s': method `to_s' overridden (TypeError) というの

12 messages 2003/12/24

[#22385] Tk.callback_break causes seg-fault or hang-up — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

19 messages 2003/12/24
[#22387] Re: Tk.callback_break causes seg-fault or hang-up — matz@... (Yukihiro Matsumoto) 2003/12/24

まつもと ゆきひろです

[#22393] Re: Tk.callback_break causes seg-fault or hang-up — Hidetoshi NAGAI <nagai@...> 2003/12/24

永井@知能.九工大です.

[#22395] Re: Tk.callback_break causes seg-fault or hang-up — matz@... (Yukihiro Matsumoto) 2003/12/24

まつもと ゆきひろです

[#22396] Re: Tk.callback_break causes seg-fault or hang-up — matz@... (Yukihiro Matsumoto) 2003/12/24

まつもと ゆきひろです

[#22397] Re: Tk.callback_break causes seg-fault or hang-up — Hidetoshi NAGAI <nagai@...> 2003/12/24

永井@知能.九工大です.

[#22418] ruby-1.8.1 build failed on HP-UX 11.11 — MIYAMUKO Katsuyuki <k-miyamuko@...>

みやむこです。

29 messages 2003/12/25
[#22419] Re: ruby-1.8.1 build failed on HP-UX 11.11 — matz@... (Yukihiro Matsumoto) 2003/12/25

まつもと ゆきひろです

[#22420] Re: ruby-1.8.1 build failed on HP-UX 11.11 — matz@... (Yukihiro Matsumoto) 2003/12/25

まつもと ゆきひろです

[#22424] Re: ruby-1.8.1 build failed on HP-UX 11.11 — MIYAMUKO Katsuyuki <k-miyamuko@...> 2003/12/25

みやむこです。

[#22491] Re: ruby-1.8.1 build failed on HP-UX 11.11 — MIYAMUKO Katsuyuki <k-miyamuko@...> 2004/01/05

みやむこです。

[ruby-dev:22237] File#link in environments without link()

From: siena@... (Siena. / SHINAGAWA, Norihide)
Date: 2003-12-11 18:16:10 UTC
List: ruby-dev #22237
Siena. です。

OS/2 with EMX で test_fileutils.rb を実行して気付いたのですが、
File#link を呼んだ時に次の例外が上がります。

/fileutils/test_fileutils.rb:35:in `link': 
No such file or directory - linktmp or linktest (Errno::ENOENT)
	from ./fileutils/test_fileutils.rb:35
(後略)

OS/2 with EMX では link() が存在せず、現在は missing/os2.c で
{ return -1; } で仮実装されているのが原因だと分かりました。

file.c を見ると、rb_file_s_link() では無条件に link() を呼ぶのに対し、
rb_file_s_symlink() では HAVE_SYMLINK で存在を確認しています。
そこで、File#link もこれに合わせるように変更してみました。

手元でのビルドではテストまで通りましたが、変更はこれだけで十分でしょうか。


Index: ruby/configure.in
===================================================================
RCS file: /src/ruby/configure.in,v
retrieving revision 1.204
diff -u -p -2 -r1.204 configure.in
--- ruby/configure.in	11 Dec 2003 02:39:57 -0000	1.204
+++ ruby/configure.in	11 Dec 2003 16:28:53 -0000
@@ -385,5 +385,5 @@ AC_REPLACE_FUNCS(dup2 memmove mkdir strc
 		 isinf isnan finite hypot acosh erf)
 AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd\
-	      truncate chsize times utimes fcntl lockf lstat symlink readlink\
+	      truncate chsize times utimes fcntl lockf lstat link symlink readlink\
 	      setitimer setruid seteuid setreuid setresuid setproctitle\
 	      setrgid setegid setregid setresgid issetugid pause lchown lchmod\
Index: ruby/file.c
===================================================================
RCS file: /src/ruby/file.c,v
retrieving revision 1.165
diff -u -p -2 -r1.165 file.c
--- ruby/file.c	11 Dec 2003 02:39:57 -0000	1.165
+++ ruby/file.c	11 Dec 2003 16:29:00 -0000
@@ -1258,4 +1258,5 @@ rb_file_s_link(klass, from, to)
     VALUE klass, from, to;
 {
+#ifdef HAVE_LINK
     SafeStringValue(from);
     SafeStringValue(to);
@@ -1265,4 +1266,8 @@ rb_file_s_link(klass, from, to)
     }
     return INT2FIX(0);
+#else
+    rb_notimplement();
+    return Qnil;		/* not reached */
+#endif
 }
 
Index: ruby/missing/os2.c
===================================================================
RCS file: /src/ruby/missing/os2.c,v
retrieving revision 1.3
diff -u -p -2 -r1.3 os2.c
--- ruby/missing/os2.c	6 Mar 2001 08:17:18 -0000	1.3
+++ ruby/missing/os2.c	11 Dec 2003 16:29:08 -0000
@@ -17,5 +17,5 @@ chown(char *path, int owner, int group)
 	return 0;
 }
-
+#if 0
 int
 link(char *from, char *to)
@@ -23,4 +23,28 @@ link(char *from, char *to)
 	return -1;
 }
+#endif
+
 
 typedef char* CHARP;


---
Siena. <mailto:siena@faculty.chiba-u.jp>

In This Thread

Prev Next