]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for wxUSE_DATETIME==0 (another part of patch 1203970)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Feb 2006 16:20:28 +0000 (16:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Feb 2006 16:20:28 +0000 (16:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/debugrpt.cpp
src/xrc/xmlres.cpp
tests/datetime/datetimetest.cpp

index b52f6780b36baa6023f45797ab2be4b607a878b4..2391849334b30cffebfabe7255f2ab81d6a3877e 100644 (file)
@@ -190,10 +190,16 @@ wxDebugReport::wxDebugReport()
     // of course, this doesn't protect us against malicious users...
     wxFileName fn;
     fn.AssignTempFileName(appname);
+#if wxUSE_DATETIME
     m_dir.Printf(_T("%s%c%s_dbgrpt-%lu-%s"),
                  fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(),
                  wxGetProcessId(),
                  wxDateTime::Now().Format(_T("%Y%m%dT%H%M%S")).c_str());
+#else
+    m_dir.Printf(_T("%s%c%s_dbgrpt-%lu"),
+                 fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(),
+                 wxGetProcessId());
+#endif
 
     // as we are going to save the process state there use restrictive
     // permissions
index ac70cff46099c967bbb4e0a5e5dbede396f72bf8..569ca71aacb93abd09da86fc9154463e2ab0f889 100644 (file)
@@ -411,7 +411,11 @@ bool wxXmlResource::UpdateResources()
         {
 #           if wxUSE_FILESYSTEM
             file = fsys.OpenFile(m_data[i].File);
+#           if wxUSE_DATETIME
             modif = file && file->GetModificationTime() > m_data[i].Time;
+#           else // wxUSE_DATETIME
+            modif = true;
+#           endif // wxUSE_DATETIME
             if (!file)
             {
                 wxLogError(_("Cannot open file '%s'."), m_data[i].File.c_str());
@@ -419,9 +423,13 @@ bool wxXmlResource::UpdateResources()
             }
             wxDELETE(file);
             wxUnusedVar(file);
-#           else
+#           else // wxUSE_FILESYSTEM
+#           if wxUSE_DATETIME
             modif = wxDateTime(wxFileModificationTime(m_data[i].File)) > m_data[i].Time;
-#           endif
+#           else // wxUSE_DATETIME
+            modif = true;
+#           endif // wxUSE_DATETIME
+#           endif // wxUSE_FILESYSTEM
         }
 
         if (modif)
@@ -477,11 +485,13 @@ bool wxXmlResource::UpdateResources()
                 }
 
                 ProcessPlatformProperty(m_data[i].Doc->GetRoot());
+#if wxUSE_DATETIME
 #if wxUSE_FILESYSTEM
                 m_data[i].Time = file->GetModificationTime();
-#else
+#else // wxUSE_FILESYSTEM
                 m_data[i].Time = wxDateTime(wxFileModificationTime(m_data[i].File));
-#endif
+#endif // wxUSE_FILESYSTEM
+#endif // wxUSE_DATETIME
             }
 
 #           if wxUSE_FILESYSTEM
index 145ba064d2be917a01ce6fd81814b16a8f7ab74d..2797fa41acafcbf846a26881c95ce26bab1557da 100644 (file)
@@ -27,6 +27,8 @@
 // the macro below to do it
 //#define CHANGE_SYSTEM_DATE
 
+#if wxUSE_DATETIME
+
 #ifndef __WINDOWS__
     #undef CHANGE_SYSTEM_DATE
 #endif
@@ -823,3 +825,4 @@ void DateTimeTestCase::TestDSTBug()
 #endif // CHANGE_SYSTEM_DATE
 }
 
+#endif // wxUSE_DATETIME