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>2013-11-19 21:44:33 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-11-19 21:44:33 +0400
commitd134686a10aae7237aa2effc46cba7b23080d06e (patch)
treed46232e67e460d1e30140df500d5eb7772a2faaa
parent670c036efa74e0a8e94e8f97edd570d8981b0490 (diff)
* cygcheck.cc (dump_sysinfo): Drop code trying to fetch OSVERSIONINFO
if fetching OSVERSIONINFOEX failed. Drop code handling unsupported platform IDs. Add code to tweak dwMinorVersion on Windows 8.1 if no manifest is present.
-rw-r--r--winsup/utils/ChangeLog7
-rw-r--r--winsup/utils/cygcheck.cc36
2 files changed, 22 insertions, 21 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index fff35e2ec..01aa189ba 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,5 +1,12 @@
2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+ * cygcheck.cc (dump_sysinfo): Drop code trying to fetch OSVERSIONINFO
+ if fetching OSVERSIONINFOEX failed. Drop code handling unsupported
+ platform IDs. Add code to tweak dwMinorVersion on Windows 8.1 if no
+ manifest is present.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
* Makefile.in (cygcheck.exe): Link against wininet.dll.
(dumper.exe): Link against psapi.dll.
* cygcheck.cc (_WIN32_WINNT): Define as 0x0602.
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 209a7d181..87557da04 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1430,7 +1430,6 @@ dump_sysinfo ()
time_t now;
char *found_cygwin_dll;
bool is_nt = false;
- bool more_info = true;
char osname[128];
DWORD obcaseinsensitive = 1;
HKEY key;
@@ -1442,23 +1441,12 @@ dump_sysinfo ()
OSVERSIONINFOEX osversion;
osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- {
- more_info = false;
- osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- display_error ("dump_sysinfo: GetVersionEx()");
- }
+ display_error ("dump_sysinfo: GetVersionEx()");
HMODULE k32 = GetModuleHandleW (L"kernel32.dll");
switch (osversion.dwPlatformId)
{
- case VER_PLATFORM_WIN32s:
- strcpy (osname, "32s (not supported)");
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- strcpy (osname, "95/98/Me (not supported)");
- break;
case VER_PLATFORM_WIN32_NT:
is_nt = true;
if (osversion.dwMajorVersion == 6)
@@ -1477,15 +1465,21 @@ dump_sysinfo ()
? "7" : "2008 R2");
break;
case 2:
- default:
/* No way to distinguish W8 and W8.1 by OS version numbers
- alone. */
- if (osversion.dwBuildNumber >= 9200)
- strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8.1" : "2012 R2");
- else
- strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8" : "2012");
+ alone, unless the executables have a matching manifest.
+ What a big, fat mess. */
+ if (osversion.dwBuildNumber < 9200)
+ {
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "8" : "2012");
+ break;
+ }
+ /*FALLTHRU*/
+ case 3:
+ default:
+ osversion.dwMinorVersion = 3;
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "8.1" : "2012 R2");
break;
}
DWORD prod;