From 1e4172467f258b313da683489a714c91f103d84d Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 23 Apr 2015 19:51:18 +0000 Subject: * win32/Makefile.sub: MSVC14 have struct timespec. * win32/rtname.cmd: support vcruntime140.dll. * time.c (localtime_with_gmtoff_zone): MSVC14 doesn't have tzname and daylight but have _tzname and _daylight. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'time.c') diff --git a/time.c b/time.c index 4af193d19a..382dc3f108 100644 --- a/time.c +++ b/time.c @@ -1639,6 +1639,10 @@ localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, con else *zone = zone_str("(NO-TIMEZONE-ABBREVIATION)"); #elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT) +# if RUBY_MSVCRT_VERSION >= 140 +# define tzname _tzname +# define daylight _daylight +# endif /* this needs tzset or localtime, instead of localtime_r */ *zone = zone_str(tzname[daylight && tm.tm_isdst]); #else -- cgit v1.2.3