From c5d6a1ba48306652bb96bf0bf081c8c66cb45ef5 Mon Sep 17 00:00:00 2001 From: eban Date: Tue, 14 May 2002 05:59:35 +0000 Subject: [PATCH] * gc.c (is_pointer_to_heap): avoid GCC 3.1 warnings. * missing/strftime.c (timezone): it should take no argument on Cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ gc.c | 6 +++--- missing/strftime.c | 4 ++++ version.h | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ea947dbb5..4df7d73e8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue May 14 14:49:05 2002 WATANABE Hirofumi + + * gc.c (is_pointer_to_heap): avoid GCC 3.1 warnings. + + * missing/strftime.c (timezone): it should take no argument on Cygwin. + Mon May 13 14:38:33 2002 WATANABE Hirofumi * djgpp/config.hin, djgpp/config.sed: catch up with the latest change. diff --git a/gc.c b/gc.c index b4d63650d8..c297175686 100644 --- a/gc.c +++ b/gc.c @@ -521,7 +521,7 @@ mark_locations_array(x, n) register long n; { while (n--) { - if (is_pointer_to_heap(*x)) { + if (is_pointer_to_heap((void *)*x)) { rb_gc_mark(*x); } x++; @@ -583,7 +583,7 @@ void rb_gc_mark_maybe(obj) VALUE obj; { - if (is_pointer_to_heap(obj)) { + if (is_pointer_to_heap((void *)obj)) { rb_gc_mark(obj); } } @@ -1508,7 +1508,7 @@ id2ref(obj, id) } ptr = id ^ FIXNUM_FLAG; /* unset FIXNUM_FLAG */ - if (!is_pointer_to_heap(ptr)) { + if (!is_pointer_to_heap((void *)ptr)) { rb_raise(rb_eRangeError, "0x%x is not id value", p0); } if (BUILTIN_TYPE(ptr) == 0) { diff --git a/missing/strftime.c b/missing/strftime.c index a9e0bc0757..77c41d5fc5 100644 --- a/missing/strftime.c +++ b/missing/strftime.c @@ -447,8 +447,12 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) strcpy(tbuf, timeptr->tm_name); #else gettimeofday(& tv, & zone); +#ifdef __CYGWIN__ + strcpy(tbuf, timezone()); +#else strcpy(tbuf, timezone(zone.tz_minuteswest, timeptr->tm_isdst > 0)); +#endif #endif /* HAVE_TM_NAME */ #endif /* HAVE_TM_ZONE */ #endif /* HAVE_TZNAME */ diff --git a/version.h b/version.h index b46ca25cb5..e364088778 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.2" -#define RUBY_RELEASE_DATE "2002-05-12" +#define RUBY_RELEASE_DATE "2002-05-14" #define RUBY_VERSION_CODE 172 -#define RUBY_RELEASE_CODE 20020512 +#define RUBY_RELEASE_CODE 20020514