From owner-freebsd-standards@FreeBSD.ORG Fri Aug 19 14:05:02 2005 Return-Path: X-Original-To: standards@FreeBSD.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 433EC16A41F; Fri, 19 Aug 2005 14:05:02 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E9AA43D55; Fri, 19 Aug 2005 14:05:00 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7JE4w2v013653; Sat, 20 Aug 2005 00:04:58 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7JE4u8W013507; Sat, 20 Aug 2005 00:04:57 +1000 Date: Sat, 20 Aug 2005 00:04:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Stefan Farfeleder In-Reply-To: <20050819093649.GU21905@wombat.fafoe.narf.at> Message-ID: <20050819231640.E2640@epsplex.bde.org> References: <20050819093649.GU21905@wombat.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 14:05:02 -0000 On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > I think some of the headers included by violate the POSIX > specification (I'm looking at SUSv3/POSIX 1003.1 2004) by making more > symbols visible than allowed. > > Ok > Ok > Ok > No? (POSIX allows which is a subset) > No? > No? > Ok > > Is this correct? Should it be fixed? All of these includes except and are wrong IMO: needed, but can be obtained as a side effect of including almost any other header in the list. only used to declare size_t. We handle this better in many other headers. The old draft of POSIX that I'm looking at doesn't say that declares size_t, so it might be conformant to use __size_t in the prototypes. Ok only used to declare sigset_t and struct timespec. We have a whole header, , to help declare sigset_t better (it only declares __sigset_t), and use it in many other headers. We have 2 headers, and , just to declare struct timespec, and use them in many other headers. Here we only need a forward declaration of struct timespec or maybe struct __timespec, modulo POSIX bugs. It is a bug in POSIX that is allowed. The old draft of POSIX doesn't say that declares sigset_t or struct timespec (just that it may declare the latter). This is unlike what it says for other headers. E.g., we use in to satisfy the POSIX mistake that a complete struct timespec must be declared there. Just namespace pollution. Just namespace pollution. only used to declare struct sched_param and to satisfy a POSIX mistake. A forward declaration would suffice. POSIX should say that size_t, sigset_t and struct timespec are completely declared, and then it would say that [low quality] implementations may declare everything else in the primary headers that declare these. Bruce