summaryrefslogtreecommitdiff
path: root/ext/standard/dns.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2000-05-26 17:04:02 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2000-05-26 17:04:02 +0000
commit69d1e788c022620f7b7f81a6071e67ce37e6034d (patch)
treee13e0b9016827cdcada7acef8164fe5c0944db6a /ext/standard/dns.c
parent9bfd5e5e555372604ff69642dc32ef6e2e9444db (diff)
downloadphp-git-69d1e788c022620f7b7f81a6071e67ce37e6034d.tar.gz
if a module provides a function it should also do so if the function
is not functional due to configure findings the function should offer a meaningful warning if it is not supported instead of just beeing undefined i had already changed this in 'gd', now this is doing it for 'standard'
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r--ext/standard/dns.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 8e481af1cd..181d450b5d 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -159,12 +159,12 @@ char *php_gethostbyname(char *name)
return estrdup(inet_ntoa(in));
}
-#if !defined(PHP_WIN32)||HAVE_BINDLIB
/* {{{ proto int checkdnsrr(string host [, string type])
Check DNS records corresponding to a given Internet host name or IP address */
PHP_FUNCTION(checkdnsrr)
{
+#if !defined(PHP_WIN32)||HAVE_BINDLIB
pval **arg1,**arg2;
int type,i;
#ifndef MAXPACKET
@@ -206,9 +206,14 @@ PHP_FUNCTION(checkdnsrr)
RETURN_FALSE;
}
RETURN_TRUE;
+#else
+ PHP_NOT_IN_THIS_BUILD;
+#endif
}
/* }}} */
+#if !defined(PHP_WIN32)||HAVE_BINDLIB
+
#ifndef HFIXEDSZ
#define HFIXEDSZ 12 /* fixed data in header <arpa/nameser.h> */
#endif /* HFIXEDSZ */
@@ -220,11 +225,13 @@ PHP_FUNCTION(checkdnsrr)
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif /* MAXHOSTNAMELEN */
+#endif
/* {{{ proto int getmxrr(string hostname, array mxhosts [, array weight])
Get MX records corresponding to a given Internet host name */
PHP_FUNCTION(getmxrr)
{
+#if !defined(PHP_WIN32)||HAVE_BINDLIB
pval *host, *mx_list, *weight_list;
int need_weight = 0;
int count,qdc;
@@ -307,10 +314,12 @@ PHP_FUNCTION(getmxrr)
}
}
RETURN_TRUE;
+#else
+ PHP_NOT_IN_THIS_BUILD;
+#endif
}
/* }}} */
-#endif
/*
* Local variables:
* tab-width: 4