Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 12:08:59 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        "Andrey A. Chernov" <ache@nagual.pp.ru>, Sheldon Hearn <sheldonh@starjuice.net>, Maxim Sobolev <sobomax@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>, <hackers@FreeBSD.org>
Subject:   Re: <sys/types.h> or not <sys/types.h>? [Was: cvs commit: src/include grp.h]
Message-ID:  <20020226115508.T42756-100000@gamplex.bde.org>
In-Reply-To: <20020225144003.GA50785@walton.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Feb 2002, David Malone wrote:

> I note that in the footnotes for getgrgid, in the section for "issue
> 6" of the standard:
>
> 	The requirement to include <sys/types.h> has been removed.
> 	Although <sys/types.h> was required for conforming
> 	implementations of previous POSIX specifications, it was
> 	not required for UNIX applications.
>
> Curiously, this seems to say the opposit of what you actually see
> in SUSv2, as it lists <sys/types.h> as a prerequisit.

This is probably because SUSv2 is almost as old as POSIX.1-1996 (which
has the prerequisite).

BTW, <unistd.h> has the same prerequisite, but our version of <unistd.h>
is polluted with an include of <sys.types.h>.  Nevertheless, we fixed
several man pages to document the old-POSIX requirements.  E.g.:

    RCS file: /home/ncvs/src/lib/libc/sys/fork.2,v
    Working file: fork.2
    head: 1.14
    ...
    ----------------------------
    revision 1.7
    date: 1998/01/11 16:51:49;  author: alex;  state: Exp;  lines: +4 -1
    branches:  1.7.2;
    Add <sys/types.h> to synopsis.
    Correct a grammatical error.
    Add cross-reference to setrlimit(2).

    Obtained from:	OpenBSD
    ----------------------------

ISTR that most of the fixes came from OpenBSD.  I haven't attempted to
fix unistd.h since its pollution is old.  I only police new pollution
and must have been asleep when we broke several man pages to undocument
the old-POSIX requirements.  E.g.:

    RCS file: /home/ncvs/src/lib/libc/sys/setsid.2,v
    Working file: setsid.2
    head: 1.12
    ...
    ----------------------------
    revision 1.6
    date: 1997/04/08 10:43:47;  author: peter;  state: Exp;  lines: +1 -1
    setsid is declared in <unistd.h>, which is self sufficient (doesn't need
    prior <sys/types.h>)

    Fixes PR#3229, from Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
    ----------------------------

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020226115508.T42756-100000>