From owner-cvs-all Sun Jun 9 17:59:16 2002 Delivered-To: cvs-all@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 9170737B492; Sun, 9 Jun 2002 17:59:01 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g5A0uwu70047; Sun, 9 Jun 2002 20:56:58 -0400 (EDT) (envelope-from mike) Date: Sun, 9 Jun 2002 20:56:57 -0400 From: Mike Barcroft To: "Greg 'groggy' Lehey" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include pwd.h Message-ID: <20020609205657.B51371@espresso.q9media.com> References: <200206091939.g59JdJC05285@freefall.freebsd.org> <20020610004026.GD61036@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020610004026.GD61036@wantadilla.lemis.com>; from grog@FreeBSD.org on Mon, Jun 10, 2002 at 10:10:26AM +0930 Organization: The FreeBSD Project Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greg 'groggy' Lehey writes: > On Sunday, 9 June 2002 at 12:39:18 -0700, Mike Barcroft wrote: > > mike 2002/06/09 12:39:18 PDT > > > > Modified files: > > include pwd.h > > Log: > > o Remove include of , it adds too much pollution; > > instead, add typedefs of only gid_t, time_t, and uid_t. > > Isn't this contrary to the intentions of header files? What happens > if one of these types changes? In BSD land, has always been a prerequisite for including most headers (see getpwent(3) for instance). The new standards remove this requirement and provide typedefs for types the header makes use of. In the case only gid_t and time_t are required, but since BSD extensions to the passwd struct make use of time_t, we also provide that typedef (which Garrett informs me is legal). I'm not sure why was ever included here; it's very unusual to see in 4.4BSD headers. In any event, it can't stay because, as the commit notes, adds too much pollution. If we start making use of foo_t in struct passwd do we need to provide a new typedef? Yes. Bruce has better design for handling all these typedefs that looks like it will be much cleaner to implement than all the _BSD_FOO_T_ stuff we have to deal with now. I'm going to write a prototype soon to see how well it works. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message