compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -463,7 +463,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
PULARGE_INTEGER);
|
PULARGE_INTEGER);
|
||||||
|
|
||||||
GetDiskFreeSpaceEx_t
|
GetDiskFreeSpaceEx_t
|
||||||
pGetDiskFreeSpaceEx = ::GetProcAddress
|
pGetDiskFreeSpaceEx = (GetDiskFreeSpaceEx_t)::GetProcAddress
|
||||||
(
|
(
|
||||||
::GetModuleHandle(_T("kernel32.dll")),
|
::GetModuleHandle(_T("kernel32.dll")),
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
@@ -501,6 +501,10 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
else
|
else
|
||||||
#endif // Win32
|
#endif // Win32
|
||||||
{
|
{
|
||||||
|
// there's a problem with drives larger than 2GB, GetDiskFreeSpaceEx()
|
||||||
|
// should be used instead - but if it's not available, fall back on
|
||||||
|
// GetDiskFreeSpace() nevertheless...
|
||||||
|
|
||||||
DWORD lSectorsPerCluster,
|
DWORD lSectorsPerCluster,
|
||||||
lBytesPerSector,
|
lBytesPerSector,
|
||||||
lNumberOfFreeClusters,
|
lNumberOfFreeClusters,
|
||||||
@@ -519,8 +523,6 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// there's a problem with drives larger than 2GB on non Win32!!
|
|
||||||
// let's calculate it, nevertheless....
|
|
||||||
wxLongLong lBytesPerCluster = lSectorsPerCluster;
|
wxLongLong lBytesPerCluster = lSectorsPerCluster;
|
||||||
lBytesPerCluster *= lBytesPerSector;
|
lBytesPerCluster *= lBytesPerSector;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user