]> git.sur5r.net Git - cc65/commitdiff
Add #define for MSC
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 8 Jun 2000 18:18:20 +0000 (18:18 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 8 Jun 2000 18:18:20 +0000 (18:18 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@31 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/xsprintf.c
src/common/xsprintf.h

index 600e1282348bd6be608ed69fbf4d2a6e523a60bb..8988465fc546a4f3d1ae5bf1ea9d9f72108554bb 100644 (file)
@@ -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;
 }
 
 
index 59847a526fc85992ffa31165b2d1fb47eb9af044..4edfa0f69494b779b8e7cc955670b7a426e034bb 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998     Ullrich von Bassewitz                                        */
+/* (C) 2000     Ullrich von Bassewitz                                        */
 /*              Wacholderweg 14                                              */
 /*              D-70597 Stuttgart                                            */
 /* EMail:       uz@musoftware.de                                             */