about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS3
-rw-r--r--manual/socket.texi19
3 files changed, 18 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a39723aca..d423483b9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-08  Yogesh Chaudhari  <mr.yogesh@gmail.com>
+
+	[BZ #156]
+	* manual/socket.texi: Added statement about buffer
+	for gethostbyname2_r.
+
 2013-10-08  Ondřej Bílka  <neleai@seznam.cz>
 
 	* sysdeps/x86_64/memset.S (ALIGN): Macro removed.
diff --git a/NEWS b/NEWS
index 2273091c33..73fa9fe23d 100644
--- a/NEWS
+++ b/NEWS
@@ -9,11 +9,10 @@ Version 2.19
 
 * The following bugs are resolved with this release:
 
-  431, 13982, 13985, 14155, 14547, 14699, 15048, 15400, 15427, 15522,
+  156, 431, 13982, 13985, 14155, 14547, 14699, 15048, 15400, 15427, 15522,
   15531, 15532, 15608, 15609, 15610, 15632, 15640, 15680, 15681, 15723,
   15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844, 15849,
   15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893,
-  15895, 15897, 15905, 15909, 15919, 15921, 15887, 15890, 15892, 15893,
   15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963, 15966,
   15988.
 
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