From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 2AE0B3858C50; Thu, 9 Feb 2023 13:41:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AE0B3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675950087; bh=7n3hzoEh4TguN0/qzzfk8LX8TyGqlNUv8px9PiC+H8U=; h=From:To:Subject:Date:From; b=ZcvMqncLYlbU6GxA93XxJYnqg23hy7N5UqLgUar6Rwxv+q/7Rs0I0zR8jF9Q0N5wv B4k3o8JVLVt/rM2EikPaZGxx+ZMtwaEx+9ex8U5H+81WRJfEjMqX8enfoWTmConian fBX+RaVqrhArevox76lTX8TY+Btmu46lFJsLjhHU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: cygcheck: improve OS output X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 2a683f84a1da3d7b35fe595c64dc81e88100a511 X-Git-Newrev: dc70c8dec19b74f0b8668704a2492b4b04d56b73 Message-Id: <20230209134127.2AE0B3858C50@sourceware.org> Date: Thu, 9 Feb 2023 13:41:27 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Ddc70c8dec19= b74f0b8668704a2492b4b04d56b73 commit dc70c8dec19b74f0b8668704a2492b4b04d56b73 Author: Corinna Vinschen AuthorDate: Thu Feb 9 14:41:12 2023 +0100 Commit: Corinna Vinschen CommitDate: Thu Feb 9 14:41:12 2023 +0100 Cygwin: cygcheck: improve OS output =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/utils/mingw/cygcheck.cc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index bdab6e2718ed..66af2ce0b6a2 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -31,6 +31,10 @@ #include #include "loadlib.h" =20 +#ifndef PRODUCT_IOTENTERPRISES +#define PRODUCT_IOTENTERPRISES 0x000000bf +#endif + #ifndef max #define max __max #endif @@ -1423,24 +1427,24 @@ dump_sysinfo () { case 0: strcpy (osname, osversion.wProductType =3D=3D VER_NT_WORKSTATION - ? "Vista" : "2008"); + ? "Vista" : "Server 2008"); break; case 1: strcpy (osname, osversion.wProductType =3D=3D VER_NT_WORKSTATION - ? "7" : "2008 R2"); + ? "7" : "Server 2008 R2"); break; case 2: strcpy (osname, osversion.wProductType =3D=3D VER_NT_WORKSTATION - ? "8" : "2012"); + ? "8" : "Server 2012"); break; case 3: strcpy (osname, osversion.wProductType =3D=3D VER_NT_WORKSTATION - ? "8.1" : "2012 R2"); + ? "8.1" : "Server 2012 R2"); break; case 4: default: strcpy (osname, osversion.wProductType =3D=3D VER_NT_WORKSTATION - ? "10 Preview" : "2016 Preview"); + ? "10 Preview" : "Server 2016 Preview"); break; } else if (osversion.dwMajorVersion =3D=3D 10) @@ -1450,13 +1454,13 @@ dump_sysinfo () else { if (osversion.dwBuildNumber <=3D 14393) - strcpy (osname, "2016"); + strcpy (osname, "Server 2016"); else if (osversion.dwBuildNumber <=3D 17763) - strcpy (osname, "2019"); + strcpy (osname, "Server 2019"); else if (osversion.dwBuildNumber <=3D 20348) - strcpy (osname, "2022"); + strcpy (osname, "Server 2022"); else - strcpy (osname, "20??"); + strcpy (osname, "Server 20??"); } } DWORD prod; @@ -1663,7 +1667,7 @@ dump_sysinfo () }; if (prod =3D=3D PRODUCT_UNLICENSED) strcat (osname, "Unlicensed"); - else if (prod > 0x000000bf) + else if (prod > PRODUCT_IOTENTERPRISES) strcat (osname, ""); else strcat (osname, products[prod]);