X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetaddrinfo.c;h=a6a4066323bd7edc3c82e3679645eb661de829d0;hb=43593319b31e6b0175b8eec4433bac744959822d;hp=b9a7692d87486472a23cc1ddc924ffff4e27135d;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index b9a7692d8..a6a406632 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -1,5 +1,5 @@ /* Get address information (partial implementation). - Copyright (C) 1997, 2001-2002, 2004-2012 Free Software Foundation, Inc. + Copyright (C) 1997, 2001-2002, 2004-2013 Free Software Foundation, Inc. Contributed by Simon Josefsson . This program is free software; you can redistribute it and/or modify @@ -13,15 +13,14 @@ GNU General Public License for more details. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include + along with this program; if not, see . */ /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the sa == NULL test below. */ #define _GL_ARG_NONNULL(params) +#include + #include #if HAVE_NETINET_IN_H @@ -56,13 +55,13 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif /* gl_sockets_startup */ #include "sockets.h" -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, const struct addrinfo*, struct addrinfo**); @@ -110,7 +109,7 @@ use_win32_p (void) } #endif -static inline bool +static bool validate_family (int family) { /* FIXME: Support more families. */ @@ -153,7 +152,7 @@ getaddrinfo (const char *restrict nodename, }; #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) return getaddrinfo_ptr (nodename, servname, hints, res); #endif @@ -332,11 +331,11 @@ getaddrinfo (const char *restrict nodename, return 0; } -/* Free `addrinfo' structure AI including associated storage. */ +/* Free 'addrinfo' structure AI including associated storage. */ void freeaddrinfo (struct addrinfo *ai) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) { freeaddrinfo_ptr (ai); @@ -362,7 +361,7 @@ getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, char *restrict service, socklen_t servicelen, int flags) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) return getnameinfo_ptr (sa, salen, node, nodelen, service, servicelen, flags);