Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 10:57:55 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Maxim Sobolev <sobomax@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/include grp.h
Message-ID:  <20020226104226.U42559-100000@gamplex.bde.org>
In-Reply-To: <20020225140030.GD33818@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Feb 2002, Andrey A. Chernov wrote:

> On Mon, Feb 25, 2002 at 05:55:48 -0800, Maxim Sobolev wrote:
> > sobomax     2002/02/25 05:55:48 PST
> >
> >   Modified files:
> >     include              grp.h
> >   Log:
> >   Backout rev.1.5 - it seems that it's posixly correct that the program
> >   needs to include <sys/types.h> before <grp.h>.

Thanks.  You should have seen my recent 10-20 commits for dependencies on
namespace pollution in <sys/stat.h>, and some of my hundreds of commits
for namespace pollution not so recently.  I don't want any new namespace
pollution.

> No, it breaks POSIX compatibility, please back it out.

No, POSIX requires <sys/types.h> before <grp.h> for at least the following
functions: getgrid(), getgrnam().  By POSIX, I mean the only version of
POSIX that we really support (POSIX.1-1990).  POSIX.1-1996 has the same
requirement.  POSIX.1-2001 relaxes this requirement, but we don't come
close to supporting it.  Even in POSIX.1-1990, it is permitted for
<grp.h> to just work even if <sys/types.h> is not included before it,
but only broken programs depend on this.  Even in POSIX.1-1990, <grp.h>
could be implemented by including <sys/types.h> if <sys/types.h> had
no namespace pollution, unlike the FreeBSD version.  Only much more
broken programs depend on the details of the namespace pollution.

Recent changes did not affect this requirement.  Ports have had to
deal with this for almost 10 years, since <grp.h> has had a gid_t in
its prototope for getgrid() since rev.1.1.

Bruce


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?20020226104226.U42559-100000>