On Fri, 27 Feb 2004, Gordon Henriksen wrote:
inet_pton is preferrable, as it supports IPv6.
That is, inet_pton should trump inet_aton if both are available.
Probably, but that would require testing to see if inet_pton is available. That information is not available from perl5's Configure, and there currently is no infrastructure in parrot for making such a test. Obviously that needs to change eventually.
On Mac OS X, the preferred technique would be to weak link with inet_pton and test for its availability at run-time. (inet_pton is not available on 10.1, but is available on 10.3.) This would be another case entirely.
Yes, indeed, that's the sort of thing that makes testing for function availability so much fun :-).
FWIW, this can't work across the 10.1/10.2 schizm.
http://developer.apple.com/technotes/tn2002/tn2064.html
So parrot would need to:
- either use a separate 10.1 binary (yuck),
- or forgo use of inet_pton and IPv6 on Mac OS X 10.2 even though it is available (yuck),
- or link in at runtime a different driver DLL for 10.1 vs. 10.2 (yuck).
Roll-your-own doesn't really sound so bad. But until the implementation is not hardcoded to IPv6, preferring inet_aton (as present) gets the right behavior. But IPv6 can't be ignored forever.
Whatevsies.
—
Gordon Henriksen [EMAIL PROTECTED]