summaryrefslogtreecommitdiff
path: root/modules/arpa_inet
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-09-17 15:09:53 +0200
committerBruno Haible <bruno@clisp.org>2011-09-17 15:09:53 +0200
commite7df8796cf84f5d0d06c2a49067e24bcb1cf0551 (patch)
tree7fb684b880f1419461ad4144c732aec4161bca5c /modules/arpa_inet
parent91d0cb58387e1e52b7023bcd0b01c1337c0fb9c8 (diff)
downloadgnulib-e7df8796cf84f5d0d06c2a49067e24bcb1cf0551.tar.gz
inet_pton: Support for MSVC on Windows Vista or newer.
* lib/arpa_inet.in.h (inet_pton): Also consider REPLACE_INET_PTON. * lib/inet_pton.c (rpl_inet_pton): Use a simple wrapper if HAVE_DECL_INET_PTON is defined. * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Invoke gl_PREREQ_SYS_H_WINSOCK2. On platforms with <winsock2.h>, test whether inet_pton is declared in <ws2tcpip.h>. If so, arrange to replace it. * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize REPLACE_INET_PTON. * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_PTON. * modules/inet_pton (Files): Add m4/sys_socket_h.m4. (Depends-on, configure.ac): Update condition. * doc/posix-functions/inet_pton.texi: Mention the MSVC problem.
Diffstat (limited to 'modules/arpa_inet')
-rw-r--r--modules/arpa_inet1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/arpa_inet b/modules/arpa_inet
index ac339e6aa5..005690fefa 100644
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -37,6 +37,7 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
-e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
-e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
-e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
+ -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \