implemented wxGetFreeMemory() under IRIX (patch 1360356); made wxMemorySize always 64 bit as it can overflow even in 32 bit builds otherwise

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-11-25 22:09:22 +00:00
parent 2cdf244521
commit 9ad34f611f
2 changed files with 16 additions and 9 deletions

View File

@@ -52,16 +52,13 @@ class WXDLLIMPEXP_CORE wxPoint;
#define wxMax(a,b) (((a) > (b)) ? (a) : (b))
#define wxMin(a,b) (((a) < (b)) ? (a) : (b))
// wxGetFreeMemory can return huge amount of memory on 64-bit platforms
// define wxMemorySize according to the type which best fits your platform
#if wxUSE_LONGLONG && defined(__WIN64__)
// 64 bit Windowses have sizeof(long) only 32 bit long
// we need to use wxLongLong to express memory sizes
#define wxMemorySize wxLongLong
// wxGetFreeMemory can return huge amount of memory on 32-bit platforms as well
// so to always use long long for its result type on all platforms which
// support it
#if wxUSE_LONGLONG
typedef wxLongLong wxMemorySize;
#else
// 64 bit UNIX has sizeof(long) = 64
// assume 32 bit platforms cannnot return more than 32bits of
#define wxMemorySize long
typedef long wxMemorySize;
#endif
// ----------------------------------------------------------------------------