зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
692e595997
Коммит
1e4172467f
|
@ -1,3 +1,12 @@
|
||||||
|
Fri Apr 24 04:49:05 2015 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Thu Apr 23 11:35:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow
|
* vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow
|
||||||
|
|
4
time.c
4
time.c
|
@ -1639,6 +1639,10 @@ localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, con
|
||||||
else
|
else
|
||||||
*zone = zone_str("(NO-TIMEZONE-ABBREVIATION)");
|
*zone = zone_str("(NO-TIMEZONE-ABBREVIATION)");
|
||||||
#elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)
|
#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 */
|
/* this needs tzset or localtime, instead of localtime_r */
|
||||||
*zone = zone_str(tzname[daylight && tm.tm_isdst]);
|
*zone = zone_str(tzname[daylight && tm.tm_isdst]);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -613,6 +613,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
||||||
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
||||||
#define HAVE_ST_RDEV 1
|
#define HAVE_ST_RDEV 1
|
||||||
#define HAVE_STRUCT_TIMEVAL 1
|
#define HAVE_STRUCT_TIMEVAL 1
|
||||||
|
!if $(MSC_VER) >= 1900
|
||||||
|
#define HAVE_STRUCT_TIMESPEC
|
||||||
|
!endif
|
||||||
!if $(MSC_VER) >= 1600
|
!if $(MSC_VER) >= 1600
|
||||||
#define HAVE_STDINT_H 1
|
#define HAVE_STDINT_H 1
|
||||||
!else
|
!else
|
||||||
|
|
|
@ -3,10 +3,14 @@ set rt=
|
||||||
set rtver=
|
set rtver=
|
||||||
set osver=
|
set osver=
|
||||||
for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<msvcr.*\.dll$"`) do set rt=%%~nI
|
for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<msvcr.*\.dll$"`) do set rt=%%~nI
|
||||||
if "%rt%" == "" (
|
if "%rt%" NEQ "" goto :msvcr
|
||||||
(echo %0: %1 is not linked to msvcrt) 1>&2
|
for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<vcruntime.*\.dll$"`) do set rt=%%~nI
|
||||||
exit 1
|
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%%
|
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" (
|
if "%rt%" == "msvcrt" (
|
||||||
call set rtver=60
|
call set rtver=60
|
||||||
|
@ -15,4 +19,13 @@ if "%rt%" == "msvcrt" (
|
||||||
call set rt=msvcr%%rtver%%
|
call set rt=msvcr%%rtver%%
|
||||||
call set osver=_%%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
|
for %%I in ("PLATFORM = $(TARGET_OS)%osver%" "RT = %rt%" "RT_VER = %rtver%") do @echo %%~I
|
||||||
|
|
Загрузка…
Ссылка в новой задаче