Include <config.h>.
[gnulib.git] / lib / getaddrinfo.h
index 5955323..955833a 100644 (file)
@@ -1,5 +1,5 @@
 /* Get address information.
-   Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Simon Josefsson <simon@josefsson.org>.
 
    This program is free software; you can redistribute it and/or modify
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef GETADDRINFO_H
 # define GETADDRINFO_H
 
-/* Get getaddrinfo declarations, if available. */
+/* Get getaddrinfo declarations, if available.  Also get 'socklen_t',
+   and 'struct sockaddr' via sys/types.h which are used below. */
+# include <sys/types.h>
 # include <sys/socket.h>
 # include <netdb.h>
 
 # if defined HAVE_GETADDRINFO && !HAVE_GETADDRINFO
 
-/* Get socklen_t, struct sockaddr. */
-#  include <sys/types.h>
-
 /* Structure to contain information about address of a service provider.  */
 struct addrinfo
 {
@@ -73,16 +72,22 @@ struct addrinfo
 # endif
 
 /* Translate name of a service location and/or a service name to set of
-   socket addresses.  */
+   socket addresses.
+   For more details, see the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
 extern int getaddrinfo (const char *restrict nodename,
                        const char *restrict servname,
                        const struct addrinfo *restrict hints,
                        struct addrinfo **restrict res);
 
-/* Free `addrinfo' structure AI including associated storage.  */
+/* Free `addrinfo' structure AI including associated storage.
+   For more details, see the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
 extern void freeaddrinfo (struct addrinfo *ai);
 
-/* Convert error return from getaddrinfo() to a string.  */
+/* Convert error return from getaddrinfo() to a string.
+   For more details, see the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/gai_strerror.html>.  */
 extern const char *gai_strerror (int ecode);
 
 # endif