summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-23 19:51:18 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-23 19:51:18 (GMT)
commit1e4172467f258b313da683489a714c91f103d84d (patch)
treeadeec3ee0ec0936861c9ee9b9321ac8d5dbdb6ab /time.c
parent692e5959977b515dcae5ce661fb10d3751b322de (diff)
* 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
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/time.c b/time.c
index 4af193d..382dc3f 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