cvs: php4 /ext/standard dns.c

From: Date: Thu, 27 Dec 2001 15:42:05 +0000
Subject: cvs: php4 /ext/standard dns.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8834@lists.php.net to get a copy of this message
kalowsky Thu Dec 27 10:42:05 2001 EDT Modified files: /php4/ext/standard dns.c Log: Making PHP compile again on MacOSX 10.1 # 10.1 does not have inet_pton support yet it seems so disabling it. Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.36 php4/ext/standard/dns.c:1.37 --- php4/ext/standard/dns.c:1.36 Tue Dec 11 10:30:29 2001 +++ php4/ext/standard/dns.c Thu Dec 27 10:42:05 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.36 2001/12/11 15:30:29 sebastian Exp $ */ +/* $Id: dns.c,v 1.37 2001/12/27 15:42:05 kalowsky Exp $ */ /* {{{ includes */ @@ -82,7 +82,9 @@ addr = php_gethostbyaddr(Z_STRVAL_PP(arg)); if(addr == NULL) { -#if HAVE_IPV6 +#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) */ php_error(E_WARNING, "Address is not a valid IPv4 or IPv6 address"); #else php_error(E_WARNING, "Address is not in a.b.c.d form"); @@ -98,13 +100,17 @@ */ static char *php_gethostbyaddr(char *ip) { -#if HAVE_IPV6 +#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) */ struct in6_addr addr6; #endif struct in_addr addr; struct hostent *hp; -#if HAVE_IPV6 +#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 (inet_pton(AF_INET6, ip, &addr6)) { hp = gethostbyaddr((char *) &addr6, sizeof(addr6), AF_INET6); } else if (inet_pton(AF_INET, ip, &addr)) {

« previous php.cvs (#8834) next »