diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-12-05 13:16:37 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-12-05 13:16:37 +0000 |
commit | 3af37a79817488619bdd8a1e618865a0ca8e6f19 (patch) | |
tree | 9549406daac51ffeac3a4e4d35af3397acf4e332 /winsup | |
parent | 2c36d592bace7c87156c974b119f5338b917f36b (diff) | |
download | newlib-3af37a79817488619bdd8a1e618865a0ca8e6f19.zip newlib-3af37a79817488619bdd8a1e618865a0ca8e6f19.tar.gz newlib-3af37a79817488619bdd8a1e618865a0ca8e6f19.tar.bz2 |
* dcrt0.cc (get_cygwin_startup_info): Fix comment.
* wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to
false on non 64-bit systems.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/wincap.cc | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 86fe5c4..127526d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2006-12-05 Corinna Vinschen <corinna@vinschen.de> + * dcrt0.cc (get_cygwin_startup_info): Fix comment. + * wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to + false on non 64-bit systems. + +2006-12-05 Corinna Vinschen <corinna@vinschen.de> + * dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array. Expect first DWORD in child_info struct being set to non-zero if wincap.needs_count_in_si_lpres2 is set. Add comment to explain why. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 023f768..38b4b67 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -607,9 +607,10 @@ get_cygwin_startup_info () This seems to be a bug in Vista's WOW64, which apparently copies the lpReserved2 datastructure not using the cbReserved2 size information, but using the information given in the first DWORD within lpReserved2 - instead. Funny enough, 32 bit Vista doesn't care if zero[0] is 0 or a - non-0 count value, while older versions of Windows might crash if - zero[0] is set to a non-zero value, as observed at least on XP 64. + instead. 32 bit Windows and former WOW64 don't care if zero[0] is 0 + or a sensible non-0 count value. However, it's not clear if a non-0 + count doesn't result in trying to evaluate the content, so we do this + really only for Vista 64 for now. exec/spawn as well as fork write an appropriate value into zero[0] now, depending on the wincap.needs_count_in_si_lpres2 flag. The value is diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 3d1e61d..a8b94fc 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -901,6 +901,8 @@ wincapc::init () BOOL is_wow64_proc = FALSE; if (IsWow64Process (GetCurrentProcess (), &is_wow64_proc)) wow64 = is_wow64_proc; + else + ((wincaps *)this->caps)->needs_count_in_si_lpres2 = false; __small_sprintf (osnam, "%s-%d.%d", os, version.dwMajorVersion, version.dwMinorVersion); |