From owner-freebsd-doc Mon Jul 30 13:20: 6 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 24E0037B401 for ; Mon, 30 Jul 2001 13:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6UKK1K51013; Mon, 30 Jul 2001 13:20:01 -0700 (PDT) (envelope-from gnats) Date: Mon, 30 Jul 2001 13:20:01 -0700 (PDT) Message-Id: <200107302020.f6UKK1K51013@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: Jeroen Ruigrok/Asmodai Subject: Re: docs/26003: getgroups(2) lists NGROUPS_MAX but not syslimits.h Reply-To: Jeroen Ruigrok/Asmodai 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 The following reply was made to PR docs/26003; it has been noted by GNATS. 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 Date: Mon, 30 Jul 2001 22:01:47 +0200 -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