Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 21:02:52 -0400
From:      Mike Barcroft <mike@freebsd.org>
To:        babkin@freebsd.org
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, "Greg 'groggy' Lehey" <grog@freebsd.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/include pwd.h
Message-ID:  <20020610210252.B90728@espresso.q9media.com>
In-Reply-To: <3D05364A.469A44A5@bellatlantic.net>; from babkin@bellatlantic.net on Mon, Jun 10, 2002 at 07:29:14PM -0400
References:  <200206091939.g59JdJC05285@freefall.freebsd.org> <20020610004026.GD61036@wantadilla.lemis.com> <200206100049.g5A0nr1P004846@apollo.backplane.com> <20020609211243.C51371@espresso.q9media.com> <200206100314.g5A3EjTt005317@apollo.backplane.com> <20020609232020.F51371@espresso.q9media.com> <3D05364A.469A44A5@bellatlantic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Babkin <babkin@bellatlantic.net> writes:
> Mike Barcroft wrote:
> > Well, POSIX and X/Open were merged into on standard POSIX.1-2001
> > aka SUSv3.  I think the requirements that the typedefs be in each
> > header comes from the X/Open side, but I'm sure Bruce or Garrett could
> > elaborate.
> 
> This (defining the types multiple times) is definitely not a part 
> of Unix95 nor Unix98. And the approach of defining the types multiple
> times looks very wrong to me.  It is absolutely bound to end up with
> types changed in some headers but not in the others. And I think that
> the whole argument about "namespace pollution" is completely bogus.

What I say can easily be verified with SUSv2:
http://www.opengroup.org/onlinepubs/007908799/xsh/pwd.h.html

I have a link to POSIX.1-2001/SUSv3 on the project's page if you're
also interesting in verifying that they didn't removing this
requirement from the latest edition:
http://www.FreeBSD.org/projects/c99/

Since the type is actually only defined in one place you need only
change it in one place.  Comments like these suggest that you haven't
actually read the commit diff, and that you don't understand how
_BSD_FOO_T_ works.

> > It won't do any harm to additionally include <sys/types.h>, but you
> > are right, they should be updated.
> 
> The standard way remove to the requirement of including <sys/types.h>
> before <unistd.h> is to include <sys/types.h> from inside <unistd.h>.

Including <sys/types.h> in each header would lead to a very poor,
though possibly compliant, implementation.  Though you should feel
free to start adding <sys/types.h> includes in various headers to
measure the effectiveness of BDE's namespace pollution radar. :)

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?20020610210252.B90728>