cvs: php4 / configure.in /main network.c

From: Date: Sat, 17 Aug 2002 13:56:39 +0000
Subject: cvs: php4 / configure.in /main network.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13435@lists.php.net to get a copy of this message
venaas Sat Aug 17 09:56:39 2002 EDT Modified files: /php4 configure.in /php4/main network.c Log: Added --enable-ipv6 and only look up AAAA in DNS when enabled Index: php4/configure.in diff -u php4/configure.in:1.367 php4/configure.in:1.368 --- php4/configure.in:1.367 Fri Aug 9 17:02:36 2002 +++ php4/configure.in Sat Aug 17 09:56:39 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.367 2002/08/09 21:02:36 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.368 2002/08/17 13:56:39 venaas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -410,9 +410,6 @@ #include <sys/socket.h> #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;], [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])]) -if test "$ac_cv_ipv6_support" = yes; then - AC_DEFINE(HAVE_IPV6,1,[Whether you have IPv6 support]) -fi @@ -690,6 +687,13 @@ ], [ AC_MSG_ERROR([Problem with enabling dmalloc. Please check config.log for details.]) ]) +fi + +PHP_ARG_ENABLE(ipv6,whether to enable IPv6 support, +[ --enable-ipv6 Enable IPv6 support],yes) + +if test "$PHP_IPV6" != "no" && test "$ac_cv_ipv6_support" = yes; then + AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support]) fi AC_CHECK_LIB(crypt, crypt, [ Index: php4/main/network.c diff -u php4/main/network.c:1.59 php4/main/network.c:1.60 --- php4/main/network.c:1.59 Tue Aug 13 10:56:50 2002 +++ php4/main/network.c Sat Aug 17 09:56:39 2002 @@ -15,7 +15,7 @@ | Author: Stig Venaas <venaas@uninett.no> | +----------------------------------------------------------------------+ */ -/* $Id: network.c,v 1.59 2002/08/13 14:56:50 kalowsky Exp $ */ +/* $Id: network.c,v 1.60 2002/08/17 13:56:39 venaas Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ #define MAX_CHUNKS_PER_READ 10 @@ -157,7 +157,11 @@ struct addrinfo hints, *res, *sai; memset(&hints, '\0', sizeof(hints)); +# ifdef HAVE_IPV6 hints.ai_family = AF_UNSPEC; +# else + hints.ai_family = AF_INET; +# endif if ((n = getaddrinfo(host, NULL, &hints, &res))) { php_error(E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n)); return 0;

« previous php.cvs (#13435) next »