Update gethostbyname2_r documentation. Fixes bug #156.
authorYogesh Chaudhari <mr.yogesh@gmail.com>
Tue, 8 Oct 2013 19:42:42 +0000 (21:42 +0200)
committerOndřej Bílka <neleai@seznam.cz>
Tue, 8 Oct 2013 19:42:42 +0000 (21:42 +0200)
ChangeLog
NEWS
manual/socket.texi

index 8a39723..d423483 100644 (file)
--- 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 2273091..73fa9fe 100644 (file)
--- 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.
 
index e187402..25c35c4 100644 (file)
@@ -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