apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/poll/unix poll.c
Date Tue, 16 Jul 2002 20:27:43 GMT
bnicholes    2002/07/16 13:27:43

  Modified:    poll/unix poll.c
  Log:
  NetWare uses a different select() call if the handle is pipe rather than a socket.
  
  Revision  Changes    Path
  1.8       +17 -0     apr/poll/unix/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apr/poll/unix/poll.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- poll.c	15 Jul 2002 18:27:39 -0000	1.7
  +++ poll.c	16 Jul 2002 20:27:43 -0000	1.8
  @@ -157,6 +157,9 @@
       int rv, i;
       int maxfd = -1;
       struct timeval tv, *tvptr;
  +#ifdef NETWARE
  +    int is_pipe = 0;
  +#endif
   
       if (timeout < 0) {
           tvptr = NULL;
  @@ -179,6 +182,9 @@
           }
           else if (aprset[i].desc_type == APR_POLL_FILE) {
               fd = aprset[i].desc.f->filedes;
  +#ifdef NETWARE
  +            is_pipe = aprset[i].desc.f->is_pipe;
  +#endif
           }
           if (aprset[i].reqevents & APR_POLLIN) {
               FD_SET(fd, &readset);
  @@ -195,7 +201,18 @@
           }
       }
   
  +#ifdef NETWARE
  +    if (is_pipe) {
  +        rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr);
  +    }
  +    else {
  +#endif
  +
       rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr);
  +
  +#ifdef NETWARE
  +    }
  +#endif
   
       (*nsds) = rv;
       if ((*nsds) == 0) {
  
  
  

Mime
View raw message