summaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index a62fb6d04..056f310de 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -153,6 +153,8 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
}
#ifdef WIN32
+/* Since version 3.14, MinGW Runtime has snprintf() and vsnprintf() conform to C99 but it's not the case for older versions */
+#if (__MINGW32_MAJOR_VERSION < 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 14))
int CDECL snprintf(char *str, size_t size, const char *format, ...)
{
va_list ap;
@@ -163,6 +165,7 @@ int CDECL snprintf(char *str, size_t size, const char *format, ...)
va_end(ap);
return ret;
}
+#endif /* MinGW Runtime < 3.14 */
#ifdef _MSC_VER
/* *nprintf broken, not POSIX compliant, MSDN description