ID: 48317 Updated by: j...@php.net Reported By: jf at netmadeira dot com -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: linux PHP Version: 5.3CVS-2009-05-18 (snap) Assigned To: fb-req-jani New Comment:
With PHP 5.2 snapshot this didn't exist even. Please try the 5.3 snapshot in about hour. Should be fixed now.. Previous Comments: ------------------------------------------------------------------------ [2009-05-19 16:05:57] jf at netmadeira dot com I see you changed dns.c to macro mach with macro of basic_functions.c, and that is how it was suposed to be.. But the problem I have persists, because in dns.h its not defining the header of this functions, because its beeing restricted by another rule/macro: # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND) So, what I sugest is to move PHP_FUNCTION(dns_check_record); outside this macro, so it can match elsewhere this header is needed and respect the common macro: #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) Best regards, João Henriques ------------------------------------------------------------------------ [2009-05-19 11:14:54] j...@php.net I asked you to try the 5.2 snapshot, but I fixed it across the branches so any will do. :) ------------------------------------------------------------------------ [2009-05-19 11:14:06] j...@php.net Please try this snapshot: http://snaps.php.net/php5.2-latest.tar.gz I unified the macro usage in this mess we call dns.* :) (give it an hour or two before you download so the snapshot actually has the changes) ------------------------------------------------------------------------ [2009-05-18 22:16:44] jf at netmadeira dot com Ok, cvs is not the best help here, because for fix this bug I would need to study lots of code to now what is really breaking here, so, I'll point what I think its bad, and what I done to fix the error to myself!! The rules to define the PHP_FUNCTION(dns_check_record) are: header: dns.h #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND) PHP_FUNCTION(dns_check_record); (...) function code: dns.c #if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) (...) PHP_FUNCTION(dns_check_record) { (...) Adding the function to php functions list: basic_functions.c #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) PHP_FE(dns_check_record,arginfo_dns_check_record) PHP_FALIAS(checkdnsrr,dns_check_record,arginfo_dns_check_record) #endif What I see is that in three cases, the rules are different in all, so sometimes the header can be defines and the function not, or like in mine, the function is defined but header not!! Clearly are some conflicts of rules here, but can't really tell what, without studing the code. What I made to fix for myself was: diff -u -p -r1.1.1.1 dns.h --- standard/dns.h 18 May 2009 21:39:19 -0000 1.1.1.1 +++ standard/dns.h 18 May 2009 22:14:09 -0000 @@ -49,9 +49,9 @@ PHP_FUNCTION(gethostname); #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) +PHP_FUNCTION(dns_check_record); # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND) PHP_FUNCTION(dns_get_mx); -PHP_FUNCTION(dns_check_record); # endif #if defined(PHP_WIN32) || HAVE_DNS_FUNCS Hope some developer could fix the mess with those rules... ------------------------------------------------------------------------ [2009-05-18 21:22:19] jf at netmadeira dot com well, I'm trying to do that, but its first time working with cvs.. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/48317 -- Edit this bug report at http://bugs.php.net/?id=48317&edit=1