diff options
author | Bruno Haible <bruno@clisp.org> | 2011-09-17 15:09:53 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-09-17 15:09:53 +0200 |
commit | e7df8796cf84f5d0d06c2a49067e24bcb1cf0551 (patch) | |
tree | 7fb684b880f1419461ad4144c732aec4161bca5c /modules/inet_pton | |
parent | 91d0cb58387e1e52b7023bcd0b01c1337c0fb9c8 (diff) | |
download | gnulib-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/inet_pton')
-rw-r--r-- | modules/inet_pton | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/inet_pton b/modules/inet_pton index 7e64a66629..43cde40c23 100644 --- a/modules/inet_pton +++ b/modules/inet_pton @@ -8,14 +8,14 @@ m4/inet_pton.m4 Depends-on: arpa_inet extensions -c-ctype [test $HAVE_INET_PTON = 0] -sys_socket [test $HAVE_INET_PTON = 0] -errno [test $HAVE_INET_PTON = 0] -netinet_in [test $HAVE_INET_PTON = 0] +c-ctype [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1] +sys_socket [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1] +errno [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1] +netinet_in [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1] configure.ac: gl_FUNC_INET_PTON -if test $HAVE_INET_PTON = 0; then +if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then AC_LIBOBJ([inet_pton]) gl_PREREQ_INET_PTON fi |