From bd08f2f766a33014b8d60fbf27f0f41026d7abf7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Jul 2007 23:19:17 +0000 Subject: [PATCH] compilation fixes for wxUSE_LONGLONG==0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dir.h | 2 ++ include/wx/filename.h | 4 ++++ src/common/dircmn.cpp | 3 +++ src/common/filename.cpp | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/include/wx/dir.h b/include/wx/dir.h index 14ed2ab963..e41495513d 100644 --- a/include/wx/dir.h +++ b/include/wx/dir.h @@ -146,8 +146,10 @@ public: const wxString& filespec, int flags = wxDIR_DEFAULT); +#if wxUSE_LONGLONG // returns the size of all directories recursively found in given path static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL); +#endif // wxUSE_LONGLONG private: friend class wxDirData; diff --git a/include/wx/filename.h b/include/wx/filename.h index dd44465684..6f3273257d 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -84,8 +84,10 @@ enum wxPATH_MKDIR_FULL = 0x0001 // create directories recursively }; +#if wxUSE_LONGLONG // error code of wxFileName::GetSize() extern wxULongLong wxInvalidSize; +#endif // wxUSE_LONGLONG @@ -483,6 +485,7 @@ public: // Filesize +#if wxUSE_LONGLONG // returns the size of the given filename wxULongLong GetSize() const; static wxULongLong GetSize(const wxString &file); @@ -493,6 +496,7 @@ public: static wxString GetHumanReadableSize(const wxULongLong &sz, const wxString &nullsize = wxGetTranslation(_T("Not available")), int precision = 1); +#endif // wxUSE_LONGLONG // deprecated methods, don't use any more diff --git a/src/common/dircmn.cpp b/src/common/dircmn.cpp index ac7b30fb30..30e47dd782 100644 --- a/src/common/dircmn.cpp +++ b/src/common/dircmn.cpp @@ -291,6 +291,8 @@ wxString wxDir::FindFirst(const wxString& dirname, // wxDir::GetTotalSize() // ---------------------------------------------------------------------------- +#if wxUSE_LONGLONG + class wxDirTraverserSumSize : public wxDirTraverser { public: @@ -355,3 +357,4 @@ wxULongLong wxDir::GetTotalSize(const wxString &dirname, wxArrayString *filesSki return traverser.GetTotalSize(); } +#endif // wxUSE_LONGLONG diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 295725c32f..2d583d2719 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -139,7 +139,9 @@ #endif +#if wxUSE_LONGLONG wxULongLong wxInvalidSize = (unsigned)-1; +#endif // wxUSE_LONGLONG // ---------------------------------------------------------------------------- @@ -2317,6 +2319,8 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess, // file size functions // ---------------------------------------------------------------------------- +#if wxUSE_LONGLONG + /* static */ wxULongLong wxFileName::GetSize(const wxString &filename) { @@ -2385,6 +2389,7 @@ wxString wxFileName::GetHumanReadableSize(const wxString &failmsg, int precision return GetHumanReadableSize(GetSize(), failmsg, precision); } +#endif // wxUSE_LONGLONG // ---------------------------------------------------------------------------- // Mac-specific functions -- 2.45.2