summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2014-07-09 19:12:18 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2014-07-09 19:12:18 +0000
commita028ee5c9f341f69861256e0bde1f2001bcbeac7 (patch)
tree44dad82c092bfcfd2754a45f7d905d3eefed69c2
parenta91831a2616efe8f54f1581263071600ed0a1d0a (diff)
Notes
-rw-r--r--lib/libc/gen/sysconf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index b7952b107c38..2b3acfb5db74 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -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: