sniper Sun Feb 23 19:09:18 2003 EDT Modified files: /php4/ext/standard basic_functions.c dns.c dns.h Log: Extra paranoia checks if dn_skipname/dn_expand exist or not Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.586 php4/ext/standard/basic_functions.c:1.587 --- php4/ext/standard/basic_functions.c:1.586 Sat Feb 22 15:35:22 2003 +++ php4/ext/standard/basic_functions.c Sun Feb 23 19:09:18 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.586 2003/02/22 20:35:22 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.587 2003/02/24 00:09:18 sniper Exp $ */ #include "php.h" #include "php_streams.h" @@ -598,8 +598,10 @@ #if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE)) PHP_FE(dns_check_record, NULL) PHP_FALIAS(checkdnsrr, dns_check_record, NULL) +# if HAVE_DN_SKIPNAME && HAVE_DN_EXPAND PHP_FE(dns_get_mx, second_and_third_args_force_ref) PHP_FALIAS(getmxrr, dns_get_mx, second_and_third_args_force_ref) +# endif # if HAVE_DNS_FUNCS PHP_FE(dns_get_record, third_and_rest_force_ref) # endif Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.56 php4/ext/standard/dns.c:1.57 --- php4/ext/standard/dns.c:1.56 Fri Feb 21 03:45:58 2003 +++ php4/ext/standard/dns.c Sun Feb 23 19:09:18 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.56 2003/02/21 08:45:58 sniper Exp $ */ +/* $Id: dns.c,v 1.57 2003/02/24 00:09:18 sniper Exp $ */ /* {{{ includes */ #include "php.h" @@ -632,6 +632,7 @@ /* }}} */ #endif /* HAVE_DNS_FUNCS */ +#if HAVE_DN_SKIPNAME && HAVE_DN_EXPAND /* {{{ proto bool dns_get_mx(string hostname, array mxhosts [, array weight]) Get MX records corresponding to a given Internet host name */ PHP_FUNCTION(dns_get_mx) @@ -712,6 +713,7 @@ RETURN_TRUE; } /* }}} */ +#endif /* HAVE_DN_SKIPNAME && HAVE_DN_EXPAND */ #endif /* HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) */ Index: php4/ext/standard/dns.h diff -u php4/ext/standard/dns.h:1.14 php4/ext/standard/dns.h:1.15 --- php4/ext/standard/dns.h:1.14 Fri Feb 21 03:45:58 2003 +++ php4/ext/standard/dns.h Sun Feb 23 19:09:18 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.h,v 1.14 2003/02/21 08:45:58 sniper Exp $ */ +/* $Id: dns.h,v 1.15 2003/02/24 00:09:18 sniper Exp $ */ #ifndef DNS_H #define DNS_H @@ -34,7 +34,9 @@ #if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32)) PHP_FUNCTION(dns_check_record); +# if HAVE_DN_SKIPNAME && HAVE_DN_EXPAND PHP_FUNCTION(dns_get_mx); +# endif # if HAVE_DNS_FUNCS
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php