aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-03-07 10:31:15 +0100
committerCorinna Vinschen <corinna@vinschen.de>2022-05-12 22:00:25 +0200
commit78a706f4cfe4a0b0ab10d2d29dd702817098c5b4 (patch)
tree7e21a2307999f1b492f27eeb712662b6d95cc7f0 /winsup
parentccf1638e8ec8880f5b2282084a1e34bbb61f9051 (diff)
downloadnewlib-78a706f4cfe4a0b0ab10d2d29dd702817098c5b4.zip
newlib-78a706f4cfe4a0b0ab10d2d29dd702817098c5b4.tar.gz
newlib-78a706f4cfe4a0b0ab10d2d29dd702817098c5b4.tar.bz2
Cygwin: wincap: drop wow64 flag and all conditions depending on it
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_process.cc6
-rw-r--r--winsup/cygwin/path.cc22
-rw-r--r--winsup/cygwin/syscalls.cc3
-rw-r--r--winsup/cygwin/uname.cc11
-rw-r--r--winsup/cygwin/wincap.cc6
-rw-r--r--winsup/cygwin/wincap.h2
6 files changed, 4 insertions, 46 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 718945b..e2dd128 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -784,11 +784,7 @@ struct thread_info
char *fill_if_match (char *base, ULONG type, char *dest)
{
for (region *r = regions; r; r = r->next)
- if ((base >= r->start && base < r->end)
- /* Special case WOW64. The TEB is 8K within the region reserved
- for it. No idea what the lower 8K are used for. */
- || (r->teb && wincap.is_wow64 ()
- && r->start == base + 2 * wincap.page_size ()))
+ if (base >= r->start && base < r->end)
{
char *p = dest + __small_sprintf (dest, "[%s (tid %ld)",
r->teb ? "teb" : "stack",
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index e370843..b00f4c4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3461,28 +3461,6 @@ restart:
differ, return the final path as symlink content and set symlen
to a negative value. This forces path_conv::check to restart
symlink evaluation with the new path. */
-#ifdef __i386__
- /* On WOW64, ignore any potential problems if the path is inside
- the Windows dir to avoid false positives for stuff under File
- System Redirector control. Believe it or not, but even
- GetFinalPathNameByHandleA returns the converted path for the
- Sysnative dir. I. e.
-
- C:\Windows\Sysnative --> C:\Windows\System32
-
- This is obviously wrong when using this path for further
- file manipulation because the non-final path points to another
- file than the final path. Oh well... */
- if (!fs.is_remote_drive () && wincap.is_wow64 ())
- {
- /* windows_directory_path is stored without trailing backslash,
- so we have to check this explicitely. */
- if (RtlEqualUnicodePathPrefix (&upath, &windows_directory_path, TRUE)
- && upath.Buffer[windows_directory_path.Length / sizeof (WCHAR)]
- == L'\\')
- goto file_not_symlink;
- }
-#endif /* __i386__ */
if ((pc_flags & (PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP)) == PC_SYM_FOLLOW)
{
PWCHAR fpbuf = tp.w_get ();
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 1cecaa0..317cd2e 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4419,8 +4419,7 @@ gethostid (void)
int32_t hostid = 0x40291372; /* Choose a nice start value */
WCHAR wguid[38];
- reg_key key (HKEY_LOCAL_MACHINE,
- KEY_READ | (wincap.is_wow64() ? KEY_WOW64_64KEY : 0),
+ reg_key key (HKEY_LOCAL_MACHINE, KEY_READ,
L"SOFTWARE", L"Microsoft", L"Cryptography", NULL);
key.get_string (L"MachineGuid", wguid, 38,
L"00000000-0000-0000-0000-000000000000");
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
index 3502166..4113815 100644
--- a/winsup/cygwin/uname.cc
+++ b/winsup/cygwin/uname.cc
@@ -36,9 +36,8 @@ uname_x (struct utsname *name)
memset (name, 0, sizeof (*name));
/* sysname */
- __small_sprintf (name->sysname, "CYGWIN_%s-%u%s",
- wincap.osname (), wincap.build_number (),
- wincap.is_wow64 () ? "-WOW64" : "");
+ __small_sprintf (name->sysname, "CYGWIN_%s-%u",
+ wincap.osname (), wincap.build_number ());
/* nodename */
memset (buf, 0, sizeof buf);
cygwin_gethostname (buf, sizeof buf - 1);
@@ -100,12 +99,6 @@ uname (struct utsname *in_name)
memset (name, 0, sizeof (*name));
__small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
- /* Add a hint to the sysname, that we're running under WOW64. This might
- give an early clue if somebody encounters problems. */
- if (wincap.is_wow64 ())
- strncat (name->sysname, "-WOW",
- sizeof name->sysname - strlen (name->sysname) - 1);
-
/* Computer name */
cygwin_gethostname (name->nodename, sizeof (name->nodename) - 1);
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index ffc3214..c153627 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -461,14 +461,8 @@ wincapc::init ()
((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION);
#ifdef __x86_64__
- wow64 = 0;
/* 64 bit systems have one more guard page than their 32 bit counterpart. */
++((wincaps *)caps)->def_guard_pages;
-#else
- if (NT_SUCCESS (NtQueryInformationProcess (NtCurrentProcess (),
- ProcessWow64Information,
- &wow64, sizeof wow64, NULL))
- && !wow64)
#endif
{
((wincaps *)caps)->has_gaa_largeaddress_bug = false;
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 1602ed6..26cf4be 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -49,7 +49,6 @@ class wincapc
SYSTEM_INFO system_info;
RTL_OSVERSIONINFOEXW version;
char osnam[40];
- ULONG_PTR wow64;
void *caps;
public:
@@ -69,7 +68,6 @@ public:
{ return (size_t) system_info.dwAllocationGranularity; }
const char *osname () const { return osnam; }
const DWORD build_number () const { return version.dwBuildNumber; }
- const bool is_wow64 () const { return !!wow64; }
#define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; }