You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/11/29 22:41:46 UTC

svn commit: r480722 - /incubator/stdcxx/trunk/src/time_put.cpp

Author: sebor
Date: Wed Nov 29 13:41:45 2006
New Revision: 480722

URL: http://svn.apache.org/viewvc?view=rev&rev=480722
Log:
2006-11-29  Martin Sebor  <se...@roguewave.com>

	* time_put.cpp [MSVC >= 8.0] (__rw_put_time): Used the conforming
	swprintf() rather than the legacy Microsoft one without the size
	argument as suggested by the compiler warning.

Modified:
    incubator/stdcxx/trunk/src/time_put.cpp

Modified: incubator/stdcxx/trunk/src/time_put.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/time_put.cpp?view=diff&rev=480722&r1=480721&r2=480722
==============================================================================
--- incubator/stdcxx/trunk/src/time_put.cpp (original)
+++ incubator/stdcxx/trunk/src/time_put.cpp Wed Nov 29 13:41:45 2006
@@ -2799,9 +2799,11 @@
         const wchar_t *fmtstr = 'z' == fmt ? L"%+*.*d" : L"%*.*d";
 
         res = swprintf (wbuf, 
-#ifndef _MSC_VER
+#if !defined (_MSC_VER) || 1400 <= _MSC_VER
+                        // MSVC 8.0 changed swprintf() to conform
+                        // to the C standard signature
                         bufsize,
-#endif
+#endif   // not MSVC || MSVC >= 8.0
                         fmtstr,
                         width < 0 ? tpd.width : width,
                         prec < 0 ? tpd.prec : prec, tpd.val);