.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-11-15 by aeb
.\"
-.TH GETGRNAM 3 2010-10-21 "" "Linux Programmer's Manual"
+.TH GETGRNAM 3 2012-04-23 "" "Linux Programmer's Manual"
.SH NAME
getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
.SH SYNOPSIS
was found or an error occurred) is stored in
.IR *result .
.PP
-The maximum needed size for
-.I buf
-can be found using
-.BR sysconf (3)
-with the argument
-.BR _SC_GETGR_R_SIZE_MAX .
+The call
+
+ sysconf(_SC_GETGR_R_SIZE_MAX)
+
+returns either \-1, without changing
+.IR errno ,
+or an initial suggested size for
+.IR buf .
+(If this size is too small,
+the call fails with
+.BR ERANGE ,
+in which case the caller can retry with a larger buffer.)
.SH "RETURN VALUE"
The
.BR getgrnam ()