Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-28 12:47:06 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-28 12:47:06 +0400
commitaacf1864d89d9cf6b80b517655605ee73720e40a (patch)
tree7ed5815983554596092838a5096af8e91eaac8ac /winsup/cygwin/init.cc
parent533ce3fb55349f6d9fcfd000be47f2dd52446de8 (diff)
* autoload.cc (IsWow64Process): Remove.
(Wow64DisableWow64FsRedirection): Remove. (Wow64RevertWow64FsRedirection): Remove. * ntdll.h (enum _PROCESSINFOCLASS): Define ProcessWow64Information. * init.cc (respawn_wow64_process): Use NtQueryInformationProcess to get WOW64 state. * wincap.cc (wincapc::init): Ditto. * wincap.h (wincapc::wow64): Change type to ULONG.
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r--winsup/cygwin/init.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 4fe62063d..b05427592 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -71,25 +71,25 @@ respawn_wow64_process ()
PROCESS_BASIC_INFORMATION pbi;
HANDLE parent;
- BOOL is_wow64_proc = TRUE; /* Opt on the safe side. */
+ ULONG wow64 = TRUE; /* Opt on the safe side. */
/* Unfortunately there's no simpler way to retrieve the
parent process in NT, as far as I know. Hints welcome. */
ret = NtQueryInformationProcess (GetCurrentProcess (),
ProcessBasicInformation,
- (PVOID) &pbi,
- sizeof pbi, NULL);
- if (ret == STATUS_SUCCESS
+ &pbi, sizeof pbi, NULL);
+ if (NT_SUCCESS (ret)
&& (parent = OpenProcess (PROCESS_QUERY_INFORMATION,
FALSE,
pbi.InheritedFromUniqueProcessId)))
{
- IsWow64Process (parent, &is_wow64_proc);
+ NtQueryInformationProcess (parent, ProcessWow64Information,
+ &wow64, sizeof wow64, NULL);
CloseHandle (parent);
}
/* The parent is a real 64 bit process? Respawn! */
- if (!is_wow64_proc)
+ if (!wow64)
{
PROCESS_INFORMATION pi;
STARTUPINFOW si;