Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2002 21:12:43 -0400
From:      Mike Barcroft <mike@FreeBSD.ORG>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        "Greg 'groggy' Lehey" <grog@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/include pwd.h
Message-ID:  <20020609211243.C51371@espresso.q9media.com>
In-Reply-To: <200206100049.g5A0nr1P004846@apollo.backplane.com>; from dillon@apollo.backplane.com on Sun, Jun 09, 2002 at 05:49:53PM -0700
References:  <200206091939.g59JdJC05285@freefall.freebsd.org> <20020610004026.GD61036@wantadilla.lemis.com> <200206100049.g5A0nr1P004846@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon <dillon@apollo.backplane.com> writes:
>     And why is it conditional on _BSD_XXX_T being defined?  Either
>     pwd.h and password related routines need these types or they don't.
>     If they don't need them then the typedefs do not belong in pwd.h.
>     If they do need them then either the users must #include the properly
>     header file, or <pwd.h> must #include the proper header file.  You
>     don't want a 'some times it does this, sometimes it does that' type
>     of situation.

I guess you don't understand how _BSD_FOO_T_ works.  It provides a
means to typedef the same type in multiple headers.  Recommended
reading: <machine/ansi.h> and <sys/types.h>.

Why typedef things in multiple headers?  The standards require them.

>     The manual pages seem fairly clear.  If you look at something like
>     'man getgid' it clearly states that <sys/types.h> must be included
>     before <unistd.h>.
>
>     For password related calls, the manual page also quite clearly states
>     that <sys/types.h> must be included before <pwd.h>

Yes, this was how old BSD/POSIX worked.  It's very different in new
standards.  My changes won't affect any BSD software and only help
portability.

See my reply to Greg for more details.

>     For these reasons I would strongly recommend either reverting this change
>     and leaving at as it was, or removing <sys/types.h> from <pwd.h>
>     and *NOT* adding weird #ifdef's for gid_t, uid_t, etc, as the manual
>     page implies.

I don't hear you complaining about those weird #ifdef's in
<sys/types.h> :).  But seriously, Bruce's designed replacement will
get rid of those once I've implemented it.

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?20020609211243.C51371>