svn commit: r268743 - stable/9/lib/libc/gen

看板FB_svn作者時間11年前 (2014/07/16 17:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Author: kib Date: Wed Jul 16 08:58:38 2014 New Revision: 268743 URL: http://svnweb.freebsd.org/changeset/base/268743 Log: MFC r268467: Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX). Modified: stable/9/lib/libc/gen/sysconf.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sysconf.c ============================================================================== --- stable/9/lib/libc/gen/sysconf.c Wed Jul 16 08:55:53 2014 (r268742) +++ stable/9/lib/libc/gen/sysconf.c Wed Jul 16 08:58:38 2014 (r268743) @@ -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: _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
文章代碼(AID): #1JnZzFcA (FB_svn)