about summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
authorYogesh Chaudhari <mr.yogesh@gmail.com>2013-10-08 21:42:42 +0200
committerOndřej Bílka <neleai@seznam.cz>2013-10-08 21:42:42 +0200
commitb86835ca92a1942ed08d8b5ee47498e711feaddb (patch)
treefa4151229252d075d8f7797e799fcd779fbcba51 /manual
parent7d0c5ed0fe4ea1230fd47710ff355faa125ba546 (diff)
downloadglibc-b86835ca92a1942ed08d8b5ee47498e711feaddb.tar.gz
glibc-b86835ca92a1942ed08d8b5ee47498e711feaddb.tar.xz
glibc-b86835ca92a1942ed08d8b5ee47498e711feaddb.zip
Update gethostbyname2_r documentation. Fixes bug #156.
Diffstat (limited to 'manual')
-rw-r--r--manual/socket.texi19
1 files changed, 11 insertions, 8 deletions
diff --git a/manual/socket.texi b/manual/socket.texi
index e187402abd..25c35c46b1 100644
--- a/manual/socket.texi
+++ b/manual/socket.texi
@@ -1290,14 +1290,17 @@ pointer and the size of the buffer in the @var{buf} and @var{buflen}
 parameters.
 
 A pointer to the buffer, in which the result is stored, is available in
-@code{*@var{result}} after the function call successfully returned.  If
-an error occurs or if no entry is found, the pointer @code{*@var{result}}
-is a null pointer.  Success is signalled by a zero return value.  If the
-function failed the return value is an error number.  In addition to the
-errors defined for @code{gethostbyname} it can also be @code{ERANGE}.
-In this case the call should be repeated with a larger buffer.
-Additional error information is not stored in the global variable
-@code{h_errno} but instead in the object pointed to by @var{h_errnop}.
+@code{*@var{result}} after the function call successfully returned. The
+buffer passed as the @var{buf} parameter can be freed only once the caller
+has finished with the result hostent struct, or has copied it including all
+the other memory that it points to. If an error occurs or if no entry is
+found, the pointer @code{*@var{result}} is a null pointer. Success is
+signalled by a zero return value.  If the function failed the return value
+is an error number.  In addition to the errors defined for
+@code{gethostbyname} it can also be @code{ERANGE}. In this case the call
+should be repeated with a larger buffer. Additional error information is
+not stored in the global variable @code{h_errno} but instead in the object
+pointed to by @var{h_errnop}.
 
 Here's a small example:
 @smallexample