Treat the special case of regular files more efficiently.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Sep 2008 21:50:26 +0000 (23:50 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 30 Sep 2008 21:50:26 +0000 (23:50 +0200)
ChangeLog
lib/winsock-select.c

index 8c49189b08f833e4098583bb0487b29925e670ed..c2f9f7ca700df9594cd73ffd357af14d358e628e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-30  Bruno Haible  <bruno@clisp.org>
+
+       * lib/winsock-select.c (win32_poll_handle): Add shortcut for regular
+       files.
+
 2008-09-30  Jim Meyering  <meyering@redhat.com>
 
        fts.m4: correct the test for statfs.f_type
index 00bf2c67d520be81f29e13472873caf299914b41..33e5f734fe6b885070d82967ee76be9d415fa125 100644 (file)
@@ -93,6 +93,11 @@ win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits,
   read = write = except = FALSE;
   switch (GetFileType (h))
     {
+    case FILE_TYPE_DISK:
+      read = TRUE;
+      write = TRUE;
+      break;
+
     case FILE_TYPE_PIPE:
       if (!once_only)
        {