In perl.git, the branch smoke-me/inet_aton has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3eea015d78f613c18abb1091eb6797e88ff026d2?hp=f0a60934402596b7c927e571503b3e6251ca0d6b>

- Log -----------------------------------------------------------------
commit 3eea015d78f613c18abb1091eb6797e88ff026d2
Author: Nicholas Clark <[email protected]>
Date:   Sun Mar 6 15:07:16 2011 +0000

    Just for smoking - what happens if we enforce the use of getaddrinfo?
    
    This will fail to compile on platforms where there is no getaddrinfo.
-----------------------------------------------------------------------

Summary of changes:
 ext/Socket/Socket.xs |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 71f0c57..e820d48 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -422,21 +422,14 @@ inet_aton(host)
        CODE:
        {
        struct in_addr ip_address;
-       struct hostent * phe;
 
        if ((*host != '\0') && inet_aton(host, &ip_address)) {
                ST(0) = newSVpvn_flags((char *)&ip_address, sizeof ip_address, 
SVs_TEMP);
                XSRETURN(1);
        }
 
-       phe = gethostbyname(host);
-       if (phe && phe->h_addrtype == AF_INET && phe->h_length == 4) {
-               ST(0) = newSVpvn_flags((char *)phe->h_addr, phe->h_length, 
SVs_TEMP);
-               XSRETURN(1);
-       }
-
        ST(0) = &PL_sv_undef;
-#ifdef HAS_GETADDRINFO
+#if 1
        {
                struct addrinfo hints = { 0 };
                struct addrinfo *result;

--
Perl5 Master Repository

Reply via email to