develooper Front page | perl.perl5.porters | Postings from December 2013

Re: [perl #120835] IO::Socket getsockopt subroutine on AIX

Thread Previous | Thread Next
From:
yaberger
Date:
December 25, 2013 07:39
Subject:
Re: [perl #120835] IO::Socket getsockopt subroutine on AIX
Message ID:
OF9230DD92.6E639323-ON85257C4A.00709086-85257C4A.0070D135@ca.ibm.com
Hi,

I've tested it and it works.
Is it too late to get this in 5.18.2?
If so, could this be added for 5.18.3 and 5.19/5.20?


Best regards,

Yannick Bergeron
Advisory IT Specialist



From:   "Reini Urban via RT" <perlbug-followup@perl.org>
To:     Yannick Y Bergeron/Bromont/IBM@IBMCA, 
Date:   12/21/2013 12:44 PM
Subject:        [perl #120835] IO::Socket getsockopt subroutine on AIX



https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA

John K. patch looks good but can you test it?

pp_sys.c:
     case OP_GSOCKOPT: 
         SvGROW(sv, 257); 
         (void)SvPOK_only(sv); 
         SvCUR_set(sv,256); 
         *SvEND(sv) ='\0'; 
         len = SvCUR(sv); 
         if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) 
             goto nuts2; 
         SvCUR_set(sv, len); 
         *SvEND(sv) ='\0'; 
         PUSHs(sv); 
         break; 
=>
     if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) 
        goto nuts2; 
   #if defined(_AIX) 
     if (len == 256) 
        len = sizeof(int); 
   #endif 
     SvCUR_set(sv, len); 
     ... 
-- 
Reini Urban



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About