From owner-freebsd-doc Mon Jul 30 13:13:35 2001 Delivered-To: freebsd-doc@freebsd.org Received: from amsfep13-int.chello.nl (unknown [213.46.243.23]) by hub.freebsd.org (Postfix) with ESMTP id 003B137B401; Mon, 30 Jul 2001 13:13:28 -0700 (PDT) (envelope-from asmodai@wxs.nl) Received: from daemon.chronias.ninth-circle.org ([62.163.96.180]) by amsfep13-int.chello.nl (InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with ESMTP id <20010730201029.EHOH24832.amsfep13-int.chello.nl@daemon.chronias.ninth-circle.org>; Mon, 30 Jul 2001 22:10:29 +0200 Received: (from asmodai@localhost) by daemon.chronias.ninth-circle.org (8.11.3/8.11.3) id f6UK1lf24192; Mon, 30 Jul 2001 22:01:47 +0200 (CEST) (envelope-from asmodai) Date: Mon, 30 Jul 2001 22:01:47 +0200 From: Jeroen Ruigrok/Asmodai To: Bruce Evans Cc: Robert Watson , dd@FreeBSD.org, freebsd-doc@FreeBSD.org, bde@FreeBSD.org, FreeBSD Gnats Subject: Re: docs/26003: getgroups(2) lists NGROUPS_MAX but not syslimits.h Message-ID: <20010730220147.H65558@daemon.ninth-circle.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.3.19i Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org -On [20010401 13:00], Bruce Evans (bde@zeta.org.au) wrote: >On Sat, 31 Mar 2001, Robert Watson wrote: > >> Dunno -- I guess this leads to a number of questions of specification-land >> -- is NGROUPS_MAX supposed to be exposed to the application, if so, how >> should the application go about including things to get the value, etc. >> Bruce might have a good answer, if not a correct one, so I've CC'd him >> :-). > >In POSIX.1-1996: > >1) NGROUPS_MAX is defined in . ( is BSD > implementation detail, so it shouldn't be documented.) > >2) NGROUPS_MAX is a "Run-Time Increasable Value". This means that > applications may find that the actual maximum number of groups is > larger than their compile time value of NGROUPS_MAX. The run time > maximum is given by sysconf(_SC_NGROUPS_MAX). > >3) Unlike some other POSIX limits, NGROUPS_MAX must be defined at > compile time, although its value is almost useless if its run time > value is larger. A footnote says that future revisions of POSIX.1 > are expected to permit omitting the definition of NGROUPS_MAX from > to indicate that its value is variable. Latest POSIX draft specifies: SYNOPSIS #include int getgroups(int gidsetsize, gid_t grouplist[]); [...] Applications writers should note that {NGROUPS_MAX} is not necessarily a constant on all implementations. [...] Issue 6 In the SYNOPSIS, the optional include of the header is removed. The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification: · The requirement to include has been removed. Although was required for conforming implementations of previous POSIX specifications, it was not required for UNIX applications. · A return value of 0 is not permitted, because {NGROUPS_MAX} cannot be 0. This is a FIPS requirement. -- Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|freebsd.org|xmach.org] Documentation nutter/C-rated Coder, finger asmodai@ninth-circle.dnsalias.net http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ The human race is challenged more than ever before to demonstrate our mastery -- not over nature but of ourselves... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message