* autoload.cc (MsgWaitForMultipleObjectsEx): Define.

(MsgWaitForMultipleObjects): Remove.
	* select.cc (select_stuff::wait): Use MsgWaitForMultipleObjectsEx with
	QS_ALLPOSTMESSAGE and, if possible, MWMO_INPUTAVAILABLE flags.  Explain
	why.  Fix a potential crash due to a NULL pointer in WAIT_FAILED case.
	(peek_windows): Use filter pattern on NT4.  Explain why.
	* wincap.h (wincaps::has_mwmo_inputavailable): New element.
	* wincap.cc: Implement above element throughout.
This commit is contained in:
Corinna Vinschen
2010-08-30 10:39:43 +00:00
parent 98edb049e4
commit 92596190c4
5 changed files with 46 additions and 4 deletions

View File

@@ -59,6 +59,7 @@ wincaps wincap_unknown __attribute__((section (".cygwin_dll_common"), shared)) =
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
};
wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -99,6 +100,7 @@ wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
};
wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -139,6 +141,7 @@ wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
};
wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -179,6 +182,7 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -219,6 +223,7 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -259,6 +264,7 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -299,6 +305,7 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -339,6 +346,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -379,6 +387,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
};
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -419,6 +428,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:false,
has_always_all_codepages:true,
has_localenames:true,
has_mwmo_inputavailable:true,
};
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -459,6 +469,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_broken_alloc_console:true,
has_always_all_codepages:true,
has_localenames:true,
has_mwmo_inputavailable:true,
};
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));