httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c
Date Sat, 07 Oct 2000 00:37:18 GMT
jim         00/10/06 17:37:18

  Modified:    src/lib/apr/include apr_network_io.h
               src/main http_core.c
  Log:
  This is ugly, but at least we compile again on platforms that lack
  sendfile().
  
  Revision  Changes    Path
  1.54      +9 -0      apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- apr_network_io.h	2000/08/22 15:09:20	1.53
  +++ apr_network_io.h	2000/10/07 00:37:17	1.54
  @@ -145,6 +145,15 @@
       /** number of trailers in the iovec */
       int numtrailers;
   };
  +#else
  +/* 
  + * we need to define something for non-sendfile systems, since
  + * we don't abtract out function calls (eg: send_the_file in http_core.c))
  + * depending on sendfile existance
  + */
  +struct apr_hdtr_t {
  +    int dummy;
  +};
   #endif
   
   /* function definitions */
  
  
  
  1.148     +8 -0      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- http_core.c	2000/10/06 17:24:41	1.147
  +++ http_core.c	2000/10/07 00:37:18	1.148
  @@ -3384,6 +3384,13 @@
           }
           if (fd) {
               apr_hdtr_t hdtr;
  +#if APR_HAS_SENDFILE
  +/*
  + * TODO: fix the call to send_the_file somehow to remove the need for
  + * the apr_hdtr_t paramater if !APR_HAS_SENDFILE. The way it is
  + * now, we have to define a dummy apr_hdtr_t typedef and then
  + * wrap sections anyway. -- jj
  + */
               memset(&hdtr, '\0', sizeof(hdtr));
               if (nvec) {
                   hdtr.numheaders = nvec;
  @@ -3393,6 +3400,7 @@
                   hdtr.numtrailers = nvec_trailers;
                   hdtr.trailers = vec_trailers;
               }
  +#endif
               rv = send_the_file(c, fd, &hdtr, foffset, flen, &bytes_sent);
           }
           else {
  
  
  

Mime
View raw message