[#20392] [BigDecimal] proposal to change specification — "Tadashi Saito" <shiba@...2.accsnet.ne.jp>

斎藤と申します。

25 messages 2003/06/20
[#20407] Re: [BigDecimal] proposal to change specification — "Shigeo Kobayashi" <shigeo@...> 2003/06/22

小林です。

[#20447] [BigDecimal] renaming proposal — "Tadashi Saito" <shiba@...2.accsnet.ne.jp>

斎藤です。

47 messages 2003/06/24
[#20621] Re: [BigDecimal] renaming proposal — "Shigeo Kobayashi" <shigeo@...> 2003/07/11

小林@MAILチェック中です。

[#20628] Re: [BigDecimal] renaming proposal — "Shigeo Kobayashi" <shigeo@...> 2003/07/11

小林です。

[ruby-dev:20422] [BUG] SEGV on Alpha (Re: ruby 1.8.0 preview3)

From: Minero Aoki <aamine@...>
Date: 2003-06-23 14:28:31 UTC
List: ruby-dev #20422
青木です。

  In mail "[ruby-dev:20416] ruby 1.8.0 preview3"
    matz@ruby-lang.org (Yukihiro Matsumoto) wrote:

> まつもと ゆきひろです
> 
> さっきftpに置きました。試してみてください。

NetBSD/Alpha での make で落ちました。

  compiling Win32API
  /home/aamine/s/src/ruby-1.8.0/lib/mkmf.rb:191: [BUG] Segmentation fault
  ruby 1.8.0 (2003-06-23) [alpha-netbsd]

  Abort trap - core dumped
  *** Error code 134

  環境: NetBSD 1.6, gcc 2.95.3, CC=gcc CFLAGS=-g

原因はプロトタイプ忘れによる int / long ズレでした。

また、添付の missing-prototype.rb でチェックしたところ、
他にも同様の個所がいくつか見付かったのでそれも付けます。

さらに、-Wall を付けたら error.c で warning が出たので
その修正も付けます。


ちなみに、まだ -mieee は自分で付けないといけないんでしたっけ。
# 付けないと SIGFPE で make test が止まったので。


> 今回の目玉はYAML,REXML,CVSなどが追加されたことでしょうか。

CVS じゃなくて CSV ですよね。
あと個人的には dRuby が入ったのが嬉しいです。
-------------------------------------------------------------------
青木峰郎

Mon Jun 23 23:11:14 2003  Minero Aoki  <aamine@loveruby.net>

	* io.c (io_close): missing prototype (causes SEGV on Alpha).

	* ext/socket/socket.c (bsock_do_not_rev_lookup_set): ditto.

	* ext/win32ole/win32ole.c (foletype_guid, foletype_progid): ditto.

	* error.c (syserr_initialize): length argument of sprintf() is an
	  int.


Index: io.c
===================================================================
RCS file: /home/aamine/var/cvs/ruby/ruby/io.c,v
retrieving revision 1.216
diff -u -p -r1.216 io.c
--- io.c	23 Jun 2003 08:41:07 -0000	1.216
+++ io.c	23 Jun 2003 14:05:46 -0000
@@ -1424,6 +1424,7 @@ rb_io_close_m(io)
 
 static VALUE
 io_close(io)
+    VALUE io;
 {
     return rb_funcall(io, rb_intern("close"), 0, 0);
 }
Index: ext/socket/socket.c
===================================================================
RCS file: /home/aamine/var/cvs/ruby/ruby/ext/socket/socket.c,v
retrieving revision 1.94
diff -u -p -r1.94 socket.c
--- ext/socket/socket.c	27 May 2003 11:07:57 -0000	1.94
+++ ext/socket/socket.c	23 Jun 2003 14:06:02 -0000
@@ -484,6 +484,7 @@ bsock_do_not_rev_lookup()
 
 static VALUE
 bsock_do_not_rev_lookup_set(self, val)
+    VALUE self, val;
 {
     rb_secure(4);
     do_not_reverse_lookup = RTEST(val);
Index: ext/win32ole/win32ole.c
===================================================================
RCS file: /home/aamine/var/cvs/ruby/ruby/ext/win32ole/win32ole.c,v
retrieving revision 1.12
diff -u -p -r1.12 win32ole.c
--- ext/win32ole/win32ole.c	16 Jun 2003 07:25:38 -0000	1.12
+++ ext/win32ole/win32ole.c	23 Jun 2003 14:06:21 -0000
@@ -3190,6 +3190,7 @@ ole_type_guid(pTypeInfo) 
  */
 static VALUE
 foletype_guid(self)
+    VALUE self;
 {
     struct oletypedata *ptype;
     Data_Get_Struct(self, struct oletypedata, ptype);
@@ -3221,6 +3222,7 @@ ole_type_progid(pTypeInfo)
  */
 static VALUE
 foletype_progid(self)
+    VALUE self;
 {
     struct oletypedata *ptype;
     Data_Get_Struct(self, struct oletypedata, ptype);
Index: error.c
===================================================================
RCS file: /home/aamine/var/cvs/ruby/ruby/error.c,v
retrieving revision 1.71
diff -u -p -r1.71 error.c
--- error.c	23 Jun 2003 06:52:38 -0000	1.71
+++ error.c	23 Jun 2003 14:07:41 -0000
@@ -582,7 +582,7 @@ syserr_initialize(argc, argv, self)
     if (!NIL_P(mesg)) {
 	StringValue(mesg);
 	buf = ALLOCA_N(char, strlen(err)+RSTRING(mesg)->len+4);
-	sprintf(buf, "%s - %.*s", err, RSTRING(mesg)->len, RSTRING(mesg)->ptr);
+	sprintf(buf, "%s - %.*s", err, (int)RSTRING(mesg)->len, RSTRING(mesg)->ptr);
 	mesg = rb_str_new2(buf);
     }
     else {

#
# missing-prototypes.rb
#
# Usage: ruby missing-prototypes.rb ruby/**/*.c
#

def check( fname )
  buf = ['', '']
  File.open(fname) {|f|
    f.each do |line|
      buf.shift
      buf.push line
      if /\A\w/ === buf[0] and
	 /\A\{/ === buf[1]
	next if /\A(?:struct|typedef|union|register)/ === buf[0]
	next if /[;=]/ === buf[0]
	next if /\w+\(\)/ === buf[0]
	next if /\A\w+ \(\)/ === buf[0]
	next if /\(\s*\w+\**\s+/ === buf[0]
	next if /\(void\)/i === buf[0]
	next if %r<\(/\* void \*/\)> === buf[0]
	puts "#{fname}:#{f.lineno}: #{buf[0].strip}"
	puts "#{fname}:#{f.lineno}: #{buf[1].strip}"
      end
    end
  }
end

trap(:PIPE) { exit 0 }
ARGV.each do |fname|
  check fname
end


In This Thread