]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
WinMain: Drop local GetVersionEx in favour of using OSMajorVersion.
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 20 Jan 2016 17:52:46 +0000 (18:52 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 20 Jan 2016 17:52:46 +0000 (18:52 +0100)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
main.cc

diff --git a/main.cc b/main.cc
index 3da61856f041810174ef5eb2c9377402658f11ed..3d6e6fb8b5d90fd9cdf81b75d0b7587eb512044f 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -268,15 +268,11 @@ WinMain (HINSTANCE h,
     SetupArch = is_64bit ? "x86_64" : "x86";
     SetupIniDir = SetupArch+"/";
 
-    /* Get System info */
-    OSVERSIONINFO version;
-    version.dwOSVersionInfoSize = sizeof version;
-    GetVersionEx (&version);
     /* Initialize well known SIDs.  We need the admin SID to test if we're
        supposed to elevate. */
     nt_sec.initialiseWellKnownSIDs ();
     /* Check if we have to elevate. */
-    bool elevate = !help_option && version.dwMajorVersion >= 6
+    bool elevate = !help_option && OSMajorVersion () >= 6
                   && !NoAdminOption && !nt_sec.isRunAsAdmin ();
 
     /* Start logging only if we don't elevate.  Same for setting default
This page took 0.032901 seconds and 5 git commands to generate.