Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2000 22:04:02 +1100 (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.0003252142050.654-100000@alphplex.bde.org>
In-Reply-To: <20000325191659G.shin@nd.net.fujitsu.co.jp>

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

> ...
> There seems to be no message from bmah related to this, so I
> now add a follow-up here.
> 
> The authors' reply is that,
> 
> >The X/Open (as well as POSIX I think) man pages for sendmsg()
> >only list socket.h as an include file.
> >The old BSD man pages list both param.h and socket.h.
> 
> And, from `man sendmsg` on FreeBSD, only,
> 
> >SYNOPSIS
> >     #include <sys/types.h>
> >     #include <sys/socket.h>
> 
> are required.

Same in the not-so-old BSD man pages (Lite1).

> So I think machine/param.h should be included from
> sys/socket.h for more portability.

<machine/param.h> can't be included in any standard header
(except in <sys/param.h>) because it gives massive, undocumented
namespace pollution.  The macro `MACHINE' is especially likely
to conflict with an application macro.

Instead, CMSG* should use _ALIGN() and _ALIGN() should be implemented
somewhere that doesn't add any namespace pollution.  We currently
use <machine/ansi.h> for things like this, but it is already too
overloaded.

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.0003252142050.654-100000>