Proper printf type for DWORDLONG on cygwin.

This commit is contained in:
Bartosz Taudul 2018-12-29 00:49:05 +01:00
parent ee718f18d9
commit 1733961885

View File

@ -349,7 +349,11 @@ static const char* GetHostInfo()
MEMORYSTATUSEX statex; MEMORYSTATUSEX statex;
statex.dwLength = sizeof( statex ); statex.dwLength = sizeof( statex );
GlobalMemoryStatusEx( &statex ); GlobalMemoryStatusEx( &statex );
# ifdef _MSC_VER
ptr += sprintf( ptr, "RAM: %I64u MB\n", statex.ullTotalPhys / 1024 / 1024 ); ptr += sprintf( ptr, "RAM: %I64u MB\n", statex.ullTotalPhys / 1024 / 1024 );
# else
ptr += sprintf( ptr, "RAM: %llu MB\n", statex.ullTotalPhys / 1024 / 1024 );
# endif
#elif defined __linux__ #elif defined __linux__
struct sysinfo sysInfo; struct sysinfo sysInfo;
sysinfo( &sysInfo ); sysinfo( &sysInfo );