You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by gw...@apache.org on 2006/12/14 19:09:57 UTC
svn commit: r487284 -
/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp
Author: gwinn
Date: Thu Dec 14 10:09:56 2006
New Revision: 487284
URL: http://svn.apache.org/viewvc?view=rev&rev=487284
Log:
Replace localtime with localtime_r/localtime_s
Modified:
incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp
Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp?view=diff&rev=487284&r1=487283&r2=487284
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDODate.cpp Thu Dec 14 10:09:56 2006
@@ -45,7 +45,14 @@
const char* SDODate::ascTime(void) const
{
- return asctime(localtime(&value));
+ struct tm tmp_tm;
+
+#if defined(WIN32) || defined (_WINDOWS)
+ localtime_s(&tmp_tm, &value);
+#else
+ localtime_r(&value, &tmp_tm);
+#endif
+ return asctime(&tmp_tm);
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org