X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetaddrinfo.h;h=7722c14ba1369969d440ea730e848398c2a2d6f9;hb=955a407e3c7dd91d6322a65747fb61403978c6a8;hp=54c9198bbb7f7e71ff231bc177c9c0fbf7839425;hpb=31fa87f9f25ae87e0a2898e885ac06a56be48334;p=gnulib.git diff --git a/lib/getaddrinfo.h b/lib/getaddrinfo.h index 54c9198bb..7722c14ba 100644 --- a/lib/getaddrinfo.h +++ b/lib/getaddrinfo.h @@ -1,5 +1,5 @@ /* Get address information. - Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Simon Josefsson . This program is free software; you can redistribute it and/or modify @@ -26,7 +26,9 @@ # include /* Get all getaddrinfo related declarations, if available. */ # include +#ifdef HAVE_NETDB_H # include +#endif # ifndef HAVE_STRUCT_ADDRINFO @@ -65,10 +67,18 @@ struct addrinfo # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ -# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ -# define EAI_SYSTEM -11 /* System error returned in `errno'. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ +#endif +# ifndef EAI_ADDRFAMILY +/* Not defined on mingw32. XXX May be incorrect? Perhaps it is never + returned? */ +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ +# endif +# ifndef EAI_SYSTEM +/* Not defined on mingw32. XXX May be incorrect? Perhaps it is never + returned? */ +# define EAI_SYSTEM -11 /* System error returned in `errno'. */ # endif # ifdef __USE_GNU @@ -82,7 +92,7 @@ struct addrinfo # endif # endif -# ifndef HAVE_DECL_GETADDRINFO +# if !HAVE_DECL_GETADDRINFO /* Translate name of a service location and/or a service name to set of socket addresses. For more details, see the POSIX:2001 specification @@ -93,14 +103,14 @@ extern int getaddrinfo (const char *restrict nodename, struct addrinfo **restrict res); # endif -# ifndef HAVE_DECL_FREEADDRINFO +# if !HAVE_DECL_FREEADDRINFO /* Free `addrinfo' structure AI including associated storage. For more details, see the POSIX:2001 specification . */ extern void freeaddrinfo (struct addrinfo *ai); # endif -# ifndef HAVE_DECL_GAI_STRERROR +# if !HAVE_DECL_GAI_STRERROR /* Convert error return from getaddrinfo() to a string. For more details, see the POSIX:2001 specification . */