Some windows environments don't have _snprint_s
Do an alternative version for them.
That happens for example with our windows buildbot with mingw32-make.
diff --git a/library/debug.c b/library/debug.c
index 672e045..2a559b5 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -65,8 +65,17 @@
va_start( argp, format );
#if defined(_WIN32)
+#if defined(_TRUNCATE)
ret = _vsnprintf_s( str, DEBUG_BUF_SIZE, _TRUNCATE, format, argp );
#else
+ ret = _vsnprintf( str, DEBUG_BUF_SIZE, format, argp );
+ if( ret < 0 || (size_t) ret == DEBUG_BUF_SIZE )
+ {
+ str[DEBUG_BUF_SIZE-1] = '\0';
+ ret = -1;
+ }
+#endif
+#else
ret = vsnprintf( str, DEBUG_BUF_SIZE, format, argp );
#endif
va_end( argp );