From owner-freebsd-current Sat Mar 25 7:44:16 2000 Delivered-To: freebsd-current@freebsd.org Received: from fgwmail6.fujitsu.co.jp (fgwmail6.fujitsu.co.jp [192.51.44.36]) by hub.freebsd.org (Postfix) with ESMTP id 365B137B679 for ; Sat, 25 Mar 2000 07:44:13 -0800 (PST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from m3.gw.fujitsu.co.jp by fgwmail6.fujitsu.co.jp (8.9.3/3.7W-MX0002-Fujitsu Gateway) id AAA12715; Sun, 26 Mar 2000 00:43:22 +0900 (JST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from incapgw.fujitsu.co.jp by m3.gw.fujitsu.co.jp (8.9.3/3.7W-0003-Fujitsu Domain Master) id AAA22533; Sun, 26 Mar 2000 00:43:21 +0900 (JST) Received: from localhost ([192.168.245.184]) by incapgw.fujitsu.co.jp (8.9.3/3.7W-0002) id AAA06469; Sun, 26 Mar 2000 00:43:19 +0900 (JST) To: bde@zeta.org.au Cc: bmah@CA.Sandia.GOV, nnd@mail.nsk.ru, current@FreeBSD.ORG Subject: Re: 'machine/param.h' required for 'sys/socket.h' In-Reply-To: References: <20000325202906C.shin@nd.net.fujitsu.co.jp> X-Mailer: Mew version 1.94 on Emacs 20.4 / Mule 4.0 (HANANOEN) X-Prom-Mew: Prom-Mew 1.93.4 (procmail reader for Mew) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000326004417L.shin@nd.net.fujitsu.co.jp> Date: Sun, 26 Mar 2000 00:44:17 +0900 From: Yoshinobu Inoue X-Dispatcher: imput version 990905(IM130) Lines: 53 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > Instead, CMSG* should use _ALIGN() and _ALIGN() should be implemented > > > somewhere that doesn't add any namespace pollution. We currently > > > use for things like this, but it is already too > > > overloaded. > > > OK, then how about creating machine/align.h? > > That approach in general would give too many headers. > > is more wrongly loaded than overloaded. It is used > to avoid certain namespace problems in general, not just ones in ANSI > headers. It is mainly used to avoid namespace problems with typedefs. > Typedefs should all be handled in , but currently > aren't because would give namespace pollution in > ANSI headers. I think headers like and > should define only names in the implementation namespace, so that they > can be used in standard headers. The standard headers then export > precisely the names specified by the applicable standard, if any. Then, how about defining a macro which specifies name space polluted part, for short term solution. machine/param.h: #ifdef _NO_NAME_SPACE_POLLUTION #define _ALIGN(x) ...... .... #else .... #endif sys/socket.h: #ifdef _NO_NAME_SPACE_POLLUTION #include #else #define _NO_NAME_SPACE_POLLUTION #include #undef _NO_NAME_SPACE_POLLUTION #endif The macro might be also handy for fixing each of apps which depends on current machine/param.h and machine/types.h one by one. It can be specified for each apps, each dir, or in make.conf. When all apps are fixed, then the macro and name space polluted part in machine/param.h and machine/types.h can be removed. Or am I still too optimistic? Yoshinobu Inoue To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message