Cygwin: update cygcheck OS information

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2021-10-21 18:33:35 +02:00
parent 745b547ebd
commit 548f124698
1 changed files with 13 additions and 2 deletions

View File

@ -1418,8 +1418,19 @@ dump_sysinfo ()
}
else if (osversion.dwMajorVersion == 10)
{
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
? "10" : "2016");
if (osversion.wProductType == VER_NT_WORKSTATION)
strcpy (osname, osversion.dwBuildNumber >= 22000 ? "11" : "10");
else
{
if (osversion.dwBuildNumber <= 14393)
strcpy (osname, "2016");
else if (osversion.dwBuildNumber <= 17763)
strcpy (osname, "2019");
else if (osversion.dwBuildNumber <= 20348)
strcpy (osname, "2022");
else
strcpy (osname, "20??");
}
}
DWORD prod;
if (GetProductInfo (osversion.dwMajorVersion,