You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@locus.apache.org on 2000/12/29 00:14:16 UTC
cvs commit: apr CHANGES configure.in
rbb 00/12/28 15:14:12
Modified: . CHANGES configure.in
Log:
FreeBSD's sendfile does not work if the FreeBSD version is less than
4.2 and we are compiled for a threaded program. This change automatically
detects that set of conditions, and sets the sendfile detection correctly.
Revision Changes Path
1.31 +4 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- CHANGES 2000/12/22 00:19:14 1.30
+++ CHANGES 2000/12/28 23:14:04 1.31
@@ -1,5 +1,9 @@
Changes with APR b1
+ *) FreeBSD does not support sendfile() in combination with threads
+ before version 4.2. We no longer even try to support it.
+ [Ryan Bloom]
+
*) On FreeBSD, it is possible for the first call to sendfile to
get EAGAIN, but still send some data. This means that we cannot
call sendfile and then check for EAGAIN, and then wait and call
1.196 +19 -8 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -r1.195 -r1.196
--- configure.in 2000/12/22 16:54:47 1.195
+++ configure.in 2000/12/28 23:14:06 1.196
@@ -216,12 +216,7 @@
AC_CHECK_FUNCS(writev)
sendfile="0"
AC_CHECK_FUNCS(sendfile send_file, [ sendfile="1" ])
-case "$OS" in
- *alpha*-dec-osf* )
- sendfile="0"
- echo "sendfile support disabled to avoid system problem"
- ;;
-esac
+
AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
AC_CHECK_FUNCS(getpass)
APR_CHECK_INET_ADDR
@@ -238,7 +233,6 @@
AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ])
AC_CHECK_FUNCS(bzero, [ have_bzero="1" ], [ have_bzero="0"] )
-AC_SUBST(sendfile)
AC_SUBST(fork)
AC_SUBST(have_inet_addr)
AC_SUBST(have_inet_network)
@@ -585,7 +579,24 @@
AC_SUBST(threads)
dnl THIS MUST COME AFTER THE THREAD TESTS - FreeBSD doesn't always have a
-dnl threaded poll()
+dnl threaded poll() and we don't want to use sendfile on early FreeBSD
+dnl systems if we are also using threads.
+
+case "$OS" in
+ *freebsd*)
+ if test `echo "$OS" | sed -e 's/.*\(.\)\.\(.\)/\1\2/'` -le "41"; then
+ if test "$threads" = "1"; then
+ sendfile="0"
+ fi
+ fi
+ ;;
+ *alpha*-dec-osf* )
+ sendfile="0"
+ echo "sendfile support disabled to avoid system problem"
+ ;;
+esac
+AC_SUBST(sendfile)
+
AC_CHECK_FUNCS(poll)