[setup] branch master, updated. release_2.873-10-g1f7ba4b
corinna@sourceware.org
corinna@sourceware.org
Wed Jan 20 17:52:00 GMT 2016
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
More information about the Cygwin-apps-cvs
mailing list