[#6728] Ruby 1.3.3-990507 — matz <matz@...>

Ruby 1.3.3-990507 is out, check out:

34 messages 1999/05/07
[#6731] Re: Ruby 1.3.3-990507 — Katsuyuki Komatsu <komatsu@...> 1999/05/07

小松です。

[#6779] Re: private inner class (Re: Re: class def in class def) — Koji Oda <oda@...1.qnes.nec.co.jp>

小田@QNES です。

13 messages 1999/05/13

[#6789] Ruby 1.3.3-990513 — Yukihiro Matsumoto <matz@...>

Ruby 1.3.3-990513 is out, check out:

59 messages 1999/05/13
[#6811] Re: Ruby 1.3.3-990513 — Koji Oda <oda@...1.qnes.nec.co.jp> 1999/05/14

小田@QNES です。

[#6814] Re: Ruby 1.3.3-990513 — matz@... (Yukihiro Matsumoto) 1999/05/15

まつもと ゆきひろです

[#6821] Re: Ruby 1.3.3-990513 — Koji Oda <oda@...1.qnes.nec.co.jp> 1999/05/16

小田@QNES です。

[#6790] Re: Ruby 1.3.3-990513 — Katsuyuki Komatsu <komatsu@...> 1999/05/13

小松です。

[#6891] Ruby 1.3.3-990518 — Yukihiro Matsumoto <matz@...>

Ruby 1.3.3-990518 is out, check out:

19 messages 1999/05/18

[#6919] ext/socket/getaddrinfo.c tiny fix — Jun-ichiro itojun Hagino <itojun@...>

ext/socket/getaddrinfo.cに以下のpatchをおねがいします。

22 messages 1999/05/20
[#6921] Re: ext/socket/getaddrinfo.c tiny fix — Jun-ichiro itojun Hagino <itojun@...> 1999/05/20

[#7034] Ruby 1.3.4-990531 — Yukihiro Matsumoto <matz@...>

Ruby 1.3.4-990531 is out, check out:

25 messages 1999/05/31

[ruby-dev:6731] Re: Ruby 1.3.3-990507

From: Katsuyuki Komatsu <komatsu@...>
Date: 1999-05-07 13:38:16 UTC
List: ruby-dev #6731
小松です。

4箇所ひっかかりました。全部ext/socket/です。

(1) addrinfo.hの#ifdef HAVE_PROTOTYPESの後の1
(2) addrinfo.hのstruct sockaddr_storageの消し忘れ
(3) getaddrinfo.cのinet_aton()の第2引数の型
(4) getnameinfo.cのstrncpy()はsnprintf()を使うつもりだったと解釈

いつもの、
    Solaris 2.5.1, SunOS 4.1.4, HP-UX 10.20, AIX 4.1.3
の4プラットフォームで確認しています。

ただ、[ruby-dev:6727]の、HP-UX 10.20のsedのバグでMakefileと
ext/extmk.rbが作れない問題の対策が見つからないのがうっとおしい。

config.statusの
    s%@localstatedir@%${prefix}/var%g
を次の行と入れ替えただけで
    /bin/sh config.status
が通るようになるのでので明らかに/bin/sedの問題なのですが。

diff -r -u ruby-1.3.3-990507.orig/ext/socket/addrinfo.h ruby-1.3.3-990507/ext/socket/addrinfo.h
--- ruby-1.3.3-990507.orig/ext/socket/addrinfo.h	Thu May  6 15:27:35 1999
+++ ruby-1.3.3-990507/ext/socket/addrinfo.h	Fri May  7 20:49:00 1999
@@ -66,7 +66,7 @@
 #define freeaddrinfo freeaddrinfo__compat
 
 #ifndef __P
-# ifdef HAVE_PROTOTYPES 1
+# ifdef HAVE_PROTOTYPES
 #  define __P(args) args
 # else
 #  define __P(args)
@@ -134,12 +134,6 @@
 	char	*ai_canonname;	/* canonical name for hostname */
 	struct sockaddr *ai_addr;	/* binary address */
 	struct addrinfo *ai_next;	/* next structure in linked list */
-};
-
-struct sockaddr_storage {
-	u_int8_t __ss_len;
-	u_int8_t __ss_family;
-	u_int8_t fill[126];
 };
 
 extern int getaddrinfo __P((
diff -r -u ruby-1.3.3-990507.orig/ext/socket/getaddrinfo.c ruby-1.3.3-990507/ext/socket/getaddrinfo.c
--- ruby-1.3.3-990507.orig/ext/socket/getaddrinfo.c	Fri May  7 01:01:41 1999
+++ ruby-1.3.3-990507/ext/socket/getaddrinfo.c	Fri May  7 20:49:36 1999
@@ -221,7 +221,7 @@
 	struct in_addr in;
 
 #ifdef HAVE_INET_ATON
-	if (!inet_aton(hostname, &in.s_addr))
+	if (!inet_aton(hostname, &in))
 	    return 0;
 #else
 	int d1, d2, d3, d4;
diff -r -u ruby-1.3.3-990507.orig/ext/socket/getnameinfo.c ruby-1.3.3-990507/ext/socket/getnameinfo.c
--- ruby-1.3.3-990507.orig/ext/socket/getnameinfo.c	Fri May  7 01:02:47 1999
+++ ruby-1.3.3-990507/ext/socket/getnameinfo.c	Fri May  7 20:49:22 1999
@@ -93,7 +93,7 @@
 #ifdef HAVE_INET_NTOA
 	struct in_addr in;
 	memcpy(&in.s_addr, addr, sizeof(in.s_addr));
-	strncpy(numaddr, numaddr_len, inet_ntoa(in));
+	snprintf(numaddr, numaddr_len, "%s", inet_ntoa(in));
 #else
 	unsigned long x = ntohl(*(unsigned long*)addr);
 	snprintf(numaddr, numaddr_len, "%d.%d.%d.%d",

--
小松克行 (株)サリオンシステムズリサーチ ソフトウェア開発部
Katsuyuki Komatsu <komatsu@sarion.co.jp>

In This Thread