Commit de2a67b4 authored by Daniel Veillard's avatar Daniel Veillard

Applying IPv6 patch from Archana Shah <archana.shah@wipro.com>

closing bug #114837

* configure.in: Added checks for IPv6 support and getaddrinfo().

* acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6.

* config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6.

* nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage
  field or sockaddr_in field, depending upon the availability of IPv6
  support.
  have_ipv6(): Added to check for run-time IPv6 support.
  (xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy):
  Modified to parse a URI with IPv6 address given in [].
  (xmlNanoFTPConnect): Changed to use getaddrinfo for address
  resolution, if it is available on the system, as gethostbyname
  does not return IPv6 addresses on some platforms.
  (xmlNanoFTPGetConnection): Modified type of dataAddr variable to
  sockaddr_storage or sockaddr_in depending upon the IPv6 support.
  Sending EPSV, EPRT or PASV, PORT depending upon the type of address
  we are dealing with.

* nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support.
  (xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse
  a URI with IPv6 address given in [].
  (xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is
  available on the system. Also IPv6 addresses will be resolved by
  gethostbyname only if IPv6 run-time support is available.
  (xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address.

Daniel
parent e8b5b0f1
Sat Jun 21 16:10:24 CEST 2003 Daniel Veillard <daniel@veillard.com>
Applying IPv6 patch from Archana Shah <archana.shah@wipro.com>
closing bug #114837
* configure.in: Added checks for IPv6 support and getaddrinfo().
* acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6.
* config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6.
* nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage
field or sockaddr_in field, depending upon the availability of IPv6
support.
have_ipv6(): Added to check for run-time IPv6 support.
(xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy):
Modified to parse a URI with IPv6 address given in [].
(xmlNanoFTPConnect): Changed to use getaddrinfo for address
resolution, if it is available on the system, as gethostbyname
does not return IPv6 addresses on some platforms.
(xmlNanoFTPGetConnection): Modified type of dataAddr variable to
sockaddr_storage or sockaddr_in depending upon the IPv6 support.
Sending EPSV, EPRT or PASV, PORT depending upon the type of address
we are dealing with.
* nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support.
(xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse
a URI with IPv6 address given in [].
(xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is
available on the system. Also IPv6 addresses will be resolved by
gethostbyname only if IPv6 run-time support is available.
(xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address.
Sat Jun 14 18:46:51 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
* win32/configure.js include/win32config.h
......
......@@ -9,3 +9,9 @@
#undef SOCKLEN_T
#undef HAVE_LIBPTHREAD
#undef HAVE_PTHREAD_H
/* Define if IPV6 support is there */
#undef SUPPORT_IP6
/* Define if getaddrinfo is there */
#undef HAVE_GETADDRINFO
......@@ -11,6 +11,12 @@
#undef HAVE_LIBPTHREAD
#undef HAVE_PTHREAD_H
/* Define if IPv6 support is there. */
#undef SUPPORT_IP6
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the <ansidecl.h> header file. */
#undef HAVE_ANSIDECL_H
......
......@@ -192,6 +192,42 @@ AC_TRY_COMPILE2([
AC_MSG_WARN(could not determine)])])])
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T)
dnl ***********************Checking for availability of IPv6*******************
AC_MSG_CHECKING([whether to enable IPv6])
AC_ARG_ENABLE(ipv6, [ --enable-ipv6=[yes/no] enables compilation of IPv6 code],, enable_ipv6=yes)
if test $enable_ipv6 = yes; then
have_ipv6=no
AC_TRY_COMPILE([
#include <sys/socket.h>
#include <sys/types.h>], [
struct sockaddr_storage ss;
socket(AF_INET6, SOCK_STREAM, 0)
],
have_ipv6=yes,
have_ipv6=no
)
AC_MSG_RESULT($have_ipv6)
if test $have_ipv6=yes; then
AC_DEFINE(SUPPORT_IP6)
have_getaddrinfo=no
AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
if test $have_getaddrinfo != yes; then
for lib in bsd socket inet; do
AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
done
fi
if test $have_getaddrinfo=yes; then
AC_DEFINE(HAVE_GETADDRINFO)
fi
fi
fi
dnl ******************************End IPv6 checks******************************
dnl Checks for isnan in libm if not in libc
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
[AC_DEFINE(HAVE_ISNAN)]))
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment