Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-02-09 16:41:12 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-02-09 16:41:12 +0300
commitdc70c8dec19b74f0b8668704a2492b4b04d56b73 (patch)
tree750ec0d02c6bd76ec82148db9bcf3b17cd001a25 /winsup/utils
parent2a683f84a1da3d7b35fe595c64dc81e88100a511 (diff)
Cygwin: cygcheck: improve OS output
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/mingw/cygcheck.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc
index bdab6e271..66af2ce0b 100644
--- a/winsup/utils/mingw/cygcheck.cc
+++ b/winsup/utils/mingw/cygcheck.cc
@@ -31,6 +31,10 @@
#include <mntent.h>
#include "loadlib.h"
+#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 == VER_NT_WORKSTATION
- ? "Vista" : "2008");
+ ? "Vista" : "Server 2008");
break;
case 1:
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "7" : "2008 R2");
+ ? "7" : "Server 2008 R2");
break;
case 2:
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8" : "2012");
+ ? "8" : "Server 2012");
break;
case 3:
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8.1" : "2012 R2");
+ ? "8.1" : "Server 2012 R2");
break;
case 4:
default:
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "10 Preview" : "2016 Preview");
+ ? "10 Preview" : "Server 2016 Preview");
break;
}
else if (osversion.dwMajorVersion == 10)
@@ -1450,13 +1454,13 @@ dump_sysinfo ()
else
{
if (osversion.dwBuildNumber <= 14393)
- strcpy (osname, "2016");
+ strcpy (osname, "Server 2016");
else if (osversion.dwBuildNumber <= 17763)
- strcpy (osname, "2019");
+ strcpy (osname, "Server 2019");
else if (osversion.dwBuildNumber <= 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 == PRODUCT_UNLICENSED)
strcat (osname, "Unlicensed");
- else if (prod > 0x000000bf)
+ else if (prod > PRODUCT_IOTENTERPRISES)
strcat (osname, "");
else
strcat (osname, products[prod]);