mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
43f910a9aa
commit
893af1e3b6
3 changed files with 25 additions and 19 deletions
11
strftime.c
11
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 */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue