Change 33946 by [EMAIL PROTECTED] on 2008/05/28 23:09:01

        Integrate:
        [ 33629]
        Fix bug in change 33379 - if we're using malloc_size() as well as being
        careful to work with PERL_TRACK_MEMPOOL, we also have to be careful to
        work *without* it.
        
        [ 33632]
        In Perl_sv_grow(), no need to do PERL_STRLEN_ROUNDUP() if we have
        malloc_size() to get the true allocated space, as PERL_STRLEN_ROUNDUP()
        might actually bump the request across an allocation size boundary.
        
        [ 33639]
        Clean up some compiler warnings spotted by smokers.
        
        [ 33644]
        From: "Jan Dubois" <[EMAIL PROTECTED]>
        Subject: [PATCH] PL_bincompat_opt should be exported on AIX and Windows
        Date: Thu, 3 Apr 2008 17:34:13 -0700
        Message-ID: <[EMAIL PROTECTED]>
        
        (with one tweak--it should be PL_bincompat_options!)
        
        [ 33650]
        Subject: [PATCH] perlfunc.pod: atan2(0,0) returns 0, not undef
        From: Paul Fenwick <[EMAIL PROTECTED]>
        Date: Sun, 06 Apr 2008 11:28:27 +1000
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 33653]
        Replace all remaining accesses to COP's cop_label with CopLABEL().
        
        [ 33676]
        Make atan2(0,0) return undef
        
        [ 33678]
        Revert change #33676, likely to break atan(-0,0) on some platforms

Affected files ...

... //depot/maint-5.10/perl/dump.c#8 integrate
... //depot/maint-5.10/perl/ext/B/B.pm#5 integrate
... //depot/maint-5.10/perl/ext/B/B.xs#8 integrate
... //depot/maint-5.10/perl/globvar.sym#2 integrate
... //depot/maint-5.10/perl/perl.c#12 integrate
... //depot/maint-5.10/perl/perl.h#13 integrate
... //depot/maint-5.10/perl/pod/perlfunc.pod#8 integrate
... //depot/maint-5.10/perl/pp.c#8 integrate
... //depot/maint-5.10/perl/pp_ctl.c#15 integrate
... //depot/maint-5.10/perl/pp_sys.c#6 integrate
... //depot/maint-5.10/perl/sv.c#17 integrate
... //depot/maint-5.10/perl/t/op/exp.t#2 integrate

Differences ...

==== //depot/maint-5.10/perl/dump.c#8 (text) ====
Index: perl/dump.c
--- perl/dump.c#7~33945~        2008-05-28 13:51:40.000000000 -0700
+++ perl/dump.c 2008-05-28 16:09:01.000000000 -0700
@@ -759,9 +759,9 @@
                if (CopSTASHPV(cCOPo))
                    Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
                                     CopSTASHPV(cCOPo));
-               if (cCOPo->cop_label)
+               if (CopLABEL(cCOPo))
                    Perl_dump_indent(aTHX_ level, file, "LABEL = \"%s\"\n",
-                                    cCOPo->cop_label);
+                                    CopLABEL(cCOPo));
            }
        }
        else
@@ -1061,9 +1061,9 @@
        if (CopSTASHPV(cCOPo))
            Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
                             CopSTASHPV(cCOPo));
-       if (cCOPo->cop_label)
+       if (CopLABEL(cCOPo))
            Perl_dump_indent(aTHX_ level, file, "LABEL = \"%s\"\n",
-                            cCOPo->cop_label);
+                            CopLABEL(cCOPo));
        break;
     case OP_ENTERLOOP:
        Perl_dump_indent(aTHX_ level, file, "REDO ===> ");
@@ -2520,9 +2520,9 @@
                if (CopSTASHPV(cCOPo))
                    PerlIO_printf(file, " package=\"%s\"",
                                     CopSTASHPV(cCOPo));
-               if (cCOPo->cop_label)
+               if (CopLABEL(cCOPo))
                    PerlIO_printf(file, " label=\"%s\"",
-                                    cCOPo->cop_label);
+                                    CopLABEL(cCOPo));
            }
        }
        else
@@ -2781,9 +2781,9 @@
        if (CopSTASHPV(cCOPo))
            S_xmldump_attr(aTHX_ level, file, "package=\"%s\"",
                             CopSTASHPV(cCOPo));
-       if (cCOPo->cop_label)
+       if (CopLABEL(cCOPo))
            S_xmldump_attr(aTHX_ level, file, "label=\"%s\"",
-                            cCOPo->cop_label);
+                            CopLABEL(cCOPo));
        break;
     case OP_ENTERLOOP:
        S_xmldump_attr(aTHX_ level, file, "redo=\"");

==== //depot/maint-5.10/perl/ext/B/B.pm#5 (text) ====
Index: perl/ext/B/B.pm
--- perl/ext/B/B.pm#4~33921~    2008-05-24 09:32:36.000000000 -0700
+++ perl/ext/B/B.pm     2008-05-28 16:09:01.000000000 -0700
@@ -7,7 +7,7 @@
 #
 package B;
 
-our $VERSION = '1.19';
+our $VERSION = '1.20';
 
 use XSLoader ();
 require Exporter;

==== //depot/maint-5.10/perl/ext/B/B.xs#8 (text) ====
Index: perl/ext/B/B.xs
--- perl/ext/B/B.xs#7~33921~    2008-05-24 09:32:36.000000000 -0700
+++ perl/ext/B/B.xs     2008-05-28 16:09:01.000000000 -0700
@@ -1195,7 +1195,7 @@
 LOOP_lastop(o)
        B::LOOP o
 
-#define COP_label(o)   o->cop_label
+#define COP_label(o)   CopLABEL(o)
 #define COP_stashpv(o) CopSTASHPV(o)
 #define COP_stash(o)   CopSTASH(o)
 #define COP_file(o)    CopFILE(o)

==== //depot/maint-5.10/perl/globvar.sym#2 (text) ====
Index: perl/globvar.sym
--- perl/globvar.sym#1~32694~   2007-12-22 01:23:09.000000000 -0800
+++ perl/globvar.sym    2008-05-28 16:09:01.000000000 -0700
@@ -3,6 +3,7 @@
 # *** Only structures/arrays with constant initializers should go here.
 # *** Usual globals initialized at runtime should be added in *var*.h.
 
+bincompat_options
 block_type
 check
 fold

==== //depot/maint-5.10/perl/perl.c#12 (text) ====
Index: perl/perl.c
--- perl/perl.c#11~33856~       2008-05-18 09:11:18.000000000 -0700
+++ perl/perl.c 2008-05-28 16:09:01.000000000 -0700
@@ -3195,7 +3195,7 @@
            if (colon) 
                Perl_croak(aTHX_ "Invalid module name %.*s with -%c option: "
                                    "contains single ':'",
-                                   s - start, start, option);
+                                   (int)(s - start), start, option);
            end = s + strlen(s);
            if (*s != '=') {
                sv_catpvn(sv, start, end - start);

==== //depot/maint-5.10/perl/perl.h#13 (text) ====
Index: perl/perl.h
--- perl/perl.h#12~33942~       2008-05-27 18:21:26.000000000 -0700
+++ perl/perl.h 2008-05-28 16:09:01.000000000 -0700
@@ -4070,17 +4070,25 @@
 #ifdef MYMALLOC
 #  define Perl_safesysmalloc_size(where)       Perl_malloced_size(where)
 #else
-#   ifdef HAS_MALLOC_SIZE
+#  ifdef HAS_MALLOC_SIZE
+#    ifdef PERL_TRACK_MEMPOOL
 #      define Perl_safesysmalloc_size(where)                   \
            (malloc_size(((char *)(where)) - sTHX) - sTHX)
-#   endif
-#   ifdef HAS_MALLOC_GOOD_SIZE
+#    else
+#      define Perl_safesysmalloc_size(where) malloc_size(where)
+#    endif
+#  endif
+#  ifdef HAS_MALLOC_GOOD_SIZE
+#    ifdef PERL_TRACK_MEMPOOL
 #      define Perl_malloc_good_size(how_much)                  \
            (malloc_good_size((how_much) + sTHX) - sTHX)
-#   else
+#    else
+#      define Perl_malloc_good_size(how_much) malloc_good_size(how_much)
+#    endif
+#  else
 /* Having this as the identity operation makes some code simpler.  */
 #      define Perl_malloc_good_size(how_much)  (how_much)
-#   endif
+#  endif
 #endif
 
 typedef int (CPERLscope(*runops_proc_t)) (pTHX);

==== //depot/maint-5.10/perl/pod/perlfunc.pod#8 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#7~33884~      2008-05-20 08:07:58.000000000 -0700
+++ perl/pod/perlfunc.pod       2008-05-28 16:09:01.000000000 -0700
@@ -492,7 +492,8 @@
 
     sub tan { sin($_[0]) / cos($_[0])  }
 
-Note that atan2(0, 0) is not well-defined.
+The return value for C<atan2(0,0)> is implementation-defined; consult
+your atan2(3) manpage for more information.
 
 =item bind SOCKET,NAME
 X<bind>

==== //depot/maint-5.10/perl/pp_ctl.c#15 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#14~33941~     2008-05-27 15:58:13.000000000 -0700
+++ perl/pp_ctl.c       2008-05-28 16:09:01.000000000 -0700
@@ -2280,7 +2280,7 @@
        /* First try all the kids at this level, since that's likeliest. */
        for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) {
            if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) &&
-                   kCOP->cop_label && strEQ(kCOP->cop_label, label))
+                   CopLABEL(kCOP) && strEQ(CopLABEL(kCOP), label))
                return kid;
        }
        for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) {

==== //depot/maint-5.10/perl/pp_sys.c#6 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#5~33880~      2008-05-20 05:15:13.000000000 -0700
+++ perl/pp_sys.c       2008-05-28 16:09:01.000000000 -0700
@@ -4936,7 +4936,7 @@
 {
 #ifdef HAS_SETNETENT
     dVAR; dSP;
-    PerlSock_setnetent(TOPi);
+    (void)PerlSock_setnetent(TOPi);
     RETSETYES;
 #else
     DIE(aTHX_ PL_no_sock_func, "setnetent");
@@ -4947,7 +4947,7 @@
 {
 #ifdef HAS_SETPROTOENT
     dVAR; dSP;
-    PerlSock_setprotoent(TOPi);
+    (void)PerlSock_setprotoent(TOPi);
     RETSETYES;
 #else
     DIE(aTHX_ PL_no_sock_func, "setprotoent");
@@ -4958,7 +4958,7 @@
 {
 #ifdef HAS_SETSERVENT
     dVAR; dSP;
-    PerlSock_setservent(TOPi);
+    (void)PerlSock_setservent(TOPi);
     RETSETYES;
 #else
     DIE(aTHX_ PL_no_sock_func, "setservent");

==== //depot/maint-5.10/perl/sv.c#17 (text) ====
Index: perl/sv.c
--- perl/sv.c#16~33944~ 2008-05-28 11:24:46.000000000 -0700
+++ perl/sv.c   2008-05-28 16:09:01.000000000 -0700
@@ -1438,7 +1438,7 @@
        s = SvPVX_mutable(sv);
 
     if (newlen > SvLEN(sv)) {          /* need more room? */
-#ifndef MYMALLOC
+#ifndef Perl_safesysmalloc_size
        newlen = PERL_STRLEN_ROUNDUP(newlen);
 #endif
        if (SvLEN(sv) && s) {
End of Patch.

Reply via email to