public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup] branch master, updated. release_2.873-10-g1f7ba4b
@ 2016-01-20 17:52 corinna
0 siblings, 0 replies; only message in thread
From: corinna @ 2016-01-20 17:52 UTC (permalink / raw)
To: cygwin-apps-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-20 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 17:52 [setup] branch master, updated. release_2.873-10-g1f7ba4b corinna
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).