ruby-changes:45102
From: nobu <ko1@a...>
Date: Sat, 24 Dec 2016 22:22:56 +0900 (JST)
Subject: [ruby-changes:45102] nobu:r57175 (trunk): regint.h: version for secure functions
nobu 2016-12-24 22:22:53 +0900 (Sat, 24 Dec 2016) New Revision: 57175 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57175 Log: regint.h: version for secure functions * regint.h (xvsnprintf): secure version functions are not supported on old VC. Modified files: trunk/regint.h Index: regint.h =================================================================== --- regint.h (revision 57174) +++ regint.h (revision 57175) @@ -202,7 +202,7 @@ https://github.com/ruby/ruby/blob/trunk/regint.h#L202 #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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/