]> sourceware.org Git - newlib-cygwin.git/commitdiff
cygwin: wincap: fix evaluation of build number
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 24 Apr 2017 15:12:16 +0000 (17:12 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 24 Apr 2017 15:12:16 +0000 (17:12 +0200)
RtlGetNtVersionNumbers returns the build number with some upper bits
set for no apparent reason.  The fact that RtlGetNtVersionNumbers is
undocumented doesn't exactly help.

Just filter out the upper WORD for now.  If build numbers are in
danger to become 6 digit numbers, re-evaluate.

winsup/cygwin/wincap.cc

index cb52aad6f6529f1a3bf79beca873ae7ed2a83208..c8799f3eceb0c4fa692a717944be1232c25d6917 100644 (file)
@@ -118,6 +118,7 @@ wincapc::init ()
   RtlGetNtVersionNumbers (&version.dwMajorVersion,
                          &version.dwMinorVersion,
                          &version.dwBuildNumber);
+  version.dwBuildNumber &= 0xffff;
 
   switch (version.dwMajorVersion)
     {
This page took 0.031773 seconds and 5 git commands to generate.