From 52dd481a53d751d0557b7d0daa5fb2a6b55b7ab2 Mon Sep 17 00:00:00 2001 From: ivmai Date: Tue, 31 May 2011 09:53:36 +0000 Subject: [PATCH] 2011-05-31 Ivan Maidanski * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF. --- ChangeLog | 4 ++++ misc.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b31e5ed3..cbba2527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-05-31 Ivan Maidanski + + * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF. + 2011-05-31 Ivan Maidanski * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED() diff --git a/misc.c b/misc.c index 50d55e04..428cffe6 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 -- 2.40.0