]> git.saurik.com Git - wxWidgets.git/commitdiff
Work around mingw/cygwin bug 1046059
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Thu, 2 Jun 2005 07:47:57 +0000 (07:47 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Thu, 2 Jun 2005 07:47:57 +0000 (07:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index 8b55ee465b8ab22597b232a4d0ebbd8db3546175..b09fe1ef75c694a91d067104276475d089d0a09e 100644 (file)
@@ -376,13 +376,18 @@ static long GetTruncatedJDN(wxDateTime::wxDateTime_t day,
 static wxString CallStrftime(const wxChar *format, const tm* tm)
 {
     wxChar buf[4096];
+    // Create temp wxString here to work around mingw/cygwin bug 1046059
+    // http://sourceforge.net/tracker/?func=detail&atid=102435&aid=1046059&group_id=2435
+    wxString s;
+
     if ( !wxStrftime(buf, WXSIZEOF(buf), format, tm) )
     {
         // buffer is too small?
         wxFAIL_MSG(_T("strftime() failed"));
     }
 
-    return wxString(buf);
+    s = buf;
+    return s;
 }
 #endif