From 3ca6344e57de58719554f45fc5889ded774b265c Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 19 Nov 2002 02:34:13 +0000 Subject: -rename checkdnsrr to dns_check_record, keep old name as alias -rename getmxrr to dns_get_mx, keep old name as alias -added dns_get_record @Added dns_get_record() which allows to retrieve DNS information about @a host. (Marcus, Pollita) --- ext/standard/basic_functions.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'ext/standard/basic_functions.c') diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 93d9385d1e..dde522db33 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -31,6 +31,7 @@ #include "ext/standard/info.h" #include "ext/session/php_session.h" #include "zend_operators.h" +#include "ext/standard/dns.h" #include #include @@ -434,15 +435,6 @@ function_entry basic_functions[] = { PHP_FE(getprotobynumber, NULL) #endif - PHP_FE(gethostbyaddr, NULL) - PHP_FE(gethostbyname, NULL) - PHP_FE(gethostbynamel, NULL) - -#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE)) - PHP_FE(checkdnsrr, NULL) - PHP_FE(getmxrr,second_and_third_args_force_ref) -#endif - PHP_FE(getmyuid, NULL) PHP_FE(getmygid, NULL) PHP_FE(getmypid, NULL) @@ -576,6 +568,21 @@ function_entry basic_functions[] = { PHP_FE(is_uploaded_file, NULL) PHP_FE(move_uploaded_file, NULL) + /* functions from dns.c */ + PHP_FE(gethostbyaddr, NULL) + PHP_FE(gethostbyname, NULL) + PHP_FE(gethostbynamel, NULL) + +#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_DNS_FUNCS + PHP_FE(dns_get_record, third_and_rest_force_ref) + PHP_FE(dns_get_mx, second_and_third_args_force_ref) + PHP_FALIAS(getmxrr, dns_get_mx, NULL) +# endif +#endif + /* functions from type.c */ PHP_FE(intval, NULL) PHP_FE(floatval, NULL) @@ -1059,6 +1066,12 @@ PHP_MINIT_FUNCTION(basic) php_register_url_stream_wrapper("https", &php_stream_http_wrapper TSRMLS_CC); php_register_url_stream_wrapper("ftps", &php_stream_ftp_wrapper TSRMLS_CC); # endif +#endif + +#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) +# if HAVE_DNS_FUNCS + PHP_MINIT(dns) (INIT_FUNC_ARGS_PASSTHRU); +# endif #endif return SUCCESS; -- cgit v1.2.1