summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-22 20:28:06 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-22 20:28:06 -0700
commit853333cd709cc063e4f97418c1297f9c83e48d41 (patch)
tree2ed4cfef66686a9ea113cdd69ea2a72cd47ef602
parent2252927c04cc61c95a58cf4c3c47a0aac4b05b61 (diff)
Use PUGI__MSVC_CRT_VERSION instead of _MSC_VER
It's not clear whether we still need PUGI__MSVC_CRT_VERSION, but it's more consistent for now to use it for _snprintf_s since this is relying on a CRT extension, not on a compiler feature.
-rw-r--r--src/pugixml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index e047822..da4ecf9 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -130,7 +130,7 @@ using std::memset;
// Not all platforms have snprintf; we define a wrapper that uses snprintf if possible. This only works with buffers with a known size.
#if __cplusplus >= 201103
# define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__)
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
+#elif defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400
# define PUGI__SNPRINTF(buf, ...) _snprintf_s(buf, _countof(buf), _TRUNCATE, __VA_ARGS__)
#else
# define PUGI__SNPRINTF sprintf