Change 34654: Add MUTABLE_IO(), and eliminate (IO *) casts in *.c.

2008-10-29 Thread Nicholas Clark
Change 34654 by [EMAIL PROTECTED] on 2008/10/29 23:20:01

Add MUTABLE_IO(), and eliminate (IO *) casts in *.c.

Affected files ...

... //depot/perl/doio.c#373 edit
... //depot/perl/gv.c#403 edit
... //depot/perl/handy.h#155 edit
... //depot/perl/perl.c#882 edit
... //depot/perl/pp.c#637 edit
... //depot/perl/pp_sys.c#566 edit
... //depot/perl/sv.c#1568 edit

Differences ...

 //depot/perl/doio.c#373 (text) 
Index: perl/doio.c
--- perl/doio.c#372~34653~  2008-10-29 16:04:34.0 -0700
+++ perl/doio.c 2008-10-29 16:20:01.0 -0700
@@ -1316,7 +1316,7 @@
goto do_fstat;
}
 else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
-io = (IO*)SvRV(sv);
+io = MUTABLE_IO(SvRV(sv));
gv = NULL;
 goto do_fstat_have_io;
 }

 //depot/perl/gv.c#403 (text) 
Index: perl/gv.c
--- perl/gv.c#402~34653~2008-10-29 16:04:34.0 -0700
+++ perl/gv.c   2008-10-29 16:20:01.0 -0700
@@ -1499,7 +1499,7 @@
 {
 dVAR;
 GV *iogv;
-IO * const io = (IO*)newSV_type(SVt_PVIO);
+IO * const io = MUTABLE_IO(newSV_type(SVt_PVIO));
 /* This used to read SvREFCNT(io) = 1;
It's not clear why the reference count needed an explicit reset. NWC
 */

 //depot/perl/handy.h#155 (text) 
Index: perl/handy.h
--- perl/handy.h#154~34647~ 2008-10-29 14:57:34.0 -0700
+++ perl/handy.h2008-10-29 16:20:01.0 -0700
@@ -57,6 +57,7 @@
 #define MUTABLE_AV(p)  ((AV *)MUTABLE_PTR(p))
 #define MUTABLE_CV(p)  ((CV *)MUTABLE_PTR(p))
 #define MUTABLE_HV(p)  ((HV *)MUTABLE_PTR(p))
+#define MUTABLE_IO(p)  ((IO *)MUTABLE_PTR(p))
 #define MUTABLE_SV(p)  ((SV *)MUTABLE_PTR(p))
 
 /* XXX Configure ought to have a test for a boolean type, if I can

 //depot/perl/perl.c#882 (text) 
Index: perl/perl.c
--- perl/perl.c#881~34653~  2008-10-29 16:04:34.0 -0700
+++ perl/perl.c 2008-10-29 16:20:01.0 -0700
@@ -4554,7 +4554,7 @@
 IoIFP(io) = PerlIO_stdin();
 tmpgv = gv_fetchpvs("stdin", GV_ADD|GV_NOTQUAL, SVt_PV);
 GvMULTI_on(tmpgv);
-GvIOp(tmpgv) = (IO*)SvREFCNT_inc_simple(io);
+GvIOp(tmpgv) = MUTABLE_IO(SvREFCNT_inc_simple(io));
 
 tmpgv = gv_fetchpvs("STDOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO);
 GvMULTI_on(tmpgv);
@@ -4564,7 +4564,7 @@
 setdefout(tmpgv);
 tmpgv = gv_fetchpvs("stdout", GV_ADD|GV_NOTQUAL, SVt_PV);
 GvMULTI_on(tmpgv);
-GvIOp(tmpgv) = (IO*)SvREFCNT_inc_simple(io);
+GvIOp(tmpgv) = MUTABLE_IO(SvREFCNT_inc_simple(io));
 
 PL_stderrgv = gv_fetchpvs("STDERR", GV_ADD|GV_NOTQUAL, SVt_PVIO);
 GvMULTI_on(PL_stderrgv);
@@ -4573,7 +4573,7 @@
 IoOFP(io) = IoIFP(io) = PerlIO_stderr();
 tmpgv = gv_fetchpvs("stderr", GV_ADD|GV_NOTQUAL, SVt_PV);
 GvMULTI_on(tmpgv);
-GvIOp(tmpgv) = (IO*)SvREFCNT_inc_simple(io);
+GvIOp(tmpgv) = MUTABLE_IO(SvREFCNT_inc_simple(io));
 
 PL_statname = newSV(0);/* last filename we did stat on */
 

 //depot/perl/pp.c#637 (text) 
Index: perl/pp.c
--- perl/pp.c#636~34653~2008-10-29 16:04:34.0 -0700
+++ perl/pp.c   2008-10-29 16:20:01.0 -0700
@@ -139,7 +139,7 @@
if (SvTYPE(sv) == SVt_PVIO) {
GV * const gv = (GV*) sv_newmortal();
gv_init(gv, 0, "", 0, 0);
-   GvIOp(gv) = (IO *)sv;
+   GvIOp(gv) = MUTABLE_IO(sv);
SvREFCNT_inc_void_NN(sv);
sv = (SV*) gv;
}

 //depot/perl/pp_sys.c#566 (text) 
Index: perl/pp_sys.c
--- perl/pp_sys.c#565~34653~2008-10-29 16:04:34.0 -0700
+++ perl/pp_sys.c   2008-10-29 16:20:01.0 -0700
@@ -2207,7 +2207,7 @@
goto do_ftruncate_gv;
}
else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
-   io = (IO*) SvRV(sv); /* *main::FRED{IO} for example */
+   io = MUTABLE_IO(SvRV(sv)); /* *main::FRED{IO} for example */
goto do_ftruncate_io;
}
 
@@ -2854,7 +2854,7 @@
 goto do_fstat_warning_check;
 goto do_fstat;
 } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { 
-io = (IO*)SvRV(sv);
+io = MUTABLE_IO(SvRV(sv));
 if (PL_op->op_type == OP_LSTAT)
 goto do_fstat_warning_check;
 goto do_fstat_have_io; 

 //depot/perl/sv.c#1568 (text) 
Index: perl/sv.c
--- perl/sv.c#1567~34653~   2008-10-29 16:04:34.0 -0700
+++ perl/sv.c   2008-10-29 16:20:01.0 -0700
@@ -4736,7 +4736,7 @@
 */
 
 if (how == PERL_MAGIC_tiedscalar && SvTYPE(sv) == SVt_PVIO &&
-obj && SvROK(obj) && GvIO(SvRV(obj)) == (IO*)sv)
+obj && SvROK(obj) && GvIO(SvRV(obj)) == (const IO *)sv)
 {
   sv_rvweaken(obj);
 }
@@ -5494,7 +5494,7 @@
IoIFP(sv) != PerlIO_stdout() &&
IoIFP(sv) != PerlIO_stderr())
{
-   io_close((IO*)sv, FALSE);
+   io_close(MUTA

Change 34653: Use pvs macros instead of pvn where possible.

2008-10-29 Thread Marcus Holland-Moritz
Change 34653 by [EMAIL PROTECTED] on 2008/10/29 23:04:34

Use pvs macros instead of pvn where possible.

Affected files ...

... //depot/perl/doio.c#372 edit
... //depot/perl/doop.c#205 edit
... //depot/perl/dump.c#317 edit
... //depot/perl/gv.c#402 edit
... //depot/perl/mg.c#536 edit
... //depot/perl/op.c#1014 edit
... //depot/perl/pad.c#126 edit
... //depot/perl/perl.c#881 edit
... //depot/perl/pp.c#636 edit
... //depot/perl/pp_ctl.c#703 edit
... //depot/perl/pp_hot.c#583 edit
... //depot/perl/pp_pack.c#145 edit
... //depot/perl/pp_sys.c#565 edit
... //depot/perl/regcomp.c#665 edit
... //depot/perl/sv.c#1567 edit
... //depot/perl/toke.c#832 edit
... //depot/perl/universal.c#203 edit
... //depot/perl/utf8.c#315 edit
... //depot/perl/util.c#663 edit

Differences ...

 //depot/perl/doio.c#372 (text) 
Index: perl/doio.c
--- perl/doio.c#371~34585~  2008-10-25 05:23:01.0 -0700
+++ perl/doio.c 2008-10-29 16:04:34.0 -0700
@@ -212,7 +212,7 @@
goto say_false;
}
 #endif /* USE_STDIO */
-   name = SvOK(*svp) ? savesvpv (*svp) : savepvn ("", 0);
+   name = SvOK(*svp) ? savesvpv (*svp) : savepvs ("");
SAVEFREEPV(name);
}
else {
@@ -766,7 +766,7 @@
const char *star = strchr(PL_inplace, '*');
if (star) {
const char *begin = PL_inplace;
-   sv_setpvn(sv, "", 0);
+   sv_setpvs(sv, "");
do {
sv_catpvn(sv, begin, star - begin);
sv_catpvn(sv, PL_oldname, oldlen);
@@ -1282,7 +1282,7 @@
 do_fstat_have_io:
 PL_laststype = OP_STAT;
 PL_statgv = gv;
-sv_setpvn(PL_statname, "", 0);
+sv_setpvs(PL_statname, "");
 if(io) {
if (IoIFP(io)) {
return (PL_laststatval = 
PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &PL_statcache));
@@ -2179,7 +2179,7 @@
 
 /* suppress warning when reading into undef var --jhi */
 if (! SvOK(mstr))
-   sv_setpvn(mstr, "", 0);
+   sv_setpvs(mstr, "");
 msize = SvIVx(*++mark);
 mtype = (long)SvIVx(*++mark);
 flags = SvIVx(*++mark);
@@ -2288,7 +2288,7 @@
char *mbuf;
/* suppress warning when reading into undef var (tchrist 3/Mar/00) */
if (! SvOK(mstr))
-   sv_setpvn(mstr, "", 0);
+   sv_setpvs(mstr, "");
SvPV_force_nolen(mstr);
mbuf = SvGROW(mstr, (STRLEN)msize+1);
 

 //depot/perl/doop.c#205 (text) 
Index: perl/doop.c
--- perl/doop.c#204~34650~  2008-10-29 15:45:15.0 -0700
+++ perl/doop.c 2008-10-29 16:04:34.0 -0700
@@ -707,7 +707,7 @@
++mark;
 }
 
-sv_setpvn(sv, "", 0);
+sv_setpvs(sv, "");
 /* sv_setpv retains old UTF8ness [perl #24846] */
 SvUTF8_off(sv);
 
@@ -1050,7 +1050,7 @@
}
}
else
-   sv_setpvn(astr, "", 0);
+   sv_setpvs(astr, "");
 }
 else if (s && len) {
s += --len;
@@ -1061,7 +1061,7 @@
SvNIOK_off(sv);
 }
 else
-   sv_setpvn(astr, "", 0);
+   sv_setpvs(astr, "");
 SvSETMAGIC(sv);
 }
 
@@ -1228,7 +1228,7 @@
 PERL_ARGS_ASSERT_DO_VOP;
 
 if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv)))
-   sv_setpvn(sv, "", 0);   /* avoid undef warning on |= and ^= */
+   sv_setpvs(sv, "");  /* avoid undef warning on |= and ^= */
 lsave = lc = SvPV_nomg_const(left, leftlen);
 rsave = rc = SvPV_nomg_const(right, rightlen);
 

 //depot/perl/dump.c#317 (text) 
Index: perl/dump.c
--- perl/dump.c#316~34650~  2008-10-29 15:45:15.0 -0700
+++ perl/dump.c 2008-10-29 16:04:34.0 -0700
@@ -229,7 +229,7 @@
 
 if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) {
/* This won't alter the UTF-8 flag */
-   sv_setpvn(dsv, "", 0);
+   sv_setpvs(dsv, "");
 }
 
 if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
@@ -342,29 +342,29 @@

 if (!(flags & PERL_PV_PRETTY_NOCLEAR)) {
/* This won't alter the UTF-8 flag */
-   sv_setpvn(dsv, "", 0);
+   sv_setpvs(dsv, "");
 }
 
 if ( dq == '"' )
-sv_catpvn(dsv, "\"", 1);
+sv_catpvs(dsv, "\"");
 else if ( flags & PERL_PV_PRETTY_LTGT )
-sv_catpvn(dsv, "<", 1);
+sv_catpvs(dsv, "<");
 
 if ( start_color != NULL ) 
-Perl_sv_catpv( aTHX_ dsv, start_color);
+sv_catpv(dsv, start_color);
 
 pv_escape( dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR 
);
 
 if ( end_color != NULL ) 
-Perl_sv_catpv( aTHX_ dsv, end_color);
+sv_catpv(dsv, end_color);
 
 if ( dq == '"' ) 
-   sv_catpvn( dsv, "\"", 1 );
+   sv_catpvs( dsv, "\"");
 else if ( flags & PERL_PV_PRETTY_LTGT )
-sv_catpvn( dsv, ">", 1); 
+sv_ca

Change 34650: Eliminate (AV *) casts in *.c.

2008-10-29 Thread Nicholas Clark
Change 34650 by [EMAIL PROTECTED] on 2008/10/29 22:45:15

Eliminate (AV *) casts in *.c.

Affected files ...

... //depot/perl/av.c#137 edit
... //depot/perl/doop.c#204 edit
... //depot/perl/dump.c#316 edit
... //depot/perl/mathoms.c#90 edit
... //depot/perl/mg.c#535 edit
... //depot/perl/mro.c#56 edit
... //depot/perl/pad.c#125 edit
... //depot/perl/pp.c#635 edit
... //depot/perl/pp_ctl.c#702 edit
... //depot/perl/pp_hot.c#582 edit
... //depot/perl/pp_sort.c#82 edit
... //depot/perl/regcomp.c#664 edit
... //depot/perl/regexec.c#573 edit
... //depot/perl/scope.c#229 edit
... //depot/perl/sv.c#1566 edit
... //depot/perl/toke.c#831 edit
... //depot/perl/universal.c#202 edit
... //depot/perl/util.c#662 edit

Differences ...

 //depot/perl/av.c#137 (text) 
Index: perl/av.c
--- perl/av.c#136~34604~2008-10-27 13:22:36.0 -0700
+++ perl/av.c   2008-10-29 15:45:15.0 -0700
@@ -385,7 +385,7 @@
 AV *
 Perl_av_make(pTHX_ register I32 size, register SV **strp)
 {
-register AV * const av = (AV*)newSV_type(SVt_PVAV);
+register AV * const av = MUTABLE_AV(newSV_type(SVt_PVAV));
 /* sv_upgrade does AvREAL_only()  */
 PERL_ARGS_ASSERT_AV_MAKE;
 assert(SvTYPE(av) == SVt_PVAV);

 //depot/perl/doop.c#204 (text) 
Index: perl/doop.c
--- perl/doop.c#203~34629~  2008-10-28 15:14:26.0 -0700
+++ perl/doop.c 2008-10-29 15:45:15.0 -0700
@@ -998,7 +998,7 @@
 
 if (SvTYPE(sv) == SVt_PVAV) {
register I32 i;
-   AV* const av = (AV*)sv;
+   AV *const av = MUTABLE_AV(sv);
const I32 max = AvFILL(av);
 
for (i = 0; i <= max; i++) {
@@ -1084,7 +1084,7 @@
 count = 0;
 if (SvTYPE(sv) == SVt_PVAV) {
register I32 i;
-   AV* const av = (AV*)sv;
+   AV *const av = MUTABLE_AV(sv);
const I32 max = AvFILL(av);
 
for (i = 0; i <= max; i++) {

 //depot/perl/dump.c#316 (text) 
Index: perl/dump.c
--- perl/dump.c#315~34649~  2008-10-29 15:15:33.0 -0700
+++ perl/dump.c 2008-10-29 15:45:15.0 -0700
@@ -1661,10 +1661,10 @@
if (AvREIFY(sv))sv_catpv(d, ",REIFY");
Perl_dump_indent(aTHX_ level, file, "  FLAGS = (%s)\n",
 SvCUR(d) ? SvPVX_const(d) + 1 : "");
-   if (nest < maxnest && av_len((AV*)sv) >= 0) {
+   if (nest < maxnest && av_len(MUTABLE_AV(sv)) >= 0) {
int count;
-   for (count = 0; count <=  av_len((AV*)sv) && count < maxnest; 
count++) {
-   SV** const elt = av_fetch((AV*)sv,count,0);
+   for (count = 0; count <=  av_len(MUTABLE_AV(sv)) && count < 
maxnest; count++) {
+   SV** const elt = av_fetch(MUTABLE_AV(sv),count,0);
 
Perl_dump_indent(aTHX_ level + 1, file, "Elt No. %"IVdf"\n", 
(IV)count);
if (elt)
@@ -2030,7 +2030,7 @@
SV *sv;
 if (cv) {
AV * const padlist = CvPADLIST(cv);
-AV * const comppad = (AV*)(*av_fetch(padlist, 0, FALSE));
+AV * const comppad = MUTABLE_AV(*av_fetch(padlist, 0, FALSE));
 sv = *av_fetch(comppad, o->op_targ, FALSE);
 } else
 sv = NULL;

 //depot/perl/mathoms.c#90 (text) 
Index: perl/mathoms.c
--- perl/mathoms.c#89~34629~2008-10-28 15:14:26.0 -0700
+++ perl/mathoms.c  2008-10-29 15:45:15.0 -0700
@@ -609,7 +609,7 @@
 Perl_av_fake(pTHX_ register I32 size, register SV **strp)
 {
 register SV** ary;
-register AV * const av = (AV*)newSV_type(SVt_PVAV);
+register AV * const av = MUTABLE_AV(newSV_type(SVt_PVAV));
 
 PERL_ARGS_ASSERT_AV_FAKE;
 
@@ -1445,7 +1445,7 @@
 AV *
 Perl_newAV(pTHX)
 {
-return (AV*)newSV_type(SVt_PVAV);
+return MUTABLE_AV(newSV_type(SVt_PVAV));
 /* sv_upgrade does AvREAL_only():
 AvALLOC(av) = 0;
 AvARRAY(av) = NULL;

 //depot/perl/mg.c#535 (text) 
Index: perl/mg.c
--- perl/mg.c#534~34647~2008-10-29 14:57:34.0 -0700
+++ perl/mg.c   2008-10-29 15:45:15.0 -0700
@@ -358,7 +358,7 @@
 
 switch(SvTYPE(sv)) {
case SVt_PVAV:
-   return AvFILLp((AV *) sv); /* Fallback to non-tied array */
+   return AvFILLp((const AV *) sv); /* Fallback to non-tied array */
case SVt_PVHV:
/* FIXME */
default:
@@ -1603,7 +1603,7 @@
 /* Bail out if destruction is going on */
 if(PL_dirty) return 0;
 
-av_clear((AV*)sv);
+av_clear(MUTABLE_AV(sv));
 
 /* XXX see comments in magic_setisa */
 stash = GvSTASH(
@@ -1895,7 +1895,7 @@
 Perl_magic_getarylen(pTHX_ SV *sv, const MAGIC *mg)
 {
 dVAR;
-AV * const obj = (AV*)mg->mg_obj;
+AV * const obj = MUTABLE_AV(mg->mg_obj);
 
 PERL_ARGS_ASSERT_MAGIC_GETARYLEN;
 
@@ -1911,7 +1911,7 @@
 Perl_magic_setarylen(pTHX_ SV *sv, MAGIC *mg)
 {
 dVAR;
-AV * const obj = (AV*)mg->mg_obj;
+AV * const obj = MUTABLE_AV(mg->mg_obj);
 
 PERL_ARGS_ASSERT_MAGIC_SETARYLEN;
 
@@ -2164,7 +2164,7 @@
   

Change 34649: Remove redundant (and wrong) prototype for pv_display()

2008-10-29 Thread Marcus Holland-Moritz
Change 34649 by [EMAIL PROTECTED] on 2008/10/29 22:15:33

Remove redundant (and wrong) prototype for pv_display()
from its apidoc section.

Affected files ...

... //depot/perl/dump.c#315 edit

Differences ...

 //depot/perl/dump.c#315 (text) 
Index: perl/dump.c
--- perl/dump.c#314~34646~  2008-10-29 14:36:17.0 -0700
+++ perl/dump.c 2008-10-29 15:15:33.0 -0700
@@ -372,9 +372,6 @@
 /*
 =for apidoc pv_display
 
-  char *pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len,
-   STRLEN pvlim, U32 flags)
-
 Similar to
 
   pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);
End of Patch.


Change 34648: Fwd: CPAN Upload: S/SA/SAPER/constant-1.17.tar.gz

2008-10-29 Thread Nicholas Clark
Change 34648 by [EMAIL PROTECTED] on 2008/10/29 22:14:33

Subject: Fwd: CPAN Upload: S/SA/SAPER/constant-1.17.tar.gz
From: Sébastien Aperghis-Tramoni <[EMAIL PROTECTED]>
Message-Id: <[EMAIL PROTECTED]>
Date: Wed, 29 Oct 2008 22:58:52 +0100

Affected files ...

... //depot/perl/lib/constant.pm#32 edit
... //depot/perl/lib/constant.t#12 edit

Differences ...

 //depot/perl/lib/constant.pm#32 (text) 
Index: perl/lib/constant.pm
--- perl/lib/constant.pm#31~34385~  2008-09-21 07:45:10.0 -0700
+++ perl/lib/constant.pm2008-10-29 15:14:33.0 -0700
@@ -4,7 +4,7 @@
 use warnings::register;
 
 use vars qw($VERSION %declared);
-$VERSION = '1.16';
+$VERSION = '1.17';
 
 #===
 

 //depot/perl/lib/constant.t#12 (text) 
Index: perl/lib/constant.t
--- perl/lib/constant.t#11~32800~   2008-01-01 15:46:55.0 -0800
+++ perl/lib/constant.t 2008-10-29 15:14:33.0 -0700
@@ -12,11 +12,11 @@
 BEGIN {# ...and save 'em for later
 $SIG{'__WARN__'} = sub { push @warnings, @_ }
 }
-END { print STDERR @warnings }
+END { @warnings && print STDERR join "\n- ", "accumulated warnings:", 
@warnings }
 
 
 use strict;
-use Test::More tests => 97;
+use Test::More tests => 95;
 my $TB = Test::More->builder;
 
 BEGIN { use_ok('constant'); }
@@ -80,13 +80,6 @@
 is MESS, q('"'\\"'"\\);
 is length(MESS), 8;
 
-use constant TRAILING  => '12 cats';
-{
-local $^W;
-cmp_ok TRAILING, '==', 12;
-}
-is TRAILING, '12 cats';
-
 use constant LEADING   => " \t1234";
 cmp_ok LEADING, '==', 1234;
 is LEADING, " \t1234";
@@ -112,7 +105,7 @@
 # text may vary, so we can't test much better than this.
 cmp_ok length(E2BIG), '>', 6;
 
-is @warnings, 0 or diag join "\n", "unexpected warning", @warnings;
+is @warnings, 0 or diag join "\n- ", "unexpected warning:", @warnings;
 @warnings = ();# just in case
 undef &PI;
 ok @warnings && ($warnings[0] =~ /Constant sub.* undefined/) or
@@ -122,9 +115,9 @@
 is @warnings, 0, "unexpected warning";
 
 my $curr_test = $TB->current_test;
-use constant CSCALAR   => \"ok 37\n";
-use constant CHASH => { foo => "ok 38\n" };
-use constant CARRAY=> [ undef, "ok 39\n" ];
+use constant CSCALAR   => \"ok 35\n";
+use constant CHASH => { foo => "ok 36\n" };
+use constant CARRAY=> [ undef, "ok 37\n" ];
 use constant CCODE => sub { "ok $_[0]\n" };
 
 my $output = $TB->output ;
End of Patch.


Change 34647: Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.

2008-10-29 Thread Nicholas Clark
Change 34647 by [EMAIL PROTECTED] on 2008/10/29 21:57:34

Add MUTABLE_CV(), and eliminate (CV *) casts in *.c. 

Affected files ...

... //depot/perl/gv.c#401 edit
... //depot/perl/handy.h#154 edit
... //depot/perl/mg.c#534 edit
... //depot/perl/op.c#1013 edit
... //depot/perl/pad.c#124 edit
... //depot/perl/perl.c#880 edit
... //depot/perl/pp.c#634 edit
... //depot/perl/pp_ctl.c#701 edit
... //depot/perl/pp_hot.c#581 edit
... //depot/perl/pp_sort.c#81 edit
... //depot/perl/pp_sys.c#564 edit
... //depot/perl/sv.c#1565 edit
... //depot/perl/toke.c#830 edit
... //depot/perl/xsutils.c#58 edit

Differences ...

 //depot/perl/gv.c#401 (text) 
Index: perl/gv.c
--- perl/gv.c#400~34629~2008-10-28 15:14:26.0 -0700
+++ perl/gv.c   2008-10-29 14:57:34.0 -0700
@@ -1764,10 +1764,10 @@
if (i < DESTROY_amg)
have_ovl = 1;
} else if (gv) {/* Autoloaded... */
-   cv = (CV*)gv;
+   cv = MUTABLE_CV(gv);
filled = 1;
}
-   amt.table[i]=(CV*)SvREFCNT_inc_simple(cv);
+   amt.table[i]=MUTABLE_CV(SvREFCNT_inc_simple(cv));
 }
 if (filled) {
   AMT_AMAGIC_on(&amt);

 //depot/perl/handy.h#154 (text) 
Index: perl/handy.h
--- perl/handy.h#153~34619~ 2008-10-28 11:30:54.0 -0700
+++ perl/handy.h2008-10-29 14:57:34.0 -0700
@@ -55,6 +55,7 @@
 #endif
 
 #define MUTABLE_AV(p)  ((AV *)MUTABLE_PTR(p))
+#define MUTABLE_CV(p)  ((CV *)MUTABLE_PTR(p))
 #define MUTABLE_HV(p)  ((HV *)MUTABLE_PTR(p))
 #define MUTABLE_SV(p)  ((SV *)MUTABLE_PTR(p))
 

 //depot/perl/mg.c#534 (text) 
Index: perl/mg.c
--- perl/mg.c#533~34629~2008-10-28 15:14:26.0 -0700
+++ perl/mg.c   2008-10-29 14:57:34.0 -0700
@@ -2916,7 +2916,7 @@
 if (flags & 16)
PL_scopestack_ix += 1;
 /* sv_2cv is too complicated, try a simpler variant first: */
-if (!SvROK(PL_psig_ptr[sig]) || !(cv = (CV*)SvRV(PL_psig_ptr[sig]))
+if (!SvROK(PL_psig_ptr[sig]) || !(cv = MUTABLE_CV(SvRV(PL_psig_ptr[sig])))
|| SvTYPE(cv) != SVt_PVCV) {
HV *st;
cv = sv_2cv(PL_psig_ptr[sig], &st, &gv, GV_ADD);

 //depot/perl/op.c#1013 (text) 
Index: perl/op.c
--- perl/op.c#1012~34645~   2008-10-29 14:24:54.0 -0700
+++ perl/op.c   2008-10-29 14:57:34.0 -0700
@@ -5569,7 +5569,7 @@
{
Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "Runaway 
prototype");
}
-   cv_ckproto_len((CV*)gv, NULL, ps, ps_len);
+   cv_ckproto_len((const CV *)gv, NULL, ps, ps_len);
}
if (ps)
sv_setpvn((SV*)gv, ps, ps_len);
@@ -6103,7 +6103,7 @@
 if (cv)/* must reuse cv if autoloaded */
cv_undef(cv);
 else {
-   cv = (CV*)newSV_type(SVt_PVCV);
+   cv = MUTABLE_CV(newSV_type(SVt_PVCV));
if (name) {
GvCV(gv) = cv;
GvCVGEN(gv) = 0;

 //depot/perl/pad.c#124 (text) 
Index: perl/pad.c
--- perl/pad.c#123~34629~   2008-10-28 15:14:26.0 -0700
+++ perl/pad.c  2008-10-29 14:57:34.0 -0700
@@ -285,7 +285,7 @@
if (namesv && namesv != &PL_sv_undef
&& *SvPVX_const(namesv) == '&')
{
-   CV * const innercv = (CV*)curpad[ix];
+   CV * const innercv = MUTABLE_CV(curpad[ix]);
U32 inner_rc = SvREFCNT(innercv);
assert(inner_rc);
namepad[ix] = NULL;
@@ -511,10 +511,10 @@
 
 /* to avoid ref loops, we never have parent + child referencing each
  * other simultaneously */
-if (CvOUTSIDE((CV*)sv)) {
-   assert(!CvWEAKOUTSIDE((CV*)sv));
-   CvWEAKOUTSIDE_on((CV*)sv);
-   SvREFCNT_dec(CvOUTSIDE((CV*)sv));
+if (CvOUTSIDE((const CV *)sv)) {
+   assert(!CvWEAKOUTSIDE((const CV *)sv));
+   CvWEAKOUTSIDE_on(MUTABLE_CV(sv));
+   SvREFCNT_dec(CvOUTSIDE(MUTABLE_CV(sv)));
 }
 return ix;
 }
@@ -1486,7 +1486,7 @@
 ENTER;
 SAVESPTR(PL_compcv);
 
-cv = PL_compcv = (CV*)newSV_type(SvTYPE(proto));
+cv = PL_compcv = MUTABLE_CV(newSV_type(SvTYPE(proto)));
 CvFLAGS(cv) = CvFLAGS(proto) & ~(CVf_CLONE|CVf_WEAKOUTSIDE);
 CvCLONED_on(cv);
 
@@ -1502,7 +1502,7 @@
 CvROOT(cv) = OpREFCNT_inc(CvROOT(proto));
 OP_REFCNT_UNLOCK;
 CvSTART(cv)= CvSTART(proto);
-CvOUTSIDE(cv)  = (CV*)SvREFCNT_inc_simple(outside);
+CvOUTSIDE(cv)  = MUTABLE_CV(SvREFCNT_inc_simple(outside));
 CvOUTSIDE_SEQ(cv) = CvOUTSIDE_SEQ(proto);
 
 if (SvPOK(proto))
@@ -1620,7 +1620,7 @@
if (namesv && namesv != &PL_sv_undef
&& *SvPVX_const(namesv) == '&')
{
-   CV * const innercv = (CV*)curpad[ix];
+   CV * const innercv = MUTABLE_CV(curpad[ix]);
assert(CvWEAKOUTSIDE(innercv));
assert(CvOUTSIDE(innercv) == old_cv);
CvOUTSIDE(innercv) = new_cv;

 //

Change 34646: As Perl_cv_const_sv() now takes a const CV *, use that as the cast for

2008-10-29 Thread Nicholas Clark
Change 34646 by [EMAIL PROTECTED] on 2008/10/29 21:36:17

As Perl_cv_const_sv() now takes a const CV *, use that as the cast for
its arguments.

Affected files ...

... //depot/perl/dump.c#314 edit
... //depot/perl/pp.c#633 edit
... //depot/perl/sv.c#1564 edit

Differences ...

 //depot/perl/dump.c#314 (text) 
Index: perl/dump.c
--- perl/dump.c#313~34642~  2008-10-29 13:39:43.0 -0700
+++ perl/dump.c 2008-10-29 14:36:17.0 -0700
@@ -1805,7 +1805,7 @@
do_op_dump(level+1, file, CvROOT(sv));
}
} else {
-   SV * const constant = cv_const_sv((CV *)sv);
+   SV * const constant = cv_const_sv((const CV *)sv);
 
Perl_dump_indent(aTHX_ level, file, "  XSUB = 0x%"UVxf"\n", 
PTR2UV(CvXSUB(sv)));
 

 //depot/perl/pp.c#633 (text) 
Index: perl/pp.c
--- perl/pp.c#632~34629~2008-10-28 15:14:26.0 -0700
+++ perl/pp.c   2008-10-29 14:36:17.0 -0700
@@ -809,7 +809,7 @@
hv_undef(MUTABLE_HV(sv));
break;
 case SVt_PVCV:
-   if (cv_const_sv((CV*)sv) && ckWARN(WARN_MISC))
+   if (cv_const_sv((const CV *)sv) && ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_MISC), "Constant subroutine %s 
undefined",
 CvANON((CV*)sv) ? "(anonymous)" : GvENAME(CvGV((CV*)sv)));
/* FALLTHROUGH */

 //depot/perl/sv.c#1564 (text) 
Index: perl/sv.c
--- perl/sv.c#1563~34629~   2008-10-28 15:14:26.0 -0700
+++ perl/sv.c   2008-10-29 14:36:17.0 -0700
@@ -3522,7 +3522,8 @@
/* Redefining a sub - warning is mandatory if
   it was a const and its value changed. */
if (CvCONST(cv) && CvCONST((CV*)sref)
-   && cv_const_sv(cv) == cv_const_sv((CV*)sref)) {
+   && cv_const_sv(cv)
+   == cv_const_sv((const CV *)sref)) {
NOOP;
/* They are 2 constant subroutines generated from
   the same constant. This probably means that
@@ -3535,7 +3536,8 @@
 || (CvCONST(cv)
 && (!CvCONST((CV*)sref)
 || sv_cmp(cv_const_sv(cv),
-  cv_const_sv((CV*)sref) {
+  cv_const_sv((const CV *)
+  sref) {
Perl_warner(aTHX_ packWARN(WARN_REDEFINE),
(const char *)
(CvCONST(cv)
End of Patch.


Change 34644: Integrate:

2008-10-29 Thread Nicholas Clark
Change 34644 by [EMAIL PROTECTED] on 2008/10/29 21:18:32

Integrate:
[ 34600]
No, it's not a const SV* if we subsequently call
SvREFCNT_dec() on it.

Affected files ...

... //depot/maint-5.10/perl/pad.c#5 integrate

Differences ...

 //depot/maint-5.10/perl/pad.c#5 (text) 
Index: perl/pad.c
--- perl/pad.c#4~34599~ 2008-10-26 14:44:48.0 -0700
+++ perl/pad.c  2008-10-29 14:18:32.0 -0700
@@ -312,7 +312,7 @@
 
 ix = AvFILLp(padlist);
 while (ix >= 0) {
-   const SV* const sv = AvARRAY(padlist)[ix--];
+   SV* const sv = AvARRAY(padlist)[ix--];
if (sv) {
if (sv == (SV*)PL_comppad_name)
PL_comppad_name = NULL;
End of Patch.


Change 34645: Perl_cv_const_sv() takes a const CV *const cv argument.

2008-10-29 Thread Nicholas Clark
Change 34645 by [EMAIL PROTECTED] on 2008/10/29 21:24:54

Perl_cv_const_sv() takes a const CV *const cv argument.

Affected files ...

... //depot/perl/embed.fnc#626 edit
... //depot/perl/op.c#1012 edit
... //depot/perl/proto.h#961 edit

Differences ...

 //depot/perl/embed.fnc#626 (text) 
Index: perl/embed.fnc
--- perl/embed.fnc#625~34627~   2008-10-28 14:12:09.0 -0700
+++ perl/embed.fnc  2008-10-29 14:24:54.0 -0700
@@ -174,7 +174,7 @@
|NULLOK const char* p|const STRLEN len
 pd |CV*|cv_clone   |NN CV* proto
 ApdR   |SV*|gv_const_sv|NN GV* gv
-ApdR   |SV*|cv_const_sv|NULLOK CV* cv
+ApdR   |SV*|cv_const_sv|NULLOK const CV *const cv
 pR |SV*|op_const_sv|NULLOK const OP* o|NULLOK CV* cv
 Apd|void   |cv_undef   |NN CV* cv
 Ap |void   |cx_dump|NN PERL_CONTEXT* cx

 //depot/perl/op.c#1012 (text) 
Index: perl/op.c
--- perl/op.c#1011~34629~   2008-10-28 15:14:26.0 -0700
+++ perl/op.c   2008-10-29 14:24:54.0 -0700
@@ -5385,7 +5385,7 @@
 =cut
 */
 SV *
-Perl_cv_const_sv(pTHX_ CV *cv)
+Perl_cv_const_sv(pTHX_ const CV *const cv)
 {
 PERL_UNUSED_CONTEXT;
 if (!cv)

 //depot/perl/proto.h#961 (text+w) 
Index: perl/proto.h
--- perl/proto.h#960~34627~ 2008-10-28 14:12:09.0 -0700
+++ perl/proto.h2008-10-29 14:24:54.0 -0700
@@ -450,7 +450,7 @@
 #define PERL_ARGS_ASSERT_GV_CONST_SV   \
assert(gv)
 
-PERL_CALLCONV SV*  Perl_cv_const_sv(pTHX_ CV* cv)
+PERL_CALLCONV SV*  Perl_cv_const_sv(pTHX_ const CV *const cv)
__attribute__warn_unused_result__;
 
 PERL_CALLCONV SV*  Perl_op_const_sv(pTHX_ const OP* o, CV* cv)
End of Patch.


Change 34643: Upgrade to PathTools 3.29.

2008-10-29 Thread Nicholas Clark
Change 34643 by [EMAIL PROTECTED] on 2008/10/29 20:49:30

Upgrade to PathTools 3.29.

Affected files ...

... //depot/perl/ext/Cwd/Changes#33 edit
... //depot/perl/lib/Cwd.pm#116 edit
... //depot/perl/lib/File/Spec.pm#63 edit
... //depot/perl/lib/File/Spec/Cygwin.pm#25 edit
... //depot/perl/lib/File/Spec/Epoc.pm#16 edit
... //depot/perl/lib/File/Spec/Functions.pm#19 edit
... //depot/perl/lib/File/Spec/Mac.pm#34 edit
... //depot/perl/lib/File/Spec/OS2.pm#30 edit
... //depot/perl/lib/File/Spec/Unix.pm#65 edit
... //depot/perl/lib/File/Spec/VMS.pm#54 edit
... //depot/perl/lib/File/Spec/Win32.pm#51 edit

Differences ...

 //depot/perl/ext/Cwd/Changes#33 (text) 
Index: perl/ext/Cwd/Changes
--- perl/ext/Cwd/Changes#32~34609~  2008-10-27 14:34:55.0 -0700
+++ perl/ext/Cwd/Changes2008-10-29 13:49:30.0 -0700
@@ -1,5 +1,9 @@
 Revision history for Perl distribution PathTools.
 
+3.29 - Wed Oct 29 20:48:11 2008
+
+- Promote to stable release.
+
 3.28_03 - Mon Oct 27 22:12:11 2008
 
 - In Cwd.pm, pass the un-munged $VERSION to XSLoader/DynaLoader,

 //depot/perl/lib/Cwd.pm#116 (text) 
Index: perl/lib/Cwd.pm
--- perl/lib/Cwd.pm#115~34609~  2008-10-27 14:34:55.0 -0700
+++ perl/lib/Cwd.pm 2008-10-29 13:49:30.0 -0700
@@ -171,7 +171,7 @@
 use Exporter;
 use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 my $xs_version = $VERSION;
 $VERSION = eval $VERSION;
 

 //depot/perl/lib/File/Spec.pm#63 (text) 
Index: perl/lib/File/Spec.pm
--- perl/lib/File/Spec.pm#62~34609~ 2008-10-27 14:34:55.0 -0700
+++ perl/lib/File/Spec.pm   2008-10-29 13:49:30.0 -0700
@@ -3,7 +3,7 @@
 use strict;
 use vars qw(@ISA $VERSION);
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 my %module = (MacOS   => 'Mac',

 //depot/perl/lib/File/Spec/Cygwin.pm#25 (text) 
Index: perl/lib/File/Spec/Cygwin.pm
--- perl/lib/File/Spec/Cygwin.pm#24~34609~  2008-10-27 14:34:55.0 
-0700
+++ perl/lib/File/Spec/Cygwin.pm2008-10-29 13:49:30.0 -0700
@@ -4,7 +4,7 @@
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 @ISA = qw(File::Spec::Unix);

 //depot/perl/lib/File/Spec/Epoc.pm#16 (text) 
Index: perl/lib/File/Spec/Epoc.pm
--- perl/lib/File/Spec/Epoc.pm#15~34609~2008-10-27 14:34:55.0 
-0700
+++ perl/lib/File/Spec/Epoc.pm  2008-10-29 13:49:30.0 -0700
@@ -3,7 +3,7 @@
 use strict;
 use vars qw($VERSION @ISA);
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 require File::Spec::Unix;

 //depot/perl/lib/File/Spec/Functions.pm#19 (text) 
Index: perl/lib/File/Spec/Functions.pm
--- perl/lib/File/Spec/Functions.pm#18~34609~   2008-10-27 14:34:55.0 
-0700
+++ perl/lib/File/Spec/Functions.pm 2008-10-29 13:49:30.0 -0700
@@ -5,7 +5,7 @@
 
 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 require Exporter;

 //depot/perl/lib/File/Spec/Mac.pm#34 (text) 
Index: perl/lib/File/Spec/Mac.pm
--- perl/lib/File/Spec/Mac.pm#33~34609~ 2008-10-27 14:34:55.0 -0700
+++ perl/lib/File/Spec/Mac.pm   2008-10-29 13:49:30.0 -0700
@@ -4,7 +4,7 @@
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 @ISA = qw(File::Spec::Unix);

 //depot/perl/lib/File/Spec/OS2.pm#30 (text) 
Index: perl/lib/File/Spec/OS2.pm
--- perl/lib/File/Spec/OS2.pm#29~34609~ 2008-10-27 14:34:55.0 -0700
+++ perl/lib/File/Spec/OS2.pm   2008-10-29 13:49:30.0 -0700
@@ -4,7 +4,7 @@
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 @ISA = qw(File::Spec::Unix);

 //depot/perl/lib/File/Spec/Unix.pm#65 (text) 
Index: perl/lib/File/Spec/Unix.pm
--- perl/lib/File/Spec/Unix.pm#64~34609~2008-10-27 14:34:55.0 
-0700
+++ perl/lib/File/Spec/Unix.pm  2008-10-29 13:49:30.0 -0700
@@ -3,7 +3,7 @@
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 =head1 NAME

 //depot/perl/lib/File/Spec/VMS.pm#54 (text) 
Index: perl/lib/File/Spec/VMS.pm
--- perl/lib/File/Spec/VMS.pm#53~34609~ 2008-10-27 14:34:55.0 -0700
+++ perl/lib/File/Spec/VMS.pm   2008-10-29 13:49:30.0 -0700
@@ -4,7 +4,7 @@
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.28_03';
+$VERSION = '3.29';
 $VERSION = eval $VERSION;
 
 @ISA = qw(File::Spec::Unix);

 //depot/perl/lib/File/Spec/Win32.pm#51 (text) 
Index: perl/lib/File/Spec/Win32.pm
--- perl/lib/File/Spec/Win32.pm#50~34609~   2008-10-27 14:34:55.0 
-0700
+++ perl/lib/File/Spec/Win32.pm 2008-10-29 13:49:30.0 -0700
@@ -5,7 +5,7 @@

Change 34641: Integrate:

2008-10-29 Thread Nicholas Clark
Change 34641 by [EMAIL PROTECTED] on 2008/10/29 20:32:31

Integrate:
[ 34602]
Subject: [PATCH: Configure] Fix prototype detection for C++
From: Marcus Holland-Moritz <[EMAIL PROTECTED]>
Date: Sun, 26 Oct 2008 21:41:13 +0100
Message-ID: <[EMAIL PROTECTED]>

[ 34617]
Subject: fix for failed Gconvert detection under C++
From: Tony Cook <[EMAIL PROTECTED]>
Date: Tue, 28 Oct 2008 22:24:05 +1100
Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.10/perl/Configure#12 integrate
... //depot/maint-5.10/perl/Porting/Glossary#8 integrate

Differences ...

 //depot/maint-5.10/perl/Configure#12 (xtext) 
Index: perl/Configure
--- perl/Configure#11~34274~2008-09-05 07:42:01.0 -0700
+++ perl/Configure  2008-10-29 13:32:31.0 -0700
@@ -25,7 +25,7 @@
 
 # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
 #
-# Generated on Fri Aug  8 16:16:43 CEST 2008 [metaconfig 3.5 PL0]
+# Generated on Tue Oct 28 18:51:20 CET 2008 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by [EMAIL PROTECTED])
 
 cat >c1$$ &1; then
tval=true;
elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
-   echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc 
{ return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+   echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { 
return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c >/dev/null 
2>&1 $libs && tval=true;
$test "$mistrustnm" = run -a -x try && { $run 
./try$_exe >/dev/null 2>&1 || tval=false; };
$rm_try;
fi;
else
-   echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { 
return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+   echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; 
} int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 
2>&1 && tval=true;
$rm_try;
fi;
@@ -9478,6 +9480,46 @@
 prefixvar=vendorscript
 . ./installprefix
 
+: script used to emit important warnings
+cat >warn msg
+fi
+echo "*** WARNING:" >&4
+sed -e 's/^/*** /' &4
+echo "*** " >&4
+cat msg >>config.msg
+echo " " >>config.msg
+rm -f msg
+EOS
+chmod +x warn
+$eunicefix warn
+
+: see which of string.h or strings.h is needed
+echo " "
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+   echo "Using  instead of ." >&4
+   val="$define"
+else
+   val="$undef"
+   strings=`./findhdr strings.h`
+   if $test "$strings" && $test -r "$strings"; then
+   echo "Using  instead of ." >&4
+   else
+   ./warn "No string header found -- You'll surely have problems."
+   fi
+fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*)   strings=`./findhdr string.h`;;
+esac
+
 : see if qgcvt exists
 set qgcvt d_qgcvt
 eval $inlibc
@@ -9651,15 +9693,18 @@
 
 #include 
 
-#define I_STDLIB $i_stdlib
+#$i_stdlib I_STDLIB
 #ifdef I_STDLIB
 #include 
 #endif
+#$i_string I_STRING
+#ifdef I_STRING
+#  include 
+#else
+#  include 
+#endif
 
-int
-checkit(expect, got)
-char *expect;
-char *got;
+int checkit(char *expect, char *got)
 {
 if (strcmp(expect, got)) {
printf("%s oddity:  Expected %s, got %s\n",
@@ -10143,19 +10188,19 @@
define)
case "$asctime_r_proto" in
''|0) try='char* asctime_r(const struct tm*, char*);'
-   ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;;
+   ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SB ;;
esac
case "$asctime_r_proto" in
''|0) try='char* asctime_r(const struct tm*, char*, int);'
-   ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;;
+   ./protochk "$extern_C $try" $hdrs && asctime_r_proto=B_SBI ;;
esac
case "$asctime_r_proto" in
''|0) try='int asctime_r(const struct tm*, char*);'
-   ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;;
+   ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SB ;;
esac
case "$asctime_r_proto" in
''|0) try='int asctime_r(const struct tm*, char*, int);'
-   ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;;
+   ./protochk "$extern_C $try" $hdrs && asctime_r_proto=I_SBI ;;
esac
case "$asctime_r_proto" in
''|0)   d_asctime_r=undef
@@ -11288,11 +11333,11 @@
define)
case "$crypt_r_proto" in
''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);'
-   ./protochk "extern $try" $hdrs && crypt_r_proto=B

Change 34642: Remove redundant API definitions from '=for apidoc' sections.

2008-10-29 Thread Marcus Holland-Moritz
Change 34642 by [EMAIL PROTECTED] on 2008/10/29 20:39:43

Remove redundant API definitions from '=for apidoc' sections.
Those are already in embed.fnc, and most of them were already
outdated. This also fixes the docs for pv_escape and pv_pretty.

Affected files ...

... //depot/perl/dump.c#313 edit
... //depot/perl/pod/perlapi.pod#334 edit
... //depot/perl/pod/perlintern.pod#75 edit
... //depot/perl/utf8.c#314 edit

Differences ...

 //depot/perl/dump.c#313 (text) 
Index: perl/dump.c
--- perl/dump.c#312~34629~  2008-10-28 15:14:26.0 -0700
+++ perl/dump.c 2008-10-29 13:39:43.0 -0700
@@ -169,9 +169,7 @@
 
 
 /*
-=for apidoc Apd|char*|pv_escape|NN SV *dsv|NN const char const *str\
-   |const STRLEN count|const STRLEN max
-   |STRLEN const *escaped, const U32 flags
+=for apidoc pv_escape
 
 Escapes at most the first "count" chars of pv and puts the results into
 dsv such that the size of the escaped string will not exceed "max" chars
@@ -308,10 +306,7 @@
 return SvPVX(dsv);
 }
 /*
-=for apidoc Apd|char *|pv_pretty|NN SV *dsv|NN const char const *str\
-   |const STRLEN count|const STRLEN max\
-   |const char const *start_color| const char const *end_color\
-   |const U32 flags
+=for apidoc pv_pretty
 
 Converts a string into something presentable, handling escaping via
 pv_escape() and supporting quoting and ellipses.

 //depot/perl/pod/perlapi.pod#334 (text+w) 
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#333~34358~ 2008-09-13 01:44:30.0 -0700
+++ perl/pod/perlapi.pod2008-10-29 13:39:43.0 -0700
@@ -237,7 +237,7 @@
 Returns the highest index in the array.  The number of elements in the
 array is C.  Returns -1 if the array is empty.
 
-   I32 av_len(const AV *av)
+   I32 av_len(AV *av)
 
 =for hackers
 Found in file av.c
@@ -836,9 +836,6 @@
 =item pv_escape
 X
 
-   |const STRLEN count|const STRLEN max
-   |STRLEN const *escaped, const U32 flags
-
 Escapes at most the first "count" chars of pv and puts the results into
 dsv such that the size of the escaped string will not exceed "max" chars
 and will not contain any incomplete escape sequences.
@@ -873,8 +870,6 @@
 
 Returns a pointer to the escaped text as held by dsv.
 
-NOTE: the perl_ form of this function is deprecated.
-
char*   pv_escape(SV *dsv, char const * const str, const STRLEN count, 
const STRLEN max, STRLEN * const escaped, const U32 flags)
 
 =for hackers
@@ -883,10 +878,6 @@
 =item pv_pretty
 X
 
-   |const STRLEN count|const STRLEN max\
-   |const char const *start_color| const char const *end_color\
-   |const U32 flags
-
 Converts a string into something presentable, handling escaping via
 pv_escape() and supporting quoting and ellipses.
 
@@ -906,8 +897,6 @@
 
 Returns a pointer to the prettified text as held by dsv.

-NOTE: the perl_ form of this function is deprecated.
-
char*   pv_pretty(SV *dsv, char const * const str, const STRLEN count, 
const STRLEN max, char const * const start_color, char const * const end_color, 
const U32 flags)
 
 =for hackers

 //depot/perl/pod/perlintern.pod#75 (text+w) 
Index: perl/pod/perlintern.pod
--- perl/pod/perlintern.pod#74~33553~   2008-03-24 13:54:41.0 -0700
+++ perl/pod/perlintern.pod 2008-10-29 13:39:43.0 -0700
@@ -1092,7 +1092,7 @@
 Assumes that PL_op is the op that originally triggered the error, and that
 PL_comppad/PL_curpad points to the currently executing pad.
 
-   SV* find_uninit_var(OP* obase, SV* uninit_sv, bool top)
+   SV* find_uninit_var(const OP *const obase, const SV *const 
uninit_sv, bool top)
 
 =for hackers
 Found in file sv.c

 //depot/perl/utf8.c#314 (text) 
Index: perl/utf8.c
--- perl/utf8.c#313~34624~  2008-10-28 13:13:55.0 -0700
+++ perl/utf8.c 2008-10-29 13:39:43.0 -0700
@@ -44,7 +44,7 @@
 characters in the ASCII range are unmodified, and a zero byte never appears
 within non-zero characters.
 
-=for apidoc A|U8 *|uvuni_to_utf8_flags|U8 *d|UV uv|UV flags
+=for apidoc uvuni_to_utf8_flags
 
 Adds the UTF-8 representation of the Unicode codepoint C to the end
 of the string C; C should be have at least C free
@@ -237,7 +237,7 @@
 }
 
 /*
-=for apidoc A|STRLEN|is_utf8_char|const U8 *s
+=for apidoc is_utf8_char
 
 Tests if some arbitrary number of bytes begins in a valid UTF-8
 character.  Note that an INVARIANT (i.e. ASCII) character is a valid
@@ -260,7 +260,7 @@
 }
 
 /*
-=for apidoc A|bool|is_utf8_string|const U8 *s|STRLEN len
+=for apidoc is_utf8_string
 
 Returns true if first C bytes of the given string form a valid
 UTF-8 string, false otherwise.  Note that 'a valid UTF-8 string' does
@@ -317,7 +317,7 @@
 /*
 Implemented as a macro in utf8.h
 
-=for apidoc A|bool|is_utf8_string_loc|const U8 *s|STRLEN len|const U8 **ep
+=for apidoc is_utf8_string_loc
 
 Like is_ut

Change 34640: make distclean patch from Andy Armstrong.

2008-10-29 Thread Nicholas Clark
Change 34640 by [EMAIL PROTECTED] on 2008/10/29 19:41:54

make distclean patch from Andy Armstrong.
(Distclean isn't perfect yet because there's a spurious directory tree
created but not cleaned up by ext/Test/Harness/t/harness.t, but Andy is
working on fixing the cause)
No idea about the state of play of disclean on VMS - I couldn't see how
or where to add the three extra directories to it.

Affected files ...

... //depot/perl/Makefile.SH#409 edit
... //depot/perl/win32/Makefile#354 edit
... //depot/perl/win32/makefile.mk#394 edit

Differences ...

 //depot/perl/Makefile.SH#409 (text) 
Index: perl/Makefile.SH
--- perl/Makefile.SH#408~34317~ 2008-09-08 01:41:50.0 -0700
+++ perl/Makefile.SH2008-10-29 12:41:54.0 -0700
@@ -1211,6 +1211,7 @@
rm -rf .config
rm -f preload lib/re.pm
rm -rf lib/Encode lib/Compress lib/Hash lib/re
+   rm -rf lib/TAP lib/Module/Pluggable lib/App
rm -rf lib/IO/Compress lib/IO/Uncompress
rm -f lib/ExtUtils/ParseXS/t/XSTest.c
rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)

 //depot/perl/win32/Makefile#354 (text) 
Index: perl/win32/Makefile
--- perl/win32/Makefile#353~34192~  2008-08-09 13:11:55.0 -0700
+++ perl/win32/Makefile 2008-10-29 12:41:54.0 -0700
@@ -1183,6 +1183,9 @@
-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
+   -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
+   -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q 
$(LIBDIR)\Module\Pluggable
+   -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
-if exist $(LIBDIR)\IO\Compress rmdir /s /q $(LIBDIR)\IO\Compress
-if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
-if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress

 //depot/perl/win32/makefile.mk#394 (text) 
Index: perl/win32/makefile.mk
--- perl/win32/makefile.mk#393~34192~   2008-08-09 13:11:55.0 -0700
+++ perl/win32/makefile.mk  2008-10-29 12:41:54.0 -0700
@@ -1507,6 +1507,9 @@
-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
+   -if exist $(LIBDIR)\App rmdir /s /q $(LIBDIR)\App
+   -if exist $(LIBDIR)\Module\Pluggable rmdir /s /q 
$(LIBDIR)\Module\Pluggable
+   -if exist $(LIBDIR)\TAP rmdir /s /q $(LIBDIR)\TAP
-if exist $(LIBDIR)\IO\Compress rmdir /s /q $(LIBDIR)\IO\Compress
-if exist $(LIBDIR)\IO\Socket rmdir /s /q $(LIBDIR)\IO\Socket
-if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress
End of Patch.


Change 34639: Avoid leaving a VAR.txt after testing terminates on any platform where

2008-10-29 Thread Nicholas Clark
Change 34639 by [EMAIL PROTECTED] on 2008/10/29 19:34:05

Avoid leaving a VAR.txt after testing terminates on any platform where
you can't unlink an open file by instead opening $^X for read to get a
file handle for test purposes.

Affected files ...

... //depot/perl/ext/XS/APItest/t/svpeek.t#4 edit

Differences ...

 //depot/perl/ext/XS/APItest/t/svpeek.t#4 (text) 
Index: perl/ext/XS/APItest/t/svpeek.t
--- perl/ext/XS/APItest/t/svpeek.t#3~34433~ 2008-09-27 02:27:59.0 
-0700
+++ perl/ext/XS/APItest/t/svpeek.t  2008-10-29 12:34:05.0 -0700
@@ -58,11 +58,10 @@
   is (DPeek (sub {}),  '\CV(__ANON__)','sub {}');
 
 { our ($VAR, @VAR, %VAR);
-  open VAR, ">VAR.txt";
+  open VAR, "<", $^X or die "Can't open $^X: $!";
   sub VAR {}
   format VAR =
 .
-  END { unlink "VAR.txt" };
 
   is (DPeek ( $VAR),   'UNDEF',' $VAR undef');
   is (DPeek (\$VAR),   '\UNDEF',   '\$VAR undef');
End of Patch.


Change 34637: Upgrade to File::Path 2.06_07. (an e-mail from David)

2008-10-29 Thread Nicholas Clark
Change 34637 by [EMAIL PROTECTED] on 2008/10/29 16:50:40

Upgrade to File::Path 2.06_07. (an e-mail from David)

Affected files ...

... //depot/perl/lib/File/Path.pm#60 edit

Differences ...

 //depot/perl/lib/File/Path.pm#60 (text) 
Index: perl/lib/File/Path.pm
--- perl/lib/File/Path.pm#59~34615~ 2008-10-28 04:27:58.0 -0700
+++ perl/lib/File/Path.pm   2008-10-29 09:50:40.0 -0700
@@ -17,7 +17,7 @@
 
 use Exporter ();
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION   = '2.06_06';
+$VERSION   = '2.06_07';
 @ISA = qw(Exporter);
 @EXPORT  = qw(mkpath rmtree);
 @EXPORT_OK = qw(make_path remove_tree);
@@ -55,12 +55,12 @@
 }
 
 sub make_path {
-push @_, {} if [EMAIL PROTECTED] or (@_ and 
!UNIVERSAL::isa($_[-1],'HASH'));
+push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
 goto &mkpath;
 }
 
 sub mkpath {
-my $old_style = !(@_ > 0 and UNIVERSAL::isa($_[-1],'HASH'));
+my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
 
 my $arg;
 my $paths;
@@ -69,12 +69,11 @@
 my ($verbose, $mode);
 ($paths, $verbose, $mode) = @_;
 $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
-$arg->{verbose} = defined $verbose ? $verbose : 0;
+$arg->{verbose} = $verbose;
 $arg->{mode}= defined $mode? $mode: 0777;
 }
 else {
 $arg = pop @_;
-$arg->{verbose} ||= 0;
 $arg->{mode}  = delete $arg->{mask} if exists $arg->{mask};
 $arg->{mode} = 0777 unless exists $arg->{mode};
 ${$arg->{error}} = [] if exists $arg->{error};
@@ -125,12 +124,12 @@
 }
 
 sub remove_tree {
-push @_, {} if [EMAIL PROTECTED] or (@_ and 
!UNIVERSAL::isa($_[-1],'HASH'));
+push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
 goto &rmtree;
 }
 
 sub rmtree {
-my $old_style = !(@_ > 0 and UNIVERSAL::isa($_[-1],'HASH'));
+my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
 
 my $arg;
 my $paths;
@@ -138,7 +137,7 @@
 if ($old_style) {
 my ($verbose, $safe);
 ($paths, $verbose, $safe) = @_;
-$arg->{verbose} = defined $verbose ? $verbose : 0;
+$arg->{verbose} = $verbose;
 $arg->{safe}= defined $safe? $safe: 0;
 
 if (defined($paths) and length($paths)) {
@@ -150,14 +149,9 @@
 }
 }
 else {
-if (@_ > 0 and UNIVERSAL::isa($_[-1],'HASH')) {
 $arg = pop @_;
 ${$arg->{error}}  = [] if exists $arg->{error};
 ${$arg->{result}} = [] if exists $arg->{result};
-}
-else {
-@{$arg}{qw(verbose safe)} = (0, 0);
-}
 $paths = [EMAIL PROTECTED];
 }
 
@@ -398,79 +392,65 @@
 
 =head1 VERSION
 
-This document describes version 2.06_06 of File::Path, released
-2008-10-05.
+This document describes version 2.06_07 of File::Path, released
+2008-10-29.
 
 =head1 SYNOPSIS
 
-use File::Path;
-
-# modern
-  make_path( 'foo/bar/baz', '/zug/zwang' );
-  # or
-mkpath( 'foo/bar/baz', '/zug/zwang', {verbose => 1} );
-
-rmtree(
-'foo/bar/baz', '/zug/zwang',
-{ verbose => 1, error  => \my $err_list }
-);
-  # or
-  remove_tree( 'foo/bar/baz', '/zug/zwang' );
+  use File::Path qw(make_path remove_tree);
 
-# traditional
+  make_path('foo/bar/baz', '/zug/zwang');
+  make_path('foo/bar/baz', '/zug/zwang', {
+  verbose => 1,
+  mode => 0711,
+  });
+
+  remove_tree('foo/bar/baz', '/zug/zwang');
+  remove_tree('foo/bar/baz', '/zug/zwang', {
+  verbose => 1,
+  error  => \my $err_list,
+  });
+
+  # legacy (interface promoted before v2.0)
+  mkpath('/foo/bar/baz');
+  mkpath('/foo/bar/baz', 1, 0711);
 mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
+  rmtree('foo/bar/baz', 1, 1);
 rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);
 
-=head1 DESCRIPTION
-
-The C function provides a convenient way to create directories
-of arbitrary depth. Similarly, the C function provides a
-convenient way to delete an entire directory subtree from the
-filesystem, much like the Unix command C or C on
-Windows.
-
-There are two further functions, C and C
-that perform the same task and offer a more intuitive interface.
+  # legacy (interface promoted before v2.6)
+  mkpath('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
+  rmtree('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
 
-=head2 FUNCTIONS
+=head1 DESCRIPTION
 
-The modern way of calling C and C is with a list
-of directories to create, or remove, respectively, followed by a
-hash reference containing keys to control the function's behaviour.
+This module provide a convenient way to create directories of
+arbitrary depth and to delete an entire directory subtree from the
+filesystem.
 
-=head3 C
+The following functions are provided:
 
-The C routine accepts a list of directories to be
-created. Its behaviour may be tuned by an optional hashref
-appearing as the

Change 34636: Integrate:

2008-10-29 Thread Nicholas Clark
Change 34636 by [EMAIL PROTECTED] on 2008/10/29 16:03:41

Integrate:
[ 34635]
Integrate:
[ 34589]
lib/ExtUtils/t/eu_command.t belongs to ExtUtils-Command, and so does
the about to be committed lib/ExtUtils/t/cp.t

[ 34620]
Subject: installperl patchlet
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Message-ID: <[EMAIL PROTECTED]>
Date: Tue, 28 Oct 2008 05:11:20 +0100

Affected files ...

... //depot/maint-5.8/perl/Porting/Maintainers.pl#45 integrate
... //depot/maint-5.8/perl/installperl#42 integrate

Differences ...

 //depot/maint-5.8/perl/Porting/Maintainers.pl#45 (text) 
Index: perl/Porting/Maintainers.pl
--- perl/Porting/Maintainers.pl#44~34558~   2008-10-22 11:54:54.0 
-0700
+++ perl/Porting/Maintainers.pl 2008-10-29 09:03:41.0 -0700
@@ -271,7 +271,8 @@
'ExtUtils::Command' =>
{
'MAINTAINER'=> 'rkobes',
-   'FILES' => q[lib/ExtUtils/Command.pm],
+   'FILES' => q[lib/ExtUtils/Command.pm
+lib/ExtUtils/t/{cp,eu_command}.t],
'CPAN'  => 1,
},
 
@@ -298,7 +299,7 @@
'MAINTAINER'=> 'mschwern',
'FILES' => 
q[lib/ExtUtils/{Liblist,MakeMaker,Mkbootstrap,Mksymlists,MM*,MY,testlib}.pm
lib/ExtUtils/{Command,Liblist,MakeMaker}
-   
lib/ExtUtils/t/{[0-9FLV-Zabd-z]*,IN*,Mkbootstrap,MM_*,PL_FILES,cd,config}.t
+   
lib/ExtUtils/t/{[0-9FLV-Zabdf-z]*,IN*,Mkbootstrap,MM_*,PL_FILES,cd,config}.t
t/lib/MakeMaker t/lib/TieIn.pm t/lib/TieOut.pm],
'CPAN'  => 1,
},

 //depot/maint-5.8/perl/installperl#42 (xtext) 
Index: perl/installperl
--- perl/installperl#41~34289~  2008-09-05 16:04:00.0 -0700
+++ perl/installperl2008-10-29 09:03:41.0 -0700
@@ -612,6 +612,7 @@
next unless m,^/,;
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
+   next unless -d;
next if samepath($_, $binexp);
next if samepath($_, cwd());
next if ($mainperl_is_instperl && samepath($_, $mainperldir));
End of Patch.


Change 34635: Integrate:

2008-10-29 Thread Nicholas Clark
Change 34635 by [EMAIL PROTECTED] on 2008/10/29 10:22:10

Integrate:
[ 34589]
lib/ExtUtils/t/eu_command.t belongs to ExtUtils-Command, and so does
the about to be committed lib/ExtUtils/t/cp.t

[ 34620]
Subject: installperl patchlet
From: [EMAIL PROTECTED] (Andreas J. Koenig)
Message-ID: <[EMAIL PROTECTED]>
Date: Tue, 28 Oct 2008 05:11:20 +0100

Affected files ...

... //depot/maint-5.10/perl/Porting/Maintainers.pl#15 integrate
... //depot/maint-5.10/perl/installperl#7 integrate

Differences ...

 //depot/maint-5.10/perl/Porting/Maintainers.pl#15 (text) 
Index: perl/Porting/Maintainers.pl
--- perl/Porting/Maintainers.pl#14~34557~   2008-10-22 03:48:20.0 
-0700
+++ perl/Porting/Maintainers.pl 2008-10-29 03:22:10.0 -0700
@@ -317,7 +317,8 @@
'ExtUtils::Command' =>
{
'MAINTAINER'=> 'rkobes',
-   'FILES' => q[lib/ExtUtils/Command.pm],
+   'FILES' => q[lib/ExtUtils/Command.pm
+lib/ExtUtils/t/{cp,eu_command}.t],
'CPAN'  => 1,
},
 
@@ -344,7 +345,7 @@
'MAINTAINER'=> 'mschwern',
'FILES' => 
q[lib/ExtUtils/{Liblist,MakeMaker,Mkbootstrap,Mksymlists,MM*,MY,testlib}.pm
lib/ExtUtils/{Command,Liblist,MakeMaker}
-   
lib/ExtUtils/t/{[0-9FLV-Zabd-z]*,IN*,Mkbootstrap,MM_*,PL_FILES,cd,config}.t
+   
lib/ExtUtils/t/{[0-9FLV-Zabdf-z]*,IN*,Mkbootstrap,MM_*,PL_FILES,cd,config}.t
t/lib/MakeMaker t/lib/TieIn.pm t/lib/TieOut.pm],
'CPAN'  => 1,
},

 //depot/maint-5.10/perl/installperl#7 (xtext) 
Index: perl/installperl
--- perl/installperl#6~34276~   2008-09-05 08:17:22.0 -0700
+++ perl/installperl2008-10-29 03:22:10.0 -0700
@@ -601,6 +601,7 @@
next unless m,^/,;
# Use &samepath here because some systems have other dirs linked
# to $mainperldir (like SunOS)
+   next unless -d;
next if samepath($_, $binexp);
next if samepath($_, cwd());
next if ($mainperl_is_instperl && samepath($_, $mainperldir));
End of Patch.


Change 34634: One more for Haiku

2008-10-29 Thread H . Merijn Brand
Change 34634 by [EMAIL PROTECTED] on 2008/10/29 08:31:39

One more for Haiku

Affected files ...

... //depot/perl/lib/ExtUtils/MM_Haiku.pm#1 add

Differences ...

 //depot/perl/lib/ExtUtils/MM_Haiku.pm#1 (text) 
Index: perl/lib/ExtUtils/MM_Haiku.pm
--- /dev/null   2008-10-24 09:33:31.292628696 -0700
+++ perl/lib/ExtUtils/MM_Haiku.pm   2008-10-29 01:31:39.0 -0700
@@ -0,0 +1,63 @@
+
+package ExtUtils::MM_Haiku;
+
+use strict;
+
+=head1 NAME
+
+ExtUtils::MM_Haiku - methods to override UN*X behaviour in ExtUtils::MakeMaker
+
+=head1 SYNOPSIS
+
+ use ExtUtils::MM_Haiku;   # Done internally by ExtUtils::MakeMaker if 
needed
+
+=head1 DESCRIPTION
+
+See ExtUtils::MM_Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=over 4
+
+=cut
+
+use ExtUtils::MakeMaker::Config;
+use File::Spec;
+require ExtUtils::MM_Any;
+require ExtUtils::MM_Unix;
+
+use vars qw(@ISA $VERSION);
[EMAIL PROTECTED] = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
+$VERSION = '6.42';
+
+
+=item os_flavor
+
+Haiku is Haiku.
+
+=cut
+
+sub os_flavor {
+return('Haiku');
+}
+
+=item init_linker
+
+libperl.a equivalent to be linked to dynamic extensions.
+
+=cut
+
+sub init_linker {
+my($self) = shift;
+
+$self->{PERL_ARCHIVE} ||=
+  File::Spec->catdir('$(PERL_INC)',$Config{libperl});
+$self->{PERL_ARCHIVE_AFTER} ||= '';
+$self->{EXPORT_LIST}  ||= '';
+}
+
+=back
+
+1;
+__END__
+
End of Patch.


Change 34633: Integrate:

2008-10-29 Thread Nicholas Clark
Change 34633 by [EMAIL PROTECTED] on 2008/10/29 08:22:26

Integrate:
[ 32237]
Fix up copyright years for files modified in 2007.

[ 34599]
Integrate:
[ 34585]
Update copyright years.

[ 34586]
Update copyright year in embed.pl, and everything that it builds.


[plus fix an error in av.h introduced in 30927 when resolving 29670 -
2006, not 2005. av.h's 2005 editing was change 24542, which was never
merged to 5.8.x]

Affected files ...

... //depot/maint-5.8/perl/XSUB.h#45 integrate
... //depot/maint-5.8/perl/av.c#49 integrate
... //depot/maint-5.8/perl/av.h#8 integrate
... //depot/maint-5.8/perl/cc_runtime.h#7 integrate
... //depot/maint-5.8/perl/cop.h#46 integrate
... //depot/maint-5.8/perl/cv.h#17 integrate
... //depot/maint-5.8/perl/deb.c#24 integrate
... //depot/maint-5.8/perl/doio.c#122 integrate
... //depot/maint-5.8/perl/doop.c#56 integrate
... //depot/maint-5.8/perl/dosish.h#18 integrate
... //depot/maint-5.8/perl/dump.c#89 integrate
... //depot/maint-5.8/perl/embed.h#190 integrate
... //depot/maint-5.8/perl/embed.pl#37 integrate
... //depot/maint-5.8/perl/embedvar.h#68 integrate
... //depot/maint-5.8/perl/global.sym#81 integrate
... //depot/maint-5.8/perl/gv.c#119 integrate
... //depot/maint-5.8/perl/gv.h#23 integrate
... //depot/maint-5.8/perl/handy.h#61 integrate
... //depot/maint-5.8/perl/hv.c#124 integrate
... //depot/maint-5.8/perl/intrpvar.h#58 integrate
... //depot/maint-5.8/perl/locale.c#27 integrate
... //depot/maint-5.8/perl/mathoms.c#36 integrate
... //depot/maint-5.8/perl/mg.c#167 integrate
... //depot/maint-5.8/perl/mg.h#15 integrate
... //depot/maint-5.8/perl/miniperlmain.c#17 integrate
... //depot/maint-5.8/perl/numeric.c#27 integrate
... //depot/maint-5.8/perl/op.c#234 integrate
... //depot/maint-5.8/perl/op.h#43 integrate
... //depot/maint-5.8/perl/pad.c#69 integrate
... //depot/maint-5.8/perl/pad.h#21 integrate
... //depot/maint-5.8/perl/patchlevel.h#200 integrate
... //depot/maint-5.8/perl/perl.h#187 integrate
... //depot/maint-5.8/perl/perlapi.c#16 integrate
... //depot/maint-5.8/perl/perlapi.h#59 integrate
... //depot/maint-5.8/perl/perlio.c#124 integrate
... //depot/maint-5.8/perl/perlio.h#17 integrate
... //depot/maint-5.8/perl/perlsdio.h#8 integrate
... //depot/maint-5.8/perl/perlsfio.h#8 integrate
... //depot/maint-5.8/perl/perlvars.h#26 integrate
... //depot/maint-5.8/perl/pp.c#153 integrate
... //depot/maint-5.8/perl/pp.h#27 integrate
... //depot/maint-5.8/perl/pp_ctl.c#195 integrate
... //depot/maint-5.8/perl/pp_hot.c#148 integrate
... //depot/maint-5.8/perl/pp_pack.c#63 integrate
... //depot/maint-5.8/perl/pp_sort.c#51 integrate
... //depot/maint-5.8/perl/pp_sys.c#163 integrate
... //depot/maint-5.8/perl/proto.h#241 integrate
... //depot/maint-5.8/perl/regcomp.c#122 integrate
... //depot/maint-5.8/perl/regcomp.h#17 integrate
... //depot/maint-5.8/perl/regexec.c#106 integrate
... //depot/maint-5.8/perl/regexp.h#10 integrate
... //depot/maint-5.8/perl/scope.c#75 integrate
... //depot/maint-5.8/perl/scope.h#33 integrate
... //depot/maint-5.8/perl/sv.c#393 integrate
... //depot/maint-5.8/perl/sv.h#91 integrate
... //depot/maint-5.8/perl/taint.c#20 integrate
... //depot/maint-5.8/perl/toke.c#182 integrate
... //depot/maint-5.8/perl/universal.c#72 integrate
... //depot/maint-5.8/perl/unixish.h#15 integrate
... //depot/maint-5.8/perl/utf8.c#85 integrate
... //depot/maint-5.8/perl/utf8.h#22 integrate
... //depot/maint-5.8/perl/utfebcdic.h#11 integrate
... //depot/maint-5.8/perl/util.c#166 integrate
... //depot/maint-5.8/perl/util.h#9 integrate
... //depot/maint-5.8/perl/xsutils.c#30 integrate

Differences ...

 //depot/maint-5.8/perl/XSUB.h#45 (text) 
Index: perl/XSUB.h
--- perl/XSUB.h#44~33217~   2008-02-02 14:47:50.0 -0800
+++ perl/XSUB.h 2008-10-29 01:22:26.0 -0700
@@ -1,7 +1,7 @@
 /*XSUB.h
  *
  *Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- *2003, 2004, 2005, 2006, 2007 by Larry Wall and others
+ *2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
  *
  *You may distribute under the terms of either the GNU General Public
  *License or the Artistic License, as specified in the README file.

 //depot/maint-5.8/perl/av.c#49 (text) 
Index: perl/av.c
--- perl/av.c#48~34346~ 2008-09-11 08:16:28.0 -0700
+++ perl/av.c   2008-10-29 01:22:26.0 -0700
@@ -1,7 +1,7 @@
 /*av.c
  *
- *Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
+ *Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ *2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
  *
  *You may distribute under the terms of either the GNU General Public
  *License or the Artistic License, as specified in the README file.

 //depot/mai

Change 34631: Two haiku files to add

2008-10-29 Thread H . Merijn Brand
Change 34631 by [EMAIL PROTECTED] on 2008/10/29 08:18:00

Two haiku files to add

Affected files ...

... //depot/lib/ExtUtils/MM_Haiku.pm#1 add
... //depot/perl/hints/haiku.sh#1 add

Differences ...

 //depot/perl/hints/haiku.sh#1 (text) 
Index: perl/hints/haiku.sh
--- /dev/null   2008-10-24 09:33:31.292628696 -0700
+++ perl/hints/haiku.sh 2008-10-29 01:18:00.0 -0700
@@ -0,0 +1,34 @@
+# Haiku hints file
+# $Id$
+
+prefix="/boot/common"
+
+libpth='/boot/home/config/lib /boot/common/lib /system/lib'
+usrinc='/boot/develop/headers/posix'
+locinc='/boot/home/config/include /boot/common/include /boot/develop/headers'
+
+libc='/system/lib/libroot.so'
+libs='-lnetwork'
+
+# Use Haiku's malloc() by default.
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+# Haiku generally supports hard links, but the default file system (BFS)
+# doesn't. So better avoid using hard links.
+d_link='undef'
+dont_use_nlink='define'
+
+# The array syserrlst[] is useless for the most part.
+# Large negative numbers really kind of suck in arrays.
+d_syserrlst='undef'
+
+# Haiku uses gcc.
+cc="gcc"
+ld='gcc'
+
+# The runtime loader library path variable is LIBRARY_PATH.
+case "$ldlibpthname" in
+'') ldlibpthname=LIBRARY_PATH ;;
+esac
End of Patch.


Change 34630: [PATCH] Haiku Port

2008-10-29 Thread H . Merijn Brand
Change 34630 by [EMAIL PROTECTED] on 2008/10/29 08:09:06

Subject: [PATCH] Haiku Port
From: Ingo Weinhold <[EMAIL PROTECTED]>
Date: Wed, 29 Oct 2008 02:25:44 +0100
Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/Configure#710 edit
... //depot/perl/MANIFEST#1739 edit
... //depot/perl/README.haiku#1 add
... //depot/perl/ext/Errno/Errno_pm.PL#50 edit
... //depot/perl/ext/Time/HiRes/t/HiRes.t#35 edit
... //depot/perl/haiku/Haiku/Haiku.pm#1 add
... //depot/perl/haiku/Haiku/Haiku.xs#1 add
... //depot/perl/haiku/Haiku/Makefile.PL#1 add
... //depot/perl/haiku/haikuish.h#1 add
... //depot/perl/lib/CPANPLUS/Internals/Constants/Report.pm#3 edit
... //depot/perl/lib/ExtUtils/CBuilder.pm#16 edit
... //depot/perl/lib/ExtUtils/MM.pm#21 edit
... //depot/perl/lib/Module/Build.pm#18 edit
... //depot/perl/perl.h#841 edit
... //depot/perl/pod/perlport.pod#165 edit
... //depot/perl/t/io/fs.t#65 edit

Differences ...

 //depot/perl/Configure#710 (xtext) 
Index: perl/Configure
--- perl/Configure#709~34617~   2008-10-28 10:52:04.0 -0700
+++ perl/Configure  2008-10-29 01:09:06.0 -0700
@@ -25,7 +25,7 @@
 
 # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
 #
-# Generated on Tue Oct 28 18:51:20 CET 2008 [metaconfig 3.5 PL0]
+# Generated on Wed Oct 29 09:08:09 CET 2008 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by [EMAIL PROTECTED])
 
 cat >c1$$ < with your respective version of Perl.
+
+=head1 KNOWN PROBLEMS
+
+The following problems are encountered with Haiku revision 28311:
+
+=over 4
+
+=item *
+
+Perl cannot be compiled with threading support ATM.
+
+=item *
+
+The C test fails. More precisely: the subtests
+using datagram sockets fail. Unix datagram sockets aren't implemented in
+Haiku yet.
+
+=item *
+
+A subtest of the C test fails. This is due to Haiku
+not implementing C support yet.
+
+=item *
+
+The tests C and C
+fail. This is due to bugs in Haiku's network stack implementation.
+
+=back
+
+=head1 CONTACT
+
+For Haiku specific problems contact the HaikuPorts developers:
+http://ports.haiku-files.org/
+
+The initial Haiku port was done by Ingo Weinhold <[EMAIL PROTECTED]>.
+
+Last update: 2008-10-29

 //depot/perl/ext/Errno/Errno_pm.PL#50 (text) 
Index: perl/ext/Errno/Errno_pm.PL
--- perl/ext/Errno/Errno_pm.PL#49~29627~2006-12-27 11:36:13.0 
-0800
+++ perl/ext/Errno/Errno_pm.PL  2008-10-29 01:09:06.0 -0700
@@ -155,7 +155,7 @@
# we might miss out on compiler-specific ones
$file{"$ENV{GUSI}include:sys:errno.h"} = 1;
 
-} elsif ($^O eq 'beos') {
+} elsif ($^O eq 'beos' || $^O eq 'haiku') {
# hidden in a special place
$file{'/boot/develop/headers/posix/errno.h'} = 1;
 

 //depot/perl/ext/Time/HiRes/t/HiRes.t#35 (text) 
Index: perl/ext/Time/HiRes/t/HiRes.t
--- perl/ext/Time/HiRes/t/HiRes.t#34~33673~ 2008-04-13 07:02:38.0 
-0700
+++ perl/ext/Time/HiRes/t/HiRes.t   2008-10-29 01:09:06.0 -0700
@@ -337,7 +337,8 @@
&& defined &Time::HiRes::getitimer
&& has_symbol('ITIMER_VIRTUAL')
&& $Config{sig_name} =~ m/\bVTALRM\b/
-&& $^O !~ /^(nto)$/) { # nto: QNX 6 has the API but no implementation
+   && $^O !~ /^(nto)$/ # nto: QNX 6 has the API but no implementation
+   && $^O ne 'haiku') { # same for Haiku
 for (18..19) {
print "ok $_ # Skip: no virtual interval timers\n";
 }

 //depot/perl/haiku/Haiku/Haiku.pm#1 (text) 
Index: perl/haiku/Haiku/Haiku.pm
--- /dev/null   2008-10-24 09:33:31.292628696 -0700
+++ perl/haiku/Haiku/Haiku.pm   2008-10-29 01:09:06.0 -0700
@@ -0,0 +1,54 @@
+package Haiku;
+
+BEGIN {
+use strict;
+use vars qw|$VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK|;
+
+require Exporter;
+require DynaLoader;
+
+@ISA = qw|Exporter DynaLoader|;
+$VERSION = '0.34';
+$XS_VERSION = $VERSION;
+$VERSION = eval $VERSION;
+
+@EXPORT = qw(
+);
+@EXPORT_OK = qw(
+);
+}
+
+bootstrap Haiku;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Haiku - Interfaces to some Haiku API Functions
+
+=head1 DESCRIPTION
+
+The Haiku module contains functions to access Haiku APIs.
+
+=head2 Alphabetical Listing of Haiku Functions
+
+=over
+
+=item Haiku::debug_printf(FORMAT,...)
+
+Similar to printf, but prints to system debug output.
+
+=item Haiku::debugger(FORMAT,...)
+
+Drops the program into the debugger. The printf like arguments define the
+debugger message.
+
+=item Haiku::ktrace_printf(FORMAT,...)
+
+Similar to printf, but prints to a kernel tracing entry.
+
+=back
+
+=cut

 //depot/perl/haiku/Haiku/Haiku.xs#1 (text) 
Index: perl/haiku/Haiku/Haiku.xs
--- /dev/null   2008-10-24 09:33:31.292628696 -0700
+++ perl/haiku/Haiku/Haiku.xs   2008-10-29 01:09:06.0 -0700
@@ -0,0 +1,137 @@
+#define PERL_NO_GET_CONTEXT
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include 
+
+#include 
+
+static void
+haiku_do_debugger(const