[前][次][番号順一覧][スレッド一覧]

ruby-changes:38293

From: naruse <ko1@a...>
Date: Fri, 24 Apr 2015 04:51:45 +0900 (JST)
Subject: [ruby-changes:38293] naruse:r50374 (trunk): * win32/Makefile.sub: MSVC14 have struct timespec.

naruse	2015-04-24 04:51:18 +0900 (Fri, 24 Apr 2015)

  New Revision: 50374

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50374

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/time.c
    trunk/win32/Makefile.sub
    trunk/win32/rtname.cmd
Index: time.c
===================================================================
--- time.c	(revision 50373)
+++ time.c	(revision 50374)
@@ -1639,6 +1639,10 @@ localtime_with_gmtoff_zone(const time_t https://github.com/ruby/ruby/blob/trunk/time.c#L1639
             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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50373)
+++ ChangeLog	(revision 50374)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 24 04:49:05 2015  NARUSE, Yui  <naruse@r...>
+
+	* 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.
+
 Thu Apr 23 11:35:55 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow
Index: win32/rtname.cmd
===================================================================
--- win32/rtname.cmd	(revision 50373)
+++ win32/rtname.cmd	(revision 50374)
@@ -3,10 +3,14 @@ set rt= https://github.com/ruby/ruby/blob/trunk/win32/rtname.cmd#L3
 set rtver=
 set osver=
 for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<msvcr.*\.dll$"`) do set rt=%%~nI
-if "%rt%" == "" (
-    (echo %0: %1 is not linked to msvcrt) 1>&2
-    exit 1
-)
+if "%rt%" NEQ "" goto :msvcr
+for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<vcruntime.*\.dll$"`) do set rt=%%~nI
+if "%rt%" NEQ "" goto :vcruntime
+
+(echo %0: %1 is not linked to msvcrt nor vcruntime) 1>&2
+exit 1
+
+:msvcr
 for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @call set rt=%%rt:%%i=%%i%%
 if "%rt%" == "msvcrt" (
     call set rtver=60
@@ -15,4 +19,13 @@ if "%rt%" == "msvcrt" ( https://github.com/ruby/ruby/blob/trunk/win32/rtname.cmd#L19
     call set rt=msvcr%%rtver%%
     call set osver=_%%rtver%%
 )
+goto :exit
+
+:vcruntime
+for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @call set rt=%%rt:%%i=%%i%%
+call set rtver=%%rt:vcruntime=%%
+call set rt=vcruntime%%rtver%%
+call set osver=_%%rtver%%
+
+:exit
 for %%I in ("PLATFORM = $(TARGET_OS)%osver%" "RT = %rt%" "RT_VER = %rtver%") do @echo %%~I
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 50373)
+++ win32/Makefile.sub	(revision 50374)
@@ -613,6 +613,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L613
 #define HAVE_STRUCT_STAT_ST_RDEV 1
 #define HAVE_ST_RDEV 1
 #define HAVE_STRUCT_TIMEVAL 1
+!if $(MSC_VER) >= 1900
+#define HAVE_STRUCT_TIMESPEC
+!endif
 !if $(MSC_VER) >= 1600
 #define HAVE_STDINT_H 1
 !else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]