include wx/datetime.h and test for wxUSE_DATETIME before using wxLocaltime_r()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
// allows to exclude the usage of wxDateTime
|
||||
static wxString TimeStamp(const wxChar *format, time_t t)
|
||||
{
|
||||
#if wxUSE_DATETIME
|
||||
wxChar buf[4096];
|
||||
struct tm tm;
|
||||
if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
|
||||
@@ -89,6 +90,9 @@ static wxString TimeStamp(const wxChar *format, time_t t)
|
||||
wxFAIL_MSG(_T("strftime() failed"));
|
||||
}
|
||||
return wxString(buf);
|
||||
#else // !wxUSE_DATETIME
|
||||
return wxEmptyString;
|
||||
#endif // wxUSE_DATETIME/!wxUSE_DATETIME
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user