public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: utils: drop unnecessary wow64 checks
Date: Fri, 13 May 2022 12:39:17 +0000 (GMT)	[thread overview]
Message-ID: <20220513123917.E4A4F395B05E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4f034daba70f359015f79cba3d5fb3d0d468924e

commit 4f034daba70f359015f79cba3d5fb3d0d468924e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Sat Mar 19 12:54:07 2022 +0100

    Cygwin: utils: drop unnecessary wow64 checks
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/cygpath.cc        | 13 -------------
 winsup/utils/mingw/cygcheck.cc | 20 --------------------
 2 files changed, 33 deletions(-)

diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 701c34998..9423a3052 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -536,7 +536,6 @@ do_sysfolders (char option)
 {
   WCHAR wbuf[MAX_PATH];
   char buf[PATH_MAX];
-  BOOL iswow64 = FALSE;
 
   wbuf[0] = L'\0';
   switch (option)
@@ -579,18 +578,6 @@ do_sysfolders (char option)
 
     case 'S':
       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;
 
     case 'W':
diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc
index 288a718bc..a9d2bc2b6 100644
--- a/winsup/utils/mingw/cygcheck.cc
+++ b/winsup/utils/mingw/cygcheck.cc
@@ -1605,26 +1605,6 @@ dump_sysinfo ()
       || osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
     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))
     printf ("\nRunning in Terminal Service session\n");


                 reply	other threads:[~2022-05-13 12:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220513123917.E4A4F395B05E@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).