From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id DB23A3858405; Thu, 21 Oct 2021 16:35:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB23A3858405 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: update cygcheck OS information X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 745b547ebd03ce29fdbf223dd400e7f65aba1c7f X-Git-Newrev: 548f124698774222b011aac2796c766efed83091 Message-Id: <20211021163533.DB23A3858405@sourceware.org> Date: Thu, 21 Oct 2021 16:35:33 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2021 16:35:34 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=548f124698774222b011aac2796c766efed83091 commit 548f124698774222b011aac2796c766efed83091 Author: Corinna Vinschen Date: Thu Oct 21 18:33:35 2021 +0200 Cygwin: update cygcheck OS information Signed-off-by: Corinna Vinschen Diff: --- winsup/utils/mingw/cygcheck.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index d818a1907..288a718bc 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -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,