From 611e99e7417695aa70bc3d28d26d219ba29bc7e7 Mon Sep 17 00:00:00 2001 From: cremno Date: Tue, 22 Mar 2016 11:38:09 +0100 Subject: remove unnecessary array/each --- tasks/toolchains/visualcpp.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/toolchains/visualcpp.rake b/tasks/toolchains/visualcpp.rake index 978fe26ab..3d273900e 100644 --- a/tasks/toolchains/visualcpp.rake +++ b/tasks/toolchains/visualcpp.rake @@ -1,5 +1,5 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| - [conf.cc].each do |cc| + conf.cc do |cc| cc.command = ENV['CC'] || 'cl.exe' # C4013: implicit function declaration cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /D_CRT_SECURE_NO_WARNINGS)] @@ -9,7 +9,7 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| cc.compile_options = "%{flags} /Fo%{outfile} %{infile}" end - [conf.cxx].each do |cxx| + conf.cxx do |cxx| cxx.command = ENV['CXX'] || 'cl.exe' cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /D_CRT_SECURE_NO_WARNINGS)] cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING) -- cgit v1.2.3 From bfc7b2e30fe2d35ffddf56ea7ccff178cc9b7e9b Mon Sep 17 00:00:00 2001 From: cremno Date: Tue, 22 Mar 2016 11:41:16 +0100 Subject: deprecate Visual Studio 2010 and 2012 --- tasks/toolchains/visualcpp.rake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/toolchains/visualcpp.rake b/tasks/toolchains/visualcpp.rake index 3d273900e..7a02eafe6 100644 --- a/tasks/toolchains/visualcpp.rake +++ b/tasks/toolchains/visualcpp.rake @@ -50,4 +50,15 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| end conf.file_separator = '\\' + + if require 'open3' + Open3.popen3 conf.cc.command do |_, _, e, _| + if /Version (?\d{2}\.\d{2}\.\d{5})/ =~ e.gets && v.to_i <= 17 + m = "# VS2010/2012 support will be dropped after the next release! #" + h = "#" * m.length + puts h, m, h + end + end + end + end -- cgit v1.2.3 From 30b0100e6cffe12d09e497f609b174d819d04014 Mon Sep 17 00:00:00 2001 From: cremno Date: Tue, 22 Mar 2016 11:46:49 +0100 Subject: fix VS2010/2012 build They don't have , only . --- include/mruby/value.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/mruby/value.h b/include/mruby/value.h index 0eac19df9..4330b9441 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -22,7 +22,19 @@ struct mrb_state; # error "You can't define MRB_INT16 and MRB_INT64 at the same time." #endif -#include +#if defined _MSC_VER && _MSC_VER < 1800 +# define PRIo64 "llo" +# define PRId64 "lld" +# define PRIx64 "llx" +# define PRIo16 "ho" +# define PRId16 "hd" +# define PRIx16 "hx" +# define PRIo32 "o" +# define PRId32 "d" +# define PRIx32 "x" +#else +# include +#endif #if defined(MRB_INT64) typedef int64_t mrb_int; -- cgit v1.2.3