Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2000 22:04:58 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp>
Cc:        bmah@CA.Sandia.GOV, nnd@mail.nsk.ru, current@FreeBSD.ORG
Subject:   Re: 'machine/param.h' required for 'sys/socket.h' 
Message-ID:  <Pine.BSF.4.21.0003292152540.1861-100000@alphplex.bde.org>
In-Reply-To: <20000329003050L.shin@nd.net.fujitsu.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Mar 2000, Yoshinobu Inoue wrote:

> > > sys/socket.h:
> > > #ifdef  _NO_NAME_SPACE_POLLUTION
> > > #include <machine/param.h>
> > > #else
> > > #define _NO_NAME_SPACE_POLLUTION
> > > #include <machine/param.h>
> > > #undef _NO_NAME_SPACE_POLLUTION
> > > #endif
> > 
> > I like this for a quick fix.  Only define _ALIGN() like the current
> > ALIGN().  Don't define all the variants given in your previous mail.
> 
> I created the patches.
> It become a little bit more complicated than I expected, to
> avoid duplicated inclusion independently in each of namespace
> polluted part and non polluted part.

Now I don't like this for a quick fix :-).  It is more complicated than
a correct fix.

I think it would be OK without any anti-redefinition ifdefs.  Redefinition
is only a micro-pessimization since there are only #define's (no
typedefs, etc.) and won't occur often since <machine/param.h> should only
be included by <sys/param.h>, <sys/pipe.h> and <sys/socket.h>.  Reinclusion
can be optimized in the including file using e.g. #ifndef _ALIGN in
<sys/socket.h>.

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003292152540.1861-100000>