apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: apr/poll/unix poll.c
Date Fri, 02 Aug 2002 05:07:16 GMT
brianp      2002/08/01 22:07:16

  Modified:    poll/unix poll.c
  Log:
  Avoid trying to turn file handles into sockets on win32 (where
  they're not interchangeable)
  
  Revision  Changes    Path
  1.14      +14 -2     apr/poll/unix/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apr/poll/unix/poll.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- poll.c	2 Aug 2002 04:53:47 -0000	1.13
  +++ poll.c	2 Aug 2002 05:07:16 -0000	1.14
  @@ -197,10 +197,14 @@
               fd = aprset[i].desc.s->socketdes;
           }
           else if (aprset[i].desc_type == APR_POLL_FILE) {
  +#ifdef WIN32
  +            return APR_EBADF;
  +#else
               fd = aprset[i].desc.f->filedes;
   #ifdef NETWARE
               is_pipe = aprset[i].desc.f->is_pipe;
  -#endif
  +#endif /* NETWARE */
  +#endif /* !WIN32 */
           }
           if (aprset[i].reqevents & APR_POLLIN) {
               FD_SET(fd, &readset);
  @@ -249,7 +253,11 @@
               fd = aprset[i].desc.s->socketdes;
           }
           else {
  +#ifdef WIN32
  +            return EBADF;
  +#else
               fd = aprset[i].desc.f->filedes;
  +#endif
           }
           aprset[i].rtnevents = 0;
           if (FD_ISSET(fd, &readset)) {
  @@ -509,7 +517,11 @@
               fd = pollset->query_set[i].desc.s->socketdes;
           }
           else {
  -            fd = pollset->query_set[i].desc.s->socketdes;
  +#ifdef WIN32
  +            return APR_EBADF;
  +#else
  +            fd = pollset->query_set[i].desc.f->filedes;
  +#endif
           }
           if (FD_ISSET(fd, &readset) || FD_ISSET(fd, &writeset) ||
               FD_ISSET(fd, &exceptset)) {
  
  
  

Mime
View raw message