X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetaddrinfo.c;h=9109d440f5ef094b60459ee6b5dde5b5b8abed59;hb=2dbdfc4b6f524d0d35151ec175010c497609318a;hp=ee89fa29cb1715e6b2ceab47ee0cb02009fab8ae;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index ee89fa29c..9109d440f 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -1,6 +1,5 @@ /* Get address information (partial implementation). - Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software - Foundation, Inc. + Copyright (C) 1997, 2001-2002, 2004-2011 Free Software Foundation, Inc. Contributed by Simon Josefsson . This program is free software; you can redistribute it and/or modify @@ -19,6 +18,10 @@ #include +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the sa == NULL test below. */ +#define _GL_ARG_NONNULL(params) + #include #if HAVE_NETINET_IN_H @@ -56,6 +59,9 @@ # define WIN32_NATIVE #endif +/* gl_sockets_startup */ +#include "sockets.h" + #ifdef WIN32_NATIVE typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, const struct addrinfo*, @@ -98,6 +104,8 @@ use_win32_p (void) return 0; } + gl_sockets_startup (SOCKETS_1_1); + return 1; } #endif @@ -348,10 +356,11 @@ freeaddrinfo (struct addrinfo *ai) } } -int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, - char *restrict node, socklen_t nodelen, - char *restrict service, socklen_t servicelen, - int flags) +int +getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags) { #ifdef WIN32_NATIVE if (use_win32_p ())