markonen Fri Oct 24 13:09:37 2003 EDT Modified files: /php-src configure.in /php-src/ext/standard dns.c Log: Workaround for bug #25955 Generalized a Darwin check in dns.c to a check for inet_pton() (kalowsky) Index: php-src/configure.in diff -u php-src/configure.in:1.473 php-src/configure.in:1.474 --- php-src/configure.in:1.473 Wed Oct 22 17:43:39 2003 +++ php-src/configure.in Fri Oct 24 13:09:35 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.473 2003/10/22 21:43:39 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.474 2003/10/24 17:09:35 markonen Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -189,6 +189,7 @@ CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";; *darwin*|*rhapsody*) CPPFLAGS="$CPPFLAGS -no-cpp-precomp" + AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther]) php_multiple_shlib_versions_ok=yes;; *beos*) beos_threads=1 @@ -480,6 +481,7 @@ gmtime_r \ inet_ntoa \ inet_ntop \ +inet_pton \ isascii \ link \ localtime_r \ Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.63 php-src/ext/standard/dns.c:1.64 --- php-src/ext/standard/dns.c:1.63 Fri Sep 26 04:09:55 2003 +++ php-src/ext/standard/dns.c Fri Oct 24 13:09:36 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.63 2003/09/26 08:09:55 hholzgra Exp $ */ +/* $Id: dns.c,v 1.64 2003/10/24 17:09:36 markonen Exp $ */ /* {{{ includes */ #include "php.h" @@ -90,9 +90,7 @@ addr = php_gethostbyaddr(Z_STRVAL_PP(arg)); if(addr == NULL) { -#if HAVE_IPV6 && !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 && HAVE_INET_PTON php_error_docref(NULL TSRMLS_CC, E_WARNING, "Address is not a valid IPv4 or IPv6 address"); #else php_error_docref(NULL TSRMLS_CC, E_WARNING, "Address is not in a.b.c.d form"); @@ -107,17 +105,13 @@ /* {{{ php_gethostbyaddr */ static char *php_gethostbyaddr(char *ip) { -#if HAVE_IPV6 && !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 && HAVE_INET_PTON struct in6_addr addr6; #endif struct in_addr addr; struct hostent *hp; -#if HAVE_IPV6 && !defined(__MacOSX__) -/* MacOSX at this time has support for IPv6, but not inet_pton() - * so disabling IPv6 until further notice. MacOSX 10.1.2 (kalowsky) */ +#if HAVE_IPV6 && HAVE_INET_PTON if (inet_pton(AF_INET6, ip, &addr6)) { hp = gethostbyaddr((char *) &addr6, sizeof(addr6), AF_INET6); } else if (inet_pton(AF_INET, ip, &addr)) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php