forked from msys2/msys2-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cygwin: cache IsWow64Process2 host arch in wincap.
This was already used in the FAST_CWD check, and could be used in a couple other places. I found the "emulated"/process value returned from the function largely useless, so I did not cache it. It is useless because, as the docs say, it is set to IMAGE_FILE_MACHINE_UNKNOWN (0) if the process is not running under WOW64, but Microsoft also doesn't consider x64-on-ARM64 to be WOW64, so it is set to 0 regardless if the process is ARM64 or x64. You can tell the difference via GetProcessInformation(ProcessMachineTypeInfo), but for the current process even that's overkill: what we really want to know is the IMAGE_FILE_MACHINE_* constant for the Cygwin dll itself, which is conveniently located in memory already, so cache that in wincap also for easy comparisons. Signed-off-by: Jeremy Drake <[email protected]>
- Loading branch information
1 parent
a187679
commit 38139ae
Showing
3 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters