From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13151 invoked by alias); 20 Jan 2016 17:52:54 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 13126 invoked by uid 9078); 20 Jan 2016 17:52:54 -0000 Date: Wed, 20 Jan 2016 17:52:00 -0000 Message-ID: <20160120175254.13100.qmail@sourceware.org> From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup] branch master, updated. release_2.873-10-g1f7ba4b X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 121d6aa54f3e3906778dcda163686c09b6dbf87c X-Git-Newrev: 1f7ba4b6f214486f3491f350b205e25ab33804d1 X-SW-Source: 2016-q1/txt/msg00004.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=1f7ba4b6f214486f3491f350b205e25ab33804d1 commit 1f7ba4b6f214486f3491f350b205e25ab33804d1 Author: Corinna Vinschen Date: Wed Jan 20 18:52:46 2016 +0100 WinMain: Drop local GetVersionEx in favour of using OSMajorVersion. Signed-off-by: Corinna Vinschen Diff: --- main.cc | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/main.cc b/main.cc index 3da6185..3d6e6fb 100644 --- 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