From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 18:35:14 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 702D316A41F; Fri, 19 Aug 2005 18:35:14 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep18-int.chello.at (viefep18-int.chello.at [213.46.255.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 554D543D45; Fri, 19 Aug 2005 18:35:13 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep18-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050819183511.CWWY17761.viefep18-int.chello.at@wombat.fafoe.narf.at>; Fri, 19 Aug 2005 20:35:11 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 65811F6; Fri, 19 Aug 2005 20:35:10 +0200 (CEST) Date: Fri, 19 Aug 2005 20:35:10 +0200 From: Stefan Farfeleder To: Bruce Evans Message-ID: <20050819183507.GE77069@wombat.fafoe.narf.at> Mail-Followup-To: Bruce Evans , standards@FreeBSD.org, threads@FreeBSD.org References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050819231640.E2640@epsplex.bde.org> User-Agent: Mutt/1.5.9i Cc: threads@FreeBSD.org, standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 18:35:14 -0000 [threads@ added] On Sat, Aug 20, 2005 at 12:04:56AM +1000, Bruce Evans wrote: > 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) ^^^^^^ Actually POSIX kind of requires the inclusion of (and ). At least all symbols must be visible. > > 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. Removed, size_t is obtained via . > 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. I've include (for __uint32_t) and instead. timespec is declared through . > Just namespace pollution. We need MINSIGSTKSZ from though. The patch includes that header instead and protects its usage with __XSI_VISIBLE. I'm not happy with this, maybe MINSIGSTKSZ should be moved somewhere else? > Just namespace pollution. is included instead and __ULONG_MAX is used. > only used to declare struct sched_param and to > satisfy a POSIX mistake. A forward declaration > would suffice. Left because POSIX says so. The patch for is at http://people.freebsd.org/~stefanf/pthread.h.diff . There are a few files that need , , etc symbols and get them by inclusion, the patch at http://people.freebsd.org/~stefanf/pthread.h-2.diff fixes that. It should probably be committed anyway. Stefan