Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 1995 08:03:59 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, wollman@lcs.mit.edu
Cc:        FreeBSD-current@freebsd.org, chuckr@glue.umd.edu, roberto@keltia.freenix.fr
Subject:   Re: Make world falling over
Message-ID:  <199510292103.IAA18433@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Right.  I forgot to say in my previous mail that <sys/sysctl.h> is now
>> almost self contained so the synopsis in sysctl.3 is now almost correct.
>> It is still necessary to include <sys/types.h> before <sys/sysctl.h>

>It's fairly well-established that you have to include <sys/types.h>
>before including any other sys/ header file, and has been that way for
>as long as I can remember.

This (bogus) requirement is usually documented (e.g., in stat.2).  POSIX
requires applications to include <sys/types.h> before all POSIX headers,
including before ones in /usr/include that traditionally don't require
it, e.g., <pwd.h>, <grp.h> and <fcntl.h>.  FreeBSD includes <sys/types.h>
in some of these headers for convenience.  <grp.h> uses explicit (wrong)
types instead of uid_t and gid_t, perhaps to avoid including <sys/types.h>.
<pwd.h> uses explicit (wrong) types instead of uid_t and gid_t, although
it includes <sys/types.h>.

Bruce



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