.\" Modified 2003-11-15 by aeb
.\" 2008-11-07, mtk, Added an example program for getpwnam_r().
.\"
-.TH GETPWNAM 3 2010-10-21 "GNU" "Linux Programmer's Manual"
+.TH GETPWNAM 3 2012-04-23 "GNU" "Linux Programmer's Manual"
.SH NAME
getpwnam, getpwnam_r, getpwuid, getpwuid_r \- get password file entry
.SH SYNOPSIS
was found or an error occurred) is stored in
.IR *result .
.PP
-The maximum size needed for
-.I buf
-can be found using
-.BR sysconf (3)
-with the argument
-.BR _SC_GETPW_R_SIZE_MAX .
+The call
+
+ sysconf(_SC_GETPW_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 getpwnam ()