#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
- #include "wx/cursor.h"
#include "wx/intl.h"
#include "wx/log.h"
+#if wxUSE_GUI
+ #include "wx/cursor.h"
+#endif
#endif //WX_PRECOMP
// In some mingws there is a missing extern "C" int the winsock header,
PULARGE_INTEGER);
GetDiskFreeSpaceEx_t
- pGetDiskFreeSpaceEx = ::GetProcAddress
+ pGetDiskFreeSpaceEx = (GetDiskFreeSpaceEx_t)::GetProcAddress
(
::GetModuleHandle(_T("kernel32.dll")),
#if wxUSE_UNICODE
else
#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,
lBytesPerSector,
lNumberOfFreeClusters,
return FALSE;
}
- // there's a problem with drives larger than 2GB on non Win32!!
- // let's calculate it, nevertheless....
wxLongLong lBytesPerCluster = lSectorsPerCluster;
lBytesPerCluster *= lBytesPerSector;