summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-24 13:22:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-24 13:22:53 +0000
commitc56182a0b0852cf1fc2c13a9955a42693e0c97a4 (patch)
treead117e2a538ec0e39a0895a04b15ac45729fab3e
parent9a464db8a8e079437198c0949ca8dfe8e17dbf85 (diff)
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
-rw-r--r--regint.h2
1 files changed, 1 insertions, 1 deletions
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