httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/unix readwrite.c
Date Thu, 01 Jun 2000 22:23:16 GMT
rbb         00/06/01 15:23:16

  Modified:    src/lib/apr/file_io/unix readwrite.c
  Log:
  Fix readwrite to support BeOS.  BeOS doesn't currently support select'ing
  on files, so wait_for_io_or_timeout doesn't work there.
  Submitted by:	David Reid
  
  Revision  Changes    Path
  1.51      +6 -4      apache-2.0/src/lib/apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- readwrite.c	2000/06/01 18:50:40	1.50
  +++ readwrite.c	2000/06/01 22:23:16	1.51
  @@ -55,6 +55,7 @@
   #include "fileio.h"
   #include "apr_lock.h"
   
  +#ifndef BEOS
   static ap_status_t wait_for_io_or_timeout(ap_file_t *file, int for_read)
   {
       struct timeval tv, *tvptr;
  @@ -89,6 +90,7 @@
       }
       return APR_SUCCESS;
   }
  +#endif
   
   ap_status_t ap_read(ap_file_t *thefile, void *buf, ap_ssize_t *nbytes)
   {
  @@ -157,7 +159,7 @@
           do {
               rv = read(thefile->filedes, buf, *nbytes);
           } while (rv == -1 && errno == EINTR);
  -
  +#ifndef BEOS
           if (rv == -1 && 
               (errno == EAGAIN || errno == EWOULDBLOCK) && 
               thefile->timeout != 0) {
  @@ -172,7 +174,7 @@
                   } while (rv == -1 && errno == EINTR);
               }
           }  
  -
  +#endif
           *nbytes = bytes_read;
           if (rv == 0) {
   	return     APR_EOF;
  @@ -230,7 +232,7 @@
           do {
               rv = write(thefile->filedes, buf, *nbytes);
           } while (rv == (ap_size_t)-1 && errno == EINTR);
  -
  +#ifndef BEOS
           if (rv == (ap_size_t)-1 &&
               (errno == EAGAIN || errno == EWOULDBLOCK) && 
               thefile->timeout != 0) {
  @@ -245,7 +247,7 @@
   	        } while (rv == (ap_size_t)-1 && errno == EINTR);
               }
           }  
  -
  +#endif
           if (rv == (ap_size_t)-1) {
               (*nbytes) = 0;
               return errno;
  
  
  

Mime
View raw message