You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Victor J. Orlikowski" <vj...@raleigh.ibm.com> on 2000/06/23 16:56:01 UTC

[PATCH] sendfile detection

This patch allows sendfile detection on AIX (where it's called send_file
(don't ask me why)),
and changes the define to look for in http_protocol.c to match Ryan's in
sendrecv.c


Index: src/lib/apr/configure.in
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.116
diff -u -r1.116 configure.in
--- configure.in 2000/06/23 12:24:35 1.116
+++ configure.in 2000/06/23 14:34:28
@@ -201,7 +201,7 @@
 AC_CHECK_FUNCS(strcasecmp stricmp setsid nl_langinfo)
 AC_CHECK_FUNCS(sigaction, [ have_sigaction="1" ], [ have_sigaction="0" ])
 AC_CHECK_FUNCS(writev)
-AC_CHECK_FUNCS(sendfile, [ sendfile="1" ], [ sendfile="0" ])
+AC_CHECK_FUNCS(sendfile send_file, [ sendfile="1" ], [ sendfile="0" ])
 AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
 AC_CHECK_FUNCS(getpass)
 AC_CHECK_FUNC(inet_addr, [ inet_addr="1" ], [ inet_addr="0" ])
Index: src/main/http_protocol.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/http_protocol.c,v
retrieving revision 1.83
diff -u -r1.83 http_protocol.c
--- http_protocol.c 2000/06/20 04:22:39 1.83
+++ http_protocol.c 2000/06/23 14:34:31
@@ -2171,7 +2171,7 @@
 API_EXPORT(long) ap_send_fd(ap_file_t *fd, request_rec *r)
 {
     long len = r->finfo.size;
-#ifdef HAVE_SENDFILE
+#if APR_HAS_SENDFILE
     if (!r->chunked) {
  ap_status_t rv;
         ap_bsetopt(r->connection->client, BO_TIMEOUT,