From a61b7b04b1793b263f1c5a470a2c007719f481fd Mon Sep 17 00:00:00 2001 From: knu Date: Tue, 31 Dec 2002 10:28:52 +0000 Subject: * array.c (rb_ary_transpose): Properly declare ary as a VALUE. * file.c (rb_file_s_chmod): Do not directly cast an int to void * to avoid a warning. * defines.h (FLUSH_REGISTER_WINDOWS): Add support for FreeBSD/sparc64. miniruby still coredumps in a different place, though. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 11 +++++++++++ array.c | 1 + defines.h | 4 +++- file.c | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a414203c1..032034ac7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue Dec 31 19:21:02 2002 Akinori MUSHA + + * array.c (rb_ary_transpose): Properly declare ary as a VALUE. + + * file.c (rb_file_s_chmod): Do not directly cast an int to void * + to avoid a warning. + + * defines.h (FLUSH_REGISTER_WINDOWS): Add support for + FreeBSD/sparc64. miniruby still coredumps in a different place, + though. + Tue Dec 31 07:47:15 2002 Nobuyoshi Nakada * parse.y (parse_string): readjusted. diff --git a/array.c b/array.c index 3429d7e1a..015a4ffe2 100644 --- a/array.c +++ b/array.c @@ -1334,6 +1334,7 @@ rb_ary_zip(argc, argv, ary) static VALUE rb_ary_transpose(ary) + VALUE ary; { long elen = -1, alen, i, j; VALUE tmp, result; diff --git a/defines.h b/defines.h index 52d9856ab..cb488d7bf 100644 --- a/defines.h +++ b/defines.h @@ -140,7 +140,9 @@ void xfree _((void*)); #if defined(sparc) || defined(__sparc__) # if defined(linux) || defined(__linux__) #define FLUSH_REGISTER_WINDOWS asm("ta 0x83") -# else /* Solaris, not sparc linux */ +# elif defined(__FreeBSD__) && defined(__sparc64__) +#define FLUSH_REGISTER_WINDOWS asm volatile("flushw" : :) +# else /* Solaris, OpenBSD, NetBSD, etc. */ #define FLUSH_REGISTER_WINDOWS asm("ta 0x03") # endif /* trap always to flush register windows if we are on a Sparc system */ #else /* Not a sparc, so */ diff --git a/file.c b/file.c index 8cc369618..688a9b748 100644 --- a/file.c +++ b/file.c @@ -990,7 +990,7 @@ rb_file_s_chmod(argc, argv) rb_scan_args(argc, argv, "1*", &vmode, &rest); mode = NUM2INT(vmode); - n = apply2files(chmod_internal, rest, (void *)mode); + n = apply2files(chmod_internal, rest, (void *)(long)mode); return LONG2FIX(n); } -- cgit