From: Perl 5 Porters Date: Sat, 1 Mar 1997 06:40:49 +0000 (+1200) Subject: [inseparable changes from match from perl-5.003_91 to perl-5.003_92] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9607fc9c489d4095e3baa795d7ead7acba96137d;p=p5sagit%2Fp5-mst-13.2.git [inseparable changes from match from perl-5.003_91 to perl-5.003_92] CORE LANGUAGE CHANGES Subject: Strictly follow lexical context of C and nested subs From: Chip Salzenberg Files: op.c Subject: Make ::SUPER and UNIVERSAL work together From: Chip Salzenberg Files: gv.c pod/perlguts.pod CORE PORTABILITY Subject: OS/2 patches Date: Wed, 5 Mar 1997 22:08:43 -0500 (EST) From: Ilya Zakharevich Files: hints/os2.sh lib/ExtUtils/MakeMaker.pm t/op/taint.t Msg-ID: 199703060308.WAA22211@monk.mps.ohio-state.edu (applied based on p5p patch as commit eda4d5189d403b15f244b4696a710fb91d15053e) Subject: VMS patches Date: Wed, 05 Mar 1997 23:10:24 -0500 (EST) From: Charles Bailey Files: lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Manifest.pm perlsdio.h t/op/runlevel.t t/op/taint.t vms/descrip.mms vms/perly_c.vms vms/sockadapt.c vms/sockadapt.h vms/vms_yfix.pl private-msgid: 01IG5SQE4A6U00661G@hmivax.humgen.upenn.edu DOCUMENTATION Subject: Add taint checks and srand to perldelta Date: Sun, 2 Mar 1997 11:56:08 -0800 (PST) From: Tom Phoenix Files: pod/perldelta.pod Msg-ID: Pine.GSO.3.95q.970302115355.23058D-100000@kelly.teleport.com (applied based on p5p patch as commit b28e0bc0aa3232e18d1bacb3efcbfb755ad100e0) Subject: Don't call FileHandle 'deprecated' From: Chip Salzenberg Files: pod/perldelta.pod Subject: Improve sample module header Date: Sat, 01 Mar 1997 10:32:31 -0700 From: Tom Christiansen Files: pod/perlmod.pod Msg-ID: 199703011732.KAA14693@jhereg.perl.com (applied based on p5p patch as commit 3e1e15658152387f41e00ded4796cede4e1e10d3) Subject: Update list of CPAN sites Date: Sun, 2 Mar 1997 16:54:22 +0200 (EET) From: Jarkko Hietaniemi Files: pod/perlmod.pod Msg-ID: 199703021454.QAA07446@alpha.hut.fi (applied based on p5p patch as commit 9423903e60e6c92c1893f5f4cab2476f403f8a4b) Subject: Enhance description of 'server error' Date: Tue, 4 Feb 1997 21:03:23 +0200 (EET) From: Jarkko Hietaniemi Files: pod/perldiag.pod private-msgid: 199702041903.VAA16070@alpha.hut.fi Subject: Regularize format of E-Mail addresses in *.pod From: Chip Salzenberg Files: pod/*.pod LIBRARY AND EXTENSIONS Subject: Use IV instead of double for tms structure members From: Chip Salzenberg Files: ext/POSIX/POSIX.xs OTHER CORE CHANGES Subject: Make sure $^X is tainted when ARG_ZERO_IS_SCRIPT From: Chip Salzenberg Files: toke.c Subject: Clarify '-T too late' error From: Chip Salzenberg Files: perl.c pod/perldiag.pod Subject: Warn when redefining or undefining a constant sub From: Chip Salzenberg Files: pod/perldiag.pod pp.c sv.c Subject: Don't generate spurious 'not imported' warning From: Chip Salzenberg Files: gv.c t/pragma/strict-vars pod/perldiag.pod Subject: Clarify message re: @host in string From: Chip Salzenberg Files: pod/perldiag.pod pod/perltrap.pod toke.c Subject: Disconnect refs that are targets of pp_readline From: Chip Salzenberg Files: pp_hot.c Subject: Fix typo in test of HvFILL() From: Chip Salzenberg Files: op.c Subject: Allow for pad name array to be shorter than pad array From: Chip Salzenberg Files: op.c Subject: Eliminate format-string type warnings Date: Mon, 3 Mar 1997 10:15:11 +0100 (MET) From: Hallvard B Furuseth Files: doio.c ext/POSIX/POSIX.xs gv.c hints/dec_osf.sh pp.c pp_ctl.c pp_hot.c run.c sv.c x2p/a2py.c private-msgid: 199703030915.KAA11634@bombur2.uio.no Subject: Update copyright dates From: Chip Salzenberg Files: *.[hc] x2p/*.[hc] win32/EXTERN.h vms/vmsish.h vms/vms.c TESTS Subject: Smarter t/op/taint.t Date: Mon, 3 Mar 1997 10:31:54 -0800 (PST) From: Tom Phoenix Files: t/op/taint.t private-msgid: Pine.GSO.3.95q.970303103047.24000A-100000@kelly.teleport.com Subject: Fix taint test for systems without csh From: Chip Salzenberg Files: t/op/taint.t --- diff --git a/Changes b/Changes index a9da262..f34114e 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,216 @@ releases.) ---------------- +Version 5.003_92 +---------------- + +This release will be the public beta of 5.004, or my name isn't +Larson T. Pettifogger. + + CORE LANGUAGE CHANGES + + Title: "Strictly follow lexical context of C and nested subs" + From: Chip Salzenberg + Files: op.c + + Title: "Make ::SUPER and UNIVERSAL work together" + From: Chip Salzenberg + Files: gv.c pod/perlguts.pod + + CORE PORTABILITY + + Title: "HP-UX hint update" + From: Raphael Manfredi + Msg-ID: <1479.857653838@lyon.grenoble.hp.com> + Date: Thu, 06 Mar 97 14:10:38 +0100 + Files: hints/hpux.sh + + Title: "Re: The continuing MachTen saga" + From: Tom Phoenix + Msg-ID: + Date: Wed, 5 Mar 1997 09:47:22 -0800 (PST) + Files: hints/machten_2.sh + + Title: "OS/2 patches" + From: Ilya Zakharevich + Msg-ID: <199703060308.WAA22211@monk.mps.ohio-state.edu> + Date: Wed, 5 Mar 1997 22:08:43 -0500 (EST) + Files: hints/os2.sh lib/ExtUtils/MakeMaker.pm t/op/taint.t + + Title: "VMS patches" + From: Charles Bailey + Msg-ID: <01IG5SQE4A6U00661G@hmivax.humgen.upenn.edu> + Date: Wed, 05 Mar 1997 23:10:24 -0500 (EST) + Files: lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Manifest.pm perlsdio.h + t/op/runlevel.t t/op/taint.t vms/descrip.mms vms/perly_c.vms + vms/sockadapt.c vms/sockadapt.h vms/vms_yfix.pl + + OTHER CORE CHANGES + + Title: "Make sure $^X is tainted when ARG_ZERO_IS_SCRIPT" + From: Chip Salzenberg + Files: toke.c + + Title: "Clarify '-T too late' error" + From: Chip Salzenberg + Files: perl.c pod/perldiag.pod + + Title: "Warn when redefining or undefining a constant sub" + From: Chip Salzenberg + Files: pod/perldiag.pod pp.c sv.c + + Title: "Don't generate spurious 'not imported' warning" + From: Chip Salzenberg + Files: gv.c t/pragma/strict-vars pod/perldiag.pod + + Title: "Clarify message re: @host in string" + From: Chip Salzenberg + Files: pod/perldiag.pod pod/perltrap.pod toke.c + + Title: "Disconnect refs that are targets of pp_readline" + From: Chip Salzenberg + Files: pp_hot.c + + Title: "Fix typo in test of HvFILL()" + From: Chip Salzenberg + Files: op.c + + Title: "Allow for pad name array to be shorter than pad array" + From: Chip Salzenberg + Files: op.c + + Title: "Eliminate format-string type warnings" + From: Hallvard B Furuseth + Msg-ID: <199703030915.KAA11634@bombur2.uio.no> + Date: Mon, 3 Mar 1997 10:15:11 +0100 (MET) + Files: doio.c ext/POSIX/POSIX.xs gv.c hints/dec_osf.sh pp.c pp_ctl.c + pp_hot.c run.c sv.c x2p/a2py.c + + Title: "Update copyright dates" + From: Chip Salzenberg + Files: *.[hc] x2p/*.[hc] win32/EXTERN.h vms/vmsish.h vms/vms.c + + BUILD PROCESS + + Title: "near-harmless bug in _91's Configure" + From: Roderick Schertler + Msg-ID: + Date: 01 Mar 1997 21:26:49 -0500 + Files: Configure + + Title: "Change 'continuing anyway' to 'probably harmless'" + From: Chip Salzenberg + Files: INSTALL lib/ExtUtils/Liblist.pm + + LIBRARY AND EXTENSIONS + + Title: "Newer ReadLine" + From: Ilya Zakharevich + Msg-ID: <199703040634.BAA19919@monk.mps.ohio-state.edu> + Date: Tue, 4 Mar 1997 01:34:28 -0500 (EST) + Files: lib/Term/ReadLine.pm lib/perl5db.pl + + Title: "Refresh Getopt::Long to 2.9" + From: Johan Vromans + Files: lib/Getopt/Long.pm + + Title: "Benchmark: using code refs" + From: Hugo van der Sanden + Msg-ID: <199703041132.LAA07613@tyree.iii.co.uk> + Date: Tue, 04 Mar 1997 11:32:11 +0000 + Files: lib/Benchmark.pm + + Title: "Fix quotewords" + From: Hugo van der Sanden + Msg-ID: <199703060755.HAA15060@crypt.compulink.co.uk> + Date: Thu, 06 Mar 1997 07:55:25 +0000 + Files: lib/Text/ParseWords.pm + + Title: "Use IV instead of double for tms structure members" + From: Chip Salzenberg + Files: ext/POSIX/POSIX.xs + + Title: "Document IO::File::new_tmpfile" + From: Chip Salzenberg + Files: ext/IO/lib/IO/File.pm + + TESTS + + Title: "Make op/TEST silent under -w" + From: d-lewart@uiuc.edu (Daniel S. Lewart) + Msg-ID: <199703011821.NAA13037@sinistar.idle.com> + Date: Sat, 1 Mar 97 12:04:09 CST + Files: t/TEST + + Title: "Smarter t/op/taint.t" + From: Tom Phoenix + Msg-ID: + Date: Sun, 2 Mar 1997 16:25:03 -0800 (PST) + Files: pod/pod2html.PL + + Title: "Support 'long long' in h2ph" + From: (name lost) + Files: utils/h2ph.PL + + DOCUMENTATION + + Title: "Add taint checks and srand to perldelta" + From: Tom Phoenix + Msg-ID: , + Graham Barr + Msg-ID: <199703011732.KAA14693@jhereg.perl.com> + Date: Sat, 01 Mar 1997 10:32:31 -0700 + Files: pod/perlmod.pod + + Title: "Clarify C documentation" + From: Tom Phoenix + Msg-ID: + Msg-ID: <199703021454.QAA07446@alpha.hut.fi> + Date: Sun, 2 Mar 1997 16:54:22 +0200 (EET) + Files: pod/perlmod.pod + + Title: "Enhance description of 'server error'" + From: Jarkko Hietaniemi + Msg-ID: <199702041903.VAA16070@alpha.hut.fi> + Date: Tue, 4 Feb 1997 21:03:23 +0200 (EET) + Files: pod/perldiag.pod + + Title: "Regularize format of E-Mail addresses in *.pod" + From: Chip Salzenberg + Files: pod/*.pod + + +---------------- Version 5.003_91 ---------------- diff --git a/EXTERN.h b/EXTERN.h index 5741fbf..24fe135 100644 --- a/EXTERN.h +++ b/EXTERN.h @@ -1,6 +1,6 @@ /* EXTERN.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/INTERN.h b/INTERN.h index 76fff3b..ba71c2f 100644 --- a/INTERN.h +++ b/INTERN.h @@ -1,6 +1,6 @@ /* INTERN.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/av.c b/av.c index 67f7880..c7ca844 100644 --- a/av.c +++ b/av.c @@ -1,6 +1,6 @@ /* av.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/av.h b/av.h index c65b948..a8dc60b 100644 --- a/av.h +++ b/av.h @@ -1,6 +1,6 @@ /* av.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/cop.h b/cop.h index 00501fd..a569967 100644 --- a/cop.h +++ b/cop.h @@ -1,6 +1,6 @@ /* cop.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/cv.h b/cv.h index e7e8ce2..262d44c 100644 --- a/cv.h +++ b/cv.h @@ -1,6 +1,6 @@ /* cv.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/deb.c b/deb.c index f270835..8058d1a 100644 --- a/deb.c +++ b/deb.c @@ -1,6 +1,6 @@ /* deb.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/doio.c b/doio.c index f2973d1..8c4c267 100644 --- a/doio.c +++ b/doio.c @@ -1,6 +1,6 @@ /* doio.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1370,8 +1370,8 @@ SV **sp; { a = SvPV(astr, len); if (len != infosize) - croak("Bad arg length for %s, is %d, should be %ld", - op_desc[optype], len, (long)infosize); + croak("Bad arg length for %s, is %lu, should be %ld", + op_desc[optype], (unsigned long)len, (long)infosize); } } else diff --git a/doop.c b/doop.c index f1392ff..7086a7b 100644 --- a/doop.c +++ b/doop.c @@ -1,6 +1,6 @@ /* doop.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/dump.c b/dump.c index 7aed230..0b2084e 100644 --- a/dump.c +++ b/dump.c @@ -1,6 +1,6 @@ /* dump.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 3754e8c..2575ca1 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3533,11 +3533,11 @@ times() clock_t realtime; realtime = times( &tms ); EXTEND(sp,5); - PUSHs( sv_2mortal( newSVnv( realtime ) ) ); - PUSHs( sv_2mortal( newSVnv( tms.tms_utime ) ) ); - PUSHs( sv_2mortal( newSVnv( tms.tms_stime ) ) ); - PUSHs( sv_2mortal( newSVnv( tms.tms_cutime ) ) ); - PUSHs( sv_2mortal( newSVnv( tms.tms_cstime ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) realtime ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) tms.tms_utime ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) tms.tms_stime ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cutime ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cstime ) ) ); double difftime(time1, time2) diff --git a/form.h b/form.h index 531cc72..5e74c61 100644 --- a/form.h +++ b/form.h @@ -1,6 +1,6 @@ /* form.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/gv.c b/gv.c index 67b2600..cc520d6 100644 --- a/gv.c +++ b/gv.c @@ -1,6 +1,6 @@ /* gv.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -131,7 +131,6 @@ I32 level; GV* topgv; GV* gv; GV** gvp; - HV* lastchance; CV* cv; if (!stash) @@ -159,8 +158,33 @@ I32 level; } } - gvp = (GV**)hv_fetch(stash,"ISA",3,FALSE); - if (gvp && (gv = *gvp) != (GV*)&sv_undef && (av = GvAV(gv))) { + gvp = (GV**)hv_fetch(stash, "ISA", 3, FALSE); + av = (gvp && (gv = *gvp) && gv != (GV*)&sv_undef) ? GvAV(gv) : Nullav; + + /* create @.*::SUPER::ISA on demand */ + if (!av) { + char* packname = HvNAME(stash); + STRLEN packlen = strlen(packname); + + if (packlen >= 7 && strEQ(packname + packlen - 7, "::SUPER")) { + HV* basestash; + + packlen -= 7; + basestash = gv_stashpvn(packname, packlen, TRUE); + gvp = (GV**)hv_fetch(basestash, "ISA", 3, FALSE); + if (gvp && (gv = *gvp) != (GV*)&sv_undef && (av = GvAV(gv))) { + gvp = (GV**)hv_fetch(stash, "ISA", 3, TRUE); + if (!gvp || !(gv = *gvp)) + croak("Cannot create %s::ISA", HvNAME(stash)); + if (SvTYPE(gv) != SVt_PVGV) + gv_init(gv, stash, "ISA", 3, TRUE); + SvREFCNT_dec(GvAV(gv)); + GvAV(gv) = (AV*)SvREFCNT_inc(av); + } + } + } + + if (av) { SV** svp = AvARRAY(av); I32 items = AvFILL(av) + 1; while (items--) { @@ -179,7 +203,11 @@ I32 level; } } + /* if at top level, try UNIVERSAL */ + if (level == 0 || level == -1) { + HV* lastchance; + if (lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE)) { if (gv = gv_fetchmeth(lastchance, name, len, (level >= 0) ? level + 1 : level - 1)) { @@ -209,67 +237,29 @@ char* name; GV* gv; for (nend = name; *nend; nend++) { - if (*nend == ':' || *nend == '\'') + if (*nend == '\'') nsplit = nend; + else if (*nend == ':' && *(nend + 1) == ':') + nsplit = ++nend; } if (nsplit) { - char ch; char *origname = name; name = nsplit + 1; - ch = *nsplit; if (*nsplit == ':') --nsplit; - *nsplit = '\0'; - if (strEQ(origname,"SUPER")) { - /* Degenerate case ->SUPER::method should really lookup in original stash */ - SV *tmpstr = sv_2mortal(newSVpv(HvNAME(curcop->cop_stash),0)); + if ((nsplit - origname) == 5 && strnEQ(origname, "SUPER", 5)) { + /* ->SUPER::method should really be looked up in original stash */ + SV *tmpstr = sv_2mortal(newSVpv(HvNAME(curcop->cop_stash), 0)); sv_catpvn(tmpstr, "::SUPER", 7); - stash = gv_stashpvn(SvPVX(tmpstr),SvCUR(tmpstr),TRUE); - *nsplit = ch; - DEBUG_o( deb("Treating %s as %s::%s\n",origname,HvNAME(stash),name) ); - } else { - stash = gv_stashpvn(origname, nsplit - origname, TRUE); - *nsplit = ch; + stash = gv_stashpvn(SvPVX(tmpstr), SvCUR(tmpstr), TRUE); + DEBUG_o( deb("Treating %s as %s::%s\n", + origname, HvNAME(stash), name) ); } - } - gv = gv_fetchmeth(stash, name, nend - name, 0); - - if (!gv) { - /* Failed obvious case - look for SUPER as last element of stash's name */ - char *packname = HvNAME(stash); - STRLEN len = strlen(packname); - if (len >= 7 && strEQ(packname+len-7,"::SUPER")) { - /* Now look for @.*::SUPER::ISA */ - GV** gvp = (GV**)hv_fetch(stash,"ISA",3,FALSE); - len -= 7; - if (!gvp || (gv = *gvp) == (GV*)&sv_undef || !GvAV(gv)) { - /* No @ISA in package ending in ::SUPER - drop suffix - and see if there is an @ISA there - */ - HV *basestash; - char ch = packname[len]; - AV *av; - packname[len] = '\0'; - basestash = gv_stashpvn(packname, len, TRUE); - packname[len] = ch; - gvp = (GV**)hv_fetch(basestash,"ISA",3,FALSE); - if (gvp && (gv = *gvp) != (GV*)&sv_undef && (av = GvAV(gv))) { - /* Okay found @ISA after dropping the SUPER, alias it */ - SV *tmpstr = sv_2mortal(newSVpv(HvNAME(stash),0)); - sv_catpvn(tmpstr, "::ISA", 5); - gv = gv_fetchpv(SvPV(tmpstr,na),TRUE,SVt_PVGV); - if (gv) { - GvAV(gv) = (AV*)SvREFCNT_inc(av); - /* ... and re-try lookup */ - gv = gv_fetchmeth(stash, name, nend - name, 0); - } else { - croak("Cannot create %s::ISA",HvNAME(stash)); - } - } - } - } + else + stash = gv_stashpvn(origname, nsplit - origname, TRUE); } + gv = gv_fetchmeth(stash, name, nend - name, 0); if (!gv) { if (strEQ(name,"import")) gv = (GV*)&sv_yes; @@ -383,7 +373,7 @@ I32 sv_type; I32 len; register char *namend; HV *stash = 0; - bool global = FALSE; + U32 add_gvflags = 0; char *tmpbuf; if (*name == '*' && isALPHA(name[1])) /* accidental stringify on a GV? */ @@ -441,6 +431,8 @@ I32 sv_type; if (!stash) { if (isIDFIRST(*name)) { + bool global = FALSE; + if (isUPPER(*name)) { if (*name > 'I') { if (*name == 'S' && ( @@ -465,6 +457,7 @@ I32 sv_type; } else if (*name == '_' && !name[1]) global = TRUE; + if (global) stash = defstash; else if ((COP*)curcop == &compiling) { @@ -511,6 +504,10 @@ I32 sv_type; warn("Global symbol \"%s\" requires explicit package name", name); ++error_count; stash = curstash ? curstash : defstash; /* avoid core dumps */ + add_gvflags = ((sv_type == SVt_PV) ? GVf_IMPORTED_SV + : (sv_type == SVt_PVAV) ? GVf_IMPORTED_AV + : (sv_type == SVt_PVHV) ? GVf_IMPORTED_HV + : 0); } else return Nullgv; @@ -537,6 +534,7 @@ I32 sv_type; warn("Had to create %s unexpectedly", nambeg); gv_init(gv, stash, name, len, add & 2); gv_init_sv(gv, sv_type); + GvFLAGS(gv) |= add_gvflags; /* set up magic where warranted */ switch (*name) { @@ -997,13 +995,13 @@ HV* stash; { int filled = 0; int i; - char *cp; + const char *cp; SV* sv = NULL; SV** svp; /* Work with "fallback" key, which we assume to be first in AMG_names */ - if ( cp = (char *)AMG_names[0] ) { + if ( cp = AMG_names[0] ) { /* Try to find via inheritance. */ gv = gv_fetchmeth(stash, "()", 2, -1); /* A cookie: "()". */ if (gv) sv = GvSV(gv); @@ -1015,7 +1013,7 @@ HV* stash; for (i = 1; i < NofAMmeth; i++) { cv = 0; - cp = (char *)AMG_names[i]; + cp = AMG_names[i]; *buf = '('; /* A cookie: "(". */ strcpy(buf + 1, cp); diff --git a/gv.h b/gv.h index 8a8ac65..8040075 100644 --- a/gv.h +++ b/gv.h @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/handy.h b/handy.h index efb4f03..257c52a 100644 --- a/handy.h +++ b/handy.h @@ -1,6 +1,6 @@ /* handy.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index d50c4c6..0ba4dad 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -86,7 +86,7 @@ esac # be nauseatingly ANSI case "$cc" in -gcc) ccflags="$ccflags -ansi" +*gcc*) ccflags="$ccflags -ansi" ;; *) ccflags="$ccflags -std" ;; diff --git a/hints/os2.sh b/hints/os2.sh index 9bce2a5..70e478b 100644 --- a/hints/os2.sh +++ b/hints/os2.sh @@ -32,7 +32,9 @@ libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h: if test "$libemx" = "X"; then echo "Cannot find C library!"; fi -libpth="$libemx/mt $libemx" +# Acute backslashitis: +libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`" +libpth="$libpth $libemx/mt $libemx" set `emxrev -f emxlibcm` emxcrtrev=$5 diff --git a/hv.c b/hv.c index bcf5b96..cb2b8fe 100644 --- a/hv.c +++ b/hv.c @@ -1,6 +1,6 @@ /* hv.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/hv.h b/hv.h index a51a0ba..20af4ea 100644 --- a/hv.h +++ b/hv.h @@ -1,6 +1,6 @@ /* hv.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index e719946..aca41ea 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -6,8 +6,6 @@ # Author: Charles Bailey bailey@genetics.upenn.edu package ExtUtils::MM_VMS; -$ExtUtils::MM_VMS::Revision=$ExtUtils::MM_VMS::Revision = '5.39 (31-Jan-1997)'; -unshift @MM::ISA, 'ExtUtils::MM_VMS'; use Carp qw( &carp ); use Config; @@ -15,6 +13,11 @@ require Exporter; use VMS::Filespec; use File::Basename; +use vars qw($Revision); +$Revision = '5.3901 (6-Mar-1997)'; + +unshift @MM::ISA, 'ExtUtils::MM_VMS'; + Exporter::import('ExtUtils::MakeMaker', '$Verbose', '&neatvalue'); =head1 NAME @@ -1303,12 +1306,12 @@ $(BASEEXT).opt : Makefile.PL foreach $lib (split ' ', $self->{LDLOADLIBS}) { $lib =~ s%\$%\\\$%g; # Escape '$' in VMS filespecs if (length($line) + length($lib) > 160) { - push @m, "\t\$(PERL) -e \"print qq[$line]\" >>\$(MMS\$TARGET)\n"; + push @m, "\t\$(PERL) -e \"print qq{$line}\" >>\$(MMS\$TARGET)\n"; $line = $lib . '\n'; } else { $line .= $lib . '\n'; } } - push @m, "\t\$(PERL) -e \"print qq[$line]\" >>\$(MMS\$TARGET)\n" if $line; + push @m, "\t\$(PERL) -e \"print qq{$line}\" >>\$(MMS\$TARGET)\n" if $line; } join('',@m); @@ -1405,7 +1408,7 @@ $(INST_STATIC) : $(OBJECT) $(MYEXTLIB) push(@m,' If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET) Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST) - $(NOECHO) $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F qq[$(EXTRALIBS)\n];close F;" + $(NOECHO) $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F qq{$(EXTRALIBS)\n};close F;" '); push @m, $self->dir_target('$(INST_ARCHAUTODIR)'); join('',@m); @@ -1581,7 +1584,7 @@ sub subdir_x { subdirs :: olddef = F$Environment("Default") Set Default ',$subdir,' - - $(MMS) all $(USEMACROS)$(PASTHRU)$(MACROEND) + - $(MMS)$(MMSQUALIFIERS) all $(USEMACROS)$(PASTHRU)$(MACROEND) Set Default \'olddef\' '; join('',@m); @@ -1606,7 +1609,7 @@ clean :: foreach $dir (@{$self->{DIR}}) { # clean subdirectories first my($vmsdir) = $self->fixpath($dir,1); push( @m, ' If F$Search("'.$vmsdir.'$(MAKEFILE)").nes."" Then \\',"\n\t", - '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) clean`;"',"\n"); + '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS)$(MMSQUALIFIERS) clean`;"',"\n"); } push @m, ' $(RM_F) *.Map *.Dmp *.Lis *.cpp *.$(DLEXT) *$(OBJ_EXT) *$(LIB_EXT) *.Opt $(BOOTSTRAP) $(BASEEXT).bso .MM_Tmp '; @@ -1658,7 +1661,7 @@ realclean :: clean foreach(@{$self->{DIR}}){ my($vmsdir) = $self->fixpath($_,1); push(@m, ' If F$Search("'."$vmsdir".'$(MAKEFILE)").nes."" Then \\',"\n\t", - '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) realclean`;"',"\n"); + '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS)$(MMSQUALIFIERS) realclean`;"',"\n"); } push @m,' $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR) '; @@ -1799,8 +1802,8 @@ disttest : distdir startdir = F$Environment("Default") Set Default [.$(DISTVNAME)] $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL - $(MMS) - $(MMS) test + $(MMS)$(MMSQUALIFIERS) + $(MMS)$(MMSQUALIFIERS) test Set Default 'startdir' }; } @@ -2019,7 +2022,7 @@ $(MAKEFILE) : Makefile.PL $(CONFIGDEP) $(NOECHO) $(SAY) "$(MAKEFILE) out-of-date with respect to $(MMS$SOURCE_LIST)" $(NOECHO) $(SAY) "Cleaning current config before rebuilding $(MAKEFILE) ..." - $(MV) $(MAKEFILE) $(MAKEFILE)_old - - $(MMS) $(USEMAKEFILE)$(MAKEFILE)_old clean + - $(MMS)$(MMSQUALIFIERS) $(USEMAKEFILE)$(MAKEFILE)_old clean $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL ],join(' ',map(qq["$_"],@ARGV)),q[ $(NOECHO) $(SAY) "$(MAKEFILE) has been rebuilt." $(NOECHO) $(SAY) "Please run $(MMS) to build the extension." @@ -2054,7 +2057,7 @@ testdb :: testdb_\$(LINKTYPE) foreach(@{$self->{DIR}}){ my($vmsdir) = $self->fixpath($_,1); push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir ',"'$vmsdir'", - '; print `$(MMS) $(PASTHRU2) test`'."\n"); + '; print `$(MMS)$(MMSQUALIFIERS) $(PASTHRU2) test`'."\n"); } push(@m, "\t\$(NOECHO) \$(SAY) \"No tests defined for \$(NAME) extension.\"\n") unless $tests or -f "test.pl" or @{$self->{DIR}}; @@ -2146,7 +2149,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) MAKEAPERL=1 NORECURS=1 $(MAP_TARGET) :: $(MAKE_APERL_FILE) - $(MMS)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET) + $(MMS)$(MMSQUALIFIERS)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET) }; push @m, map( " \\\n\t\t$_", @ARGV ); push @m, "\n"; @@ -2292,9 +2295,9 @@ $(MAP_SHRTARGET) : $(MAP_LIBPERL) $(MAP_STATIC) ',"${libperldir}Perlshr_Attr.Opt $(MAP_TARGET) : $(MAP_SHRTARGET) ',"${tmp}perlmain\$(OBJ_EXT) ${tmp}PerlShr.Opt",' $(MAP_LINKCMD) ',"${tmp}perlmain\$(OBJ_EXT)",', PerlShr.Opt/Option $(NOECHO) $(SAY) "To install the new ""$(MAP_TARGET)"" binary, say" - $(NOECHO) $(SAY) " $(MMS)$(USEMAKEFILE)$(MAKEFILE) inst_perl $(USEMACROS)MAP_TARGET=$(MAP_TARGET)$(ENDMACRO)" + $(NOECHO) $(SAY) " $(MMS)$(MMSQUALIFIERS)$(USEMAKEFILE)$(MAKEFILE) inst_perl $(USEMACROS)MAP_TARGET=$(MAP_TARGET)$(ENDMACRO)" $(NOECHO) $(SAY) "To remove the intermediate files, say - $(NOECHO) $(SAY) " $(MMS)$(USEMAKEFILE)$(MAKEFILE) map_clean" + $(NOECHO) $(SAY) " $(MMS)$(MMSQUALIFIERS)$(USEMAKEFILE)$(MAKEFILE) map_clean" '; push @m,' ',"${tmp}perlmain.c",' : $(MAKEFILE) diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 77e4e2b..a46a750 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -2,7 +2,7 @@ BEGIN {require 5.002;} # MakeMaker 5.17 was the last MakeMaker that was compatib package ExtUtils::MakeMaker; -$Version = $VERSION = "5.4001"; +$Version = $VERSION = "5.4002"; $Version_OK = "5.17"; # Makefiles older than $Version_OK will die # (Will be checked from MakeMaker version 4.13 onwards) ($Revision = substr(q$Revision: 1.211 $, 10)) =~ s/\s+$//; @@ -244,10 +244,13 @@ sub full_setup { XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit - installpm + IMPORTS + installpm /; + # IMPORTS is used under OS/2 + # ^^^ installpm is deprecated, will go about Summer 96 # @Overridable is close to @MM_Sections but not identical. The diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 09bdbd5..dc7d421 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -7,20 +7,20 @@ use File::Copy 'copy'; use Carp; use strict; -use vars qw(@ISA @EXPORT_OK $VERSION $Debug $Verbose $Is_VMS $Quiet $MANIFEST $found); +use vars qw($VERSION @ISA @EXPORT_OK + $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found); +$VERSION = '1.2801'; @ISA=('Exporter'); @EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck', 'skipcheck', 'maniread', 'manicopy'); -$Debug = 0; -$Verbose = 1; $Is_VMS = $^O eq 'VMS'; +if ($Is_VMS) { require File::Basename } -$VERSION = "1.28"; - +$Debug = 0; +$Verbose = 1; $Quiet = 0; - $MANIFEST = 'MANIFEST'; # Really cool fix from Ilya :) @@ -128,8 +128,19 @@ sub maniread { } while (){ chomp; - if ($Is_VMS) { /^(\S+)/ and $read->{"\L$1"}=$_; } - else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; } + if ($Is_VMS) { + my($file)= /^(\S+)/; + next unless $file; + my($base,$dir) = File::Basename::fileparse($file); + # Resolve illegal file specifications in the same way as tar + $dir =~ tr/./_/; + my(@pieces) = split(/\./,$base); + if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); } + my $okfile = "$dir$base"; + warn "Debug: Illegal name $file changed to $okfile\n" if $Debug; + $read->{"\L$okfile"}=$_; + } + else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; } } close M; $read; @@ -177,8 +188,7 @@ sub manicopy { $dir = VMS::Filespec::unixify($dir) if $Is_VMS; File::Path::mkpath(["$target/$dir"],1,$Is_VMS ? undef : 0755); } - if ($Is_VMS) { vms_cp_if_diff($file,"$target/$file"); } - else { cp_if_diff($file, "$target/$file", $how); } + cp_if_diff($file, "$target/$file", $how); } } @@ -207,36 +217,18 @@ sub cp_if_diff { } } -# Do the comparisons here rather than spawning off another process -sub vms_cp_if_diff { - my($from,$to) = @_; - my($diff) = 0; - local(*F,*T); - open(F,$from) or croak "Can't read $from: $!\n"; - if (open(T,$to)) { - while () { $diff++,last if $_ ne ; } - $diff++ unless eof(T); - close T; - } - else { $diff++; } - close F; - if ($diff) { - system('copy',VMS::Filespec::vmsify($from),VMS::Filespec::vmsify($to)) & 1 - or confess "Copy failed: $!"; - } -} - sub cp { my ($srcFile, $dstFile) = @_; my ($perm,$access,$mod) = (stat $srcFile)[2,8,9]; copy($srcFile,$dstFile); - utime $access, $mod, $dstFile; + utime $access, $mod + ($Is_VMS ? 1 : 0), $dstFile; # chmod a+rX-w,go-w chmod( 0444 | ( $perm & 0111 ? 0111 : 0 ), $dstFile ); } sub ln { my ($srcFile, $dstFile) = @_; + return &cp if $Is_VMS; link($srcFile, $dstFile); local($_) = $dstFile; # chmod a+r,go-w+X (except "X" only applies to u=x) my $mode= 0444 | (stat)[2] & 0700; diff --git a/mg.c b/mg.c index 04fccaf..7fba763 100644 --- a/mg.c +++ b/mg.c @@ -1,6 +1,6 @@ /* mg.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/mg.h b/mg.h index 416eceb..c40a866 100644 --- a/mg.h +++ b/mg.h @@ -1,6 +1,6 @@ /* mg.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/op.c b/op.c index db97cb6..f27aa94 100644 --- a/op.c +++ b/op.c @@ -1,6 +1,6 @@ /* op.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -188,7 +188,6 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) for (off = AvFILL(curname); off > 0; off--) { if ((sv = svp[off]) && sv != &sv_undef && - !SvFAKE(sv) && seq <= SvIVX(sv) && seq > I_32(SvNVX(sv)) && strEQ(SvPVX(sv), name)) @@ -199,21 +198,24 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) depth = CvDEPTH(cv); if (!depth) { - if (newoff) + if (newoff) { + if (SvFAKE(sv)) + continue; return 0; /* don't clone from inactive stack frame */ + } depth = 1; } oldpad = (AV*)*av_fetch(curlist, depth, FALSE); oldsv = *av_fetch(oldpad, off, TRUE); if (!newoff) { /* Not a mere clone operation. */ - SV *sv = NEWSV(1103,0); + SV *namesv = NEWSV(1103,0); newoff = pad_alloc(OP_PADSV, SVs_PADMY); - sv_upgrade(sv, SVt_PVNV); - sv_setpv(sv, name); - av_store(comppad_name, newoff, sv); - SvNVX(sv) = (double)curcop->cop_seq; - SvIVX(sv) = 999999999; /* A ref, intro immediately */ - SvFAKE_on(sv); /* A ref, not a real var */ + sv_upgrade(namesv, SVt_PVNV); + sv_setpv(namesv, name); + av_store(comppad_name, newoff, namesv); + SvNVX(namesv) = (double)curcop->cop_seq; + SvIVX(namesv) = 999999999; /* A ref, intro immediately */ + SvFAKE_on(namesv); /* A ref, not a real var */ if (CvANON(compcv) || SvTYPE(compcv) == SVt_PVFM) { /* "It's closures all the way down." */ CvCLONE_on(compcv); @@ -235,7 +237,7 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) } } else if (!CvUNIQUE(compcv)) { - if (dowarn && !CvUNIQUE(cv)) + if (dowarn && !SvFAKE(sv) && !CvUNIQUE(cv)) warn("Variable \"%s\" will not stay shared", name); } } @@ -2885,7 +2887,7 @@ CV* cv; pname = AvARRAY(pad_name); ppad = AvARRAY(pad); - for (ix = 1; ix <= AvFILL(pad); ix++) { + for (ix = 1; ix <= AvFILL(pad_name); ix++) { if (SvPOK(pname[ix])) PerlIO_printf(Perl_debug_log, "\t%4d. 0x%p (%s\"%s\" %ld-%ld)\n", ix, ppad[ix], @@ -2909,6 +2911,8 @@ CV* outside; AV* protopad = (AV*)*av_fetch(protopadlist, 1, FALSE); SV** pname = AvARRAY(protopad_name); SV** ppad = AvARRAY(protopad); + I32 fname = AvFILL(protopad_name); + I32 fpad = AvFILL(protopad); AV* comppadlist; CV* cv; @@ -2948,8 +2952,8 @@ CV* outside; av_store(comppad, 0, (SV*)av); AvFLAGS(av) = AVf_REIFY; - for (ix = AvFILL(protopad); ix > 0; ix--) { - SV* namesv = pname[ix]; + for (ix = fpad; ix > 0; ix--) { + SV* namesv = (ix <= fname) ? pname[ix] : Nullsv; if (namesv && namesv != &sv_undef) { char *name = SvPVX(namesv); /* XXX */ if (SvFLAGS(namesv) & SVf_FAKE) { /* lexical from outside? */ @@ -2986,8 +2990,8 @@ CV* outside; /* Now that vars are all in place, clone nested closures. */ - for (ix = AvFILL(protopad); ix > 0; ix--) { - SV* namesv = pname[ix]; + for (ix = fpad; ix > 0; ix--) { + SV* namesv = (ix <= fname) ? pname[ix] : Nullsv; if (namesv && namesv != &sv_undef && !(SvFLAGS(namesv) & SVf_FAKE) @@ -3173,8 +3177,8 @@ OP *block; db_postponed = gv_fetchpv("DB::postponed", GV_ADDMULTI, SVt_PVHV); } hv = GvHVn(db_postponed); - if (HvFILL(hv) >= 0 && hv_exists(hv, SvPVX(tmpstr), SvCUR(tmpstr)) - && (cv = GvCV(db_postponed))) { + if (HvFILL(hv) > 0 && hv_exists(hv, SvPVX(tmpstr), SvCUR(tmpstr)) + && (cv = GvCV(db_postponed))) { dSP; PUSHMARK(sp); XPUSHs(tmpstr); diff --git a/op.h b/op.h index 4b57b33..67435f9 100644 --- a/op.h +++ b/op.h @@ -1,6 +1,6 @@ /* op.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/patchlevel.h b/patchlevel.h index 0d6595b..42143c3 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,5 +1,5 @@ #define PATCHLEVEL 3 -#define SUBVERSION 91 +#define SUBVERSION 92 /* local_patches -- list of locally applied less-than-subversion patches. diff --git a/perl.c b/perl.c index e3dd3f7..d799f2b 100644 --- a/perl.c +++ b/perl.c @@ -1,6 +1,6 @@ /* perl.c * - * Copyright (c) 1987-1996 Larry Wall + * Copyright (c) 1987-1997 Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1400,7 +1400,7 @@ char *s; return s; case 'T': if (!tainting) - croak("Too late for \"-T\" option (try putting it first)"); + croak("Too late for \"-T\" option"); s++; return s; case 'u': @@ -1427,7 +1427,7 @@ char *s; #endif #ifdef OS2 printf("\n\nOS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe Rommel\n" - "Version 5 port Copyright (c) 1994-1996, Andreas Kaiser, Ilya Zakharevich\n"); + "Version 5 port Copyright (c) 1994-1997, Andreas Kaiser, Ilya Zakharevich\n"); #endif #ifdef atarist printf("atariST series port, ++jrb bammi@cadence.com\n"); diff --git a/perl.h b/perl.h index 1ca2c2b..dace51d 100644 --- a/perl.h +++ b/perl.h @@ -1,6 +1,6 @@ /* perl.h * - * Copyright (c) 1987-1994, Larry Wall + * Copyright (c) 1987-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/perlsdio.h b/perlsdio.h index f5c2921..97add0f 100644 --- a/perlsdio.h +++ b/perlsdio.h @@ -16,7 +16,6 @@ #define PerlIO_printf fprintf #define PerlIO_stdoutf printf #define PerlIO_vprintf(f,fmt,a) vfprintf(f,fmt,a) -#define PerlIO_read(f,buf,count) fread(buf,1,count,f) #define PerlIO_write(f,buf,count) fwrite1(buf,1,count,f) #define PerlIO_open fopen #define PerlIO_fdopen fdopen @@ -24,21 +23,28 @@ #define PerlIO_close(f) fclose(f) #define PerlIO_puts(f,s) fputs(s,f) #define PerlIO_putc(f,c) fputc(c,f) -#if defined(VMS) && defined(__DECC) - /* Unusual definition of ungetc() here to accomodate fast_sv_gets()' - * belief that it can mix getc/ungetc with reads from stdio buffer */ - int decc$ungetc(int __c, FILE *__stream); -# define PerlIO_ungetc(f,c) ((c) == EOF ? EOF : \ - ((*(f) && !((*(f))->_flag & _IONBF) && \ - ((*(f))->_ptr > (*(f))->_base)) ? \ - ((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f))) - /* Work around bug in DECCRTL/AXP (DECC v5.x) which causes read - * from a pipe after EOF has been returned once to hang. +#if defined(VMS) +# if defined(__DECC) + /* Unusual definition of ungetc() here to accomodate fast_sv_gets()' + * belief that it can mix getc/ungetc with reads from stdio buffer */ + int decc$ungetc(int __c, FILE *__stream); +# define PerlIO_ungetc(f,c) ((c) == EOF ? EOF : \ + ((*(f) && !((*(f))->_flag & _IONBF) && \ + ((*(f))->_ptr > (*(f))->_base)) ? \ + ((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f))) +# else +# define PerlIO_ungetc(f,c) ungetc(c,f) +# endif + /* Work around bug in DECCRTL/AXP (DECC v5.x) and some versions of old + * VAXCRTL which causes read from a pipe after EOF has been returned + * once to hang. */ # define PerlIO_getc(f) (feof(f) ? EOF : getc(f)) +# define PerlIO_read(f,buf,count) (feof(f) ? 0 : fread(buf,1,count,f)) #else # define PerlIO_ungetc(f,c) ungetc(c,f) # define PerlIO_getc(f) getc(f) +# define PerlIO_read(f,buf,count) fread(buf,1,count,f) #endif #define PerlIO_eof(f) feof(f) #define PerlIO_getname(f,b) fgetname(f,b) diff --git a/perly.y b/perly.y index 6010a89..b181d5f 100644 --- a/perly.y +++ b/perly.y @@ -1,6 +1,6 @@ /* perly.y * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/plan9/buildinfo b/plan9/buildinfo index 96639c3..ac81a7f 100644 --- a/plan9/buildinfo +++ b/plan9/buildinfo @@ -1 +1 @@ -p9pvers = 5.003_91 +p9pvers = 5.003_92 diff --git a/pod/perl.pod b/pod/perl.pod index 99f996f..f3ddc3c 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -227,7 +227,7 @@ See L. =head1 AUTHOR -Larry Wall EFE, with the help of oodles of other folks. +Larry Wall >, with the help of oodles of other folks. =head1 FILES @@ -277,7 +277,7 @@ expression may not compile to more than 32767 bytes internally. You may mail your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, -or by C) to F. +or by C) to >. If you've succeeded in compiling perl, the perlbug script in the utils/ subdirectory can be used to help mail in a bug report. diff --git a/pod/perlcall.pod b/pod/perlcall.pod index 20c863c..dc96500 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -1889,7 +1889,7 @@ L, L, L =head1 AUTHOR -Paul Marquess EFE +Paul Marquess > Special thanks to the following people who assisted in the creation of the document. diff --git a/pod/perldelta.pod b/pod/perldelta.pod index bfdf903..734e940 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -42,13 +42,26 @@ fixed. As a result, the string "$$0" is no longer equivalent to C<$$."0">, but rather to C<${$0}>. To get the old behavior, change "$$" followed by a digit to "${$}". -=head2 Internal Change: FileHandle Deprecated +=head2 Changes to Tainting Checks -Filehandles are now stored internally as type IO::Handle. -Although C and C<*STDOUT{FILEHANDLE}> -are still supported for backwards compatibility, -C (or C or C) and -C<*STDOUT{IO}> are the way of the future. +A bug in previous versions may have failed to detect some insecure +conditions when taint checks are turned on. (Taint checks are used +in setuid or setgid scripts, or when explicitly turned on with the +C<-T> invocation option.) Although it's unlikely, this may cause a +previously-working script to now fail -- which should be construed +as a blessing, since that indicates a potentially-serious security +hole was just plugged. + +=head2 Internal Change: FileHandle Class Based on IO::* Classes + +File handles are now stored internally as type IO::Handle. The +FileHandle module is still supported for backwards compatibility, but +it is now merely a front end to the IO::* modules -- specifically, +IO::Handle, IO::Seekable, and IO::File. We suggest, but do not +require, that you use the IO::* modules in new code. + +In harmony with this change, C<*GLOB{FILEHANDLE}> is now a +backward-compatible synonym for C<*STDOUT{IO}>. =head2 Internal Change: PerlIO internal IO abstraction interface @@ -198,6 +211,19 @@ function has no prototype). FUNCTION is a reference to or the name of the function whose prototype you want to retrieve. (Not actually new; just never documented before.) +=item srand + +The default seed for C, which used to be C