summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-07-01 18:47:42 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-07-01 18:47:42 +0000
commit201aed913574634f9e04ba28869d0af9f4c2a8bd (patch)
tree24d9b6e9ffb379b6755b030bbf9fef0a7a31cc78
parent8ddbe0db64fab7835b6ee250a143591dfee04981 (diff)
parentf5eac2152adebf3de703707e233f00e2cd249b47 (diff)
downloadperl-201aed913574634f9e04ba28869d0af9f4c2a8bd.tar.gz
Raw integrate - does not build #if mess in gv.c
p4raw-id: //depot/perlio@11062
-rw-r--r--Changes232
-rw-r--r--README.os22
-rw-r--r--ext/B/B/C.pm2
-rw-r--r--ext/DB_File/DB_File.xs14
-rw-r--r--ext/Data/Dumper/Dumper.xs13
-rw-r--r--ext/IPC/SysV/SysV.xs17
-rw-r--r--ext/List/Util/Util.xs4
-rw-r--r--ext/List/Util/lib/List/Util.pm2
-rw-r--r--ext/PerlIO/Scalar/Scalar.xs3
-rw-r--r--ext/Storable/ChangeLog18
-rw-r--r--ext/Storable/Storable.pm8
-rw-r--r--ext/Storable/Storable.xs223
-rw-r--r--ext/Storable/t/freeze.t32
-rw-r--r--gv.c51
-rw-r--r--lib/Unicode/UCD.pm6
-rw-r--r--mg.c24
-rw-r--r--op.c3
-rw-r--r--op.h2
-rw-r--r--patchlevel.h2
-rw-r--r--perlio.c3
-rw-r--r--pod/Makefile.SH8
-rw-r--r--pod/perltoc.pod91
-rw-r--r--pp_sys.c6
-rw-r--r--regcomp.c7
-rw-r--r--sv.c5
-rw-r--r--utils/Makefile20
-rw-r--r--utils/perlcc.PL22
-rwxr-xr-xx2p/Makefile.SH2
28 files changed, 601 insertions, 221 deletions
diff --git a/Changes b/Changes
index e38a8018ef..65058454b6 100644
--- a/Changes
+++ b/Changes
@@ -31,6 +31,238 @@ or any other branch.
Version v5.7.1 Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 11058] By: jhi on 2001/07/01 04:57:05
+ Log: Still one typo, regen toc.
+ Branch: perl
+ ! lib/Unicode/UCD.pm pod/perltoc.pod
+____________________________________________________________________________
+[ 11057] By: jhi on 2001/07/01 04:54:35
+ Log: Detypos and regen toc.
+ Branch: perl
+ ! README.os2 lib/Unicode/UCD.pm pod/perltoc.pod
+____________________________________________________________________________
+[ 11056] By: jhi on 2001/07/01 04:26:08
+ Log: VERSION tweak.
+ Branch: perl
+ ! ext/List/Util/lib/List/Util.pm
+____________________________________________________________________________
+[ 11055] By: jhi on 2001/06/30 22:18:37
+ Log: Attempt at plugging the leak under ithreads detected by Doug.
+ Branch: perl
+ ! op.h
+____________________________________________________________________________
+[ 11054] By: jhi on 2001/06/30 21:33:29
+ Log: gcc -Wall lint after #11051.
+ Branch: perl
+ ! pp_sys.c
+____________________________________________________________________________
+[ 11053] By: jhi on 2001/06/30 21:13:55
+ Log: Integrate perlio.
+ Branch: perl
+ !> lib/File/Find/taint.t
+____________________________________________________________________________
+[ 11052] By: jhi on 2001/06/30 21:07:38
+ Log: Don't use the v-strings for module VERSIONs.
+ Branch: perl
+ ! lib/Unicode/UCD.pm
+____________________________________________________________________________
+[ 11051] By: jhi on 2001/06/30 20:59:57
+ Log: Code cleanup based on turning off the -woffs in IRIX.
+ Not all of the gripes cleaned up (hairy code in hv.c and
+ regcomp.c; unused newsp, gimme, and optype from cop.h macros;
+ unused 'key' arguments in ?DBM_File.xs) (and the -woffs left
+ to the IRIX hints)
+ Branch: perl
+ ! ext/DB_File/DB_File.xs ext/Data/Dumper/Dumper.xs
+ ! ext/IPC/SysV/SysV.xs ext/List/Util/Util.xs
+ ! ext/PerlIO/Scalar/Scalar.xs gv.c mg.c op.c perlio.c pp_sys.c
+ ! regcomp.c sv.c
+____________________________________________________________________________
+[ 11050] By: nick on 2001/06/30 20:46:46
+ Log: Jeffrey Friedl's <jfriedl@yahoo.com> fix for lib/File/Find/taint.t
+ Branch: perlio
+ ! lib/File/Find/taint.t
+____________________________________________________________________________
+[ 11049] By: nick on 2001/06/30 18:13:33
+ Log: Integrate mainline
+ Branch: perlio
+ +> NetWare/nwstdio.h NetWare/perlsdio.h
+ +> ext/Encode/Encode/7bit-jis.enc ext/Encode/Encode/7bit-kana.enc
+ +> ext/Encode/Encode/7bit-kr.enc lib/Unicode/UCD.pm
+ +> lib/Unicode/UCD.t t/run/exit.t
+ !> (integrate 60 files)
+____________________________________________________________________________
+[ 11048] By: jhi on 2001/06/30 16:23:39
+ Log: Delta delta.
+ Branch: perl
+ ! pod/perl572delta.pod
+____________________________________________________________________________
+[ 11047] By: jhi on 2001/06/30 16:03:40
+ Log: More VERSION tuning: to avoid unnecessary Perl upgrades
+ by CPAN.pm, use rather _00.
+ Branch: perl
+ ! ext/Errno/Errno_pm.PL ext/IO/lib/IO/Dir.pm
+ ! ext/IO/lib/IO/Handle.pm ext/IO/lib/IO/Seekable.pm
+ ! ext/IO/lib/IO/Socket/UNIX.pm ext/IPC/SysV/Msg.pm
+ ! ext/IPC/SysV/Semaphore.pm ext/IPC/SysV/SysV.pm
+ ! ext/Time/HiRes/HiRes.pm lib/CGI/Pretty.pm lib/CPAN/Nox.pm
+ ! lib/ExtUtils/Embed.pm lib/Test.pm
+____________________________________________________________________________
+[ 11046] By: jhi on 2001/06/30 15:53:22
+ Log: Add a simple Unicode character database interface, Unicode::UCD.
+ Branch: perl
+ + lib/Unicode/UCD.pm lib/Unicode/UCD.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 11045] By: jhi on 2001/06/30 13:42:37
+ Log: Subject: [PATCH] op/numconver.t
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Sat, 30 Jun 2001 15:40:10 +0100
+ Message-ID: <20010630154010.I59620@plum.flirble.org>
+ Branch: perl
+ ! t/op/numconvert.t
+____________________________________________________________________________
+[ 11044] By: jhi on 2001/06/30 13:29:25
+ Log: The $^N is now taken (by #11038).
+ Branch: perl
+ ! t/base/lex.t
+____________________________________________________________________________
+[ 11043] By: jhi on 2001/06/30 13:15:59
+ Log: The #11040 had slipped to a wrong function...
+ Branch: perl
+ ! sv.c
+____________________________________________________________________________
+[ 11042] By: jhi on 2001/06/30 13:08:25
+ Log: In 64-bit AIX 5L (oslevel 5.1.0.0, ccversion 5.0.2.0)
+ the Configure library symbol probe mysteriously finds all
+ symbols but those of pipe() and times().
+ Branch: perl
+ ! hints/aix.sh
+____________________________________________________________________________
+[ 11041] By: jhi on 2001/06/30 13:01:25
+ Log: Subject: [PATCH] (was Re: not OK: perl@11006 on HP-UX B.11.00)
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Fri, 29 Jun 2001 23:49:07 +0100
+ Message-ID: <20010629234907.D59620@plum.flirble.org>
+ Branch: perl
+ ! lib/ExtUtils.t
+____________________________________________________________________________
+[ 11040] By: jhi on 2001/06/30 13:00:24
+ Log: Subject: [PATCH] weakref fix 2, not yet there
+ From: Artur Bergman <artur@contiller.se>
+ Date: Sat, 30 Jun 2001 01:18:16 +0200
+ Message-ID: <B762D957.1CC9%artur@contiller.se>
+ Branch: perl
+ ! sv.c
+____________________________________________________________________________
+[ 11039] By: jhi on 2001/06/30 12:59:25
+ Log: Subject: [PATCH t/run/exit.t] Another shot at testing exit codes.
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 29 Jun 2001 19:39:11 -0400
+ Message-ID: <20010629193910.D25304@blackrider>
+ Branch: perl
+ + t/run/exit.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 11038] By: jhi on 2001/06/30 12:58:16
+ Log: Add support for $^N, the most-recently closed group.
+ Branch: perl
+ ! embedvar.h gv.c mg.c perlapi.h pod/perlretut.pod
+ ! pod/perltoc.pod pod/perlvar.pod regexec.c regexp.h t/op/pat.t
+ ! thrdvar.h
+____________________________________________________________________________
+[ 11037] By: jhi on 2001/06/30 12:53:40
+ Log: Subject: [ID 20010630.001] Editorial nits in README.solaris
+ From: lvirden@cas.org
+ Date: Sat, 30 Jun 2001 04:12:36 -0400 (EDT)
+ Message-Id: <200106300812.f5U8CaG10447@lwv26awu.cas.org>
+
+ Subject: [ID 20010630.002] Another editorial tweak to README.solaris
+ From: lvirden@cas.org
+ Date: Sat, 30 Jun 2001 04:17:55 -0400 (EDT)
+ Message-Id: <200106300817.f5U8HtN10626@lwv26awu.cas.org>
+ Branch: perl
+ ! README.solaris
+____________________________________________________________________________
+[ 11036] By: jhi on 2001/06/30 12:51:45
+ Log: Subject: [PATCH] Encode.pm to use escape-sequence encoding
+ From: SADAHIRO Tomoyuki <BQW10602@nifty.com>
+ Date: Sat, 30 Jun 2001 07:33:37 +0900
+ Message-Id: <20010630073226.7C79.BQW10602@nifty.com>
+
+ Subject: Re: [PATCH] Encode.pm to use escape-sequence encoding
+ From: SADAHIRO Tomoyuki <BQW10602@nifty.com>
+ Date: Sat, 30 Jun 2001 21:38:14 +0900
+ Message-Id: <20010630213554.F67A.BQW10602@nifty.com>
+ Branch: perl
+ + ext/Encode/Encode/7bit-jis.enc ext/Encode/Encode/7bit-kana.enc
+ + ext/Encode/Encode/7bit-kr.enc
+ ! MANIFEST ext/Encode/Encode/Tcl.pm
+____________________________________________________________________________
+[ 11035] By: jhi on 2001/06/30 12:44:51
+ Log: NetWare tweaks from Guruprasad.
+ Branch: perl
+ + NetWare/nwstdio.h NetWare/perlsdio.h
+ ! MANIFEST NetWare/Makefile NetWare/config.wc
+ ! NetWare/config_H.wc NetWare/nwperlsys.c NetWare/nwperlsys.h
+ ! NetWare/t/Readme.txt
+____________________________________________________________________________
+[ 11034] By: jhi on 2001/06/29 23:28:16
+ Log: More module $VERSION bump-ups.
+ Branch: perl
+ ! ext/Devel/Peek/Peek.pm lib/ExtUtils/Embed.pm
+ ! lib/ExtUtils/Liblist.pm lib/ExtUtils/Manifest.pm
+ ! lib/ExtUtils/Mksymlists.pm lib/IPC/Open3.pm
+____________________________________________________________________________
+[ 11033] By: jhi on 2001/06/29 21:25:23
+ Log: Doc update due to #11032.
+ Branch: perl
+ ! pod/perl572delta.pod
+____________________________________________________________________________
+[ 11032] By: jhi on 2001/06/29 21:19:44
+ Log: Subject: [PATCH: perl@11006] s/div/lib\$ediv/ in Time::HiRes for VAX
+ From: Peter Prymmer <pvhp@forte.com>
+ Date: Fri, 29 Jun 2001 14:02:16 -0700 (PDT)
+ Message-ID: <Pine.OSF.4.10.10106291337520.65853-100000@aspara.forte.com>
+ Branch: perl
+ ! ext/Time/HiRes/HiRes.xs
+____________________________________________________________________________
+[ 11031] By: jhi on 2001/06/29 14:31:53
+ Log: -lpthreads missing in AIX.
+ Branch: perl
+ ! hints/aix.sh
+____________________________________________________________________________
+[ 11030] By: jhi on 2001/06/29 14:08:12
+ Log: Subject: [PATCH] CLONE && weakrefs
+ From: Artur Bergman <artur@contiller.se>
+ Date: Fri, 29 Jun 2001 17:02:00 +0200
+ Message-ID: <B7626508.1CA0%artur@contiller.se>
+ Branch: perl
+ ! sv.c
+____________________________________________________________________________
+[ 11029] By: jhi on 2001/06/29 14:06:50
+ Log: Subject: Re: Bug report: split splits on wrong pattern
+ From: Radu Greab <radu@netsoft.ro>
+ Date: Wed, 27 Jun 2001 21:50:52 +0300
+ Message-ID: <15162.11020.279064.471031@ix.netsoft.ro>
+ Branch: perl
+ ! pp_ctl.c t/op/split.t
+____________________________________________________________________________
+[ 11028] By: jhi on 2001/06/29 13:47:38
+ Log: Metaconfig unit change for #11027.
+ Branch: metaconfig/U/perl
+ ! d_modfl.U
+____________________________________________________________________________
+[ 11027] By: jhi on 2001/06/29 13:47:03
+ Log: I thought this Configure glitch for AIX was just recently fixed?
+ Branch: perl
+ ! Configure
+____________________________________________________________________________
+[ 11026] By: jhi on 2001/06/29 13:14:07
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 11025] By: jhi on 2001/06/29 13:07:57
Log: Subject: Re: perl@10967, File::Find, and Cwd
From: Mike Guy <mjtg@cam.ac.uk>
diff --git a/README.os2 b/README.os2
index 69fa3866a4..417af523d2 100644
--- a/README.os2
+++ b/README.os2
@@ -1790,7 +1790,7 @@ F<perl????.dll> to the "new" F<perl????.dll>.
=back
-=head2 DLL name mangling: 5.6.2 and beyound
+=head2 DLL name mangling: 5.6.2 and beyond
In fact mangling of I<extension> DLLs was done due to misunderstanding
of the OS/2 dynaloading model. OS/2 (effectively) maintains two
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 1f77a2c212..f8df7b65a2 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -362,7 +362,7 @@ sub B::PMOP::save {
if (defined($re)) {
my $resym = sprintf("re%d", $re_index++);
$decl->add(sprintf("static char *$resym = %s;", cstring($re)));
- $init->add(sprintf("PM_SETRE($pm,pregcomp($resym, $resym + %u, &$pm));",
+ $init->add(sprintf("PM_SETRE(&$pm,pregcomp($resym, $resym + %u, &$pm));",
length($re)));
}
if ($gvsym) {
diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs
index d6d0e9ee05..c1040cca47 100644
--- a/ext/DB_File/DB_File.xs
+++ b/ext/DB_File/DB_File.xs
@@ -1998,16 +1998,18 @@ db_put(db, key, value, flags=0)
int
db_fd(db)
DB_File db
- int status = 0 ;
CODE:
CurrentDB = db ;
#ifdef DB_VERSION_MAJOR
RETVAL = -1 ;
- status = (db->in_memory
- ? -1
- : ((db->dbp)->fd)(db->dbp, &RETVAL) ) ;
- if (status != 0)
- RETVAL = -1 ;
+ {
+ int status = 0 ;
+ status = (db->in_memory
+ ? -1
+ : ((db->dbp)->fd)(db->dbp, &RETVAL) ) ;
+ if (status != 0)
+ RETVAL = -1 ;
+ }
#else
RETVAL = (db->in_memory
? -1
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs
index 99cd099eb8..b9fb54b978 100644
--- a/ext/Data/Dumper/Dumper.xs
+++ b/ext/Data/Dumper/Dumper.xs
@@ -190,13 +190,11 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv,
AV *seenentry = Nullav;
char *iname;
STRLEN inamelen, idlen = 0;
- U32 flags;
U32 realtype;
if (!val)
return 0;
- flags = SvFLAGS(val);
realtype = SvTYPE(val);
if (SvGMAGICAL(val))
@@ -221,7 +219,6 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv,
}
ival = SvRV(val);
- flags = SvFLAGS(ival);
realtype = SvTYPE(ival);
(void) sprintf(id, "0x%lx", (unsigned long)ival);
idlen = strlen(id);
@@ -776,9 +773,9 @@ Data_Dumper_Dumpxs(href, ...)
HV *seenhv = Nullhv;
AV *postav, *todumpav, *namesav;
I32 level = 0;
- I32 indent, terse, useqq, i, imax, postlen;
+ I32 indent, terse, i, imax, postlen;
SV **svp;
- SV *val, *name, *pad, *xpad, *apad, *sep, *tmp, *varname;
+ SV *val, *name, *pad, *xpad, *apad, *sep, *varname;
SV *freezer, *toaster, *bless;
I32 purity, deepcopy, quotekeys, maxdepth = 0;
char tmpbuf[1024];
@@ -811,11 +808,11 @@ Data_Dumper_Dumpxs(href, ...)
todumpav = namesav = Nullav;
seenhv = Nullhv;
- val = pad = xpad = apad = sep = tmp = varname
+ val = pad = xpad = apad = sep = varname
= freezer = toaster = bless = &PL_sv_undef;
name = sv_newmortal();
indent = 2;
- terse = useqq = purity = deepcopy = 0;
+ terse = purity = deepcopy = 0;
quotekeys = 1;
retval = newSVpvn("", 0);
@@ -835,8 +832,10 @@ Data_Dumper_Dumpxs(href, ...)
purity = SvIV(*svp);
if ((svp = hv_fetch(hv, "terse", 5, FALSE)))
terse = SvTRUE(*svp);
+#if 0 /* useqq currently unused */
if ((svp = hv_fetch(hv, "useqq", 5, FALSE)))
useqq = SvTRUE(*svp);
+#endif
if ((svp = hv_fetch(hv, "pad", 3, FALSE)))
pad = *svp;
if ((svp = hv_fetch(hv, "xpad", 4, FALSE)))
diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs
index 39e932da04..35a8fde0b2 100644
--- a/ext/IPC/SysV/SysV.xs
+++ b/ext/IPC/SysV/SysV.xs
@@ -163,27 +163,26 @@ PPCODE:
{
#ifdef HAS_SEM
SV **sv_ptr;
- SV *sv;
struct semid_ds ds;
AV *list = (AV*)SvRV(obj);
if(!sv_isa(obj, "IPC::Semaphore::stat"))
croak("method %s not called a %s object",
"pack","IPC::Semaphore::stat");
- if((sv_ptr = av_fetch(list,0,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,0,TRUE)) && *sv_ptr)
ds.sem_perm.uid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,1,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,1,TRUE)) && *sv_ptr)
ds.sem_perm.gid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,2,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,2,TRUE)) && *sv_ptr)
ds.sem_perm.cuid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,3,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,3,TRUE)) && *sv_ptr)
ds.sem_perm.cgid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,4,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,4,TRUE)) && *sv_ptr)
ds.sem_perm.mode = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,5,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,5,TRUE)) && *sv_ptr)
ds.sem_ctime = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,6,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,6,TRUE)) && *sv_ptr)
ds.sem_otime = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,7,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,7,TRUE)) && *sv_ptr)
ds.sem_nsems = SvIV(*sv_ptr);
ST(0) = sv_2mortal(newSVpvn((char *)&ds,sizeof(ds)));
XSRETURN(1);
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index f75944dceb..0ea2e549f5 100644
--- a/ext/List/Util/Util.xs
+++ b/ext/List/Util/Util.xs
@@ -159,7 +159,6 @@ CODE:
{
SV *ret;
int index;
- I32 markix;
GV *agv,*bgv,*gv;
HV *stash;
CV *cv;
@@ -180,7 +179,6 @@ CODE:
SAVETMPS;
SAVESPTR(PL_op);
ret = ST(1);
- markix = sp - PL_stack_base;
for(index = 2 ; index < items ; index++) {
GvSV(agv) = ret;
GvSV(bgv) = ST(index);
@@ -199,7 +197,6 @@ PROTOTYPE: &@
CODE:
{
int index;
- I32 markix;
GV *gv;
HV *stash;
CV *cv;
@@ -216,7 +213,6 @@ CODE:
PL_curpad = AvARRAY((AV*)AvARRAY(CvPADLIST(cv))[1]);
SAVETMPS;
SAVESPTR(PL_op);
- markix = sp - PL_stack_base;
for(index = 1 ; index < items ; index++) {
GvSV(PL_defgv) = ST(index);
PL_op = reducecop;
diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm
index f40ba98f91..cb645843ed 100644
--- a/ext/List/Util/lib/List/Util.pm
+++ b/ext/List/Util/lib/List/Util.pm
@@ -11,7 +11,7 @@ require DynaLoader;
our @ISA = qw(Exporter DynaLoader);
our @EXPORT_OK = qw(first min max minstr maxstr reduce sum);
-our $VERSION = "1.02";
+our $VERSION = "1.02_00";
bootstrap List::Util $VERSION;
diff --git a/ext/PerlIO/Scalar/Scalar.xs b/ext/PerlIO/Scalar/Scalar.xs
index 56d11c0121..d8ee701b59 100644
--- a/ext/PerlIO/Scalar/Scalar.xs
+++ b/ext/PerlIO/Scalar/Scalar.xs
@@ -225,12 +225,11 @@ PerlIOScalar_set_ptrcnt(PerlIO *f, STDCHAR *ptr, SSize_t cnt)
PerlIO *
PerlIOScalar_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *f, int narg, SV **args)
{
- PerlIOScalar *s;
SV *arg = (narg > 0) ? *args : PerlIOArg;
if (SvROK(arg) || SvPOK(arg))
{
f = PerlIO_allocate(aTHX);
- s = PerlIOSelf(PerlIO_push(aTHX_ f,self,mode,arg),PerlIOScalar);
+ (void)PerlIOSelf(PerlIO_push(aTHX_ f,self,mode,arg),PerlIOScalar);
PerlIOBase(f)->flags |= PERLIO_F_OPEN;
return f;
}
diff --git a/ext/Storable/ChangeLog b/ext/Storable/ChangeLog
index bed6cec134..3f07731713 100644
--- a/ext/Storable/ChangeLog
+++ b/ext/Storable/ChangeLog
@@ -1,3 +1,21 @@
+Sun Jul 1 13:27:32 MEST 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. Description:
+
+ Systematically use "=over 4" for POD linters.
+ Apparently, POD linters are much stricter than would
+ otherwise be needed, but that's OK.
+
+ Fixed memory corruption on croaks during thaw(). Thanks
+ to Claudio Garcia for reproducing this bug and providing the
+ code to exercise it. Added test cases for this bug, adapted
+ from Claudio's code.
+
+ Made code compile cleanly with -Wall (from Jarkko Hietaniemi).
+
+ Changed tagnum and classnum from I32 to IV in context. Also
+ from Jarkko.
+
Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
. Description:
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm
index fa15b010bd..6bc2a752ce 100644
--- a/ext/Storable/Storable.pm
+++ b/ext/Storable/Storable.pm
@@ -1,4 +1,4 @@
-;# $Id: Storable.pm,v 1.0.1.10 2001/03/15 00:20:25 ram Exp $
+;# $Id: Storable.pm,v 1.0.1.11 2001/07/01 11:22:14 ram Exp $
;#
;# Copyright (c) 1995-2000, Raphael Manfredi
;#
@@ -6,6 +6,10 @@
;# in the README file that comes with the distribution.
;#
;# $Log: Storable.pm,v $
+;# Revision 1.0.1.11 2001/07/01 11:22:14 ram
+;# patch12: systematically use "=over 4" for POD linters
+;# patch12: updated version number
+;#
;# Revision 1.0.1.10 2001/03/15 00:20:25 ram
;# patch11: updated version number
;#
@@ -59,7 +63,7 @@ package Storable; @ISA = qw(Exporter DynaLoader);
use AutoLoader;
use vars qw($forgive_me $VERSION);
-$VERSION = '1.011';
+$VERSION = '1.012';
*AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr...
#
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index f045acbd4e..3c79eb60c6 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -3,7 +3,7 @@
*/
/*
- * $Id: Storable.xs,v 1.0.1.8 2001/03/15 00:20:55 ram Exp $
+ * $Id: Storable.xs,v 1.0.1.9 2001/07/01 11:25:02 ram Exp $
*
* Copyright (c) 1995-2000, Raphael Manfredi
*
@@ -11,6 +11,11 @@
* in the README file that comes with the distribution.
*
* $Log: Storable.xs,v $
+ * Revision 1.0.1.9 2001/07/01 11:25:02 ram
+ * patch12: fixed memory corruption on croaks during thaw()
+ * patch12: made code compile cleanly with -Wall (Jarkko Hietaniemi)
+ * patch12: changed tagnum and classnum from I32 to IV in context
+ *
* Revision 1.0.1.8 2001/03/15 00:20:55 ram
* patch11: last version was wrongly compiling with assertions on
*
@@ -47,6 +52,7 @@
#include <EXTERN.h>
#include <perl.h>
+#include <patchlevel.h> /* Perl's one, needed since 5.6 */
#include <XSUB.h>
#if 0
@@ -74,21 +80,18 @@
*/
#ifndef PERL_VERSION /* For perls < 5.6 */
-#include <patchlevel.h>
-#define PERL_REVISION 5
-#define PERL_VERSION PATCHLEVEL
-#define PERL_SUBVERSION SUBVERSION
+#define PERL_VERSION PATCHLEVEL
#ifndef newRV_noinc
#define newRV_noinc(sv) ((Sv = newRV(sv)), --SvREFCNT(SvRV(Sv)), Sv)
#endif
-#if (PERL_VERSION <= 4) /* Older perls (<= 5.004) lack PL_ namespace */
+#if (PATCHLEVEL <= 4) /* Older perls (<= 5.004) lack PL_ namespace */
#define PL_sv_yes sv_yes
#define PL_sv_no sv_no
#define PL_sv_undef sv_undef
-#if (PERL_SUBVERSION <= 4) /* 5.004_04 has been reported to lack newSVpvn */
+#if (SUBVERSION <= 4) /* 5.004_04 has been reported to lack newSVpvn */
#define newSVpvn newSVpv
#endif
-#endif /* PERL_VERSION <= 4 */
+#endif /* PATCHLEVEL <= 4 */
#ifndef HvSHAREKEYS_off
#define HvSHAREKEYS_off(hv) /* Ignore */
#endif
@@ -274,21 +277,23 @@ typedef unsigned long stag_t; /* Used by pre-0.6 binary format */
typedef struct stcxt {
int entry; /* flags recursion */
int optype; /* type of traversal operation */
- HV *hseen; /* which objects have been seen, store time */
- AV *hook_seen; /* which SVs were returned by STORABLE_freeze() */
- AV *aseen; /* which objects have been seen, retrieve time */
- HV *hclass; /* which classnames have been seen, store time */
- AV *aclass; /* which classnames have been seen, retrieve time */
- HV *hook; /* cache for hook methods per class name */
- IV tagnum; /* incremented at store time for each seen object */
- IV classnum; /* incremented at store time for each seen classname */
- int netorder; /* true if network order used */
- int s_tainted; /* true if input source is tainted, at retrieve time */
- int forgive_me; /* whether to be forgiving... */
- int canonical; /* whether to store hashes sorted by key */
+ HV *hseen; /* which objects have been seen, store time */
+ AV *hook_seen; /* which SVs were returned by STORABLE_freeze() */
+ AV *aseen; /* which objects have been seen, retrieve time */
+ HV *hclass; /* which classnames have been seen, store time */
+ AV *aclass; /* which classnames have been seen, retrieve time */
+ HV *hook; /* cache for hook methods per class name */
+ IV tagnum; /* incremented at store time for each seen object */
+ IV classnum; /* incremented at store time for each seen classname */
+ int netorder; /* true if network order used */
+ int s_tainted; /* true if input source is tainted, at retrieve time */
+ int forgive_me; /* whether to be forgiving... */
+ int canonical; /* whether to store hashes sorted by key */
int s_dirty; /* context is dirty due to CROAK() -- can be cleaned */
- struct extendable keybuf; /* for hash key retrieval */
- struct extendable membuf; /* for memory store/retrieve operations */
+ int membuf_ro; /* true means membuf is read-only and msaved is rw */
+ struct extendable keybuf; /* for hash key retrieval */
+ struct extendable membuf; /* for memory store/retrieve operations */
+ struct extendable msaved; /* where potentially valid mbuf is saved */
PerlIO *fio; /* where I/O are performed, NULL for memory */
int ver_major; /* major of version for retrieved object */
int ver_minor; /* minor of version for retrieved object */
@@ -298,7 +303,7 @@ typedef struct stcxt {
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI)
-#if (PERL_VERSION <= 4) && (PERL_SUBVERSION < 68)
+#if (PATCHLEVEL <= 4) && (SUBVERSION < 68)
#define dSTCXT_SV \
SV *perinterp_sv = perl_get_sv(MY_VERSION, FALSE)
#else /* >= perl5.004_68 */
@@ -402,7 +407,7 @@ static stcxt_t *Context_ptr = &Context;
} while (0)
#define KBUFCHK(x) do { \
if (x >= ksiz) { \
- TRACEME(("** extending kbuf to %d bytes", x+1)); \
+ TRACEME(("** extending kbuf to %d bytes (had %d)", x+1, ksiz)); \
Renew(kbuf, x+1, char); \
ksiz = x+1; \
} \
@@ -443,10 +448,34 @@ static stcxt_t *Context_ptr = &Context;
#define MBUF_SIZE() (mptr - mbase)
/*
+ * MBUF_SAVE_AND_LOAD
+ * MBUF_RESTORE
+ *
+ * Those macros are used in do_retrieve() to save the current memory
+ * buffer into cxt->msaved, before MBUF_LOAD() can be used to retrieve
+ * data from a string.
+ */
+#define MBUF_SAVE_AND_LOAD(in) do { \
+ ASSERT(!cxt->membuf_ro, ("mbase not already saved")); \
+ cxt->membuf_ro = 1; \
+ TRACEME(("saving mbuf")); \
+ StructCopy(&cxt->membuf, &cxt->msaved, struct extendable); \
+ MBUF_LOAD(in); \
+} while (0)
+
+#define MBUF_RESTORE() do { \
+ ASSERT(cxt->membuf_ro, ("mbase is read-only")); \
+ cxt->membuf_ro = 0; \
+ TRACEME(("restoring mbuf")); \
+ StructCopy(&cxt->msaved, &cxt->membuf, struct extendable); \
+} while (0)
+
+/*
* Use SvPOKp(), because SvPOK() fails on tainted scalars.
* See store_scalar() for other usage of this workaround.
*/
#define MBUF_LOAD(v) do { \
+ ASSERT(cxt->membuf_ro, ("mbase is read-only")); \
if (!SvPOKp(v)) \
CROAK(("Not a scalar string")); \
mptr = mbase = SvPV(v, msiz); \
@@ -456,7 +485,9 @@ static stcxt_t *Context_ptr = &Context;
#define MBUF_XTEND(x) do { \
int nsz = (int) round_mgrow((x)+msiz); \
int offset = mptr - mbase; \
- TRACEME(("** extending mbase to %d bytes", nsz)); \
+ ASSERT(!cxt->membuf_ro, ("mbase is not read-only")); \
+ TRACEME(("** extending mbase from %d to %d bytes (wants %d new)", \
+ msiz, nsz, (x))); \
Renew(mbase, nsz, char); \
msiz = nsz; \
mptr = mbase + offset; \
@@ -929,6 +960,19 @@ static void init_perinterp(void)
}
/*
+ * reset_context
+ *
+ * Called at the end of every context cleaning, to perform common reset
+ * operations.
+ */
+static void reset_context(stcxt_t *cxt)
+{
+ cxt->entry = 0;
+ cxt->s_dirty = 0;
+ cxt->optype &= ~(ST_STORE|ST_RETRIEVE); /* Leave ST_CLONE alone */
+}
+
+/*
* init_store_context
*
* Initialize a new store context for real recursion.
@@ -1038,13 +1082,17 @@ static void clean_store_context(stcxt_t *cxt)
* Insert real values into hashes where we stored faked pointers.
*/
- hv_iterinit(cxt->hseen);
- while ((he = hv_iternext(cxt->hseen)))
- HeVAL(he) = &PL_sv_undef;
+ if (cxt->hseen) {
+ hv_iterinit(cxt->hseen);
+ while ((he = hv_iternext(cxt->hseen))) /* Extra () for -Wall, grr.. */
+ HeVAL(he) = &PL_sv_undef;
+ }
- hv_iterinit(cxt->hclass);
- while ((he = hv_iternext(cxt->hclass)))
- HeVAL(he) = &PL_sv_undef;
+ if (cxt->hclass) {
+ hv_iterinit(cxt->hclass);
+ while ((he = hv_iternext(cxt->hclass))) /* Extra () for -Wall, grr.. */
+ HeVAL(he) = &PL_sv_undef;
+ }
/*
* And now dispose of them...
@@ -1084,8 +1132,7 @@ static void clean_store_context(stcxt_t *cxt)
sv_free((SV *) hook_seen);
}
- cxt->entry = 0;
- cxt->s_dirty = 0;
+ reset_context(cxt);
}
/*
@@ -1165,8 +1212,7 @@ static void clean_retrieve_context(stcxt_t *cxt)
sv_free((SV *) hseen); /* optional HV, for backward compat. */
}
- cxt->entry = 0;
- cxt->s_dirty = 0;
+ reset_context(cxt);
}
/*
@@ -1174,19 +1220,26 @@ static void clean_retrieve_context(stcxt_t *cxt)
*
* A workaround for the CROAK bug: cleanup the last context.
*/
-static void clean_context(cxt)
-stcxt_t *cxt;
+static void clean_context(stcxt_t *cxt)
{
TRACEME(("clean_context"));
ASSERT(cxt->s_dirty, ("dirty context"));
+ if (cxt->membuf_ro)
+ MBUF_RESTORE();
+
+ ASSERT(!cxt->membuf_ro, ("mbase is not read-only"));
+
if (cxt->optype & ST_RETRIEVE)
clean_retrieve_context(cxt);
- else
+ else if (cxt->optype & ST_STORE)
clean_store_context(cxt);
+ else
+ reset_context(cxt);
ASSERT(!cxt->s_dirty, ("context is clean"));
+ ASSERT(cxt->entry == 0, ("context is reset"));
}
/*
@@ -1208,6 +1261,11 @@ stcxt_t *parent_cxt;
cxt->prev = parent_cxt;
SET_STCXT(cxt);
+ TRACEME(("kbuf has %d bytes at 0x%x", ksiz, kbuf));
+ TRACEME(("mbuf has %d bytes at 0x%x", msiz, mbase));
+
+ ASSERT(!cxt->s_dirty, ("clean context"));
+
return cxt;
}
@@ -1234,6 +1292,8 @@ stcxt_t *cxt;
Safefree(cxt);
SET_STCXT(prev);
+
+ ASSERT(cxt, ("context not void"));
}
/***
@@ -1768,7 +1828,7 @@ static int store_array(stcxt_t *cxt, AV *av)
continue;
}
TRACEME(("(#%d) item", i));
- if ((ret = store(cxt, *sav)))
+ if ((ret = store(cxt, *sav))) /* Extra () for -Wall, grr... */
return ret;
}
@@ -1876,7 +1936,7 @@ static int store_hash(stcxt_t *cxt, HV *hv)
TRACEME(("(#%d) value 0x%"UVxf, i, PTR2UV(val)));
- if ((ret = store(cxt, val)))
+ if ((ret = store(cxt, val))) /* Extra () for -Wall, grr... */
goto out;
/*
@@ -1922,7 +1982,7 @@ static int store_hash(stcxt_t *cxt, HV *hv)
TRACEME(("(#%d) value 0x%"UVxf, i, PTR2UV(val)));
- if ((ret = store(cxt, val)))
+ if ((ret = store(cxt, val))) /* Extra () for -Wall, grr... */
goto out;
/*
@@ -2005,7 +2065,7 @@ static int store_tied(stcxt_t *cxt, SV *sv)
* accesses on the retrieved object will indeed call the magic methods...
*/
- if ((ret = store(cxt, mg->mg_obj)))
+ if ((ret = store(cxt, mg->mg_obj))) /* Extra () for -Wall, grr... */
return ret;
TRACEME(("ok (tied)"));
@@ -2044,12 +2104,12 @@ static int store_tied_item(stcxt_t *cxt, SV *sv)
PUTMARK(SX_TIED_KEY);
TRACEME(("store_tied_item: storing OBJ 0x%"UVxf, PTR2UV(mg->mg_obj)));
- if ((ret = store(cxt, mg->mg_obj)))
+ if ((ret = store(cxt, mg->mg_obj))) /* Extra () for -Wall, grr... */
return ret;
TRACEME(("store_tied_item: storing PTR 0x%"UVxf, PTR2UV(mg->mg_ptr)));
- if ((ret = store(cxt, (SV *) mg->mg_ptr)))
+ if ((ret = store(cxt, (SV *) mg->mg_ptr))) /* Idem, for -Wall */
return ret;
} else {
I32 idx = mg->mg_len;
@@ -2058,7 +2118,7 @@ static int store_tied_item(stcxt_t *cxt, SV *sv)
PUTMARK(SX_TIED_IDX);
TRACEME(("store_tied_item: storing OBJ 0x%"UVxf, PTR2UV(mg->mg_obj)));
- if ((ret = store(cxt, mg->mg_obj)))
+ if ((ret = store(cxt, mg->mg_obj))) /* Idem, for -Wall */
return ret;
TRACEME(("store_tied_item: storing IDX %d", idx));
@@ -2138,8 +2198,8 @@ static int store_hook(
I32 classnum;
int ret;
int clone = cxt->optype & ST_CLONE;
- char mtype = 0; /* for blessed ref to tied structures */
- unsigned char eflags = 0; /* used when object type is SHT_EXTRA */
+ char mtype = '\0'; /* for blessed ref to tied structures */
+ unsigned char eflags = '\0'; /* used when object type is SHT_EXTRA */
TRACEME(("store_hook, class \"%s\", tagged #%d", HvNAME(pkg), cxt->tagnum));
@@ -2305,7 +2365,7 @@ static int store_hook(
} else
PUTMARK(flags);
- if ((ret = store(cxt, xsv))) /* Given by hook for us to store */
+ if ((ret = store(cxt, xsv))) /* Given by hook for us to store */
return ret;
svh = hv_fetch(cxt->hseen, (char *) &xsv, sizeof(xsv), FALSE);
@@ -2482,7 +2542,7 @@ static int store_hook(
* [<magic object>]
*/
- if ((ret = store(cxt, mg->mg_obj)))
+ if ((ret = store(cxt, mg->mg_obj))) /* Extra () for -Wall, grr... */
return ret;
}
@@ -2620,7 +2680,7 @@ static int store_other(stcxt_t *cxt, SV *sv)
*/
(void) sprintf(buf, "You lost %s(0x%"UVxf")%c", sv_reftype(sv, FALSE),
- PTR2UV(sv), (char)0);
+ PTR2UV(sv), (char) 0);
len = strlen(buf);
STORE_SCALAR(buf, len);
@@ -3001,7 +3061,6 @@ static SV *mbuf2sv(void)
*/
SV *mstore(SV *sv)
{
- dSTCXT;
SV *out;
TRACEME(("mstore"));
@@ -3020,7 +3079,6 @@ SV *mstore(SV *sv)
*/
SV *net_mstore(SV *sv)
{
- dSTCXT;
SV *out;
TRACEME(("net_mstore"));
@@ -3086,8 +3144,7 @@ static SV *retrieve_idx_blessed(stcxt_t *cxt, char *cname)
sva = av_fetch(cxt->aclass, idx, FALSE);
if (!sva)
- CROAK(("Class name #%"IVdf" should have been seen already",
- (IV)idx));
+ CROAK(("Class name #%"IVdf" should have been seen already", (IV) idx));
class = SvPVX(*sva); /* We know it's a PV, by construction */
@@ -3281,8 +3338,8 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
sva = av_fetch(cxt->aclass, idx, FALSE);
if (!sva)
- CROAK(("Class name #%"IVdf" should have been seen already",
- (IV)idx));
+ CROAK(("Class name #%"IVdf" should have been seen already",
+ (IV) idx));
class = SvPVX(*sva); /* We know it's a PV, by construction */
TRACEME(("class ID %d => %s", idx, class));
@@ -3383,7 +3440,8 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
tag = ntohl(tag);
svh = av_fetch(cxt->aseen, tag, FALSE);
if (!svh)
- CROAK(("Object #%"IVdf" should have been retrieved already", (IV)tag));
+ CROAK(("Object #%"IVdf" should have been retrieved already",
+ (IV) tag));
xsv = *svh;
ary[i] = SvREFCNT_inc(xsv);
}
@@ -4007,16 +4065,14 @@ static SV *retrieve_byte(stcxt_t *cxt, char *cname)
{
SV *sv;
int siv;
- signed char tmp; /* must use temp var to work around
- an AIX compiler bug --H.Merijn Brand */
+ signed char tmp; /* Workaround for AIX cc bug --H.Merijn Brand */
TRACEME(("retrieve_byte (#%d)", cxt->tagnum));
GETMARK(siv);
TRACEME(("small integer read as %d", (unsigned char) siv));
- tmp = ((unsigned char)siv) - 128;
- sv = newSViv (tmp);
-
+ tmp = (unsigned char) siv - 128;
+ sv = newSViv(tmp);
SEEN(sv, cname); /* Associate this new scalar with tag "tagnum" */
TRACEME(("byte %d", tmp));
@@ -4285,7 +4341,7 @@ static SV *old_retrieve_hash(stcxt_t *cxt, char *cname)
I32 size;
I32 i;
HV *hv;
- SV *sv=NULL;
+ SV *sv = (SV *) 0;
int c;
static SV *sv_h_undef = (SV *) 0; /* hv_store() bug */
@@ -4461,7 +4517,7 @@ magic_ok:
* information to check.
*/
- if ((cxt->netorder = (use_network_order & 0x1)))
+ if ((cxt->netorder = (use_network_order & 0x1))) /* Extra () for -Wall */
return &PL_sv_undef; /* No byte ordering info */
sprintf(byteorder, "%lx", (unsigned long) BYTEORDER);
@@ -4532,7 +4588,8 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
I32 tagn;
svh = hv_fetch(cxt->hseen, (char *) &tag, sizeof(tag), FALSE);
if (!svh)
- CROAK(("Old tag 0x%"UVxf" should have been mapped already", (UV)tag));
+ CROAK(("Old tag 0x%"UVxf" should have been mapped already",
+ (UV) tag));
tagn = SvIV(*svh); /* Mapped tag number computed earlier below */
/*
@@ -4541,7 +4598,8 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
svh = av_fetch(cxt->aseen, tagn, FALSE);
if (!svh)
- CROAK(("Object #%"IVdf" should have been retrieved already", (IV)tagn));
+ CROAK(("Object #%"IVdf" should have been retrieved already",
+ (IV) tagn));
sv = *svh;
TRACEME(("has retrieved #%d at 0x%"UVxf, tagn, PTR2UV(sv)));
SvREFCNT_inc(sv); /* One more reference to this same sv */
@@ -4567,7 +4625,6 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
* Regular post-0.6 binary format.
*/
-again:
GETMARK(type);
TRACEME(("retrieve type = %d", type));
@@ -4582,8 +4639,8 @@ again:
tag = ntohl(tag);
svh = av_fetch(cxt->aseen, tag, FALSE);
if (!svh)
- CROAK(("Object #%"IVdf" should have been retrieved already",
- (IV)tag));
+ CROAK(("Object #%"IVdf" should have been retrieved already",
+ (IV) tag));
sv = *svh;
TRACEME(("had retrieved #%d at 0x%"UVxf, tag, PTR2UV(sv)));
SvREFCNT_inc(sv); /* One more reference to this same sv */
@@ -4654,7 +4711,7 @@ static SV *do_retrieve(
dSTCXT;
SV *sv;
int is_tainted; /* Is input source tainted? */
- struct extendable msave; /* Where potentially valid mbuf is saved */
+ int pre_06_fmt = 0; /* True with pre Storable 0.6 formats */
TRACEME(("do_retrieve (optype = 0x%x)", optype));
@@ -4702,11 +4759,8 @@ static SV *do_retrieve(
KBUFINIT(); /* Allocate hash key reading pool once */
- if (!f && in) {
- StructCopy(&cxt->membuf, &msave, struct extendable);
- MBUF_LOAD(in);
- }
-
+ if (!f && in)
+ MBUF_SAVE_AND_LOAD(in);
/*
* Magic number verifications.
@@ -4748,7 +4802,9 @@ static SV *do_retrieve(
*/
if (!f && in)
- StructCopy(&msave, &cxt->membuf, struct extendable);
+ MBUF_RESTORE();
+
+ pre_06_fmt = cxt->hseen != NULL; /* Before we clean context */
/*
* The "root" context is never freed.
@@ -4777,15 +4833,15 @@ static SV *do_retrieve(
*
* Build a reference to the SV returned by pretrieve even if it is
* already one and not a scalar, for consistency reasons.
- *
- * NB: although context might have been cleaned, the value of `cxt->hseen'
- * remains intact, and can be used as a flag.
*/
- if (cxt->hseen) { /* Was not handling overloading by then */
+ if (pre_06_fmt) { /* Was not handling overloading by then */
SV *rv;
- if (sv_type(sv) == svis_REF && (rv = SvRV(sv)) && SvOBJECT(rv))
+ TRACEME(("fixing for old formats -- pre 0.6"));
+ if (sv_type(sv) == svis_REF && (rv = SvRV(sv)) && SvOBJECT(rv)) {
+ TRACEME(("ended do_retrieve() with an object -- pre 0.6"));
return sv;
+ }
}
/*
@@ -4806,15 +4862,18 @@ static SV *do_retrieve(
*/
if (SvOBJECT(sv)) {
- HV *stash = (HV *) SvSTASH (sv);
+ HV *stash = (HV *) SvSTASH(sv);
SV *rv = newRV_noinc(sv);
if (stash && Gv_AMG(stash)) {
SvAMAGIC_on(rv);
TRACEME(("restored overloading on root reference"));
}
+ TRACEME(("ended do_retrieve() with an object"));
return rv;
}
+ TRACEME(("regular do_retrieve() end"));
+
return newRV_noinc(sv);
}
diff --git a/ext/Storable/t/freeze.t b/ext/Storable/t/freeze.t
index 37631edc7e..9f644871f0 100644
--- a/ext/Storable/t/freeze.t
+++ b/ext/Storable/t/freeze.t
@@ -1,6 +1,6 @@
#!./perl
-# $Id: freeze.t,v 1.0 2000/09/01 19:40:41 ram Exp $
+# $Id: freeze.t,v 1.0.1.1 2001/07/01 11:25:16 ram Exp $
#
# Copyright (c) 1995-2000, Raphael Manfredi
#
@@ -8,6 +8,9 @@
# in the README file that comes with the distribution.
#
# $Log: freeze.t,v $
+# Revision 1.0.1.1 2001/07/01 11:25:16 ram
+# patch12: added test cases for mem corruption during thaw()
+#
# Revision 1.0 2000/09/01 19:40:41 ram
# Baseline for first official release.
#
@@ -22,12 +25,12 @@ sub BEGIN {
exit 0;
}
require 'lib/st-dump.pl';
+ sub ok;
}
-
use Storable qw(freeze nfreeze thaw);
-print "1..15\n";
+print "1..19\n";
$a = 'toto';
$b = \$a;
@@ -117,3 +120,26 @@ eval { freeze($foo) };
print "not " if $@;
print "ok 15\n";
+# Test cleanup bug found by Claudio Garcia -- RAM, 08/06/2001
+my $thaw_me = 'asdasdasdasd';
+
+eval {
+ my $thawed = thaw $thaw_me;
+};
+ok 16, $@;
+
+my %to_be_frozen = (foo => 'bar');
+my $frozen;
+eval {
+ $frozen = freeze \%to_be_frozen;
+};
+ok 17, !$@;
+
+freeze {};
+eval { thaw $thaw_me };
+eval { $frozen = freeze { foo => {} } };
+ok 18, !$@;
+
+thaw $frozen; # used to segfault here
+ok 19, 1;
+
diff --git a/gv.c b/gv.c
index 0af054c4f5..bbe8d47a5b 100644
--- a/gv.c
+++ b/gv.c
@@ -1357,11 +1357,18 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
CV *cv=NULL;
CV **cvp=NULL, **ocvp=NULL;
AMT *amtp=NULL, *oamtp=NULL;
- int fl=0, off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
+ int off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
int postpr = 0, force_cpy = 0, assignshift = assign ? 1 : 0;
+#ifdef DEBUGGING
+ int fl=0;
HV* stash=NULL;
+#endif
if (!(AMGf_noleft & flags) && SvAMAGIC(left)
- && (mg = mg_find((SV*)(stash=SvSTASH(SvRV(left))),
+ && (mg = mg_find((SV*)(
+#ifdef DEGUGGING
+ stash=
+#endif
+ SvSTASH(SvRV(left))),
PERL_MAGIC_overload_table))
&& (ocvp = cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (oamtp = amtp = (AMT*)mg->mg_ptr)->table
@@ -1369,7 +1376,11 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
&& ((cv = cvp[off=method+assignshift])
|| (assign && amtp->fallback > AMGfallNEVER && /* fallback to
* usual method */
- (fl = 1, cv = cvp[off=method])))) {
+ (
+#ifdef DEBUGGING
+ fl = 1,
+#endif
+ cv = cvp[off=method])))) {
lr = -1; /* Call method for left argument */
} else {
if (cvp && amtp->fallback > AMGfallNEVER && flags & AMGf_unary) {
@@ -1475,7 +1486,11 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
}
if (!cv) goto not_found;
} else if (!(AMGf_noright & flags) && SvAMAGIC(right)
- && (mg = mg_find((SV*)(stash=SvSTASH(SvRV(right))),
+ && (mg = mg_find((SV*)(
+#ifdef DEBUGGING
+ stash=
+#endif
+ SvSTASH(SvRV(right))),
PERL_MAGIC_overload_table))
&& (cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (amtp = (AMT*)mg->mg_ptr)->table
@@ -1562,21 +1577,23 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
force_cpy = force_cpy || assign;
}
}
+#ifdef DEBUGGING
if (!notfound) {
- DEBUG_o( Perl_deb(aTHX_
- "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %s%s\n",
- AMG_id2name(off),
- method+assignshift==off? "" :
- " (initially `",
- method+assignshift==off? "" :
- AMG_id2name(method+assignshift),
- method+assignshift==off? "" : "')",
- flags & AMGf_unary? "" :
- lr==1 ? " for right argument": " for left argument",
- flags & AMGf_unary? " for argument" : "",
- HvNAME(stash),
- fl? ",\n\tassignment variant used": "") );
+ DEBUG_o(Perl_deb(aTHX_
+ "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %s%s\n",
+ AMG_id2name(off),
+ method+assignshift==off? "" :
+ " (initially `",
+ method+assignshift==off? "" :
+ AMG_id2name(method+assignshift),
+ method+assignshift==off? "" : "')",
+ flags & AMGf_unary? "" :
+ lr==1 ? " for right argument": " for left argument",
+ flags & AMGf_unary? " for argument" : "",
+ HvNAME(stash),
+ fl? ",\n\tassignment variant used": "") );
}
+#endif
/* Since we use shallow copy during assignment, we need
* to dublicate the contents, probably calling user-supplied
* version of copy operator
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm
index ab214bb770..ce657a1ed4 100644
--- a/lib/Unicode/UCD.pm
+++ b/lib/Unicode/UCD.pm
@@ -3,7 +3,7 @@ package Unicode::UCD;
use strict;
use warnings;
-our $VERSION = v3.1.0;
+our $VERSION = '3.1.0';
require Exporter;
@@ -14,7 +14,7 @@ use Carp;
=head1 NAME
-Unicode - Unicode character database
+Unicode::UCD - Unicode character database
=head1 SYNOPSIS
@@ -119,7 +119,7 @@ sub charinfo {
return;
}
-=head2 charbloc
+=head2 charblock
use Unicode::UCD 'charblock';
diff --git a/mg.c b/mg.c
index 30c8cddfdc..b9a5501333 100644
--- a/mg.c
+++ b/mg.c
@@ -169,7 +169,6 @@ U32
Perl_mg_length(pTHX_ SV *sv)
{
MAGIC* mg;
- char *junk;
STRLEN len;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
@@ -186,7 +185,7 @@ Perl_mg_length(pTHX_ SV *sv)
}
}
- junk = SvPV(sv, len);
+ (void)SvPV(sv, len);
return len;
}
@@ -1148,19 +1147,16 @@ int
Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg)
{
HV *hv = (HV*)LvTARG(sv);
- HE *entry;
I32 i = 0;
-
+
if (hv) {
- (void) hv_iterinit(hv);
- if (! SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
- i = HvKEYS(hv);
- else {
- /*SUPPRESS 560*/
- while ((entry = hv_iternext(hv))) {
- i++;
- }
- }
+ (void) hv_iterinit(hv);
+ if (! SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
+ i = HvKEYS(hv);
+ else {
+ while (hv_iternext(hv))
+ i++;
+ }
}
sv_setiv(sv, (IV)i);
@@ -2223,7 +2219,6 @@ Perl_sighandler(int sig)
CV *cv = Nullcv;
OP *myop = PL_op;
U32 flags = 0;
- I32 o_save_i = PL_savestack_ix;
XPV *tXpv = PL_Xpv;
#if defined(WIN32) && defined(PERL_IMPLICIT_CONTEXT)
@@ -2247,7 +2242,6 @@ Perl_sighandler(int sig)
infinity, so we fix 4 (in fact 5): */
if (flags & 1) {
PL_savestack_ix += 5; /* Protect save in progress. */
- o_save_i = PL_savestack_ix;
SAVEDESTRUCTOR_X(unwind_handler_stack, (void*)&flags);
}
if (flags & 4)
diff --git a/op.c b/op.c
index 913f1967be..90e86e01b2 100644
--- a/op.c
+++ b/op.c
@@ -3931,7 +3931,6 @@ Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *
OP *next = 0;
OP *listop;
OP *o;
- OP *condop;
U8 loopflags = 0;
if (expr && (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
@@ -3993,7 +3992,7 @@ Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *
return Nullop; /* listop already freed by new_logop */
}
if (listop)
- ((LISTOP*)listop)->op_last->op_next = condop =
+ ((LISTOP*)listop)->op_last->op_next =
(o == listop ? redo : LINKLIST(o));
}
else
diff --git a/op.h b/op.h
index 490b0fa8f6..eaf849938f 100644
--- a/op.h
+++ b/op.h
@@ -277,7 +277,7 @@ struct pmop {
#ifdef USE_ITHREADS
# define PmopSTASHPV(o) ((o)->op_pmstashpv)
-# define PmopSTASHPV_set(o,pv) ((o)->op_pmstashpv = ((pv) ? savepv(pv) : Nullch))
+# define PmopSTASHPV_set(o,pv) (Safefree((o)->op_pmstashpv), (o)->op_pmstashpv = ((pv) ? savepv(pv) : Nullch))
# define PmopSTASH(o) (PmopSTASHPV(o) \
? gv_stashpv(PmopSTASHPV(o),GV_ADD) : Nullhv)
# define PmopSTASH_set(o,hv) PmopSTASHPV_set(o, (hv) ? HvNAME(hv) : Nullch)
diff --git a/patchlevel.h b/patchlevel.h
index 1ae6b612ab..a1de5a1448 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -70,7 +70,7 @@
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
- ,"DEVEL11025"
+ ,"DEVEL11058"
,NULL
};
diff --git a/perlio.c b/perlio.c
index 3fac35d8e1..e20563aaf6 100644
--- a/perlio.c
+++ b/perlio.c
@@ -954,8 +954,7 @@ PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int mode, const char *names)
if (!names && (O_TEXT != O_BINARY && (mode & O_BINARY)))
{
PerlIO *top = f;
- PerlIOl *l;
- while ((l = *top))
+ while (*top)
{
if (PerlIOBase(top)->tab == &PerlIO_crlf)
{
diff --git a/pod/Makefile.SH b/pod/Makefile.SH
index 684822540b..a481ca6de6 100644
--- a/pod/Makefile.SH
+++ b/pod/Makefile.SH
@@ -163,9 +163,9 @@ perlmodlib.pod: $(PERL) perlmodlib.PL ../mv-if-diff ../MANIFEST
sh ../mv-if-diff perlmodlib.tmp perlmodlib.pod
compile: all
- $(REALPERL) -I../lib ../utils/perlcc -o pod2latex.exe pod2latex -log ../compilelog
- $(REALPERL) -I../lib ../utils/perlcc -o pod2man.exe pod2man -log ../compilelog
- $(REALPERL) -I../lib ../utils/perlcc -o pod2text.exe pod2text -log ../compilelog
- $(REALPERL) -I../lib ../utils/perlcc -o checkpods.exe checkpods -log ../compilelog
+ $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2latex.exe pod2latex -log ../compilelog
+ $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2man.exe pod2man -log ../compilelog
+ $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o pod2text.exe pod2text -log ../compilelog
+ $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. -o checkpods.exe checkpods -log ../compilelog
!NO!SUBS!
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index 98652cc60b..d299d033cb 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -882,7 +882,7 @@ listing
=item Predefined Names
$ARG, $_, $a, $b, $<I<digits>>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $',
-$LAST_PAREN_MATCH, $+, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*,
+$LAST_PAREN_MATCH, $+, $^N, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*,
input_line_number HANDLE EXPR, $INPUT_LINE_NUMBER, $NR, $,
input_record_separator HANDLE EXPR, $INPUT_RECORD_SEPARATOR, $RS, $/,
autoflush HANDLE EXPR, $OUTPUT_AUTOFLUSH, $|, output_field_separator HANDLE
@@ -904,7 +904,7 @@ $CHILD_ERROR, $?, $OS_ERROR, $ERRNO, $!, $EXTENDED_OS_ERROR, $^E,
$EVAL_ERROR, $@, $PROCESS_ID, $PID, $$, $REAL_USER_ID, $UID, $<,
$EFFECTIVE_USER_ID, $EUID, $>, $REAL_GROUP_ID, $GID, $(,
$EFFECTIVE_GROUP_ID, $EGID, $), $PROGRAM_NAME, $0, $[, $], $COMPILING, $^C,
-$DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H, $INPLACE_EDIT, $^I, $^M, $^N,
+$DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H, $INPLACE_EDIT, $^I, $^M,
$OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x100, 0x200, $LAST_REGEXP_CODE_RESULT, $^R, $EXCEPTIONS_BEING_CAUGHT, $^S,
$BASETIME, $^T, $PERL_VERSION, $^V, $WARNING, $^W, ${^WARNING_BITS},
@@ -3468,7 +3468,7 @@ C<!!!>, C<!!>, C<!>
=item The CLEANUP: Keyword
-=item The POST_CALL: Keyword
+=item The POSTCALL: Keyword
=item The BOOT: Keyword
@@ -3912,14 +3912,14 @@ strLE, strLT, strNE, strnEQ, strnNE, StructCopy, SvCUR, SvCUR_set, SvEND,
SvGETMAGIC, SvGROW, SvIOK, SvIOKp, SvIOK_notUV, SvIOK_off, SvIOK_on,
SvIOK_only, SvIOK_only_UV, SvIOK_UV, SvIV, SvIVX, SvIVx, SvLEN, SvNIOK,
SvNIOKp, SvNIOK_off, SvNOK, SvNOKp, SvNOK_off, SvNOK_on, SvNOK_only, SvNV,
-SvNVx, SvNVX, SvOK, SvOOK, SvPOK, SvPOKp, SvPOK_off, SvPOK_on, SvPOK_only,
+SvNVX, SvNVx, SvOK, SvOOK, SvPOK, SvPOKp, SvPOK_off, SvPOK_on, SvPOK_only,
SvPOK_only_UTF8, SvPV, SvPVbyte, SvPVbytex, SvPVbytex_force,
SvPVbyte_force, SvPVbyte_nolen, SvPVutf8, SvPVutf8x, SvPVutf8x_force,
SvPVutf8_force, SvPVutf8_nolen, SvPVX, SvPVx, SvPV_force, SvPV_force_nomg,
SvPV_nolen, SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK, SvROK_off,
SvROK_on, SvRV, SvSETMAGIC, SvSetMagicSV, SvSetMagicSV_nosteal, SvSetSV,
SvSetSV_nosteal, SvSTASH, SvTAINT, SvTAINTED, SvTAINTED_off, SvTAINTED_on,
-SvTRUE, svtype, SvTYPE, SVt_IV, SVt_NV, SVt_PV, SVt_PVAV, SVt_PVCV,
+SvTRUE, SvTYPE, svtype, SVt_IV, SVt_NV, SVt_PV, SVt_PVAV, SVt_PVCV,
SVt_PVHV, SVt_PVMG, SvUOK, SvUPGRADE, SvUTF8, SvUTF8_off, SvUTF8_on, SvUV,
SvUVX, SvUVx, sv_2bool, sv_2cv, sv_2io, sv_2iv, sv_2mortal, sv_2nv,
sv_2pvbyte, sv_2pvbyte_nolen, sv_2pvutf8, sv_2pvutf8_nolen, sv_2pv_flags,
@@ -4625,12 +4625,18 @@ I<The Road goes ever on and on, down from the door where it began.>
=item New or Changed Diagnostics
-=item Changed Internals
+=item Source Code Enhancements
=over 4
+=item MAGIC constants
+
+=item Better commented code
+
=item Regex pre-/post-compilation items matched up
+=item gcc -Wall
+
=back
=item New Tests
@@ -4663,6 +4669,8 @@ I<The Road goes ever on and on, down from the door where it began.>
=item UTS
+=item VMS
+
=item Localising a Tied Variable Leaks Memory
=item Self-tying of Arrays and Hashes Is Forbidden
@@ -6395,7 +6403,14 @@ C<HAB>, C<HMQ>
=item Priorities
-=item DLL name mangling
+=item DLL name mangling: pre 5.6.2
+
+=item DLL name mangling: 5.6.2 and beyond
+
+Global DLLs, specific DLLs, C<BEGINLIBPATH> and C<ENDLIBPATH>, F<.> from
+C<LIBPATH>
+
+=item DLL forwarder generation
=item Threading
@@ -6409,6 +6424,8 @@ C<COND_WAIT>, F<os2.c>
=back
+=item BUGS
+
=back
=over 4
@@ -6597,9 +6614,9 @@ DATAMODEL_NATIVE specified", sh: ar: not found
=item Proc::ProcessTable on Solaris
-=item BSD::Resource on Solairs
+=item BSD::Resource on Solaris
-=item Net::SSLeay on Soalris
+=item Net::SSLeay on Solaris
=back
@@ -8700,17 +8717,17 @@ C<d_mkstemps>, C<d_mktime>, C<d_mmap>, C<d_modfl>, C<d_modfl_pow32_bug>,
C<d_mprotect>, C<d_msg>, C<d_msg_ctrunc>, C<d_msg_dontroute>, C<d_msg_oob>,
C<d_msg_peek>, C<d_msg_proxy>, C<d_msgctl>, C<d_msgget>, C<d_msghdr_s>,
C<d_msgrcv>, C<d_msgsnd>, C<d_msync>, C<d_munmap>, C<d_mymalloc>,
-C<d_nice>, C<d_nv_preserves_uv>, C<d_nv_preserves_uv_bits>, C<d_off64_t>,
-C<d_old_pthread_create_joinable>, C<d_oldpthreads>, C<d_oldsock>,
-C<d_open3>, C<d_pathconf>, C<d_pause>, C<d_perl_otherlibdirs>,
-C<d_phostname>, C<d_pipe>, C<d_poll>, C<d_portable>, C<d_PRId64>,
-C<d_PRIeldbl>, C<d_PRIEUldbl>, C<d_PRIfldbl>, C<d_PRIFUldbl>,
-C<d_PRIgldbl>, C<d_PRIGUldbl>, C<d_PRIi64>, C<d_PRIo64>, C<d_PRIu64>,
-C<d_PRIx64>, C<d_PRIXU64>, C<d_pthread_yield>, C<d_pwage>, C<d_pwchange>,
-C<d_pwclass>, C<d_pwcomment>, C<d_pwexpire>, C<d_pwgecos>, C<d_pwpasswd>,
-C<d_pwquota>, C<d_qgcvt>, C<d_quad>, C<d_readdir>, C<d_readlink>,
-C<d_readv>, C<d_recvmsg>, C<d_rename>, C<d_rewinddir>, C<d_rmdir>,
-C<d_safebcpy>, C<d_safemcpy>, C<d_sanemcmp>, C<d_sbrkproto>,
+C<d_nice>, C<d_nl_langinfo>, C<d_nv_preserves_uv>,
+C<d_nv_preserves_uv_bits>, C<d_off64_t>, C<d_old_pthread_create_joinable>,
+C<d_oldpthreads>, C<d_oldsock>, C<d_open3>, C<d_pathconf>, C<d_pause>,
+C<d_perl_otherlibdirs>, C<d_phostname>, C<d_pipe>, C<d_poll>,
+C<d_portable>, C<d_PRId64>, C<d_PRIeldbl>, C<d_PRIEUldbl>, C<d_PRIfldbl>,
+C<d_PRIFUldbl>, C<d_PRIgldbl>, C<d_PRIGUldbl>, C<d_PRIi64>, C<d_PRIo64>,
+C<d_PRIu64>, C<d_PRIx64>, C<d_PRIXU64>, C<d_pthread_yield>, C<d_pwage>,
+C<d_pwchange>, C<d_pwclass>, C<d_pwcomment>, C<d_pwexpire>, C<d_pwgecos>,
+C<d_pwpasswd>, C<d_pwquota>, C<d_qgcvt>, C<d_quad>, C<d_readdir>,
+C<d_readlink>, C<d_readv>, C<d_recvmsg>, C<d_rename>, C<d_rewinddir>,
+C<d_rmdir>, C<d_safebcpy>, C<d_safemcpy>, C<d_sanemcmp>, C<d_sbrkproto>,
C<d_sched_yield>, C<d_scm_rights>, C<d_SCNfldbl>, C<d_seekdir>,
C<d_select>, C<d_sem>, C<d_semctl>, C<d_semctl_semid_ds>,
C<d_semctl_semun>, C<d_semget>, C<d_semop>, C<d_sendmsg>, C<d_setegid>,
@@ -8768,9 +8785,9 @@ C<h_fcntl>, C<h_sysfile>, C<hint>, C<hostcat>
C<i16size>, C<i16type>, C<i32size>, C<i32type>, C<i64size>, C<i64type>,
C<i8size>, C<i8type>, C<i_arpainet>, C<i_bsdioctl>, C<i_db>, C<i_dbm>,
C<i_dirent>, C<i_dld>, C<i_dlfcn>, C<i_fcntl>, C<i_float>, C<i_gdbm>,
-C<i_grp>, C<i_iconv>, C<i_ieeefp>, C<i_inttypes>, C<i_libutil>,
-C<i_limits>, C<i_locale>, C<i_machcthr>, C<i_malloc>, C<i_math>,
-C<i_memory>, C<i_mntent>, C<i_ndbm>, C<i_netdb>, C<i_neterrno>,
+C<i_grp>, C<i_iconv>, C<i_ieeefp>, C<i_inttypes>, C<i_langinfo>,
+C<i_libutil>, C<i_limits>, C<i_locale>, C<i_machcthr>, C<i_malloc>,
+C<i_math>, C<i_memory>, C<i_mntent>, C<i_ndbm>, C<i_netdb>, C<i_neterrno>,
C<i_netinettcp>, C<i_niin>, C<i_poll>, C<i_prot>, C<i_pthread>, C<i_pwd>,
C<i_rpcsvcdbm>, C<i_sfio>, C<i_sgtty>, C<i_shadow>, C<i_socks>,
C<i_stdarg>, C<i_stddef>, C<i_stdlib>, C<i_string>, C<i_sunmath>,
@@ -15721,6 +15738,34 @@ VAL, TYPE ), UNIVERSAL::can ( VAL, METHOD )
=back
+=head2 Unicode::UCD - Unicode character database
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=back
+
+=over 4
+
+=item charinfo
+
+=back
+
+=over 4
+
+=item charblock
+
+=back
+
+=over 4
+
+=item AUTHOR
+
+=back
+
=head2 User::grent - by-name interface to Perl's built-in getgr*()
functions
diff --git a/pp_sys.c b/pp_sys.c
index 4f7a6c2ebd..83dfb193da 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -699,8 +699,6 @@ PP(pp_binmode)
PerlIO *fp;
MAGIC *mg;
SV *discp = Nullsv;
- STRLEN len = 0;
- char *names = NULL;
if (MAXARG < 1)
RETPUSHUNDEF;
@@ -730,10 +728,6 @@ PP(pp_binmode)
RETPUSHUNDEF;
}
- if (discp) {
- names = SvPV(discp,len);
- }
-
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
(discp) ? SvPV_nolen(discp) : Nullch))
RETPUSHYES;
diff --git a/regcomp.c b/regcomp.c
index 9be1523ada..209743e26a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1099,7 +1099,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
&& !deltanext && minnext == 1 ) {
/* Try to optimize to CURLYN. */
regnode *nxt = NEXTOPER(oscan) + EXTRA_STEP_2ARGS;
- regnode *nxt1 = nxt, *nxt2;
+ regnode *nxt1 = nxt;
+#ifdef DEBUGGING
+ regnode *nxt2;
+#endif
/* Skip open. */
nxt = regnext(nxt);
@@ -1107,7 +1110,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, I32 *deltap, reg
&& !(PL_regkind[(U8)OP(nxt)] == EXACT
&& STR_LEN(nxt) == 1))
goto nogo;
+#ifdef DEBUGGING
nxt2 = nxt;
+#endif
nxt = regnext(nxt);
if (OP(nxt) != CLOSE)
goto nogo;
diff --git a/sv.c b/sv.c
index ef046875f1..6ed638c742 100644
--- a/sv.c
+++ b/sv.c
@@ -5102,7 +5102,6 @@ coercion. See also C<SvCUR>, which gives raw access to the xpv_cur slot.
STRLEN
Perl_sv_len(pTHX_ register SV *sv)
{
- char *junk;
STRLEN len;
if (!sv)
@@ -5111,7 +5110,7 @@ Perl_sv_len(pTHX_ register SV *sv)
if (SvGMAGICAL(sv))
len = mg_length(sv);
else
- junk = SvPV(sv, len);
+ (void)SvPV(sv, len);
return len;
}
@@ -7782,7 +7781,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
q++;
if (*q == '*') {
q++;
- if (EXPECT_NUMBER(q, epix) && *q++ != '$')
+ if (EXPECT_NUMBER(q, epix) && *q++ != '$') /* epix currently unused */
goto unknown;
if (args)
i = va_arg(*args, int);
diff --git a/utils/Makefile b/utils/Makefile
index 801b4a4244..043430aba8 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -12,16 +12,16 @@ plextractexe = ./c2ph ./h2ph ./h2xs ./perlbug ./perldoc ./pl2pm ./splain ./perl
all: $(plextract)
compile: all $(plextract)
- $(REALPERL) -I../lib perlcc c2ph -o c2ph.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc h2ph -o h2ph.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc h2xs -o h2xs.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc perlbug -o perlbug.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc perldoc -o perldoc.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc pl2pm -o pl2pm.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc splain -o splain.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc perlcc -o perlcc.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc dprofpp -o dprofpp.exe -v 10 -log ../compilelog;
- $(REALPERL) -I../lib perlcc libnetcfg -o libnetcfg.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. c2ph -o c2ph.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. h2ph -o h2ph.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. h2xs -o h2xs.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. perlbug -o perlbug.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. perldoc -o perldoc.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. pl2pm -o pl2pm.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. splain -o splain.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. perlcc -I .. -L .. -o perlcc.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. dprofpp -o dprofpp.exe -v 10 -log ../compilelog;
+ $(REALPERL) -I../lib perlcc -I .. -L .. libnetcfg -o libnetcfg.exe -v 10 -log ../compilelog;
$(plextract):
$(PERL) -I../lib $@.PL
diff --git a/utils/perlcc.PL b/utils/perlcc.PL
index 63045559d8..cdd7759b31 100644
--- a/utils/perlcc.PL
+++ b/utils/perlcc.PL
@@ -146,8 +146,10 @@ sub vprint {
sub parse_argv {
use Getopt::Long;
-# Getopt::Long::Configure("bundling"); turned off. this is silly because
-# it doesn't allow for long switches.
+
+ # disallows using long arguments
+ # Getopt::Long::Configure("bundling");
+
Getopt::Long::Configure("no_ignore_case");
# no difference in exists and defined for %ENV; also, a "0"
@@ -173,17 +175,6 @@ sub parse_argv {
'log:s' # where to log compilation process information
);
- # This is an attempt to make perlcc's arg. handling look like cc.
- # if ( opt('s') ) { # must quote: looks like s)foo)bar)!
- # if (opt('s') eq 'hared') {
- # $Options->{shared}++;
- # } elsif (opt('s') eq 'tatic') {
- # $Options->{static}++;
- # } else {
- # warn "$0: Unknown option -s", opt('s');
- # }
- # }
-
$Options->{v} += 0;
helpme() if opt(h); # And exit
@@ -334,6 +325,7 @@ sub cc_harness {
$command .= " -L".$_ for split /\s+/, opt(L);
my @mods = split /-?u /, $stash;
$command .= " ".ExtUtils::Embed::ldopts("-std", \@mods);
+ $command .= " -lperl";
vprint 3, "running $Config{cc} $command";
system("$Config{cc} $command");
}
@@ -582,8 +574,10 @@ perlcc - generate executables from Perl programs
$ perlcc -e 'print q//' # Compiles a one-liner into 'a.out'
$ perlcc -c -e 'print q//' # Creates a C file 'a.out.c'
- $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
+ $ perlcc -I /foo hello # extra headers (notice the space after -I)
+ $ perlcc -L /foo hello # extra libraries (notice the space after -L)
+ $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
$ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'.
# with arguments 'a b c'
diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH
index 3f045e388c..fe4fb1eb0a 100755
--- a/x2p/Makefile.SH
+++ b/x2p/Makefile.SH
@@ -102,7 +102,7 @@ all: $(public) $(private) $(util)
@echo " "
compile: all
- $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' $(plextract) -prog -verbose dcf -log ../compilelog;
+ $(REALPERL) -I../lib ../utils/perlcc -I .. -L .. $(plextract) -v -log ../compilelog;
a2p: $(obj) a2p$(OBJ_EXT)
$(CC) -o a2p $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs)