From owner-svn-src-stable@FreeBSD.ORG Wed Jul 16 08:52:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DDC112D; Wed, 16 Jul 2014 08:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B0732F30; Wed, 16 Jul 2014 08:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6G8qipV054661; Wed, 16 Jul 2014 08:52:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6G8qiiE054660; Wed, 16 Jul 2014 08:52:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407160852.s6G8qiiE054660@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 16 Jul 2014 08:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268741 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 08:52:44 -0000 Author: kib Date: Wed Jul 16 08:52:44 2014 New Revision: 268741 URL: http://svnweb.freebsd.org/changeset/base/268741 Log: MFC r268467: Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX). Modified: stable/10/lib/libc/gen/sysconf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sysconf.c ============================================================================== --- stable/10/lib/libc/gen/sysconf.c Wed Jul 16 06:25:44 2014 (r268740) +++ stable/10/lib/libc/gen/sysconf.c Wed Jul 16 08:52:44 2014 (r268741) @@ -367,11 +367,17 @@ yesno: * _POSIX_FILE_LOCKING, so we can't answer this one. */ #endif -#if _POSIX_THREAD_SAFE_FUNCTIONS > -1 + + /* + * SUSv4tc1 says the following about _SC_GETGR_R_SIZE_MAX and + * _SC_GETPW_R_SIZE_MAX: + * Note that sysconf(_SC_GETGR_R_SIZE_MAX) may return -1 if + * there is no hard limit on the size of the buffer needed to + * store all the groups returned. + */ case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: -#error "somebody needs to implement this" -#endif + return (-1); case _SC_HOST_NAME_MAX: return (MAXHOSTNAMELEN - 1); /* does not include \0 */ case _SC_LOGIN_NAME_MAX: