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

ruby-changes:60746

From: Nobuyoshi <ko1@a...>
Date: Sat, 11 Apr 2020 17:15:50 +0900 (JST)
Subject: [ruby-changes:60746] 93edbb4c08 (master): Support version ranges for MSVC [Feature #16763]

https://git.ruby-lang.org/ruby.git/commit/?id=93edbb4c08

From 93edbb4c08856d6d10d0e2676cc2e36eef839a7d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 11 Apr 2020 17:12:24 +0900
Subject: Support version ranges for MSVC [Feature #16763]


diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 3951ef1..df9eab2 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -607,9 +607,15 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L607
 	@$(IFCHANGE) "--timestamp=$(@:/=\)" $(RUBY_CONFIG_H:/=\) <<
 #ifndef $(guard)
 #define $(guard) 1
+!if defined(MSC_VER_LOWER)
+#if (_MSC_VER < $(MSC_VER_LOWER)) || (_MSC_VER > $(MSC_VER_UPPER))
+#error MSC version unmatch: $(MSC_VER_LOWER)..$(MSC_VER_UPPER) is expected.
+#endif
+!else
 #if _MSC_VER != $(MSC_VER)
 #error MSC version unmatch: $(MSC_VER) is expected.
 #endif
+!endif
 #define RUBY_MSVCRT_VERSION $(RT_VER)
 #define STDC_HEADERS 1
 #define HAVE_SYS_TYPES_H 1
diff --git a/win32/setup.mak b/win32/setup.mak
index 85ce834..fa8d226 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -149,7 +149,12 @@ echo TEENY = RUBY_VERSION_TEENY https://github.com/ruby/ruby/blob/trunk/win32/setup.mak#L149
 #if defined RUBY_PATCHLEVEL && RUBY_PATCHLEVEL < 0
 echo RUBY_DEVEL = yes
 #endif
-echo MSC_VER = _MSC_VER
+set /a MSC_VER = _MSC_VER
+#if _MSC_VER > 1900
+set /a MSC_VER_LOWER = MSC_VER/10*10+0
+set /a MSC_VER_UPPER = MSC_VER/10*10+9
+#endif
+set MSC_VER
 del %0 & exit
 <<
 
-- 
cgit v0.10.2


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

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