Hi all,

I'm running a linux box based on the SuSE distribution. Trying to use
the getmxrr function in recent snap builds of PHP4, i found out that
this function was not supported anymore.

Browsing through the code resulted in the observation that both
mentioned functions were only avialable if HAVE_BINDLIB was set by
configure.

Now, on SuSE, you don't have libbind, instead you have libresolv, which
provides the same functionality as libbind with respect to getmxrr. My
suspicion grew about a bug when i recognized that configure actually
searches for libresolv and puts a HAVE_LIBRESOLV 1 into php_config.h.
The problem is that HAVE_LIBRESOLV isn't referenced anywhere else in the
code, so it is a quite useless information now.

The solution is quite simple: Just add HAVE_LIBRESOLV to the ifdefs
looking for LIBBIND. Everything works fine then. Here are my diffs, i
don't know how to make a patch out of it, but someone surely will find
out:

diff basic_functions.c
--------------------------------------------------------------------------------
250c250
< #if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32)) ||
HAVE_LIBRESOLV
---
> #if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32))


diff dns.c
-------------------------------------------------------------------------------
170c170
< #if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32)) ||
HAVE_LIBRESOLV
---
> #if HAVE_BINDLIB && !(defined(__BEOS__)||defined(PHP_WIN32))


Michael


P.S.: IMHO, such a bug really should'nt be spotted by an amateur C
programmer like me..;->..


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to