>> Instead of:
>> #ifdef T_AAAA
>> /* blah blah blah */
>> #endif
>>
>> Why not just put:
>> #ifndef T_AAAA
>> #define T_AAAA 28
>> #endif
>>
>> in dns.h?  This should let the function continue working even on
>> platforms where T_AAAA isn't defined?
>
> WHere do you get those numbers? Are you sure they are correct? Anywya, I
>  think the solution Jani introduced is better, now we dont enable code
> if  it's not available on a platform.
>
RFC 1886 - Section 2.1
http://www.ietf.org/rfc/rfc1886.txt

libresolv (and I should imagine other resolver libraries) simply pass
these numbers through to the question section of the dns query packet.
(See RFC 1035)  Therefore it's reasonable to assume that if the resolver
library supports dns queries at all (i.e. T_A, T_NS, T_CNAME, etc...) that
it would have to support any types since it's just another 16-bit
big-endian integer being included in the packet.

While it's true that Jani's solution will avoid enabling code on platforms
where it's not supported, it'll also unnecessarily disable functionality
on platforms which would otherwise support it.

-Pollita



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to