X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/373658eb493827a9a68a79eeaaab1dbfc69a206b..90f501b16e1b6dcc9e2aae6a413287a22842da61:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index c190b20543..d2b2ce1f50 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -498,14 +498,22 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree) return FALSE; } + // ULARGE_INTEGER is a union of a 64 bit value and a struct containing + // two 32 bit fields which may be or may be not named - try to make it + // compile in all cases +#if defined(__BORLANDC__) && !defined(_ANONYMOUS_STRUCT) + #define UL(ul) ul.u +#else // anon union + #define UL(ul) ul +#endif if ( pTotal ) { - *pTotal = wxLongLong(bytesTotal.HighPart, bytesTotal.LowPart); + *pTotal = wxLongLong(UL(bytesTotal).HighPart, UL(bytesTotal).LowPart); } if ( pFree ) { - *pFree = wxLongLong(bytesFree.HighPart, bytesFree.LowPart); + *pFree = wxLongLong(UL(bytesFree).HighPart, UL(bytesFree).LowPart); } } else @@ -1504,7 +1512,8 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) #if defined(__WIN32__) && !defined(__WXMICROWIN__) -#if wxUSE_GUI +// wxGetNativeFontEncoding() doesn't exist neither in wxBase nor in wxUniv +#if wxUSE_GUI && !defined(__WXUNIVERSAL__) #include "wx/fontmap.h"