You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <cl...@yahoo.com> on 2001/07/25 05:12:23 UTC

apr_socket_accept_filter()

I'm trying to clear up a warning on FreeBSD related to
apr_socket_accept_filter() (no prototype).  The problem is that
apr_network_io.h has an #ifdef APR_OS_ACCEPT_FILTER around the prototype
for that function, and APR_OS_ACCEPT_FILTER doesn't exist anywhere else in
the code.  [The prototype is wrong anyway, but that's easy to fix.]  It
gets worse.

I see about five variations of the name of this macro, as follows:

1) configure.in and apr.h.in check sys/socket.h for SO_ACCEPT_FILTER and
set APR_HAS_SO_ACCEPT_FILTER and...

2) HAVE_SO_ACCEPT_FILTER  [shouldn't #1 be APR_HAVE_SO_ACCEPT_FILTER?]

3) apr_network_io.h has an #ifdef APR_OS_ACCEPT_FILTER around the
prototype as mentioned above

4) network_io/unix/sockopt.c uses #ifdef SO_ACCEPTFILTER around the
function itself, pulling directly from the system header.

5) Apache's server/listen.c has a test for #ifdef APR_HAS_SO_ACCEPTFILTER.
(Note that this is *not* the same as #1.)

Sheesh!!


FreeBSD is the only platform I've been able to find (checked Solaris 2.6,
Linux, Irix, AIX, FreeBSD) that has either SO_ACCEPTFILTER or
SO_ACCEPT_FILTER in any system header file.  On FreeBSD, it's called
SO_ACCEPTFILTER.  Is there any platform that defines SO_ACCEPT_FILTER,
which is what configure is currently checking for?  If so, which one?  If
not, I'll change configure.in and apr.h.in appropriately and go from
there.

Thanks,
Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




Re: apr_socket_accept_filter()

Posted by Cliff Woolley <cl...@yahoo.com>.
On Wed, 25 Jul 2001, Ryan Bloom wrote:

> This is most likely just a thinko on my part.  Easy to fix, just use
> APR_HAS_SO_ACCEPTFILTER everywhere.  :-)

Okay.  Will patch this afternoon.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: apr_socket_accept_filter()

Posted by Ryan Bloom <rb...@covalent.net>.
This is most likely just a thinko on my part.  Easy to fix, just use APR_HAS_SO_ACCEPTFILTER
everywhere.  :-)

Ryan

On Tuesday 24 July 2001 20:12, Cliff Woolley wrote:
> I'm trying to clear up a warning on FreeBSD related to
> apr_socket_accept_filter() (no prototype).  The problem is that
> apr_network_io.h has an #ifdef APR_OS_ACCEPT_FILTER around the prototype
> for that function, and APR_OS_ACCEPT_FILTER doesn't exist anywhere else in
> the code.  [The prototype is wrong anyway, but that's easy to fix.]  It
> gets worse.
>
> I see about five variations of the name of this macro, as follows:
>
> 1) configure.in and apr.h.in check sys/socket.h for SO_ACCEPT_FILTER and
> set APR_HAS_SO_ACCEPT_FILTER and...
>
> 2) HAVE_SO_ACCEPT_FILTER  [shouldn't #1 be APR_HAVE_SO_ACCEPT_FILTER?]
>
> 3) apr_network_io.h has an #ifdef APR_OS_ACCEPT_FILTER around the
> prototype as mentioned above
>
> 4) network_io/unix/sockopt.c uses #ifdef SO_ACCEPTFILTER around the
> function itself, pulling directly from the system header.
>
> 5) Apache's server/listen.c has a test for #ifdef APR_HAS_SO_ACCEPTFILTER.
> (Note that this is *not* the same as #1.)
>
> Sheesh!!
>
>
> FreeBSD is the only platform I've been able to find (checked Solaris 2.6,
> Linux, Irix, AIX, FreeBSD) that has either SO_ACCEPTFILTER or
> SO_ACCEPT_FILTER in any system header file.  On FreeBSD, it's called
> SO_ACCEPTFILTER.  Is there any platform that defines SO_ACCEPT_FILTER,
> which is what configure is currently checking for?  If so, which one?  If
> not, I'll change configure.in and apr.h.in appropriately and go from
> there.
>
> Thanks,
> Cliff
>
> --------------------------------------------------------------
>    Cliff Woolley
>    cliffwoolley@yahoo.com
>    Charlottesville, VA

-- 

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------