public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: corinna@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup] branch master, updated. release_2.873-10-g1f7ba4b Date: Wed, 20 Jan 2016 17:52:00 -0000 [thread overview] Message-ID: <20160120175254.13100.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=1f7ba4b6f214486f3491f350b205e25ab33804d1 commit 1f7ba4b6f214486f3491f350b205e25ab33804d1 Author: Corinna Vinschen <corinna@vinschen.de> Date: Wed Jan 20 18:52:46 2016 +0100 WinMain: Drop local GetVersionEx in favour of using OSMajorVersion. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> 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
reply other threads:[~2016-01-20 17:52 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160120175254.13100.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).