Date: Sun, 9 Jun 2002 20:56:57 -0400 From: Mike Barcroft <mike@FreeBSD.org> To: "Greg 'groggy' Lehey" <grog@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include pwd.h Message-ID: <20020609205657.B51371@espresso.q9media.com> In-Reply-To: <20020610004026.GD61036@wantadilla.lemis.com>; from grog@FreeBSD.org on Mon, Jun 10, 2002 at 10:10:26AM %2B0930 References: <200206091939.g59JdJC05285@freefall.freebsd.org> <20020610004026.GD61036@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg 'groggy' Lehey <grog@FreeBSD.org> 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 <sys/types.h>, 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, <sys/types.h> 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 <sys/types.h> 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, <sys/types.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020609205657.B51371>