diff --git a/ChangeLog b/ChangeLog index c2249b2..ce089b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-05-17 Yogesh Chaudhari + + [BZ #156] + * manual/socket.texi: Added statement about buffer + for gethostbyname2_r. + 2013-05-13 Joseph Myers * math/libm-test.inc (struct test_fi_f_data): New type. diff --git a/manual/socket.texi b/manual/socket.texi index e187402..c3f82d9 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 [feedly mini]