stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r480722 - /incubator/stdcxx/trunk/src/time_put.cpp
Date Wed, 29 Nov 2006 21:41:46 GMT
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  <sebor@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);



Mime
View raw message