mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 12:59:21 +08:00
Cygwin: utils: drop unnecessary wow64 checks
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
d4df9c6de1
commit
4f034daba7
@ -536,7 +536,6 @@ do_sysfolders (char option)
|
|||||||
{
|
{
|
||||||
WCHAR wbuf[MAX_PATH];
|
WCHAR wbuf[MAX_PATH];
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
BOOL iswow64 = FALSE;
|
|
||||||
|
|
||||||
wbuf[0] = L'\0';
|
wbuf[0] = L'\0';
|
||||||
switch (option)
|
switch (option)
|
||||||
@ -579,18 +578,6 @@ do_sysfolders (char option)
|
|||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
GetSystemDirectoryW (wbuf, MAX_PATH);
|
GetSystemDirectoryW (wbuf, MAX_PATH);
|
||||||
if (!windows_flag
|
|
||||||
&& IsWow64Process (GetCurrentProcess (), &iswow64) && iswow64)
|
|
||||||
{
|
|
||||||
/* When calling NtQueryInformationFile(FileNameInformation) on WOW64,
|
|
||||||
the returned path will point to SysWOW64. This breaks path
|
|
||||||
redirection to the network related files under device/etc. This
|
|
||||||
here is a bad hack to make sure that the conversion will convert
|
|
||||||
the case *and* stick to System32. */
|
|
||||||
PWCHAR last_bs = wcsrchr (wbuf, L'\\');
|
|
||||||
if (last_bs)
|
|
||||||
wcpcpy (last_bs + 1, L"Sysnative");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
|
@ -1605,26 +1605,6 @@ dump_sysinfo ()
|
|||||||
|| osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
|
|| osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
|
||||||
BOOL is_wow64 = FALSE;
|
|
||||||
if (IsWow64Process (GetCurrentProcess (), &is_wow64) && is_wow64)
|
|
||||||
{
|
|
||||||
SYSTEM_INFO natinfo;
|
|
||||||
GetNativeSystemInfo (&natinfo);
|
|
||||||
fputs ("\nRunning under WOW64 on ", stdout);
|
|
||||||
switch (natinfo.wProcessorArchitecture)
|
|
||||||
{
|
|
||||||
case PROCESSOR_ARCHITECTURE_IA64:
|
|
||||||
puts ("IA64");
|
|
||||||
break;
|
|
||||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
|
||||||
puts ("AMD64");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
puts("??");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetSystemMetrics (SM_REMOTESESSION))
|
if (GetSystemMetrics (SM_REMOTESESSION))
|
||||||
printf ("\nRunning in Terminal Service session\n");
|
printf ("\nRunning in Terminal Service session\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user