From owner-freebsd-standards@FreeBSD.ORG Sun Jan 27 18:20:03 2008 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D4D16A419 for ; Sun, 27 Jan 2008 18:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 39A3513C459 for ; Sun, 27 Jan 2008 18:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0RIK2fF029109 for ; Sun, 27 Jan 2008 18:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0RIK2kP029108; Sun, 27 Jan 2008 18:20:02 GMT (envelope-from gnats) Date: Sun, 27 Jan 2008 18:20:02 GMT Message-Id: <200801271820.m0RIK2kP029108@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Garrett Wollman Cc: Subject: Re: docs/26003: getgroups(2) lists NGROUPS_MAX but not syslimits.h X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Wollman List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2008 18:20:03 -0000 The following reply was made to PR docs/26003; it has been noted by GNATS. From: Garrett Wollman To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: docs/26003: getgroups(2) lists NGROUPS_MAX but not syslimits.h Date: Sun, 27 Jan 2008 12:58:03 -0500 < said: > one (to be unportable by hard-coding NGROUPS_MAX). The includes are > already sufficient for using {NGROUPS_MAX} in its portable form > sysconf(_SC_NGROUPS_MAX), except you will also need malloc(). > for using malloc() is another include that doesn't belong in the > synopsis. What Bruce said. It would be better for constants such as this to be left completely undefined (at least when not compiling the kernel) -- although there is the inevitable tension between handling these limits correctly and handling broken applications that do things like #ifndef NGROUPS_MAX #define NGROUPS_MAX 8 #endif Those applications, at least, are clearly wrong, so my vote would be on the side of breaking the applications and doing the Right Thing by not defining NGROUPS_MAX. -GAWollman