diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-01-13 17:00:10 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-01-13 17:00:10 +0300 |
commit | 71f98c4caa7ea253718fa6d5165af27feba2300c (patch) | |
tree | 9eada92df813b03f28d58275d388b9e54ce34868 /winsup/cygwin/uname.cc | |
parent | 67066cabade4f443c953da8a602a30cea1abacca (diff) |
* uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
member to see when running under WOW64.
Diffstat (limited to 'winsup/cygwin/uname.cc')
-rw-r--r-- | winsup/cygwin/uname.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc index fa89373d2..3797b140d 100644 --- a/winsup/cygwin/uname.cc +++ b/winsup/cygwin/uname.cc @@ -36,10 +36,15 @@ uname (struct utsname *name) build systems which think the native system is a 64 bit system. Since we're actually running in a 32 bit environment, it looks more correct just to use the CPU info given by WOW64. */ - BOOL is_64bit_machine = FALSE; - if (IsWow64Process (hMainProc, &is_64bit_machine) && is_64bit_machine) + if (wincap.is_wow64 ()) GetNativeSystemInfo (&sysinfo); else +#else + /* But it seems ok to 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, "-WOW64", + sizeof name->sysname - strlen (name->sysname) - 1); #endif GetSystemInfo (&sysinfo); |