From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 1806D3954C04; Thu, 29 Apr 2021 13:39:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1806D3954C04 To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.908-1-g70fc13d3 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 78edbfe458b9354ad248870fc506a9d72bf2ea1a X-Git-Newrev: 70fc13d3bab5c29591dd0d8d020dbef27a7e2caf Message-Id: <20210429133900.1806D3954C04@sourceware.org> Date: Thu, 29 Apr 2021 13:39:00 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 13:39:00 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=70fc13d3bab5c29591dd0d8d020dbef27a7e2caf commit 70fc13d3bab5c29591dd0d8d020dbef27a7e2caf Author: Jon Turney 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