scottmac Thu, 06 Aug 2009 00:10:46 +
Revision: http://svn.php.net/viewvc?view=revisionrevision=286858
Log:
Remove usage of res_nmkquery and res_nsend. We essentially were just doing a
res_search() anyway, though now we use res_nsearch() with our own state.
This also adds support for using the high level dns.h API on OSX which in
turns allows use of bind9 (finally).
Changed paths:
U php/php-src/trunk/configure.in
U php/php-src/trunk/ext/standard/basic_functions.c
U php/php-src/trunk/ext/standard/config.m4
U php/php-src/trunk/ext/standard/dns.c
U php/php-src/trunk/ext/standard/php_dns.h
Modified: php/php-src/trunk/configure.in
===
--- php/php-src/trunk/configure.in 2009-08-05 23:20:17 UTC (rev 286857)
+++ php/php-src/trunk/configure.in 2009-08-06 00:10:46 UTC (rev 286858)
@@ -254,7 +254,6 @@
CPPFLAGS=$CPPFLAGS -no-cpp-precomp
fi
fi
-AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
php_multiple_shlib_versions_ok=yes
;;
*beos*)
Modified: php/php-src/trunk/ext/standard/basic_functions.c
===
--- php/php-src/trunk/ext/standard/basic_functions.c 2009-08-05 23:20:17 UTC (rev 286857)
+++ php/php-src/trunk/ext/standard/basic_functions.c 2009-08-06 00:10:46 UTC (rev 286858)
@@ -992,22 +992,20 @@
ZEND_END_ARG_INFO()
#endif
-#if defined(PHP_WIN32) || (HAVE_RES_SEARCH !(defined(__BEOS__) || defined(NETWARE)))
+#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC !(defined(__BEOS__) || defined(NETWARE)))
ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1)
ZEND_ARG_INFO(0, host)
ZEND_ARG_INFO(0, type)
ZEND_END_ARG_INFO()
-# if defined(PHP_WIN32) || HAVE_DNS_FUNCS
+# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 1, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, type)
ZEND_ARG_INFO(1, authns) /* ARRAY_INFO(1, authns, 1) */
ZEND_ARG_INFO(1, addtl) /* ARRAY_INFO(1, addtl, 1) */
ZEND_END_ARG_INFO()
-# endif
-# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME HAVE_DN_EXPAND)
ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */
@@ -1015,7 +1013,7 @@
ZEND_END_ARG_INFO()
# endif
-#endif /* defined(PHP_WIN32) || (HAVE_RES_SEARCH !(defined(__BEOS__) || defined(NETWARE))) */
+#endif /* defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC !(defined(__BEOS__) || defined(NETWARE))) */
/* }}} */
/* {{{ exec.c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1)
@@ -3023,17 +3021,14 @@
PHP_FE(gethostname, arginfo_gethostname)
#endif
-#if defined(PHP_WIN32) || (HAVE_RES_SEARCH !(defined(__BEOS__) || defined(NETWARE)))
+#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC !(defined(__BEOS__) || defined(NETWARE)))
PHP_FE(dns_check_record,arginfo_dns_check_record)
PHP_FALIAS(checkdnsrr, dns_check_record, arginfo_dns_check_record)
-# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME HAVE_DN_EXPAND)
+# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
PHP_FE(dns_get_mx, arginfo_dns_get_mx)
PHP_FALIAS(getmxrr,dns_get_mx, arginfo_dns_get_mx)
-# endif
-
-# if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FE(dns_get_record, arginfo_dns_get_record)
# endif
#endif
@@ -3632,8 +3627,8 @@
php_register_url_stream_wrapper(ftp, php_stream_ftp_wrapper TSRMLS_CC);
#endif
-#if defined(PHP_WIN32) || (HAVE_RES_SEARCH !(defined(__BEOS__) || defined(NETWARE)))
-# if defined(PHP_WIN32) || HAVE_DNS_FUNCS
+#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC !(defined(__BEOS__) || defined(NETWARE)))
+# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
PHP_MINIT(dns)(INIT_FUNC_ARGS_PASSTHRU);
# endif
#endif
Modified: php/php-src/trunk/ext/standard/config.m4
===
--- php/php-src/trunk/ext/standard/config.m4 2009-08-05 23:20:17 UTC (rev 286857)
+++ php/php-src/trunk/ext/standard/config.m4 2009-08-06 00:10:46 UTC (rev 286858)
@@ -247,21 +247,18 @@
dnl
dnl Detect library functions needed by php dns_xxx functions
-dnl ext/standard/php_dns.h will collect these in a single define: HAVE_DNS_FUNCS
+dnl ext/standard/php_dns.h will collect these in a single define: HAVE_FULL_DNS_FUNCS
dnl
-PHP_CHECK_FUNC(res_nmkquery, resolv, bind, socket)
-PHP_CHECK_FUNC(res_nsend, resolv, bind, socket)
-PHP_CHECK_FUNC(res_search, resolv, bind, socket)
+PHP_CHECK_FUNC(res_nsearch, resolv, bind, socket)
+PHP_CHECK_FUNC(dns_search, resolv, bind, socket)
PHP_CHECK_FUNC(dn_expand, resolv, bind, socket)
PHP_CHECK_FUNC(dn_skipname, resolv, bind, socket)
dnl
-dnl These are old deprecated functions, a single define of HAVE_DEPRECATED_DNS_FUNCS
-dnl will be set in ext/standard/php_dns.h
+dnl These are old deprecated functions
dnl
-PHP_CHECK_FUNC(res_mkquery,