From 12b2ee8f60048e81a1e78e64cc86bdc91fa01421 Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 8 Jun 2000 18:18:20 +0000 Subject: [PATCH] Add #define for MSC git-svn-id: svn://svn.cc65.org/cc65/trunk@31 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/xsprintf.c | 9 ++++++--- src/common/xsprintf.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index 600e12823..8988465fc 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ +/* (C) 2000 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -66,13 +66,16 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap) { #if defined(__WATCOMC__) int Res = _vbprintf (Buf, BufSize, Format, ap); -#elsif defined(__GNUC__) +#elif defined(__GNUC__) int Res = vsnprintf (Buf, BufSize, Format, ap); +#elif defined(_MSC_VER) + int Res = _vsnprintf (Buf, BufSize, Format, ap); #else + /* Unsafe version */ int Res = vsprintf (Buf, Format, ap); #endif assert (Res >= 0 && (unsigned) Res < BufSize); - return Res; + return Res; } diff --git a/src/common/xsprintf.h b/src/common/xsprintf.h index 59847a526..4edfa0f69 100644 --- a/src/common/xsprintf.h +++ b/src/common/xsprintf.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ +/* (C) 2000 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ -- 2.39.5