diff options
Diffstat (limited to 'lang/perl5.14/files')
-rw-r--r-- | lang/perl5.14/files/patch-IO-Socket-INET-udp | 14 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug49003 | 18 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug49472 | 48 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug51636 | 15 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug52074-54566 | 44 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug52658 | 15 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug52740 | 15 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug53038 | 95 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug54186 | 77 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug54758 | 29 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug54934 | 15 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug56908 | 31 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug59516 | 16 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-bug64562 | 23 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-qr-leak | 16 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-setpgrp | 13 | ||||
-rw-r--r-- | lang/perl5.14/files/patch-sv.c | 21 | ||||
-rw-r--r-- | lang/perl5.14/files/perl-after-upgrade | 73 |
18 files changed, 45 insertions, 533 deletions
diff --git a/lang/perl5.14/files/patch-IO-Socket-INET-udp b/lang/perl5.14/files/patch-IO-Socket-INET-udp deleted file mode 100644 index 2c0ff86f110a..000000000000 --- a/lang/perl5.14/files/patch-IO-Socket-INET-udp +++ /dev/null @@ -1,14 +0,0 @@ -# http://perl5.git.perl.org/perl.git/commitdiff/7027b9a31bf80c5639c73f75155ed1a89c674c30?hp=f175cff5cac5f8199b897ce2f1c73312d99d5761 -diff --git a/ext/IO/lib/IO/Socket/INET.pm b/ext/IO/lib/IO/Socket/INET.pm -index f8bb338..2f0e5d1 100644 ---- ext/IO/lib/IO/Socket/INET.pm -+++ ext/IO/lib/IO/Socket/INET.pm -@@ -27,7 +27,7 @@ my %socket_type = ( tcp => SOCK_STREAM, - ); - my %proto_number; - $proto_number{tcp} = Socket::IPPROTO_TCP() if defined &Socket::IPPROTO_TCP; --$proto_number{upd} = Socket::IPPROTO_UDP() if defined &Socket::IPPROTO_UDP; -+$proto_number{udp} = Socket::IPPROTO_UDP() if defined &Socket::IPPROTO_UDP; - $proto_number{icmp} = Socket::IPPROTO_ICMP() if defined &Socket::IPPROTO_ICMP; - my %proto_name = reverse %proto_number; - diff --git a/lang/perl5.14/files/patch-bug49003 b/lang/perl5.14/files/patch-bug49003 deleted file mode 100644 index c43ef58891fb..000000000000 --- a/lang/perl5.14/files/patch-bug49003 +++ /dev/null @@ -1,18 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=49003 -# http://perl5.git.perl.org/perl.git/commitdiff/b376053de54af4268a31e5a60d1f9e57db30af11?hp=3a28f3fb1bfd44e4e3dfe6842af867c8c1c9de28 -diff --git a/pp_sys.c b/pp_sys.c -index 66ca0fb..da07e46 100644 ---- pp_sys.c -+++ pp_sys.c -@@ -2999,10 +2999,9 @@ PP(pp_ftrread) - effective = TRUE; - break; - -- - case OP_FTEEXEC: - #ifdef PERL_EFF_ACCESS -- access_mode = W_OK; -+ access_mode = X_OK; - #else - use_access = 0; - #endif diff --git a/lang/perl5.14/files/patch-bug49472 b/lang/perl5.14/files/patch-bug49472 deleted file mode 100644 index afc02952ba56..000000000000 --- a/lang/perl5.14/files/patch-bug49472 +++ /dev/null @@ -1,48 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 -# http://perl5.git.perl.org/perl.git/commitdiff/ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5?hp=41d86c6b932c287037db3584f7658c067cae5e84 -diff --git a/t/comp/require.t b/t/comp/require.t -index af5e4b2..0746b3b 100755 ---- t/comp/require.t -+++ t/comp/require.t -@@ -15,7 +15,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc); - - my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; - my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; --my $total_tests = 49; -+my $total_tests = 50; - if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } - print "1..$total_tests\n"; - -@@ -258,6 +258,20 @@ EOT - } - } - -+# [perl #49472] Attributes + Unkown Error -+ -+{ -+ do_require -+ 'use strict;sub MODIFY_CODE_ATTRIBUTE{} sub f:Blah {$nosuchvar}'; -+ my $err = $@; -+ $err .= "\n" unless $err =~ /\n$/; -+ unless ($err =~ /Global symbol "\$nosuchvar" requires /) { -+ $err =~ s/^/# /mg; -+ print "${err}not "; -+ } -+ print "ok ", ++$i, " [perl #49472]\n"; -+} -+ - ########################################## - # What follows are UTF-8 specific tests. # - # Add generic tests before this point. # -diff --git a/toke.c b/toke.c -index 2ae8b75..ecee902 100644 ---- toke.c -+++ toke.c -@@ -692,6 +692,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) - #else - parser->nexttoke = 0; - #endif -+ parser->error_count = oparser ? oparser->error_count : 0; - parser->copline = NOLINE; - parser->lex_state = LEX_NORMAL; - parser->expect = XSTATE; diff --git a/lang/perl5.14/files/patch-bug51636 b/lang/perl5.14/files/patch-bug51636 deleted file mode 100644 index c4653b7a1266..000000000000 --- a/lang/perl5.14/files/patch-bug51636 +++ /dev/null @@ -1,15 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=51636 -# http://perl5.git.perl.org/perl.git/commit/b63c7c552a2e9cf2b2c5eb492358b8567fd16179 -diff --git a/av.c b/av.c -index e6c26bc..67ffad9 100644 ---- av.c -+++ av.c -@@ -437,7 +437,7 @@ Perl_av_clear(pTHX_ register AV *av) - /* Give any tie a chance to cleanup first */ - if (SvRMAGICAL(av)) { - const MAGIC* const mg = SvMAGIC(av); -- if (PL_delaymagic && mg->mg_type == PERL_MAGIC_isa) -+ if (PL_delaymagic && mg && mg->mg_type == PERL_MAGIC_isa) - PL_delaymagic |= DM_ARRAY; - else - mg_clear((SV*)av); diff --git a/lang/perl5.14/files/patch-bug52074-54566 b/lang/perl5.14/files/patch-bug52074-54566 deleted file mode 100644 index 259a39585db7..000000000000 --- a/lang/perl5.14/files/patch-bug52074-54566 +++ /dev/null @@ -1,44 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=52074 -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=54566 -# http://perl5.git.perl.org/perl.git/commitdiff/5562fa714b8071354c365365c26a950efa73179a?hp=b3562f19ee0d76b60d176a0b1cfdac4f5f36785c -# http://perl5.git.perl.org/perl.git/commitdiff/ea86b3de3510ce31d0c08dd6a21701d74b25369d?hp=72bfe1b2b35945ea3c95d9b94ae2908121292236 -diff --git a/mg.c b/mg.c -index c4d7aeb..91a36f2 100644 ---- mg.c -+++ mg.c -@@ -1543,10 +1543,11 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *mg) - stash = GvSTASH( - SvTYPE(mg->mg_obj) == SVt_PVGV - ? (GV*)mg->mg_obj -- : (GV*)SvMAGIC(mg->mg_obj)->mg_obj -+ : (GV*)mg_find(mg->mg_obj, PERL_MAGIC_isa)->mg_obj - ); - -- mro_isa_changed_in(stash); -+ if (stash) -+ mro_isa_changed_in(stash); - - return 0; - } -diff --git a/t/mro/pkg_gen.t b/t/mro/pkg_gen.t -index 6a507ac..e1f5eb0 100644 ---- t/mro/pkg_gen.t -+++ t/mro/pkg_gen.t -@@ -4,7 +4,7 @@ use strict; - use warnings; - - chdir 't' if -d 't'; --require q(./test.pl); plan(tests => 6); -+require q(./test.pl); plan(tests => 7); - - { - package Foo; -@@ -34,3 +34,7 @@ is(mro::get_pkg_gen('Foo'), 1, "pkg_gen 1 for undef %Pkg::"); - - delete $::{"Foo::"}; - is(mro::get_pkg_gen('Foo'), 0, 'pkg_gen 0 for delete $::{Pkg::}'); -+ -+delete $::{"Quux::"}; -+push @Quux::ISA, "Woot"; # should not segfault -+ok(1, "No segfault on modification of ISA in a deleted stash"); - diff --git a/lang/perl5.14/files/patch-bug52658 b/lang/perl5.14/files/patch-bug52658 deleted file mode 100644 index 435f66e1f988..000000000000 --- a/lang/perl5.14/files/patch-bug52658 +++ /dev/null @@ -1,15 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=52658 -# http://perl5.git.perl.org/perl.git/commitdiff/62b40d2474e7487e6909e1872b6bccdf812c6818?hp=d49025b75d9b5002071bd1a4210654dab5663ef0#patch1 -diff --git a/pp_ctl.c b/pp_ctl.c -index 7a377f0..88269a7 100644 ---- pp_ctl.c -+++ pp_ctl.c -@@ -218,7 +218,6 @@ PP(pp_substcont) - if (!(cx->sb_rxtainted & 2) && SvTAINTED(TOPs)) - cx->sb_rxtainted |= 2; - sv_catsv(dstr, POPs); -- FREETMPS; /* Prevent excess tmp stack */ - - /* Are we done */ - if (cx->sb_once || !CALLREGEXEC(rx, s, cx->sb_strend, orig, - diff --git a/lang/perl5.14/files/patch-bug52740 b/lang/perl5.14/files/patch-bug52740 deleted file mode 100644 index 08a73a1547ee..000000000000 --- a/lang/perl5.14/files/patch-bug52740 +++ /dev/null @@ -1,15 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=52740 -# http://perl5.git.perl.org/perl.git/commitdiff/785bee4f7cf89837cba8e6e0859abbb4b407e1f1?hp=90e91dd8c9549b16c38f6ab2e9fa25c7ea28dff8 -diff --git a/sv.c b/sv.c -index f721e6f..5fcf018 100644 ---- sv.c -+++ sv.c -@@ -3717,7 +3717,7 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags) - Perl_croak(aTHX_ "Cannot copy to %s", type); - } else if (sflags & SVf_ROK) { - if (isGV_with_GP(dstr) && dtype == SVt_PVGV -- && SvTYPE(SvRV(sstr)) == SVt_PVGV) { -+ && SvTYPE(SvRV(sstr)) == SVt_PVGV && isGV_with_GP(SvRV(sstr))) { - sstr = SvRV(sstr); - if (sstr == dstr) { - if (GvIMPORTED(dstr) != GVf_IMPORTED diff --git a/lang/perl5.14/files/patch-bug53038 b/lang/perl5.14/files/patch-bug53038 deleted file mode 100644 index c1c0954f807f..000000000000 --- a/lang/perl5.14/files/patch-bug53038 +++ /dev/null @@ -1,95 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=53038 -# http://perl5.git.perl.org/perl.git/commitdiff/414bf5ae0886eb91e2f6dbb35893ddb012852bef?hp=2556f95e0f4f5e8e95c9766374614ab52edefe3d -diff --git a/XSUB.h b/XSUB.h -index 46e9c29..2d95b1e 100644 ---- XSUB.h -+++ XSUB.h -@@ -364,10 +364,10 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">. - SAVETMPS ; \ - SAVEINT(db->filtering) ; \ - db->filtering = TRUE ; \ -- SAVESPTR(DEFSV) ; \ -+ SAVE_DEFSV ; \ - if (name[7] == 's') \ - arg = newSVsv(arg); \ -- DEFSV = arg ; \ -+ DEFSV_set(arg) ; \ - SvTEMP_off(arg) ; \ - PUSHMARK(SP) ; \ - PUTBACK ; \ -diff --git a/perl.h b/perl.h -index e07416e..526155b 100644 ---- perl.h -+++ perl.h -@@ -1306,8 +1306,12 @@ EXTERN_C char *crypt(const char *, const char *); - #endif - - #define ERRSV GvSV(PL_errgv) --/* FIXME? Change the assignments to PL_defgv to instantiate GvSV? */ --#define DEFSV GvSVn(PL_defgv) -+#ifdef PERL_CORE -+# define DEFSV (0 + GvSVn(PL_defgv)) -+#else -+# define DEFSV GvSVn(PL_defgv) -+#endif -+#define DEFSV_set(sv) (GvSV(PL_defgv) = (sv)) - #define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) - - #define ERRHV GvHV(PL_errgv) /* XXX unused, here for compatibility */ -diff --git a/pp_ctl.c b/pp_ctl.c -index 08b14c6..3ef7e32 100644 ---- pp_ctl.c -+++ pp_ctl.c -@@ -988,7 +988,7 @@ PP(pp_grepstart) - if (PL_op->op_private & OPpGREP_LEX) - PAD_SVl(PL_op->op_targ) = src; - else -- DEFSV = src; -+ DEFSV_set(src); - - PUTBACK; - if (PL_op->op_type == OP_MAPSTART) -@@ -1099,7 +1099,7 @@ PP(pp_mapwhile) - if (PL_op->op_private & OPpGREP_LEX) - PAD_SVl(PL_op->op_targ) = src; - else -- DEFSV = src; -+ DEFSV_set(src); - - RETURNOP(cLOGOP->op_other); - } -@@ -4822,7 +4822,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) - SAVETMPS; - EXTEND(SP, 2); - -- DEFSV = upstream; -+ DEFSV_set(upstream); - PUSHMARK(SP); - mPUSHi(0); - if (filter_state) { -diff --git a/pp_hot.c b/pp_hot.c -index eeedc5b..6450e25 100644 ---- pp_hot.c -+++ pp_hot.c -@@ -2424,7 +2424,7 @@ PP(pp_grepwhile) - if (PL_op->op_private & OPpGREP_LEX) - PAD_SVl(PL_op->op_targ) = src; - else -- DEFSV = src; -+ DEFSV_set(src); - - RETURNOP(cLOGOP->op_other); - } -diff --git a/regexec.c b/regexec.c -index 025d159..6c0923f 100644 ---- regexec.c -+++ regexec.c -@@ -2250,7 +2250,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) - /* Make $_ available to executed code. */ - if (reginfo->sv != DEFSV) { - SAVE_DEFSV; -- DEFSV = reginfo->sv; -+ DEFSV_set(reginfo->sv); - } - - if (!(SvTYPE(reginfo->sv) >= SVt_PVMG && SvMAGIC(reginfo->sv) diff --git a/lang/perl5.14/files/patch-bug54186 b/lang/perl5.14/files/patch-bug54186 deleted file mode 100644 index 3421afe56091..000000000000 --- a/lang/perl5.14/files/patch-bug54186 +++ /dev/null @@ -1,77 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=54186 -# http://perl5.git.perl.org/perl.git/commitdiff/a5d752217825fadff051e943940b4abad8e8b552?hp=8d2082b01041d30d9a510164df9c5e4703949441 -diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL -index bd93e59..5f6679d 100644 ---- ext/POSIX/Makefile.PL -+++ ext/POSIX/Makefile.PL -@@ -48,13 +48,11 @@ my @names = - MAX_INPUT MB_LEN_MAX MSG_CTRUNC MSG_DONTROUTE MSG_EOR MSG_OOB MSG_PEEK - MSG_TRUNC MSG_WAITALL NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST - PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX -- SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM -+ SCHAR_MIN SHRT_MAX SHRT_MIN SIGABRT SIGALRM - SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT - SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU - SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX -- STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX -- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID -- S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF -+ STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX TCIFLUSH TCIOFF - TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW - TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT - VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK -diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm -index fbbd253..97d0b2c 100644 ---- ext/POSIX/POSIX.pm -+++ ext/POSIX/POSIX.pm -@@ -13,7 +13,9 @@ use XSLoader (); - use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD - F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND - O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC -- O_WRONLY); -+ O_WRONLY SEEK_CUR SEEK_END SEEK_SET -+ S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID -+ S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR); - - # Grandfather old foo_h form to new :foo_h form - my $loaded; -diff --git a/t/lib/proxy_constant_subs.t b/t/lib/proxy_constant_subs.t -index 4af73d3..45b0a54 100644 ---- t/lib/proxy_constant_subs.t -+++ t/lib/proxy_constant_subs.t -@@ -7,20 +7,20 @@ BEGIN { - print "1..0 # Skip -- Perl configured without B module\n"; - exit 0; - } -- if ($Config::Config{'extensions'} !~ /\bPOSIX\b/) { -- print "1..0 # Skip -- Perl configured without POSIX\n"; -+ if ($Config::Config{'extensions'} !~ /\bFcntl\b/) { -+ print "1..0 # Skip -- Perl configured without Fcntl\n"; - exit 0; - } -- # errno is a real subroutine, and acts as control -+ # S_IFMT is a real subroutine, and acts as control - # SEEK_SET is a proxy constant subroutine. -- @symbols = qw(errno SEEK_SET); -+ @symbols = qw(S_IFMT SEEK_SET); - } - - use strict; - use warnings; - use Test::More tests => 4 * @symbols; - use B qw(svref_2object GVf_IMPORTED_CV); --use POSIX @symbols; -+use Fcntl @symbols; - - # GVf_IMPORTED_CV should not be set on the original, but should be set on the - # imported GV. -@@ -29,7 +29,7 @@ foreach my $symbol (@symbols) { - my ($ps, $ms); - { - no strict 'refs'; -- $ps = svref_2object(\*{"POSIX::$symbol"}); -+ $ps = svref_2object(\*{"Fcntl::$symbol"}); - $ms = svref_2object(\*{"::$symbol"}); - } - isa_ok($ps, 'B::GV'); - diff --git a/lang/perl5.14/files/patch-bug54758 b/lang/perl5.14/files/patch-bug54758 deleted file mode 100644 index a969568a7e10..000000000000 --- a/lang/perl5.14/files/patch-bug54758 +++ /dev/null @@ -1,29 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=54758 -# http://perl5.git.perl.org/perl.git/commitdiff/62b40d2474e7487e6909e1872b6bccdf812c6818?hp=d49025b75d9b5002071bd1a4210654dab5663ef0#patch1 -diff --git a/pp_sort.c b/pp_sort.c -index 9fe0dad..edfdadf 100644 ---- pp_sort.c -+++ pp_sort.c -@@ -1557,11 +1557,12 @@ PP(pp_sort) - max = AvFILL(av) + 1; - if (SvMAGICAL(av)) { - MEXTEND(SP, max); -- p2 = SP; - for (i=0; i < max; i++) { - SV **svp = av_fetch(av, i, FALSE); - *SP++ = (svp) ? *svp : NULL; - } -+ SP--; -+ p1 = p2 = SP - (max-1); - } - else { - if (SvREADONLY(av)) -@@ -1717,7 +1718,7 @@ PP(pp_sort) - SvREADONLY_off(av); - else if (av && !sorting_av) { - /* simulate pp_aassign of tied AV */ -- SV** const base = ORIGMARK+1; -+ SV** const base = MARK+1; - for (i=0; i < max; i++) { - base[i] = newSVsv(base[i]); - } diff --git a/lang/perl5.14/files/patch-bug54934 b/lang/perl5.14/files/patch-bug54934 deleted file mode 100644 index 7c4544f58c0b..000000000000 --- a/lang/perl5.14/files/patch-bug54934 +++ /dev/null @@ -1,15 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=49003 -# http://perl5.git.perl.org/perl.git/commitdiff/5a33563ff27918110ac4f876f12dae861e2d2fa2?hp=24ead1638d1eb17b67e49c614831261308ed561f -diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs -index 3bc3cbb..5e6ddd3 100644 ---- ext/PerlIO/via/via.xs -+++ ext/PerlIO/via/via.xs -@@ -89,7 +89,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags, - if (!s->fh) { - GV *gv = newGVgen(HvNAME_get(s->stash)); - GvIOp(gv) = newIO(); -- s->fh = newRV_noinc((SV *) gv); -+ s->fh = newRV((SV *) gv); - s->io = GvIOp(gv); - } - IoIFP(s->io) = PerlIONext(f); diff --git a/lang/perl5.14/files/patch-bug56908 b/lang/perl5.14/files/patch-bug56908 deleted file mode 100644 index f6789866cff7..000000000000 --- a/lang/perl5.14/files/patch-bug56908 +++ /dev/null @@ -1,31 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=56908 -# http://perl5.git.perl.org/perl.git/commitdiff/b17f5ab768c4daa8faac6c85c0c20d3895f406e1?hp=7ee5fac837a8a4ebf1956da1b1d252aa82fe506d -diff --git a/hv.c b/hv.c -index 3d4d3af..24d9150 100644 ---- hv.c -+++ hv.c -@@ -1985,6 +1985,7 @@ Perl_hv_kill_backrefs(pTHX_ HV *hv) { - if (av) { - HvAUX(hv)->xhv_backreferences = 0; - Perl_sv_kill_backrefs(aTHX_ (SV*) hv, av); -+ SvREFCNT_dec(av); - } - } - -diff --git a/sv.c b/sv.c -index 04d6e43..4792ad1 100644 ---- sv.c -+++ sv.c -@@ -10784,10 +10784,11 @@ Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) - daux->xhv_eiter = saux->xhv_eiter - ? he_dup(saux->xhv_eiter, - (bool)!!HvSHAREKEYS(sstr), param) : 0; -+ /* backref array needs refcnt=2; see sv_add_backref */ - daux->xhv_backreferences = - saux->xhv_backreferences - ? (AV*) SvREFCNT_inc( -- sv_dup((SV*)saux->xhv_backreferences, param)) -+ sv_dup_inc((SV*)saux->xhv_backreferences, param)) - : 0; - - daux->xhv_mro_meta = saux->xhv_mro_meta diff --git a/lang/perl5.14/files/patch-bug59516 b/lang/perl5.14/files/patch-bug59516 deleted file mode 100644 index 572c96e63d3c..000000000000 --- a/lang/perl5.14/files/patch-bug59516 +++ /dev/null @@ -1,16 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=59516 -# http://perl5.git.perl.org/perl.git/commitdiff/b023a8eeff463528d4a2b46396f79056c0ef9677?hp=a954f6ee3112c0edfbc59783d1b424d995122784 -diff --git a/regcomp.c b/regcomp.c -index 54347cc..68cc58c 100644 ---- regcomp.c -+++ regcomp.c -@@ -8350,6 +8350,9 @@ parseit: - *STRING(ret)= (char)value; - STR_LEN(ret)= 1; - RExC_emit += STR_SZ(1); -+ if (listsv) { -+ SvREFCNT_dec(listsv); -+ } - return ret; - } - /* optimize case-insensitive simple patterns (e.g. /[a-z]/i) */ diff --git a/lang/perl5.14/files/patch-bug64562 b/lang/perl5.14/files/patch-bug64562 deleted file mode 100644 index 7503887573e3..000000000000 --- a/lang/perl5.14/files/patch-bug64562 +++ /dev/null @@ -1,23 +0,0 @@ -# http://rt.perl.org/rt3/Public/Bug/Display.html?id=64562 -# http://perl5.git.perl.org/perl.git/commitdiff/ee6d2783b2d78accfac54397826acf5f6e1715e1?hp=5a8cf367090fb5d83d8e8e0ae381a3525a215928 -diff --git a/op.c b/op.c -index 517f648..89ed522 100644 ---- op.c -+++ op.c -@@ -6166,9 +6166,13 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) - const line_t oldline = CopLINE(PL_curcop); - if (PL_parser && PL_parser->copline != NOLINE) - CopLINE_set(PL_curcop, PL_parser->copline); -- Perl_warner(aTHX_ packWARN(WARN_REDEFINE), -- o ? "Format %"SVf" redefined" -- : "Format STDOUT redefined", SVfARG(cSVOPo->op_sv)); -+ if (o) { -+ Perl_warner(aTHX_ packWARN(WARN_REDEFINE), -+ "Format %"SVf" redefined", SVfARG(cSVOPo->op_sv)); -+ } else { -+ Perl_warner(aTHX_ packWARN(WARN_REDEFINE), -+ "Format STDOUT redefined"); -+ } - CopLINE_set(PL_curcop, oldline); - } - SvREFCNT_dec(cv); diff --git a/lang/perl5.14/files/patch-qr-leak b/lang/perl5.14/files/patch-qr-leak deleted file mode 100644 index 842c0074af46..000000000000 --- a/lang/perl5.14/files/patch-qr-leak +++ /dev/null @@ -1,16 +0,0 @@ -# http://perl5.git.perl.org/perl.git/commitdiff/a954f6ee3112c0edfbc59783d1b424d995122784?hp=711690a16d2a16be7070e06779c46a6d8f482689 -diff --git a/pp_hot.c b/pp_hot.c -index 57fa328..4a4e9e8 100644 ---- pp_hot.c -+++ pp_hot.c -@@ -1198,6 +1198,9 @@ PP(pp_qr) - if (rx->extflags & RXf_TAINTED) - SvTAINTED_on(rv); - sv_magic(sv,(SV*)ReREFCNT_inc(rx), PERL_MAGIC_qr,0,0); -+ if (pkg) { -+ SvREFCNT_dec(pkg); -+ } - XPUSHs(rv); - RETURN; - } - diff --git a/lang/perl5.14/files/patch-setpgrp b/lang/perl5.14/files/patch-setpgrp deleted file mode 100644 index e44f7aae0d5c..000000000000 --- a/lang/perl5.14/files/patch-setpgrp +++ /dev/null @@ -1,13 +0,0 @@ -# http://perl5.git.perl.org/perl.git/commit/1f200948c4c45a9bc088451dd377e4ab8733c722 -diff --git a/pp_sys.c b/pp_sys.c -index cfbf918..0d2c970 100644 ---- pp_sys.c -+++ pp_sys.c -@@ -4318,6 +4318,7 @@ PP(pp_setpgrp) - if (MAXARG < 2) { - pgrp = 0; - pid = 0; -+ XPUSHi(-1); - } - else { - pgrp = POPi; diff --git a/lang/perl5.14/files/patch-sv.c b/lang/perl5.14/files/patch-sv.c deleted file mode 100644 index 5ee260a4b4bd..000000000000 --- a/lang/perl5.14/files/patch-sv.c +++ /dev/null @@ -1,21 +0,0 @@ ---- sv.c -+++ sv.c -@@ -10421,7 +10421,8 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param) - IoBOTTOM_NAME(dstr) = SAVEPV(IoBOTTOM_NAME(dstr)); - break; - case SVt_PVAV: -- if (AvARRAY((AV*)sstr)) { -+ /* avoid cloning an empty array */ -+ if (AvARRAY((AV *)sstr) && AvFILLp((AV *)sstr) >= 0) { - SV **dst_ary, **src_ary; - SSize_t items = AvFILLp((AV*)sstr) + 1; - -@@ -10446,6 +10447,8 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param) - else { - AvARRAY((AV*)dstr) = NULL; - AvALLOC((AV*)dstr) = (SV**)NULL; -+ AvMAX( (AV *)dstr) = -1; -+ AvFILLp((AV *)dstr) = -1; - } - break; - case SVt_PVHV: diff --git a/lang/perl5.14/files/perl-after-upgrade b/lang/perl5.14/files/perl-after-upgrade index a7f074d7566a..7bb37386c4b9 100644 --- a/lang/perl5.14/files/perl-after-upgrade +++ b/lang/perl5.14/files/perl-after-upgrade @@ -18,7 +18,7 @@ perl-after-upgrade -- fixup FreeBSD packages that depend on perl =head1 SYNOPSIS perl-after-upgrade - perl-after-upgrade -f + perl-after-upgrade -f [-d] [-q] perl-after-upgrade -v =head1 DESCRIPTION @@ -109,7 +109,11 @@ perl(1). =cut -my $debug = 0; +use strict; +use warnings; +use 5.0100; + +our $debug = 0; # |/-\ my $pchar = "|"; @@ -123,6 +127,9 @@ sub progress } package FreeBSD::Package; +use strict; +use warnings; + use IO::File; use File::Copy; @@ -184,6 +191,7 @@ sub write_back package FreeBSD::Package::DB; use strict; +use warnings; sub new { @@ -217,12 +225,16 @@ sub reset } package main; +use strict; +use warnings; + use File::Temp qw/tempfile/; use File::Copy; -my $dry_run = 1; +our $dry_run = 1; +our $quiet = 0; my @tmpl; -my $VERSION = "1.3"; +our $VERSION = "1.4"; while (@ARGV) { my $opt = shift; @@ -230,6 +242,8 @@ while (@ARGV) { $dry_run = 0; } elsif ($opt eq "-d") { $debug = 1; + } elsif ($opt eq "-q") { + $quiet = 1; } elsif ($opt eq "-v") { $_ = $0; s|.*/||; @@ -247,18 +261,18 @@ while (@ARGV) { } } -my $target = '%%PERL_VERSION%%'; -my $new_perl_pkgname = '%%PKGNAME%%'; +our $PERL_VERSION = '%%PERL_VERSION%%'; +our $PERL_PKGNAME = '%%PKGNAME%%'; -my $fuzzy_source = qr/5\.10\.\d+/; -print STDERR "- Fuzzy source re: <$fuzzy_source>\n" if $debug; +our $PERL_VERSION_REGEX = qr/5\.10\.\d+/; +print STDERR "- Fuzzy source re: <$PERL_VERSION_REGEX>\n" if $debug; -my @errors; -my @notes; +our @errors; +our @notes; sub fix_script { - my ($file, $target) = @_; + my ($file) = @_; main::progress(); return 1 if $dry_run; @@ -266,7 +280,7 @@ sub fix_script return "" unless $sf; my $line = <$sf>; my $md5 = ""; - if ($line && $line =~ s|^(\s*#!\s*[\w/]+perl)$fuzzy_source\b|$1$target|) { + if ($line && $line =~ s|^(\s*#!\s*[\w/]+perl)$PERL_VERSION_REGEX\b|$1$PERL_VERSION|) { my $dir = $file; $dir =~ s|/[^/]+$||; my ($fh, $fn) = tempfile(DIR=> $dir); @@ -298,7 +312,7 @@ sub fix_script sub fix_binary { - my ($file, $target) = @_; + my ($file) = @_; main::progress(); my $sf = IO::File->new("< $file"); @@ -317,7 +331,7 @@ sub fix_binary } while (<$sf>) { - s|/lib/perl5/$fuzzy_source/mach/CORE|/lib/perl5/$target/mach/CORE|g; + s|/lib/perl5/$PERL_VERSION_REGEX/mach/CORE|/lib/perl5/$PERL_VERSION/mach/CORE|g; print $fh $_; } close $fh; @@ -370,7 +384,7 @@ sub might_need_to_fix return 1; } for ($pkg->lines) { - if (/^\@pkgdep\s+perl-(threaded-)?($fuzzy_source)\S*\s*$/) { + if (/^\@pkgdep\s+perl-(threaded-)?($PERL_VERSION_REGEX)\S*\s*$/) { return 1; } } @@ -387,15 +401,15 @@ sub fixable_binary if (/^\s+libperl\.so\s+=>/) { my $found; for (`strings $file`) { - if (m</lib/perl5/($fuzzy_source)/mach/CORE>) { + if (m</lib/perl5/($PERL_VERSION_REGEX)/mach/CORE>) { $found++; - if (length($1) != length($target)) { + if (length($1) != length($PERL_VERSION)) { push @notes, "$name cannot be fixed up (and has to be reinstalled): cannot patch $file due to length difference"; print STDERR "- Skipping $name: cannot patch $file due to length difference\n" if $debug; return undef; } print STDERR "- $name: fixable binary $file\n" if $debug && $found < 2; - $fixable = 1 if $1 ne $target; + $fixable = 1 if $1 ne $PERL_VERSION; } } if (!$found) { @@ -454,9 +468,9 @@ sub cannot_be_fixed # shared library - can prevent us from being able to upgrade } elsif ($line && $line =~ /^\177ELF.\x01.\x09.{8}\x03\0/) { return 0 unless fixable_shared_lib($file, $pkg_name); - } elsif ($line && $line =~ m<^\s*#!\s*[\w/]+perl($fuzzy_source)\b>) { + } elsif ($line && $line =~ m<^\s*#!\s*[\w/]+perl($PERL_VERSION_REGEX)\b>) { print STDERR "- $pkg_name: fixable script $file\n" if $debug; - push @$scripts, $file if $1 ne $target; + push @$scripts, $file if $1 ne $PERL_VERSION; } main::progress(); } @@ -509,14 +523,16 @@ while (my $pkg = $db->next) { $new_md5 = ""; unless (-l $from) { # skip symlinks if ($binaries{$from}) { - $new_md5 = fix_binary($from, $target); + $new_md5 = fix_binary($from); } elsif ($scripts{$from}) { - $new_md5 = fix_script($from, $target); + $new_md5 = fix_script($from); } $modified++ if $new_md5; } my $to = $from; - if ($to =~ s|/perl5/$fuzzy_source/|/perl5/$target/|g or $to =~ s|/perl5/site_perl/$fuzzy_source/|/perl5/site_perl/$target/|g) { + if ($to =~ s|/perl5/$PERL_VERSION_REGEX/|/perl5/$PERL_VERSION/|g + || $to =~ s|/perl5/site_perl/$PERL_VERSION_REGEX/|/perl5/site_perl/$PERL_VERSION/|g + ) { if ($to ne $from) { my $dir = $to; $dir =~ s|/[^/]+$||; @@ -540,14 +556,14 @@ while (my $pkg = $db->next) { } if (/^\@cwd\s+(\S+)\s*$/) { $prefix = $1; - } elsif (/^\@pkgdep\s+perl-(threaded-)?($fuzzy_source)\S*\s*$/) { - if ($target ne $2) { + } elsif (/^\@pkgdep\s+perl-(threaded-)?($PERL_VERSION_REGEX)\S*\s*$/) { + if ($PERL_VERSION ne $2) { my $perlver = $2; - s|perl-(threaded-)?\Q$perlver\E|$new_perl_pkgname|; + s|perl-(threaded-)?\Q$perlver\E\S*|$PERL_PKGNAME|; } } my $old = $_; - if (s|/perl5/$fuzzy_source/|/perl5/$target/|g || s|/perl5/site_perl/$fuzzy_source/|/perl5/site_perl/$target/|g) { + if (s|/perl5/$PERL_VERSION_REGEX/|/perl5/$PERL_VERSION/|g || s|/perl5/site_perl/$PERL_VERSION_REGEX/|/perl5/site_perl/$PERL_VERSION/|g) { if ($old ne $_) { $adjusted++; print STDERR "- adjust: $_\n" if $debug; @@ -563,7 +579,8 @@ while (my $pkg = $db->next) { $fixed++ if $moved || $modified || $adjusted; $tot_modified += $modified; $tot_moved += $moved; - print "$pkg_name: $moved moved, $modified modified, $adjusted adjusted\n"; + say "$pkg_name: $moved moved, $modified modified, $adjusted adjusted" + if !$quiet || ($moved || $modified || $adjusted); } print "\n---\n"; print "Fixed $fixed packages ($tot_moved files moved, $tot_modified files modified)\n"; |