From c56182a0b0852cf1fc2c13a9955a42693e0c97a4 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 24 Dec 2016 13:22:53 +0000 Subject: regint.h: version for secure functions * regint.h (xvsnprintf): secure version functions are not supported on old VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regint.h') diff --git a/regint.h b/regint.h index 344ece4ef1..624deea864 100644 --- a/regint.h +++ b/regint.h @@ -202,7 +202,7 @@ #define xmemcpy memcpy #define xmemmove memmove -#if defined(_WIN32) && !defined(__GNUC__) +#if defined(RUBY_MSVCRT_VERSION) && RUBY_MSVCRT_VERSION >= 90 && !defined(__GNUC__) # define xalloca _alloca # define xvsnprintf(buf,size,fmt,args) _vsnprintf_s(buf,size,_TRUNCATE,fmt,args) # define xsnprintf sprintf_s -- cgit v1.2.3