aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/uname.cc9
2 files changed, 12 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9cc8ab9..4d4be63 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2006-01-13 Corinna Vinschen <corinna@vinschen.de>
+ * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
+ member to see when running under WOW64.
+
+2006-01-13 Corinna Vinschen <corinna@vinschen.de>
+
* net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
Windows 2000 and above. Clarify the comment about IP_TOS and move
to the place where the magic happens.
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
index fa89373..3797b14 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);