fix winnt flag

This commit is contained in:
Doug MacEachern 2004-06-30 22:43:48 +00:00
parent 1c32c2acc9
commit ddc2874791
1 changed files with 5 additions and 2 deletions

View File

@ -142,8 +142,11 @@ int sigar_os_open(sigar_t **sigar)
version.dwOSVersionInfoSize = sizeof(version); version.dwOSVersionInfoSize = sizeof(version);
GetVersionEx(&version); GetVersionEx(&version);
(*sigar)->winnt = /*
(version.dwPlatformId == VER_PLATFORM_WIN32_NT); * 4 == NT 4.0
* 5 == 2000, XP, 2003 Server
*/
(*sigar)->winnt = (version.dwMajorVersion == 4);
if (USING_WIDE_S(*sigar)) { if (USING_WIDE_S(*sigar)) {
WCHAR wmachine[MAX_PATH+1]; WCHAR wmachine[MAX_PATH+1];