diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-12 00:46:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-12 00:46:59 +0000 |
commit | 893af1e3b6233deaf8b9113e4f313c5b3661d7bf (patch) | |
tree | c6a96350655adece8a4b0f31f27ad871fe11c1b2 /strftime.c | |
parent | 43f910a9aa5f65312e18902de4464ba4069e9123 (diff) | |
download | ruby-893af1e3b6233deaf8b9113e4f313c5b3661d7bf.tar.gz |
* 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
Diffstat (limited to 'strftime.c')
-rw-r--r-- | strftime.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 */ } |