Hi Paolo, Thank you for providing this select() implementation! With it, I can now make 'msgfilter' work on mingw.
Here's a patch for a possible optimization: select() on a regular file should return "ready" always, no? There's no need to even call WaitForSingleObject on this one, IMO. Proposed patch: 208-09-29 Bruno Haible <[EMAIL PROTECTED]> * lib/winsock-select.c (win32_poll_handle): Add shortcut for regular files. *** lib/winsock-select.c.orig 2008-09-29 18:06:00.000000000 +0200 --- lib/winsock-select.c 2008-09-29 18:05:44.000000000 +0200 *************** *** 93,98 **** --- 93,103 ---- read = write = except = FALSE; switch (GetFileType (h)) { + case FILE_TYPE_DISK: + read = TRUE; + write = TRUE; + break; + case FILE_TYPE_PIPE: if (!once_only) {