Sascha Schumann <[EMAIL PROTECTED]> writes:
> On 5 Jan 2001 [EMAIL PROTECTED] wrote:
>
> > rbb 01/01/05 09:19:57
> >
> > Modified: . configure.in
> > Log:
> > Some Linux's do not define TCP_CORK.
>
> I guess you are referring to libc 5.x.x systems? There are
> still kernels around (2.0.x, early 2.2.x possibly) which
> don't support TCP_CORK, so I think we should not simply
> presume that TCP_CORK works.
>
> Would anyone mind, if the *linux* portion of the case
> statement would egrep linux/socket.h for TCP_CORK?
Okay, what you committed looks nice but on RedHat 6.0 and RedHat 6.1
the AC_EGREP_HEADER doesn't find TCP_CORK in the kernel header file
because TCP_CORK is hidden by a check for the libc version.
sendrecv.c won't compile for Linux because APR_HAVE_CORKABLE_TCP is
not set but APR_HAS_SENDFILE is and the Linux-specific code won't
handle that case.
For quite a while we made do with the code below:
#if APR_HAS_SENDFILE
(uninteresting code omitted)
/* Glibc2.1.1 fails to define TCP_CORK. This is a bug that will be
*fixed in the next release. It should be 3
*/
#if !defined(TCP_CORK) && defined(__linux__)
#define TCP_CORK 3
#endif
#endif /* APR_HAS_SENDFILE */
We can put the equivalent logic in configure.in (i.e., if Linux with
sendfile() and we can't find TCP_CORK, fake it). Nobody found a
problem with that assumption yet, and apache-2.0 has been built on
quite a few Linux distributions while that code was around. Maybe
some ancient Linux dev kernel has sendfile() but not TCP_CORK, but it
seems remote that somebody would get bit by that problem (don't know
such a kernel exists and it is ancient and whoever had it loves to
upgrade anyway :) ).
I also wonder why we need APR_HAVE_CORKABLE_TCP defined in apr.h. Do
we expect an APR app to use this?
Have fun...
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...