mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Support version ranges for MSVC [Feature #16763]
This commit is contained in:
parent
e56e089b1f
commit
93edbb4c08
2 changed files with 12 additions and 1 deletions
|
@ -607,9 +607,15 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
||||||
@$(IFCHANGE) "--timestamp=$(@:/=\)" $(RUBY_CONFIG_H:/=\) <<
|
@$(IFCHANGE) "--timestamp=$(@:/=\)" $(RUBY_CONFIG_H:/=\) <<
|
||||||
#ifndef $(guard)
|
#ifndef $(guard)
|
||||||
#define $(guard) 1
|
#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)
|
#if _MSC_VER != $(MSC_VER)
|
||||||
#error MSC version unmatch: $(MSC_VER) is expected.
|
#error MSC version unmatch: $(MSC_VER) is expected.
|
||||||
#endif
|
#endif
|
||||||
|
!endif
|
||||||
#define RUBY_MSVCRT_VERSION $(RT_VER)
|
#define RUBY_MSVCRT_VERSION $(RT_VER)
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
|
@ -149,7 +149,12 @@ echo TEENY = RUBY_VERSION_TEENY
|
||||||
#if defined RUBY_PATCHLEVEL && RUBY_PATCHLEVEL < 0
|
#if defined RUBY_PATCHLEVEL && RUBY_PATCHLEVEL < 0
|
||||||
echo RUBY_DEVEL = yes
|
echo RUBY_DEVEL = yes
|
||||||
#endif
|
#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
|
del %0 & exit
|
||||||
<<
|
<<
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue