summaryrefslogtreecommitdiff
path: root/lib/arpa_inet.in.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-02-14 17:06:13 +0100
committerLudovic Courtès <ludo@gnu.org>2010-02-14 17:06:13 +0100
commit61cd9dc907b8a09990b14e9aeac7e20fe77cecc6 (patch)
tree8a843e84fae6ad63b58366dc30a5d4aeb96ae0cb /lib/arpa_inet.in.h
parent60b6a84f0f2d8d43491835a518463f4a8273bf87 (diff)
downloadguile-61cd9dc907b8a09990b14e9aeac7e20fe77cecc6.tar.gz
Use Gnulib's `getaddrinfo' module.
* m4/gnulib-cache.m4: Add `getaddrinfo'. * libguile/Makefile.am (libguile_la_LDFLAGS): Add `$(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB)'.
Diffstat (limited to 'lib/arpa_inet.in.h')
-rw-r--r--lib/arpa_inet.in.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h
index 3f2f841d7..8e6c6c5e2 100644
--- a/lib/arpa_inet.in.h
+++ b/lib/arpa_inet.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
- Copyright (C) 2005-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -19,8 +19,11 @@
#ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
- under MinGW. */
-#include <sys/socket.h>
+ under MinGW.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sys/socket.h>
+#endif
#if @HAVE_ARPA_INET_H@
@@ -36,10 +39,10 @@
#ifndef _GL_ARPA_INET_H
#define _GL_ARPA_INET_H
-/* The definition of GL_LINK_WARNING is copied here. */
-
/* The definition of _GL_ARG_NONNULL is copied here. */
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -67,10 +70,10 @@ extern const char *inet_ntop (int af, const void *restrict src,
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
-# define inet_ntop(af,src,dst,cnt) \
- (GL_LINK_WARNING ("inet_ntop is unportable - " \
- "use gnulib module inet_ntop for portability"), \
- inet_ntop (af, src, dst, cnt))
+# if HAVE_RAW_DECL_INET_NTOP
+_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
+ "use gnulib module inet_ntop for portability");
+# endif
#endif
#if @GNULIB_INET_PTON@
@@ -80,10 +83,10 @@ extern int inet_pton (int af, const char *restrict src, void *restrict dst)
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
-# define inet_pton(af,src,dst) \
- (GL_LINK_WARNING ("inet_pton is unportable - " \
- "use gnulib module inet_pton for portability"), \
- inet_pton (af, src, dst))
+# if HAVE_RAW_DECL_INET_PTON
+_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
+ "use gnulib module inet_pton for portability");
+# endif
#endif
#ifdef __cplusplus