+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (RtlGetVersion): Declare.
+ * wincap.cc (wincapc::init): Rather than GetVersionEx, call
+ RtlGetVersion which is not crippled by missing Windows 8.1 manifest.
+ * wincap.h (wincapc): Change type of version to RTL_OSVERSIONINFOEXW.
+ Align formatting of all class members.
+
2013-11-19 Corinna Vinschen <corinna@vinschen.de>
* wincap.cc (wincapc::init): Revert previous change. It's not working.
PBOOLEAN);
NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR, PSID *,
PBOOLEAN);
+ NTSTATUS NTAPI RtlGetVersion (PRTL_OSVERSIONINFOEXW);
PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid (PSID);
VOID NTAPI RtlInitEmptyUnicodeString (PUNICODE_STRING, PCWSTR, USHORT);
VOID NTAPI RtlInitAnsiString (PANSI_STRING, PCSTR);
- Fix typos in cygcheck which could crash Windows 8 and 8.1 machines.
Fixes: http://cygwin.com/ml/cygwin/2013-11/msg00334.html
+
+- Show OS version correctly even on Windows 8.1 and Server 2012 R2.
+ Fixes: http://cygwin.com/ml/cygwin/2013-11/msg00343.html
+
return; // already initialized
GetSystemInfo (&system_info);
- version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version));
+ version.dwOSVersionInfoSize = sizeof (RTL_OSVERSIONINFOEXW);
+ RtlGetVersion (&version);
switch (version.dwMajorVersion)
{
class wincapc
{
- SYSTEM_INFO system_info;
- OSVERSIONINFOEX version;
- char osnam[40];
- ULONG_PTR wow64;
- void *caps;
+ SYSTEM_INFO system_info;
+ RTL_OSVERSIONINFOEXW version;
+ char osnam[40];
+ ULONG_PTR wow64;
+ void *caps;
public:
void init ();