You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Henning Brauer <hb...@bsws.de> on 2002/09/06 21:17:52 UTC

[PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Index: src/include/ap_config.h
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v
retrieving revision 1.13
diff -u -r1.13 ap_config.h
--- src/include/ap_config.h	19 Jul 2002 21:31:15 -0000	1.13
+++ src/include/ap_config.h	6 Sep 2002 19:16:23 -0000
@@ -692,6 +692,7 @@
 #if defined __OpenBSD__
 #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
 #define USE_SYSVSEM_SERIALIZED_ACCEPT
+#define NET_SIZE_T socklen_t
 #endif
 #define HAVE_FLOCK_SERIALIZED_ACCEPT
 #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Henning Brauer <hb...@bsws.de>.
On Tue, Sep 10, 2002 at 11:17:58AM -0400, Jim Jagielski wrote:
> Henning Brauer wrote:
> > anyway, this works on -current and should do well on older releases as well.
> > patch is hand-crufted, might not apply cleanly.
> > 
> > --- ap_config.h.orig	Tue Sep 10 17:05:11 2002
> > +++ ap_config.h	Tue Sep 10 17:06:41 2002
> > @@ -692,6 +692,10 @@
> >  #if defined __OpenBSD__
> >  #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> >  #define USE_SYSVSEM_SERIALIZED_ACCEPT
> > +#include <sys/param.h>
> > +#if (OpenBSD >= 199912)
> > +#define NET_SIZE_T socklen_t
> > +#endif
> >  #endif
> >  #define HAVE_FLOCK_SERIALIZED_ACCEPT
> >  #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> can we assume that if __OpenBSD__ is defined, then OpenBSD will be as well
> in all cases? If so, then I'm +1

unless you count some never released revisions of param.h which predate
OpenBSD 2.0 (which was our first release): yes.

-- 
Henning Brauer, BS Web Services, http://bsws.de
hb@bsws.de - henning@openbsd.org
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Henning Brauer <he...@openbsd.org>.
On Tue, Sep 10, 2002 at 11:17:58AM -0400, Jim Jagielski wrote:
> Henning Brauer wrote:
> > 
> > anyway, this works on -current and should do well on older releases as well.
> > patch is hand-crufted, might not apply cleanly.
> > 
> > --- ap_config.h.orig	Tue Sep 10 17:05:11 2002
> > +++ ap_config.h	Tue Sep 10 17:06:41 2002
> > @@ -692,6 +692,10 @@
> >  #if defined __OpenBSD__
> >  #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> >  #define USE_SYSVSEM_SERIALIZED_ACCEPT
> > +#include <sys/param.h>
> > +#if (OpenBSD >= 199912)
> > +#define NET_SIZE_T socklen_t
> > +#endif
> >  #endif
> >  #define HAVE_FLOCK_SERIALIZED_ACCEPT
> >  #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> > 
> 
> can we assume that if __OpenBSD__ is defined, then OpenBSD will be as well
> in all cases? If so, then I'm +1

unless you count a few param.h releases which predate OpenBSD 2.0 (which was
our first release): yes.

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Henning Brauer <hb...@bsws.de>.
On Tue, Sep 10, 2002 at 10:05:19AM -0400, Jeff Trawick wrote:
> Henning Brauer wrote:
> > On Tue, Sep 10, 2002 at 07:12:56AM -0400, Jeff Trawick wrote:
> > > Henning Brauer <hb...@bsws.de> writes:
> > > > +#define NET_SIZE_T socklen_t
> > > Does this hold for every level of OpenBSD, or is a version check
> > > necessary?
> > all versions >= 2.6 have socklen_t.
> > Given that We don't support anything below 3.0 any more... ;-)
> Your point is well taken, but I don't think it is relevant to Apache

I saw this coming, thus the smiley. While I don't see the point of still
supporting 2.0 .. 2.5 from my (OS-Developer) perspective, I would most
probably have acted the same way if I were in your position ;-)

> > You could add a #if (OpenBSD >= 199912) if you really want. 
> Would you be so kind as to test such a patch and resubmit?

Well, as you might imagine I work on -current ;-)
I have a few -stable machines of various releases around, but none of that
vintage.

anyway, this works on -current and should do well on older releases as well.
patch is hand-crufted, might not apply cleanly.

--- ap_config.h.orig	Tue Sep 10 17:05:11 2002
+++ ap_config.h	Tue Sep 10 17:06:41 2002
@@ -692,6 +692,10 @@
 #if defined __OpenBSD__
 #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
 #define USE_SYSVSEM_SERIALIZED_ACCEPT
+#include <sys/param.h>
+#if (OpenBSD >= 199912)
+#define NET_SIZE_T socklen_t
+#endif
 #endif
 #define HAVE_FLOCK_SERIALIZED_ACCEPT
 #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT

-- 
Henning Brauer, BS Web Services, http://bsws.de
hb@bsws.de - henning@openbsd.org
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Jeff Trawick <tr...@attglobal.net>.
Henning Brauer wrote:
> 
> On Tue, Sep 10, 2002 at 07:12:56AM -0400, Jeff Trawick wrote:
> > Henning Brauer <hb...@bsws.de> writes:
> > > +#define NET_SIZE_T socklen_t
> > Does this hold for every level of OpenBSD, or is a version check
> > necessary?
> 
> all versions >= 2.6 have socklen_t.
> 
> Given that We don't support anything below 3.0 any more... ;-)

Your point is well taken, but I don't think it is relevant to Apache
unless it is very 
clear that nobody uses the old releases any more.  If somebody wants to
upgrade their
Apache to pick up an Apache security fix or any other change, we want it
to work, 
regardless of the OS vendor's stance on the OS level they are using.

(My employer is an OS vendor, and when I have to round up an OS guru for
some help
with something and they happen to suggest that we remove some cruft for
supporting an 
out-of-service level of the OS, I give 'em hell :) )

> You could add a #if (OpenBSD >= 199912) if you really want.

Would you be so kind as to test such a patch and resubmit?

Thanks,

Jeff

-- 
Jeff Trawick

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Henning Brauer <hb...@bsws.de>.
On Tue, Sep 10, 2002 at 07:12:56AM -0400, Jeff Trawick wrote:
> Henning Brauer <hb...@bsws.de> writes:
> > +#define NET_SIZE_T socklen_t
> Does this hold for every level of OpenBSD, or is a version check
> necessary?

all versions >= 2.6 have socklen_t.

Given that We don't support anything below 3.0 any more... ;-)

You could add a #if (OpenBSD >= 199912) if you really want.

Re: [PATCH] 1.3 NET_SIZE_T is socklen_t on OpenBSD

Posted by Jeff Trawick <tr...@attglobal.net>.
Does this hold for every level of OpenBSD, or is a version check
necessary?

Henning Brauer <hb...@bsws.de> writes:

> Index: src/include/ap_config.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v
> retrieving revision 1.13
> diff -u -r1.13 ap_config.h
> --- src/include/ap_config.h	19 Jul 2002 21:31:15 -0000	1.13
> +++ src/include/ap_config.h	6 Sep 2002 19:16:23 -0000
> @@ -692,6 +692,7 @@
>  #if defined __OpenBSD__
>  #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
>  #define USE_SYSVSEM_SERIALIZED_ACCEPT
> +#define NET_SIZE_T socklen_t
>  #endif
>  #define HAVE_FLOCK_SERIALIZED_ACCEPT
>  #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> 

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...