summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-31 11:53:36 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:59 +0200
commit52dd481a53d751d0557b7d0daa5fb2a6b55b7ab2 (patch)
tree30daddd2794b591844e6db5f598627e6f458702f /misc.c
parent26442e871507167317ebbc13feafca164354cf7d (diff)
2011-05-31 Ivan Maidanski <ivmai@mail.ru>
* misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 50d55e0..428cffe 100644
--- a/misc.c
+++ b/misc.c
@@ -1300,7 +1300,11 @@ GC_API void GC_CALL GC_enable_incremental(void)
#endif /* !MSWIN32 && !OS2 && !MACOS */
#define BUFSZ 1024
-#ifdef _MSC_VER
+
+#ifdef NO_VSNPRINTF
+ /* In case this function is missing (eg., in DJGPP v2.0.3). */
+# define vsnprintf(buf, bufsz, format, args) vsprintf(buf, format, args)
+#elif defined(_MSC_VER)
# ifdef MSWINCE
/* _vsnprintf is deprecated in WinCE */
# define vsnprintf StringCchVPrintfA