In perl.git, the branch maint-5.20 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/9c362a4dfb7e3aaffeb3a2615f8b65a76e5e691a?hp=479259f391d42ab4475cf476422ababdd1b9dab9>

- Log -----------------------------------------------------------------
commit 9c362a4dfb7e3aaffeb3a2615f8b65a76e5e691a
Author: Father Chrysostomos <[email protected]>
Date:   Thu Oct 23 16:30:32 2014 -0700

    perldelta for the prev. commit
    
    based on the entry in bb8c7e2708.

M       pod/perldelta.pod

commit e8ac1ac10e13942cfca5258f24ed5cdd48485530
Author: Jarkko Hietaniemi <[email protected]>
Date:   Tue Sep 23 08:17:47 2014 -0400

    AIX doesn't set the length in getsockopt.
    
    [perl #120835] and [rt #91183] and [rt #85570]
    
    Seen errors in blead smoke in AIX 6.1:
    
    cpan/IO-Socket-IP/t/18fdopen .................................. Argument
    "\0\0\0^A\0\0\0r\0\0\0\0\0\0\0\0?M-^U\0\0M-^E^[^???\0^N\0..." isn't
    numeric in numeric eq (==) at ../../lib/IO/Socket/IP.pm line 748.
    
    cpan/IO-Socket-IP/t/31nonblocking-connect-internet ............ Argument
    "\0\0\0\0\0\0\0\0?\0\n^B1?\0\0\0^B\0^BM-\rf?^H?\0^N\0^B?|..." isn't
    numeric in scalar assignment at ../../lib/IO/Socket/IP.pm line 707.
    (cherry picked from commit ee2276e59a3c027cb89c721d866c9db4ba683a7b)

M       pp_sys.c
-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod | 3 ++-
 pp_sys.c          | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index c2447d6..c64ca89 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -338,7 +338,8 @@ files in F<ext/> and F<lib/> are best summarized in 
L</Modules and Pragmata>.
 
 =item *
 
-XXX
+AIX now sets the length in C<< getsockopt >> correctly. [perl #120835],
+[rt.cpan.org #91183], [rt.cpan.org #85570].
 
 =back
 
diff --git a/pp_sys.c b/pp_sys.c
index 43d6473..a4172ac 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2617,6 +2617,11 @@ PP(pp_ssockopt)
        len = SvCUR(sv);
        if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
            goto nuts2;
+#if defined(_AIX)
+        /* XXX Configure test: does getsockopt set the length properly? */
+        if (len == 256)
+            len = sizeof(int);
+#endif
        SvCUR_set(sv, len);
        *SvEND(sv) ='\0';
        PUSHs(sv);

--
Perl5 Master Repository

Reply via email to