From 893af1e3b6233deaf8b9113e4f313c5b3661d7bf Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 12 Oct 2008 00:46:59 +0000 Subject: [PATCH] * strftime.c (rb_strftime): suppressed warnings on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ strftime.c | 11 +++++------ version.h | 29 ++++++++++++++++------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80d0059aa0..5e538482ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Oct 12 09:46:36 2008 Nobuyoshi Nakada + + * strftime.c (rb_strftime): suppressed warnings on cygwin. + Sat Oct 11 19:49:35 2008 Nobuyoshi Nakada * parse.y (parser_prepare): use utf-8 encoding directly. diff --git a/strftime.c b/strftime.c index b88b9ef403..af66fa6377 100644 --- a/strftime.c +++ b/strftime.c @@ -195,12 +195,11 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept #endif /* POSIX_SEMANTICS */ #ifndef HAVE_TM_ZONE #ifndef HAVE_TM_NAME -#if !defined HAVE_VAR_TIMEZONE || defined HAVE_TIMEZONE +#if ((defined(MAILHEADER_EXT) && !HAVE_VAR_TIMEZONE && HAVE_GETTIMEOFDAY) || \ + (!HAVE_TZNAME && HAVE_TIMEZONE)) struct timeval tv; -#endif -#ifdef HAVE_TIMEZONE struct timezone zone; -#endif /* HAVE_TIMEZONE */ +#endif #endif /* HAVE_TM_NAME */ #endif /* HAVE_TM_ZONE */ int precision, flags; @@ -473,7 +472,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept #else off = -timezone / 60; #endif -#else /* !HAVE_TIMEZONE */ +#else /* !HAVE_VAR_TIMEZONE */ #ifdef HAVE_GETTIMEOFDAY gettimeofday(&tv, &zone); off = -zone.tz_minuteswest; @@ -487,7 +486,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept off = (now - mktime(&utc)) / 60; } #endif -#endif /* !HAVE_TIMEZONE */ +#endif /* !HAVE_VAR_TIMEZONE */ #endif /* !HAVE_TM_ZONE */ #endif /* !HAVE_TM_NAME */ } diff --git a/version.h b/version.h index afdf3e8d34..54dfcf048d 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-10-11" +#define RUBY_RELEASE_DATE "2008-10-12" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20081011 +#define RUBY_RELEASE_CODE 20081012 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 10 -#define RUBY_RELEASE_DAY 11 +#define RUBY_RELEASE_DAY 12 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; @@ -32,23 +32,26 @@ RUBY_EXTERN const char ruby_copyright[]; #define RUBY_REVISION 0 #endif -#if RUBY_VERSION_TEENY > 0 && RUBY_PATCHLEVEL < 5000 && !RUBY_REVISION -#define RUBY_RELEASE_STR "patchlevel" -#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL +#if RUBY_PATCHLEVEL +#define RUBY_PATCHLEVEL_STR " patchlevel "STRINGIZE(RUBY_PATCHLEVEL) #else -#ifdef RUBY_BRANCH_NAME -#define RUBY_RELEASE_STR RUBY_BRANCH_NAME -#else -#define RUBY_RELEASE_STR "revision" +#define RUBY_PATCHLEVEL_STR "" #endif -#define RUBY_RELEASE_NUM RUBY_REVISION +#if RUBY_REVISION +#ifdef RUBY_BRANCH_NAME +#define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION) +#else +#define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION) +#endif +#else +#define RUBY_REVISION_STR "" #endif # define RUBY_DESCRIPTION \ "ruby "RUBY_VERSION \ " ("RUBY_RELEASE_DATE" " \ - RUBY_RELEASE_STR" " \ - STRINGIZE(RUBY_RELEASE_NUM)") " \ + RUBY_PATCHLEVEL_STR \ + RUBY_REVISION_STR") " \ "["RUBY_PLATFORM"]" # define RUBY_COPYRIGHT \ "ruby - Copyright (C) " \