Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2002 17:49:53 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.ORG>
Cc:        Mike Barcroft <mike@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/include pwd.h
Message-ID:  <200206100049.g5A0nr1P004846@apollo.backplane.com>
References:  <200206091939.g59JdJC05285@freefall.freebsd.org> <20020610004026.GD61036@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help

:>   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?
:
:Greg
:--
:See complete headers for address and phone numbers

    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.

    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>

    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.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


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?200206100049.g5A0nr1P004846>