projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
[gnulib.git]
/
lib
/
getaddrinfo.c
diff --git
a/lib/getaddrinfo.c
b/lib/getaddrinfo.c
index
b9a7692
..
a6a4066
100644
(file)
--- a/
lib/getaddrinfo.c
+++ b/
lib/getaddrinfo.c
@@
-1,5
+1,5
@@
/* Get address information (partial implementation).
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001-2002, 2004-201
2
Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2002, 2004-201
3
Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify
Contributed by Simon Josefsson <simon@josefsson.org>.
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
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 <config.h>
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the sa == NULL test below. */
#define _GL_ARG_NONNULL(params)
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the sa == NULL test below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
#include <netdb.h>
#if HAVE_NETINET_IN_H
#include <netdb.h>
#if HAVE_NETINET_IN_H
@@
-56,13
+55,13
@@
#endif
#if defined _WIN32 || defined __WIN32__
#endif
#if defined _WIN32 || defined __WIN32__
-# define WIN
32
_NATIVE
+# define WIN
DOWS
_NATIVE
#endif
/* gl_sockets_startup */
#include "sockets.h"
#endif
/* gl_sockets_startup */
#include "sockets.h"
-#ifdef WIN
32
_NATIVE
+#ifdef WIN
DOWS
_NATIVE
typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
const struct addrinfo*,
struct addrinfo**);
typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
const struct addrinfo*,
struct addrinfo**);
@@
-110,7
+109,7
@@
use_win32_p (void)
}
#endif
}
#endif
-static
inline
bool
+static bool
validate_family (int family)
{
/* FIXME: Support more families. */
validate_family (int family)
{
/* FIXME: Support more families. */
@@
-153,7
+152,7
@@
getaddrinfo (const char *restrict nodename,
};
#endif
};
#endif
-#ifdef WIN
32
_NATIVE
+#ifdef WIN
DOWS
_NATIVE
if (use_win32_p ())
return getaddrinfo_ptr (nodename, servname, hints, res);
#endif
if (use_win32_p ())
return getaddrinfo_ptr (nodename, servname, hints, res);
#endif
@@
-332,11
+331,11
@@
getaddrinfo (const char *restrict nodename,
return 0;
}
return 0;
}
-/* Free
`
addrinfo' structure AI including associated storage. */
+/* Free
'
addrinfo' structure AI including associated storage. */
void
freeaddrinfo (struct addrinfo *ai)
{
void
freeaddrinfo (struct addrinfo *ai)
{
-#ifdef WIN
32
_NATIVE
+#ifdef WIN
DOWS
_NATIVE
if (use_win32_p ())
{
freeaddrinfo_ptr (ai);
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)
{
char *restrict service, socklen_t servicelen,
int flags)
{
-#ifdef WIN
32
_NATIVE
+#ifdef WIN
DOWS
_NATIVE
if (use_win32_p ())
return getnameinfo_ptr (sa, salen, node, nodelen,
service, servicelen, flags);
if (use_win32_p ())
return getnameinfo_ptr (sa, salen, node, nodelen,
service, servicelen, flags);