Author: wyoung
Date: Wed Jan 24 21:34:46 2007
New Revision: 1419

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1419&view=rev
Log:
More platform fixes for the localtime*() thing, for VC++2003 and MinGW.

Modified:
    trunk/lib/datetime.cpp

Modified: trunk/lib/datetime.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/datetime.cpp?rev=1419&r1=1418&r2=1419&view=diff
==============================================================================
--- trunk/lib/datetime.cpp (original)
+++ trunk/lib/datetime.cpp Wed Jan 24 21:34:46 2007
@@ -190,12 +190,12 @@
 DateTime::DateTime(time_t t)
 {
        struct tm tm;
-#if defined(_MSC_VER) && !defined(_STLP_VERSION)
+#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_STLP_VERSION)
        localtime_s(&tm, &t);
-#elif defined(__MINGW32_VERSION)
+#elif !defined(__MINGW32_VERSION) && !defined(_STLP_VERSION)
+       localtime_r(&t, &tm);
+#else
        memcpy(&tm, localtime(&t), sizeof(tm));
-#else
-       localtime_r(&t, &tm);
 #endif
 
        year = tm.tm_year + 1900;


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to