httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/unix readwrite.c
Date Thu, 02 Mar 2000 12:51:09 GMT
dreid       00/03/02 04:51:08

  Modified:    src/lib/apr/file_io/beos readwrite.c
               src/lib/apr/file_io/unix readwrite.c
  Log:
  Bring BeOS ap_writev up to date and amend the documentation to show
  the new argumnets.
  
  Revision  Changes    Path
  1.8       +10 -11    apache-2.0/src/lib/apr/file_io/beos/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/beos/readwrite.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- readwrite.c	2000/02/21 16:41:39	1.7
  +++ readwrite.c	2000/03/02 12:51:08	1.8
  @@ -127,30 +127,29 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_writev(ap_file_t *, iovec *, ap_ssize_t *)
  - *    Write data from ap_iovec array to the specified file.
  + * ap_status_t ap_writev(ap_file_t *, struct iovec *, ap_size_t, ap_ssize_t *)
  + *    Write data from iovec array to the specified file.
    * arg 1) The file descriptor to write to.
    * arg 2) The array from which to get the data to write to the file.
  - * arg 3) The number of elements in the ap_iovec array.  This must be
  + * arg 3) The number of elements in the struct iovec array. This must be
    *        smaller than AP_MAX_IOVEC_SIZE.  If it isn't, the function will
    *        fail with APR_EINVAL.
  - * NOTE:  The third arguement is updated with the number of bytes actually 
  - *        written on function exit. 
  + * arg 4) The number of bytes written.
    */
  -#ifdef HAVE_WRITEV
  -ap_status_t ap_writev(struct file_t *thefile, const struct iovec *vec, ap_ssize_t *iocnt)
  +
  +ap_status_t ap_writev(struct file_t *thefile, const struct iovec *vec, 
  +                      ap_size_t nvec, ap_ssize_t *nbytes)
   {
       int bytes;
  -    if ((bytes = writev(thefile->filedes, vec, *iocnt)) < 0) {
  -        *iocnt = bytes;
  +    if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
  +        *nbytes = 0;
           return errno;
       }
       else {
  -        *iocnt = bytes;
  +        *nbytes = bytes;
           return APR_SUCCESS;
       }
   }
  -#endif
   
   /* ***APRDOC********************************************************
    * ap_status_t ap_putc(char, ap_file_t *)
  
  
  
  1.23      +3 -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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- readwrite.c	2000/03/01 16:21:14	1.22
  +++ readwrite.c	2000/03/02 12:51:08	1.23
  @@ -205,15 +205,14 @@
   }
   
   /* ***APRDOC********************************************************
  - * ap_status_t ap_writev(ap_file_t *, struct iovec *, ap_ssize_t *)
  + * ap_status_t ap_writev(ap_file_t *, struct iovec *, ap_size_t, ap_ssize_t *)
    *    Write data from iovec array to the specified file.
    * arg 1) The file descriptor to write to.
    * arg 2) The array from which to get the data to write to the file.
  - * arg 3) The number of elements in the struct iovec array.  This must be
  + * arg 3) The number of elements in the struct iovec array. This must be
    *        smaller than AP_MAX_IOVEC_SIZE.  If it isn't, the function will
    *        fail with APR_EINVAL.
  - * NOTE:  The third arguement is updated with the number of bytes actually 
  - *        written on function exit. 
  + * arg 4) The number of bytes written.
    */
   #ifdef HAVE_WRITEV
   ap_status_t ap_writev(struct file_t *thefile, const struct iovec *vec,
  
  
  

Mime
View raw message