bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] implement full-blown select(2) for winsock


From: Bruno Haible
Subject: Re: [PATCH v2] implement full-blown select(2) for winsock
Date: Mon, 29 Sep 2008 18:18:01 +0200
User-agent: KMail/1.5.4

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  <address@hidden>

        * 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)
        {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]