[setup - the official Cygwin setup program] branch master, updated. release_2.908-1-g70fc13d3

Jon TURNEY jturney@sourceware.org
Thu Apr 29 13:39:00 GMT 2021




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=70fc13d3bab5c29591dd0d8d020dbef27a7e2caf

commit 70fc13d3bab5c29591dd0d8d020dbef27a7e2caf
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Apr 26 13:49:39 2021 +0100

    Fix native machine reported on x86_64 without IsWow64Process2()
    
    If the OS version is old enough not to have IsWow64Process2(), and
    IsWow64Process() returns FALSE, this only indicates x86 for an x86
    process.
    
    Fixes 4936dbc.


Diff:
---
 win32.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/win32.cc b/win32.cc
index ffc52e6d..8ee424f9 100644
--- a/win32.cc
+++ b/win32.cc
@@ -409,10 +409,13 @@ WowNativeMachine ()
       (pfnIsWow64Process2(GetCurrentProcess(), &processMachine, &nativeMachine)))
     return nativeMachine;
   else if (pfnIsWow64Process) {
+#ifdef _X86_
     BOOL bIsWow64 = FALSE;
     if (pfnIsWow64Process(GetCurrentProcess(), &bIsWow64))
       return bIsWow64 ? IMAGE_FILE_MACHINE_AMD64 : IMAGE_FILE_MACHINE_I386;
+#endif
   }
+
 #ifdef __x86_64__
   return IMAGE_FILE_MACHINE_AMD64;
 #else



More information about the Cygwin-apps-cvs mailing list