summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-11-09 20:34:11 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-11-09 20:34:11 +0000
commiteeb3addf3feec5ffbcc249451fd5751440056e0d (patch)
treef768dac0b163ce44ec17e0d6bb12b2aa8f8c72dd
parent4a4a611618e8ff6d5ad41c0e944ec39ce1bd0e52 (diff)
parentc024d977a3f66deece6fa8197092e1716641d48e (diff)
downloadperl-eeb3addf3feec5ffbcc249451fd5751440056e0d.tar.gz
Integrate mainline.
p4raw-id: //depot/perlio@7630
-rw-r--r--AUTHORS47
-rw-r--r--Changes475
-rwxr-xr-xConfigure200
-rw-r--r--Makefile.SH2
-rw-r--r--Porting/pumpkin.pod41
-rw-r--r--README.cygwin21
-rw-r--r--README.dos16
-rw-r--r--README.os218
-rw-r--r--README.win326
-rw-r--r--configure.com53
-rw-r--r--cygwin/cygwin.c2
-rw-r--r--ext/Devel/Peek/Peek.xs3
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL51
-rw-r--r--ext/Errno/Errno_pm.PL10
-rw-r--r--ext/IPC/SysV/SysV.xs2
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c21
-rw-r--r--ext/Storable/ChangeLog11
-rw-r--r--ext/Storable/Storable.pm7
-rw-r--r--ext/Storable/Storable.xs71
-rw-r--r--hints/cygwin.sh1
-rw-r--r--lib/Class/Struct.pm29
-rw-r--r--lib/File/stat.pm2
-rw-r--r--lib/Math/Complex.pm2
-rw-r--r--lib/ftp.pl2
-rw-r--r--malloc.c30
-rw-r--r--mg.c6
-rw-r--r--minimod.pl2
-rw-r--r--patchlevel.h2
-rw-r--r--perlio.c7
-rw-r--r--pod/buildtoc.PL8
-rw-r--r--pod/perl.pod2
-rw-r--r--pod/perl5004delta.pod35
-rw-r--r--pod/perl5005delta.pod8
-rw-r--r--pod/perl56delta.pod7
-rw-r--r--pod/perldebguts.pod10
-rw-r--r--pod/perldebtut.pod8
-rw-r--r--pod/perldebug.pod6
-rw-r--r--pod/perldelta.pod8
-rw-r--r--pod/perldiag.pod19
-rw-r--r--pod/perlembed.pod27
-rw-r--r--pod/perlfaq.pod2
-rw-r--r--pod/perlfaq1.pod4
-rw-r--r--pod/perlfaq2.pod6
-rw-r--r--pod/perlfaq5.pod8
-rw-r--r--pod/perlfaq7.pod4
-rw-r--r--pod/perlfaq8.pod6
-rw-r--r--pod/perlfilter.pod1
-rw-r--r--pod/perlfunc.pod10
-rw-r--r--pod/perlguts.pod4
-rw-r--r--pod/perlhack.pod270
-rw-r--r--pod/perlhist.pod2
-rw-r--r--pod/perlipc.pod4
-rw-r--r--pod/perllexwarn.pod2
-rw-r--r--pod/perllocale.pod19
-rw-r--r--pod/perlmodlib.pod28
-rw-r--r--pod/perlnumber.pod4
-rw-r--r--pod/perlop.pod10
-rw-r--r--pod/perlopentut.pod24
-rw-r--r--pod/perlport.pod9
-rw-r--r--pod/perlre.pod2
-rw-r--r--pod/perlsub.pod6
-rw-r--r--pod/perltie.pod8
-rw-r--r--pod/perltoot.pod2
-rw-r--r--pod/perltootc.pod2
-rw-r--r--pod/perlunicode.pod2
-rw-r--r--pp_ctl.c15
-rw-r--r--pp_sys.c10
-rw-r--r--sv.c15
-rwxr-xr-xt/comp/proto.t4
-rw-r--r--t/lib/st-lock.t4
-rw-r--r--t/lib/st-recurse.t16
-rwxr-xr-xt/lib/syslog.t12
-rw-r--r--t/lib/tie-refhash.t70
-rwxr-xr-xt/op/pos.t9
-rwxr-xr-xt/op/taint.t31
-rwxr-xr-xt/pragma/locale.t63
-rw-r--r--t/pragma/warn/pp_sys14
-rw-r--r--toke.c59
-rw-r--r--unixish.h6
-rw-r--r--utf8.c2
-rw-r--r--util.c46
-rw-r--r--utils/perlbug.PL7
-rw-r--r--vms/perlvms.pod8
-rw-r--r--vms/vms.c2
-rw-r--r--vos/config.alpha.h11
-rw-r--r--vos/config.ga.def1
-rw-r--r--vos/config.ga.h11
-rw-r--r--win32/vdir.h18
88 files changed, 1634 insertions, 517 deletions
diff --git a/AUTHORS b/AUTHORS
index e7d9e1d39d..1b804182a9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,7 +4,8 @@
# if known) from the Changes files. These people have either submitted
# patches or suggestions, or their bug reports or comments have inspired
# the appropriate patches. Corrections and additions welcome.
-
+#
+--
Aaron B. Dossett <aaron@iglou.com>
Abigail <abigail@foad.org>
Achim Bohnet <ach@mpe.mpg.de>
@@ -19,7 +20,7 @@ Alexander Smishlajev <als@turnhere.com>
Ambrose Kofi Laing
Andreas Klussmann <andreas@infosys.heitec.de>
Andreas König <a.koenig@mind.de>
-Andreas Schwab
+Andreas Schwab <schwab@suse.de>
Andrew Bettison <andrewb@zip.com.au>
Andrew Cohen <cohen@andy.bu.edu>
Andrew M. Langmead <aml@world.std.com>
@@ -65,7 +66,7 @@ Carl Witty
Cary D. Renzema <caryr@mxim.com>
Casey R. Tweten <crt@kiski.net>
Castor Fu
-Chaim Frenkel
+Chaim Frenkel <chaimf@pobox.com>
Charles Bailey <bailey@newman.upenn.edu>
Charles F. Randall <crandall@free.click-n-call.com>
Charles Lane <lane@DUPHY4.Physics.Drexel.Edu>
@@ -77,7 +78,7 @@ Christian Kirsch <ck@held.mind.de>
Christopher Davis <ckd@loiosh.kei.com>
Chuck D. Phillips <cdp@hpescdp.fc.hp.com>
Chunhui Teng <cteng@nortel.ca>
-Clark Cooper
+Clark Cooper <coopercc@netheaven.com>
Clinton Pierce <cpierce1@ford.com>
Colin Kuskie <ckuskie@cadence.com>
Conrad Augustin
@@ -132,22 +133,21 @@ Dov Grobgeld
Drago Goricanec <drago@raptor.otsd.ts.fujitsu.co.jp>
Ed Peschko <epeschko@den-mdev1>
Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
-Eric Arnold
+Eric Arnold <eric.arnold@sun.com>
Eric Bartley <bartley@icd.cc.purdue.edu>
Eric E. Coe <Eric.Coe@oracle.com>
-Eric Fifer <EFifer@sanwaint.com>
+Eric Fifer <egf7@columbia.edu>
Erich Rickheit
Eryq <eryq@zeegee.com>
Eugene Alterman <Eugene.Alterman@bremer-inc.com>
-Fabien Tassin
Fabien Tassin <tassin@eerie.fr>
-Fisher Mark <fisherm@tce.com>
+Felix Gallo <fgallo@etoys.com>
Florent Guillaume
Frank Crawford
Frank Ridderbusch <Frank.Ridderbusch@pdb.siemens.de>
Frank Tobin <ftobin@uiuc.edu>
François Désarménien <desar@club-internet.fr>
-Frederic Chauveau
+Fréderic Chauveau <fmc@pasteur.fr>
G. Del Merritt <del@intranetics.com>
Gabe Schaffer
Gary Clark <GaryC@mail.jeld-wen.com>
@@ -164,7 +164,7 @@ Greg Chapman <glc@well.com>
Greg Earle
Greg Kuperberg
Greg Seibert <seibert@Lynx.COM>
-Greg Ward
+Greg Ward <gward@ase.com>
Gregory Martin Pfeil <pfeilgm@technomadic.org>
Gurusamy Sarathy <gsar@activestate.com>
Gustaf Neumann
@@ -194,7 +194,7 @@ Irving Reid <irving@tor.securecomputing.com>
J. David Blackstone <jdb@dfwnet.sbms.sbc.com>
J. van Krieken <John.van.Krieken@ATComputing.nl>
JD Laub <jdl@access-health.com>
-Jack Shirazi
+Jack Shirazi <JackS@GemStone.com>
Jacqui Caren <Jacqui.Caren@ig.co.uk>
James FitzGibbon <james@ican.net>
Jamshid Afshar
@@ -202,13 +202,13 @@ Jan D. <jan.djarv@mbox200.swipnet.se>
Jan Dubois <jand@activestate.com>
Jan Pazdziora <adelton@fi.muni.cz>
Jan-Pieter Cornet <johnpc@xs4all.nl>
-Jared Rhine
+Jared Rhine <jared@organic.com>
Jarkko Hietaniemi <jhi@iki.fi>
Jason A. Smith <smithj4@rpi.edu>
Jason Shirk
Jason Stewart <jasons@cs.unm.edu>
Jason Varsoke <jjv@caesun10.msd.ray.com>
-Jay Rogers
+Jay Rogers <jay@rgrs.com>
Jeff Bouis
Jeff McDougal <jmcdo@cris.com>
Jeff Okamoto <okamoto@corp.hp.com>
@@ -223,7 +223,7 @@ Jens-Uwe Mager <jum@helios.de>
Jeremy D. Zawodny <jzawodn@wcnet.org>
Jerome Abela <abela@hsc.fr>
Jim Anderson <jander@ml.com>
-Jim Avera
+Jim Avera <avera@hal.com>
Jim Balter
Jim Meyering <meyering@asic.sc.ti.com>
Jim Miner <jfm@winternet.com>
@@ -246,7 +246,6 @@ John L. Allen <allen@grumman.com>
John Macdonald <jmm@revenge.elegant.com>
John Nolan <jpnolan@Op.Net>
John Peacock <jpeacock@rowman.com>
-John Q. Linux <jql@accessone.com>
John Rowe
John Stoffel <jfs@fluent.com>
John Tobey <jtobey@john-edwin-tobey.org>
@@ -262,7 +261,7 @@ Joshua Pritikin <joshua.pritikin@db.com>
Juan Gallego <Little.Boss@physics.mcgill.ca>
Julian Yip <julian@imoney.com>
Ka-Ping Yee
-Karl Glazebrook
+Karl Glazebrook <kgb@aaossz.aao.GOV.AU>
Karl Heuer <kwzh@gnu.org>
Karl Simon Berg
Karsten Sperling <spiff@phreax.net>
@@ -270,7 +269,7 @@ Keith Neufeld <neufeld@fast.pvi.org>
Keith Thompson
Ken Estes <estes@ms.com>
Ken Fox <kfox@ford.com>
-Ken MacLeod
+Ken MacLeod <ken@bitsko.slc.ut.us>
Ken Shan <ken@digitas.harvard.edu>
Kenneth Albanowski <kjahds@kjahds.com>
Kenneth Duda <kjd@cisco.com>
@@ -309,6 +308,7 @@ Mark Kaehny
Mark Kettenis <kettenis@wins.uva.nl>
Mark Knutsen
Mark Kvale <kvale@phy.ucsf.edu>
+Mark Leighton Fisher <fisherm@tce.com>
Mark P. Lutz <mark.p.lutz@boeing.com>
Mark R. Levinson <mrl@isc.upenn.edu>
Mark-Jason Dominus <mjd@plover.com>
@@ -318,7 +318,7 @@ Martin Jost
Martin Lichtin <lichtin@bivio.com>
Martin Plechsmid <plechsmi@karlin.mff.cuni.cz>
Marty Lucich <marty@netcom.com>
-Martyn Pearce
+Martyn Pearce <martyn@inpharmatica.co.uk>
Masahiro KAJIURA <masahiro.kajiura@toshiba.co.jp>
Mathias Koerber <mathias@dnssec1.singnet.com.sg>
Matt Kimball
@@ -425,7 +425,7 @@ Russell Fulton <russell@ccu1.auckland.ac.nz>
Russell Mosemann
Ryan Herbert <rherbert@sycamorehq.com>
SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
-Samuli Kärkkäinen
+Samuli Kärkkäinen <skarkkai@woods.iki.fi>
Scott Gifford <sgifford@tir.com>
Scott Henry <scotth@sgi.com>
Sean Robinson <robinson_s@sc.maricopa.edu>
@@ -444,7 +444,7 @@ Stephen P. Potter <spp@ds.net>
Stephen Zander <gibreel@pobox.com>
Steve A Fink <sfink@cs.berkeley.edu>
Steve Kelem <steve.kelem@xilinx.com>
-Steve McDougall
+Steve McDougall <swmcd@world.std.com>
Steve Nielsen <spn@enteract.com>
Steve Pearlmutter
Steve Vinoski
@@ -457,7 +457,6 @@ Taro KAWAGISHI
Ted Ashton <ashted@southern.edu>
Ted Law <tedlaw@cibcwg.com>
Thad Floryan <thad@thadlabs.com>
-The Man
Thomas Bowditch <bowditch@inmet.com>
Thomas Conté <tom@fr.uu.net>
Thomas Dorner <Thomas.Dorner@start.de>
@@ -481,7 +480,7 @@ Tom Spindler <dogcow@merit.edu>
Tony Camas
Tony Cook <tony@develop-help.com>
Tony Sanders <sanders@bsdi.com>
-Tor Lillqvist
+Tor Lillqvist <tml@hemuli.tte.vtt.fi>
Trevor Blackwell <tlb@viaweb.com>
Tuomas J. Lukka <tjl@lukka.student.harvard.edu>
Tye McQueen <tye@metronet.com>
@@ -496,11 +495,11 @@ W. Phillip Moore <wpm@ms.com>
Warren Hyde <whyde@pezz.sps.mot.com>
Warren Jones <wjones@tc.fluke.com>
Wayne Berke
-Wayne Scott
+Wayne Scott <wscott@ichips.intel.com>
Wayne Thompson <Wayne.Thompson@Ebay.sun.com>
Wilfredo Sánchez <wsanchez@apple.com>
William Mann <wmann@avici.com>
-William J. Middleton
+William J. Middleton <William.Middleton@oslo.mobil.telenor.no>
William R Ward <hermit@BayView.COM>
William Setzer
Winfried König <win@in.rhein-main.de>
diff --git a/Changes b/Changes
index 71a5667b8d..7c51de6cae 100644
--- a/Changes
+++ b/Changes
@@ -32,6 +32,481 @@ Version v5.7.0 Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 7612] By: jhi on 2000/11/08 18:35:25
+ Log: Subject: is this the appropriate patch to fix: [ID 20001106.006] find2perl generated scripts issue new lstat() on filehandle _ warning
+ From: David Dyck <dcd@tc.fluke.com>
+ Date: Wed, 8 Nov 2000 10:05:44 -0800 (PST)
+ Message-ID: <Pine.LNX.4.30.0011080957440.2572-100000@dd.tc.fluke.com>
+ Branch: perl
+ ! pp_sys.c
+____________________________________________________________________________
+[ 7611] By: jhi on 2000/11/08 18:30:26
+ Log: Subject: [PATCH bleadperl] Re: Patch 7533 prevents malloc.c from compiling on MachTen
+ From: Dominic Dunlop <domo@computer.org>
+ Date: Tue, 7 Nov 2000 12:05:25 +0100
+ Message-Id: <p04320403b62d8e0870cf@[192.168.1.4]>
+ Branch: perl
+ ! malloc.c
+____________________________________________________________________________
+[ 7610] By: jhi on 2000/11/08 18:25:14
+ Log: Do not test UTF-8 locales since that the tests would require
+ polymorphic regexen.
+ Branch: perl
+ ! t/pragma/locale.t
+____________________________________________________________________________
+[ 7609] By: jhi on 2000/11/08 17:12:51
+ Log: Locale buglets.
+
+ Subject: RE: Locales support (setlocale) fixes
+ From: "Konovalov, Vadim" <vkonovalov@lucent.com>
+ Date: Wed, 8 Nov 2000 20:01:39 +0300
+ Message-ID: <402099F49BEED211999700805FC7359F825283@ru0028exch01.spb.lucent.com>
+ Branch: perl
+ ! t/pragma/locale.t util.c
+____________________________________________________________________________
+[ 7608] By: jhi on 2000/11/08 17:00:16
+ Log: Deleting $ENV{PATH} in VMS is not recommendable.
+ Branch: perl
+ ! t/pragma/locale.t
+____________________________________________________________________________
+[ 7607] By: jhi on 2000/11/08 16:58:26
+ Log: Subject: PATCH std stdio for (Free)BSD
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Wed, 8 Nov 2000 15:36:29 +0000
+ Message-ID: <20001108153629.D98736@plum.flirble.org>
+ Branch: metaconfig
+ ! U/compline/d_stdstdio.U
+ Branch: perl
+ ! Configure config_h.SH
+____________________________________________________________________________
+[ 7606] By: jhi on 2000/11/08 16:43:31
+ Log: Forgot to bump the line numbers in #7601.
+ Branch: perl
+ ! t/pragma/warn/pp_sys
+____________________________________________________________________________
+[ 7605] By: jhi on 2000/11/08 16:39:12
+ Log: More careful detection of how well NVs and UVs mix.
+
+ Subject: [PATCH] Re: NV preserving UV (wasRe: [ID 20001007.002] Not OK: perl v5.7.0 +DEVEL7158 on armv4l-linux-64int 2.2.17-rmk1 (UNINSTALLED))
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Wed, 8 Nov 2000 15:14:12 +0000
+ Message-ID: <20001108151412.B98736@plum.flirble.org>
+
+ Added some SIGFPE paranoia.
+ Branch: metaconfig/U/perl
+ ! perlxv.U
+ Branch: perl
+ ! Configure config_h.SH
+____________________________________________________________________________
+[ 7604] By: jhi on 2000/11/08 14:39:10
+ Log: Subject: [patch perl@7595] VMS configure.com tweak
+ From: "Craig A. Berry" <craigberry@mac.com>
+ Date: Wed, 8 Nov 2000 00:24:12 -0600
+ Message-Id: <p04330103b62e879ceeff@[192.168.56.177]>
+ Branch: perl
+ ! configure.com
+____________________________________________________________________________
+[ 7603] By: jhi on 2000/11/08 14:27:11
+ Log: Subject: [PATCH @7595] int/ptr casts in perlio.c
+ From: Robin Barker <rmb1@cise.npl.co.uk>
+ Date: Wed, 8 Nov 2000 11:11:39 GMT
+ Message-Id: <200011081111.LAA07377@tempest.npl.co.uk>
+ Branch: perl
+ ! perlio.c
+____________________________________________________________________________
+[ 7602] By: jhi on 2000/11/08 14:25:03
+ Log: Fix for the tie-refhash string table leaks.
+
+ From: Nick Ing-Simmons <nik@tiuk.ti.com>
+ Date: Wed, 8 Nov 2000 13:03:04 GMT
+ Message-Id: <200011081303.NAA07042@mikado.tiuk.ti.com>
+ Branch: perl
+ ! t/lib/tie-refhash.t
+____________________________________________________________________________
+[ 7601] By: jhi on 2000/11/08 14:21:08
+ Log: Try to avoid flockless and emulationless places.
+ Branch: perl
+ ! t/pragma/warn/pp_sys
+____________________________________________________________________________
+[ 7600] By: jhi on 2000/11/08 02:28:54
+ Log: Overrideable keys, each, pop, push, shift, splice, unshift.
+
+ Subject: [PATCH] prototyped functions that should be overrideable
+ From: "Casey R. Tweten" <crt@kiski.net>
+ Date: Fri, 3 Nov 2000 11:09:12 -0500 (EST)
+ Message-ID: <Pine.OSF.4.21.0011031100470.17471-100000@home.kiski.net>
+ Branch: perl
+ ! toke.c
+____________________________________________________________________________
+[ 7599] By: jhi on 2000/11/08 01:12:05
+ Log: Make perlbug not insist on dumping to a file when stdout isn't a tty.
+
+ Subject: [PATCH] perlbug.PL
+ From: "Kurt D. Starsinic" <kstar@chapin.edu>
+ Date: Mon, 6 Nov 2000 21:39:01 -0500
+ Message-ID: <20001106213901.B20955@O2.chapin.edu>
+ Branch: perl
+ ! utils/perlbug.PL
+____________________________________________________________________________
+[ 7598] By: jhi on 2000/11/07 23:42:00
+ Log: Bad thinko in #7581 (I used the test program with the expanded
+ values as-is).
+ Branch: metaconfig
+ ! U/compline/d_stdstdio.U
+ Branch: perl
+ ! Configure
+____________________________________________________________________________
+[ 7597] By: jhi on 2000/11/07 21:43:29
+ Log: Subject: [PATCH perl@7573] cygwin port
+ From: "Fifer, Eric" <EFifer@sanwaint.com>
+ Date: Tue, 7 Nov 2000 18:08:51 -0000
+ Message-ID: <779F20BCCE5AD31186A50008C75D99791717BB@silldn_mail1.sanwaint.com>
+
+ Synchronize with Cygwin 1.1.5.
+ Branch: perl
+ ! AUTHORS README.cygwin cygwin/cygwin.c hints/cygwin.sh mg.c
+ ! pod/perlport.pod unixish.h util.c
+____________________________________________________________________________
+[ 7596] By: jhi on 2000/11/07 21:39:25
+ Log: perlhack updates from H.Merijn Brand.
+ Branch: perl
+ ! pod/perlhack.pod
+____________________________________________________________________________
+[ 7595] By: jhi on 2000/11/07 20:21:41
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
+[ 7594] By: jhi on 2000/11/07 19:18:58
+ Log: Be more robust in Dynaloader.pm.
+ Branch: perl
+ ! ext/DynaLoader/DynaLoader_pm.PL
+____________________________________________________________________________
+[ 7593] By: jhi on 2000/11/07 16:49:31
+ Log: AUTHORS update.
+ Branch: perl
+ ! AUTHORS
+____________________________________________________________________________
+[ 7592] By: gsar on 2000/11/07 16:39:51
+ Log: normalize relative paths in virtualized current directory on windows,
+ under ithreads (avoids ".." etc showing up in what Cwd::cwd()
+ returns)
+ Branch: perl
+ ! win32/vdir.h
+____________________________________________________________________________
+[ 7591] By: jhi on 2000/11/07 16:04:26
+ Log: Too profiler-happy: with optimization the #7590 actually makes
+ the test to run 0.5% _slower_. Requires much more instrumentation.
+ Retract #7590.
+ Branch: perl
+ ! regcomp.c regcomp.h
+____________________________________________________________________________
+[ 7590] By: jhi on 2000/11/07 15:51:13
+ Log: Shave off about 5% (Digital UNIX, -g, pixie) of the op/regexp
+ execution time in regcomp.c S_cl_any() and S_cl_is_anything()
+ by using memset() and testing bytewise (as opposed to bitwise).
+ Branch: perl
+ ! regcomp.c regcomp.h
+____________________________________________________________________________
+[ 7589] By: jhi on 2000/11/07 12:56:39
+ Log: Subject: [PATCH perl@7573] configure.com and st-lock.t changes for
+ From: "Craig A. Berry" <craig.berry@psinetcs.com>
+ Date: Mon, 06 Nov 2000 23:45:30 -0500
+ Message-Id: <0011079735.AA973576259@univpress.com>
+ Branch: perl
+ ! configure.com t/lib/st-lock.t
+____________________________________________________________________________
+[ 7588] By: jhi on 2000/11/07 01:03:28
+ Log: Tweak #7587.
+ Branch: perl
+ ! pod/perldiag.pod
+____________________________________________________________________________
+[ 7587] By: jhi on 2000/11/07 01:00:27
+ Log: A doc addition for bug id 20001105.019, beware \p.
+ Branch: perl
+ ! pod/perldiag.pod
+____________________________________________________________________________
+[ 7586] By: jhi on 2000/11/07 00:32:22
+ Log: Fake support of holey files in win/dosish platforms.
+
+ Subject: SDBM_File under MS-Windows95/98 does not work correctly. (APR#1302)
+ From: kipp@shonanblue.ne.jp
+ Date: Mon, 6 Nov 2000 13:30:55 -0800
+ Message-Id: <200011062130.eA6LUpZ17387@smtp3.ActiveState.com>
+ Branch: perl
+ ! ext/SDBM_File/sdbm/sdbm.c
+____________________________________________________________________________
+[ 7585] By: jhi on 2000/11/07 00:12:54
+ Log: Subject: Pod updates
+ From: "Stephen P. Potter" <spp@spotter.yi.org>
+ Date: Mon, 06 Nov 2000 18:56:43 -0500
+ Message-Id: <200011062357.SAA18173@spotter.yi.org>
+ Branch: perl
+ ! README.dos README.os2 README.win32 pod/buildtoc.PL
+ ! pod/perl.pod pod/perl5004delta.pod pod/perl5005delta.pod
+ ! pod/perl56delta.pod pod/perldebguts.pod pod/perldebtut.pod
+ ! pod/perldebug.pod pod/perldelta.pod pod/perldiag.pod
+ ! pod/perlembed.pod pod/perlfaq.pod pod/perlfaq1.pod
+ ! pod/perlfaq2.pod pod/perlfaq5.pod pod/perlfaq7.pod
+ ! pod/perlfaq8.pod pod/perlfilter.pod pod/perlfunc.pod
+ ! pod/perlguts.pod pod/perlhack.pod pod/perlhist.pod
+ ! pod/perlipc.pod pod/perllexwarn.pod pod/perllocale.pod
+ ! pod/perlmodlib.pod pod/perlnumber.pod pod/perlop.pod
+ ! pod/perlopentut.pod pod/perlport.pod pod/perlre.pod
+ ! pod/perlsub.pod pod/perltie.pod pod/perltoot.pod
+ ! pod/perltootc.pod pod/perlunicode.pod
+____________________________________________________________________________
+[ 7584] By: jhi on 2000/11/07 00:04:17
+ Log: Varargs don't always work too well if one puts an unsigned
+ char on the stack and pop an unsigned quad off the stack.
+
+ Subject: Re: [ID 20001103.002] Not OK: perl v5.7.0 +DEVEL7523 on os2-64int-ld-2.30 (UNINSTALLED)
+ From: sthoenna@efn.org (Yitzchak Scott-Thoennes)
+ Date: Mon, 06 Nov 2000 15:19:05 -0800
+ Message-ID: <pxzB6gzkgKXY092yn@efn.org>
+ Branch: perl
+ ! utf8.c
+____________________________________________________________________________
+[ 7583] By: jhi on 2000/11/06 23:58:48
+ Log: %ENV note tweaks from Dan Sugalski.
+ Branch: perl
+ ! pod/perlport.pod vms/perlvms.pod
+____________________________________________________________________________
+[ 7582] By: jhi on 2000/11/06 23:05:49
+ Log: glibc5 detection by __GNU_LIBRARY__.
+ Branch: perl
+ ! toke.c
+____________________________________________________________________________
+[ 7581] By: jhi on 2000/11/06 22:51:29
+ Log: Make the stdio test program of 7427 less noisy while being
+ compiled so that Digital UNIX wouldn't get both
+ d_stdio_ptr_lval_nochange_cnt and d_stdio_ptr_lval_sets_cnt
+ undefined. This makes perlio happy.
+ Branch: metaconfig
+ ! U/compline/d_stdstdio.U
+ Branch: perl
+ ! Configure config_h.SH
+____________________________________________________________________________
+[ 7580] By: jhi on 2000/11/06 22:41:41
+ Log: Document %ENV = () portability issues.
+ Branch: perl
+ ! pod/perlport.pod vms/perlvms.pod
+____________________________________________________________________________
+[ 7579] By: jhi on 2000/11/06 21:29:24
+ Log: VOS updates from Paul Green.
+ Branch: perl
+ ! vos/config.alpha.h vos/config.ga.def vos/config.ga.h
+____________________________________________________________________________
+[ 7578] By: jhi on 2000/11/06 21:00:40
+ Log: Sanitize the environment further.
+ Branch: perl
+ ! t/pragma/locale.t
+____________________________________________________________________________
+[ 7577] By: jhi on 2000/11/06 20:53:51
+ Log: Re-introduce 7552 lost in integration.
+ Branch: perl
+ ! perlio.c
+____________________________________________________________________________
+[ 7576] By: jhi on 2000/11/06 20:33:46
+ Log: Admit that the test leaks scalars.
+ Branch: perl
+ ! t/comp/proto.t
+____________________________________________________________________________
+[ 7575] By: jhi on 2000/11/06 20:17:08
+ Log: Integrate perlio.
+ Branch: perl
+ !> perlio.c
+____________________________________________________________________________
+[ 7573] By: jhi on 2000/11/06 13:56:05
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
+[ 7572] By: jhi on 2000/11/06 13:48:41
+ Log: Subject: Re: rsync'ed patches vs. rsync'ed source
+ From: "H.Merijn Brand" <h.m.brand@hccnet.nl>
+ Date: Mon, 06 Nov 2000 10:11:42 +0100
+ Message-Id: <20001106100920.9BAD.H.M.BRAND@hccnet.nl>
+ Branch: perl
+ ! pod/perlhack.pod
+____________________________________________________________________________
+[ 7571] By: jhi on 2000/11/06 01:45:51
+ Log: AUTHORS updates.
+ Branch: perl
+ ! AUTHORS
+____________________________________________________________________________
+[ 7570] By: jhi on 2000/11/06 00:18:00
+ Log: Fix for
+
+ Subject: [ID 20000728.005] perl -P broken
+ From: David Dyck <dcd@tc.fluke.com>
+ Date: Fri, 28 Jul 2000 17:19:16 -0700
+ Message-Id: <200007290019.RAA08484@dd.tc.fluke.com>
+
+ (hopefully). The fix is also not complete, it seems to break
+ BOM swallowing for libc5 systems, but until someone figures
+ out a way to do this without ftell(), this will do.
+ Branch: perl
+ ! toke.c
+____________________________________________________________________________
+[ 7569] By: jhi on 2000/11/06 00:05:30
+ Log: Document that the evaled syntax errors cause scalar leaks.
+ Branch: perl
+ ! t/comp/proto.t
+____________________________________________________________________________
+[ 7568] By: jhi on 2000/11/05 23:14:47
+ Log: opmini.o can linger from Configures past.
+ Branch: perl
+ ! Makefile.SH
+____________________________________________________________________________
+[ 7567] By: jhi on 2000/11/05 21:28:39
+ Log: Fake __FUNCTION__ for non-gcc builds, cast madvise()
+ first argument correctly.
+ Branch: perl
+ ! perlio.c
+____________________________________________________________________________
+[ 7566] By: jhi on 2000/11/05 21:15:56
+ Log: Integrate perlio.
+ Branch: perl
+ !> perlio.c
+____________________________________________________________________________
+[ 7565] By: jhi on 2000/11/05 21:15:13
+ Log: Use -dM for gcc (the suggested patch did it only for Linux,
+ but I think it can be generalized).
+
+ Subject: Re: connect and $!{EINPROGRESS} pb (was [ID 20001030.010] [PATCH] io_multihomed.t failing)
+ From: Pixel <pixel@mandrakesoft.com>
+ Date: 05 Nov 2000 21:49:34 +0100
+ Message-ID: <ly8zqygn4x.fsf@leia.mandrakesoft.com>
+ Branch: perl
+ ! ext/Errno/Errno_pm.PL
+____________________________________________________________________________
+[ 7563] By: jhi on 2000/11/05 19:48:55
+ Log: Add a note for future generations about bug id 20000229.006.
+ Branch: perl
+ ! malloc.c
+____________________________________________________________________________
+[ 7562] By: jhi on 2000/11/05 19:38:24
+ Log: Fix for bug id 19990615.008, pos() unset during s///ge.
+ Branch: perl
+ ! pp_ctl.c t/op/pos.t
+____________________________________________________________________________
+[ 7561] By: jhi on 2000/11/05 18:21:46
+ Log: Add =pod to be tidy.
+ Branch: perl
+ ! lib/Math/Complex.pm
+____________________________________________________________________________
+[ 7560] By: jhi on 2000/11/05 17:38:46
+ Log: Upgrade to Storable 1.0.6, from Raphael Manfredi.
+ Branch: perl
+ ! ext/Storable/ChangeLog ext/Storable/Storable.pm
+ ! ext/Storable/Storable.xs t/lib/st-recurse.t
+____________________________________________________________________________
+[ 7559] By: jhi on 2000/11/05 17:32:59
+ Log: Subject: [Corrected/tested PATCH] Re: [ID 20001102.008] Not OK: perl v5.7.0 +DEVEL7503 on i686-linux 2.2.16
+ From: "Peter J. Farley III" <pjfarley@banet.net>
+ Date: Sun, 05 Nov 2000 11:55:59 -0500
+ Message-Id: <4.3.1.0.20001105115341.00b35160@pop5.banet.net>
+ Branch: perl
+ ! t/lib/syslog.t
+____________________________________________________________________________
+[ 7558] By: jhi on 2000/11/05 17:29:19
+ Log: Integrate perlio.
+ Branch: perl
+ !> perlio.c
+____________________________________________________________________________
+[ 7557] By: jhi on 2000/11/05 17:22:01
+ Log: A fix of sorts for 20000329.026, a better error message
+ for a missing "use charnames" when using the \N{...}.
+ Branch: perl
+ ! pod/perldiag.pod toke.c
+____________________________________________________________________________
+[ 7556] By: jhi on 2000/11/05 16:33:50
+ Log: Test tweak: show also the failed locales.
+
+ Subject: [ID 20001105.001] Not OK: perl v5.7.0 +DEVEL7523 on i86pc-solaris 2.8
+ From: Lupe Christoph <lupe@lupe-christoph.de>
+ Date: Sun, 5 Nov 2000 12:39:27 +0100 (MET)
+ Message-Id: <200011051139.MAA12442@lupe-christoph.de>
+ Branch: perl
+ ! t/pragma/locale.t
+____________________________________________________________________________
+[ 7553] By: jhi on 2000/11/05 01:12:16
+ Log: Fix for
+
+ Subject: [ID 20001004.007] taint propogation is inconsistent
+ From: pimlott@idiomtech.com (Andrew Pimlott)
+ Date: Wed, 4 Oct 2000 23:17:44 -0400 (EDT)
+ Message-Id: <m13h1XU-000SEmC@nolfolan.idiomtech.com>
+
+ The culprit was sv_setsv() which was rather blindly
+ propagating taint, which lead to behaviour where was
+ a tainted anon hash value was seen all the values from
+ then on became tainted.
+ Branch: perl
+ ! sv.c t/op/taint.t
+____________________________________________________________________________
+[ 7552] By: jhi on 2000/11/04 23:44:18
+ Log: Some cpps don't like splitting conditionals across several lines.
+ Branch: perl
+ ! perlio.c
+____________________________________________________________________________
+[ 7549] By: jhi on 2000/11/04 23:14:01
+ Log: Fix for
+
+ Subject: [ID 20001004.006] undef is never tainted
+ From: pimlott@idiomtech.com (Andrew Pimlott)
+ Date: Wed, 4 Oct 2000 21:57:43 -0400 (EDT)
+ Message-Id: <m13h0I3-000SEmC@nolfolan.idiomtech.com>
+
+ An undef read from a slurped file was not tainted.
+ Branch: perl
+ ! pp_hot.c t/op/taint.t
+____________________________________________________________________________
+[ 7548] By: jhi on 2000/11/04 22:56:21
+ Log: Test tweak ($Config{useperlio} is by default undef) .
+ Branch: perl
+ ! t/lib/b.t
+____________________________________________________________________________
+[ 7547] By: jhi on 2000/11/04 22:43:56
+ Log: Integrate perlio.
+ Branch: perl
+ +> lib/perlio.pm
+ !> MANIFEST iperlsys.h objXSUB.h perlapi.c perlio.c
+ !> pod/perlapi.pod t/lib/b.t
+____________________________________________________________________________
+[ 7546] By: jhi on 2000/11/04 22:40:59
+ Log: Configure would use a bad $myuname from an old config.sh.
+
+ Subject: [PATCH 5.6.1-to-be and 5.7.x] Very old Configure myuname bug
+ From: Andy Dougherty <doughera@lafayette.edu>
+ Date: Sat, 4 Nov 2000 14:15:29 -0500 (EST)
+ Message-ID: <Pine.SOL.4.10.10011041410120.982-100000@maxwell.phys.lafayette.edu>
+ Branch: metaconfig
+ ! U/modified/Oldconfig.U
+ Branch: perl
+ ! Configure config_h.SH
+____________________________________________________________________________
+[ 7545] By: jhi on 2000/11/04 22:36:54
+ Log: Subject: Locales support (setlocale) fixes
+ From: "Konovalov, Vadim" <vkonovalov@lucent.com>
+ Date: Sat, 4 Nov 2000 10:15:48 +0300
+ Message-ID: <402099F49BEED211999700805FC7359F82511F@ru0028exch01.spb.lucent.com>
+
+ Modified quite a bit to be more portable.
+ Branch: perl
+ ! embed.h embed.pl perl.h proto.h util.c
+____________________________________________________________________________
+[ 7544] By: jhi on 2000/11/04 22:32:47
+ Log: Dying is too strict here, better just skip.
+ Branch: perl
+ ! t/op/misc.t
+____________________________________________________________________________
+[ 7542] By: jhi on 2000/11/04 21:09:28
+ Log: More Changes tweakery.
+ Branch: perl
+ ! Changes Porting/genlog
+____________________________________________________________________________
[ 7541] By: jhi on 2000/11/04 20:58:18
Log: Changes fixups.
Branch: perl
diff --git a/Configure b/Configure
index 13e52dbd28..677338c6a2 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sun Nov 5 00:37:41 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Nov 9 15:20:17 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >/tmp/c1$$ <<EOF
@@ -10096,6 +10096,37 @@ rp="What is the size of a character (in bytes)?"
charsize="$ans"
$rm -f try.c try
+: check for volatile keyword
+echo " "
+echo 'Checking to see if your C compiler knows about "volatile"...' >&4
+$cat >try.c <<'EOCP'
+int main()
+{
+ typedef struct _goo_struct goo_struct;
+ goo_struct * volatile goo = ((goo_struct *)0);
+ struct _goo_struct {
+ long long_int;
+ int reg_int;
+ char char_var;
+ };
+ typedef unsigned short foo_t;
+ char *volatile foo;
+ volatile int bar;
+ volatile foo_t blech;
+ foo = foo;
+}
+EOCP
+if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
+ val="$define"
+ echo "Yup, it does."
+else
+ val="$undef"
+ echo "Nope, it doesn't."
+fi
+set d_volatile
+eval $setvar
+$rm -f try.*
+
echo " "
$echo "Choosing the C types to be used for Perl's internal types..." >&4
@@ -10274,67 +10305,68 @@ case "$i64type" in
;;
esac
-$echo "Checking whether your NVs can preserve your UVs..." >&4
+$echo "Checking how many bits of your UVs your NVs can preserve..." >&4
+: volatile so that the compiler has to store it out to memory.
+if test X"$d_volatile" = X"$define"; then
+ volatile=volatile
+fi
$cat <<EOP >try.c
#include <stdio.h>
-int main() {
- $uvtype k = ($uvtype)~0, l;
- $nvtype d;
- l = k;
- d = ($nvtype)l;
- l = ($uvtype)d;
- if (l == k)
- printf("preserve\n");
- exit(0);
-}
-EOP
-set try
-if eval $compile; then
- case "`./try$exe_ext`" in
- preserve) d_nv_preserves_uv="$define" ;;
- esac
-fi
-case "$d_nv_preserves_uv" in
-$define) $echo "Yes, they can." 2>&1 ;;
-*) $echo "No, they can't." 2>&1
- d_nv_preserves_uv="$undef"
- ;;
-esac
-
-$rm -f try.* try
-
-case "$d_nv_preserves_uv" in
-"$define") d_nv_preserves_uv_bits=`expr $uvsize \* 8` ;;
-*) $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
- $cat <<EOP >try.c
-#include <stdio.h>
+#include <sys/types.h>
+#include <signal.h>
+#ifdef SIGFPE
+$volatile int bletched = 0;
+$signal_t blech(s) int s; { bletched = 1; }
+#endif
int main() {
$uvtype u = 0;
+ $nvtype d;
int n = 8 * $uvsize;
int i;
+#ifdef SIGFPE
+ signal(SIGFPE, blech);
+#endif
+
for (i = 0; i < n; i++) {
u = u << 1 | ($uvtype)1;
- if (($uvtype)($nvtype)u != u)
+ d = ($nvtype)u;
+ if (($uvtype)d != u)
break;
+ if (d <= 0)
+ break;
+ d = ($nvtype)(u - 1);
+ if (($uvtype)d != (u - 1))
+ break;
+#ifdef SIGFPE
+ if (bletched) {
+ break;
+#endif
+ }
}
- printf("%d\n", i);
+ printf("%d\n", ((i == n) ? -n : i));
exit(0);
}
EOP
- set try
- if eval $compile; then
- d_nv_preserves_uv_bits="`./try$exe_ext`"
- fi
- case "$d_nv_preserves_uv_bits" in
- [1-9]*) $echo "Your NVs can preserve $d_nv_preserves_uv_bits bits of your UVs." 2>&1 ;;
- *) $echo "Can't figure out how many bits your NVs preserve." 2>&1
- d_nv_preserves_uv_bits="$undef"
- ;;
- esac
- $rm -f try.* try
+set try
+
+d_nv_preserves_uv="$undef"
+if eval $compile; then
+ d_nv_preserves_uv_bits="`./try$exe_ext`"
+fi
+case "$d_nv_preserves_uv_bits" in
+\-[1-9]*)
+ d_nv_preserves_uv_bits=`expr 0 - $d_nv_preserves_uv_bits`
+ $echo "Your NVs can preserve all $d_nv_preserves_uv_bits bits of your UVs." 2>&1
+ d_nv_preserves_uv="$define"
;;
+[1-9]*) $echo "Your NVs can preserve only $d_nv_preserves_uv_bits bits of your UVs." 2>&1
+ d_nv_preserves_uv="$undef" ;;
+*) $echo "Can't figure out how many bits your NVs preserve." 2>&1
+ d_nv_preserves_uv_bits="$undef" ;;
esac
+$rm -f try.* try
+
: check for off64_t
echo " "
@@ -11446,7 +11478,28 @@ esac
: see if _ptr and _cnt from stdio act std
echo " "
-if $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
+
+if $contains '_lbfsize' `./findhdr stdio.h` >/dev/null 2>&1 ; then
+ echo "(Looks like you have stdio.h from BSD.)"
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_p)'
+ ptr_lval=$define
+ ;;
+ *) ptr_lval=$d_stdio_ptr_lval;;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_r)'
+ cnt_lval=$define
+ ;;
+ *) cnt_lval=$d_stdio_cnt_lval;;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)';;
+ esac
+elif $contains '_IO_fpos_t' `./findhdr stdio.h` `./findhdr libio.h` >/dev/null 2>&1 ; then
echo "(Looks like you have stdio.h from Linux.)"
case "$stdio_ptr" in
'') stdio_ptr='((fp)->_IO_read_ptr)'
@@ -11486,6 +11539,7 @@ else
'') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
esac
fi
+
: test whether _ptr and _cnt really work
echo "Checking how std your stdio is..." >&4
$cat >try.c <<EOP
@@ -11546,13 +11600,24 @@ $cat >try.c <<EOP
#include <stdio.h>
/* Can we scream? */
/* Eat dust sed :-) */
+/* In the buffer space, no one can hear you scream. */
#define FILE_ptr(fp) $stdio_ptr
#define FILE_cnt(fp) $stdio_cnt
+#include <sys/types.h>
int main() {
FILE *fp = fopen("try.c", "r");
- char c = getc(fp);
+ int c;
char *ptr;
size_t cnt;
+ if (!fp) {
+ puts("Fail even to read");
+ exit(1);
+ }
+ c = getc(fp); /* Read away the first # */
+ if (c == EOF) {
+ puts("Fail even to read");
+ exit(1);
+ }
if (!(
18 <= FILE_cnt(fp) &&
strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
@@ -11560,12 +11625,12 @@ int main() {
puts("Fail even to read");
exit (1);
}
- ptr = FILE_ptr(fp);
- cnt = FILE_cnt(fp);
+ ptr = (char*) FILE_ptr(fp);
+ cnt = (size_t)FILE_cnt(fp);
- FILE_ptr(fp)+= 42;
+ FILE_ptr(fp) += 42;
- if (FILE_ptr(fp) != (ptr + 42)) {
+ if ((char*)FILE_ptr(fp) != (ptr + 42)) {
printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
exit (1);
}
@@ -12066,37 +12131,6 @@ esac
set d_void_closedir
eval $setvar
$rm -f closedir*
-: check for volatile keyword
-echo " "
-echo 'Checking to see if your C compiler knows about "volatile"...' >&4
-$cat >try.c <<'EOCP'
-int main()
-{
- typedef struct _goo_struct goo_struct;
- goo_struct * volatile goo = ((goo_struct *)0);
- struct _goo_struct {
- long long_int;
- int reg_int;
- char char_var;
- };
- typedef unsigned short foo_t;
- char *volatile foo;
- volatile int bar;
- volatile foo_t blech;
- foo = foo;
-}
-EOCP
-if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
- val="$define"
- echo "Yup, it does."
-else
- val="$undef"
- echo "Nope, it doesn't."
-fi
-set d_volatile
-eval $setvar
-$rm -f try.*
-
: see if there is a wait4
set wait4 d_wait4
eval $inlibc
diff --git a/Makefile.SH b/Makefile.SH
index ab9606571f..1bb44fae58 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -300,7 +300,7 @@ utilities: miniperl lib/Config.pm $(plextract) lib/lib.pm FORCE
FORCE:
@sh -c true
-opmini$(OBJ_EXT): op.c
+opmini$(OBJ_EXT): op.c config.h
$(RMS) opmini.c
$(LNS) op.c opmini.c
$(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB opmini.c
diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod
index d7610595f0..3bc9d09c87 100644
--- a/Porting/pumpkin.pod
+++ b/Porting/pumpkin.pod
@@ -58,7 +58,7 @@ and 1 is the subversion.
For compatibility with the older numbering scheme the composite floating
point version number continues to be available as the magic variable $],
-and amounts to C<$revision + $version/1000 + $subversion/1000000>. This
+and amounts to C<$revision + $version/1000 + $subversion/100000>. This
can still be used in comparisons.
print "You've got an old perl\n" if $] < 5.005_03;
@@ -210,7 +210,7 @@ unset appropriate Configure variables, based on the Configure command
line options and possibly existing config.sh and Policy.sh files from
previous Configure runs.
-The extension hints are written Perl (by the time they are used
+The extension hints are written in Perl (by the time they are used
miniperl has been built) and control the building of their respective
extensions. They can be used to for example manipulate compilation
and linking flags.
@@ -252,7 +252,8 @@ the first B<not> to have a system call also update the list of
A file called F<README.youros> at the top level that explains things
like how to install perl at this platform, where to get any possibly
required additional software, and for example what test suite errors
-to expect, is nice too.
+to expect, is nice too. Such files are in the process of being written
+in pod format and will eventually be renamed F<INSTALL.youros>.
You may also want to write a separate F<.pod> file for your operating
system to tell about existing mailing lists, os-specific modules,
@@ -449,7 +450,9 @@ safely be sorted, so it's easy to track (typically very small) changes
to config.sh and then propoagate them to a canned 'config.h' by any
number of means, including a perl script in win32/ or carrying
config.sh and config_h.SH to a Unix system and running sh
-config_h.SH.)
+config_h.SH.) Vms uses configure.com to generate its own config.sh
+and config.h. If you want to add a new variable to config.sh check
+with vms folk how to add it to configure.com too.
XXX]
The Porting/config.sh and Porting/config_H files are provided to
@@ -460,7 +463,7 @@ distinguish the file from config.h even on case-insensitive file systems.)
Simply edit the existing config_H file; keep the first few explanatory
lines and then copy your new config.h below.
-It may also be necessary to update win32/config.?c, vms/config.vms and
+It may also be necessary to update win32/config.?c, and
plan9/config.plan9, though you should be quite careful in doing so if
you are not familiar with those systems. You might want to issue your
patch with a promise to quickly issue a follow-up that handles those
@@ -481,8 +484,10 @@ output statements mean the patch won't apply cleanly. Long ago I
started to fix F<perly.fixer> to detect this, but I never completed the
task.
-If C<perly.c> changes, make sure you run C<perl vms/vms_yfix.pl> to
-update the corresponding VMS files. See L<VMS-specific updates>.
+If C<perly.c> or C<perly.h> changes, make sure you run C<perl vms/vms_yfix.pl>
+to update the corresponding VMS files. This could be taken care of by
+the regen_all target in the Unix Makefile. See also
+L<VMS-specific updates>.
Some additional notes from Larry on this:
@@ -507,6 +512,11 @@ could be automated, but it doesn't happen very often nowadays.
Larry
+=head2 make regen_all
+
+This target takes care of the PERLYVMS, regen_headers, and regen_pods
+targets.
+
=head2 make regen_headers
The F<embed.h>, F<keywords.h>, and F<opcode.h> files are all automatically
@@ -532,6 +542,10 @@ and effort by manually running C<make regen_headers> myself rather
than answering all the questions and complaints about the failing
command.
+=head2 make regen_pods
+
+Will run `make regen_pods` in the pod directory for indexing.
+
=head2 global.sym, interp.sym and perlio.sym
Make sure these files are up-to-date. Read the comments in these
@@ -541,7 +555,7 @@ files and in perl_exp.SH to see what to do.
If you do change F<global.sym> or F<interp.sym>, think carefully about
what you are doing. To the extent reasonable, we'd like to maintain
-souce and binary compatibility with older releases of perl. That way,
+source and binary compatibility with older releases of perl. That way,
extensions built under one version of perl will continue to work with
new versions of perl.
@@ -594,11 +608,11 @@ things that need to be fixed in Configure.
=head2 VMS-specific updates
If you have changed F<perly.y> or F<perly.c>, then you most probably want
-to update F<vms/perly_{h,c}.vms> by running C<perl vms/vms_yfix.pl>.
+to update F<vms/perly_{h,c}.vms> by running C<perl vms/vms_yfix.pl>, or
+by running `make regen_all` which will run that script for you.
-The Perl version number appears in several places under F<vms>.
-It is courteous to update these versions. For example, if you are
-making 5.004_42, replace "5.00441" with "5.00442".
+The Perl revision number appears as "perl5" in configure.com.
+It is courteous to update that if necessary.
=head2 Making the new distribution
@@ -1353,7 +1367,8 @@ have good reason to do otherwise, I see no reason not to support them.
=item File locking
Somehow, straighten out, document, and implement lockf(), flock(),
-and/or fcntl() file locking. It's a mess.
+and/or fcntl() file locking. It's a mess. See $d_fcntl_can_lock
+in recent config.sh files though.
=back
diff --git a/README.cygwin b/README.cygwin
index 9718bb5e06..7e6a342b54 100644
--- a/README.cygwin
+++ b/README.cygwin
@@ -27,11 +27,11 @@ platforms. They run thanks to the Cygwin library which provides the UNIX
system calls and environment these programs expect. More information
about this project can be found at:
- http://sources.redhat.com/cygwin/
+ http://www.cygwin.com/
A recent net or commercial release of Cygwin is required.
-At the time this document was last updated, Cygwin 1.1.4 was current.
+At the time this document was last updated, Cygwin 1.1.5 was current.
B<NOTE:> At this point, minimal effort has been made to provide
compatibility with old (beta) Cygwin releases. The focus has been to
@@ -500,12 +500,11 @@ be kept as clean as possible.
=item Documentation
- INSTALL README.cygwin
+ INSTALL README.cygwin README.win32 MANIFEST
Changes Changes5.005 Changes5.004 Changes5.6
- AUTHORS MAINTAIN MANIFEST README.win32
- pod/buildtoc.PL pod/perl.pod pod/perl5004delta.pod pod/perl56delta.pod
- pod/perlfaq3.pod pod/perlhist.pod pod/perlmodlib.pod pod/perlport.pod
- pod/perltoc.pod
+ pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
+ pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
+ pod/perlhist.pod pod/perlmodlib.pod pod/buildtoc.PL pod/perltoc.pod
=item Build, Configure, Make, Install
@@ -543,9 +542,7 @@ be kept as clean as possible.
perl.h - binmode
doio.c - win9x can not rename a file when it is open
pp_sys.c - do not define h_errno, pp_system with spawn
- mg.c - environ WORKAROUND
- unixish.h - environ WORKAROUND
- util.c - environ WORKAROUND
+ util.c - use setenv
=item Compiled Module Source
@@ -588,7 +585,7 @@ and security contexts are required.
=head1 AUTHORS
Charles Wilson <cwilson@ece.gatech.edu>,
-Eric Fifer <efifer@sanwaint.com>,
+Eric Fifer <egf7@columbia.edu>,
alexander smishlajev <als@turnhere.com>,
Steven Morlock <newspost@morlock.net>,
Sebastien Barre <Sebastien.Barre@utc.fr>,
@@ -596,4 +593,4 @@ Teun Burgers <burgers@ecn.nl>.
=head1 HISTORY
-Last updated: 15 August 2000
+Last updated: 7 November 2000
diff --git a/README.dos b/README.dos
index 3fd5760540..fe649ed344 100644
--- a/README.dos
+++ b/README.dos
@@ -229,8 +229,6 @@ goes under C<($DJDIR)/lib/perl5/pod>.
=head2 Prerequisites
-=over 4
-
For building and installing non-XS modules, all you need is a working
perl under DJGPP. Non-XS modules do not require re-linking the perl
binary, and so are simpler to build and install.
@@ -247,12 +245,8 @@ an XS extension module. In addition, you will have to have built your
perl binary from the source distribution so that all of the components
of the perl binary are available for the required link step.
-=back
-
=head2 Unpacking CPAN Modules
-=over 4
-
First, download the module package from CPAN (e.g., the "Comma Separated
Value" text package, Text-CSV-0.01.tar.gz). Then expand the contents of
the package into some location on your disk. Most CPAN modules are
@@ -278,15 +272,11 @@ to unpack and expand these files. For example:
This will create the new directory C<($DJDIR)/Text-CSV-0.01>, filling
it with the source for this module.
-=back
-
=head2 Building Non-XS Modules
To build a non-XS module, you can use the standard module-building
instructions distributed with perl modules.
-=over 4
-
perl Makefile.PL
make
make test
@@ -296,16 +286,12 @@ This is sufficient because non-XS modules install only ".pm" files and
(sometimes) pod and/or man documentation. No re-linking of the perl
binary is needed to build, install or use non-XS modules.
-=back
-
=head2 Building XS Modules
To build an XS module, you must use the standard module-building
instructions distributed with perl modules *PLUS* three extra
instructions specific to the DJGPP "static link" build environment.
-=over 4
-
set FNCASE=y
perl Makefile.PL
make
@@ -333,8 +319,6 @@ by using the command:
perl -S perldoc perllocal
-=back
-
=head1 AUTHOR
Laszlo Molnar, F<laszlo.molnar@eth.ericsson.se> [Installing/building perl]
diff --git a/README.os2 b/README.os2
index b12ee0bdb7..19af8c519d 100644
--- a/README.os2
+++ b/README.os2
@@ -394,12 +394,12 @@ is considered a bug and should be fixed soon.
=over 4
-=item
+=item *
Did you run your programs with C<-w> switch? See
L<Starting OS/2 (and DOS) programs under Perl>.
-=item
+=item *
Do you try to run I<internal> shell commands, like C<`copy a b`>
(internal for F<cmd.exe>), or C<`glob a*b`> (internal for ksh)? You
@@ -1163,18 +1163,18 @@ eventually).
=over 4
-=item
+=item *
Since L<flock(3)> is present in EMX, but is not functional, it is
emulated by perl. To disable the emulations, set environment variable
C<USE_PERL_FLOCK=0>.
-=item
+=item *
Here is the list of things which may be "broken" on
EMX (from EMX docs):
-=over
+=over 4
=item *
@@ -1205,7 +1205,7 @@ L<waitpid(3)>:
Note that C<kill -9> does not work with the current version of EMX.
-=item
+=item *
Since F<sh.exe> is used for globing (see L<perlfunc/glob>), the bugs
of F<sh.exe> plague perl as well.
@@ -1517,9 +1517,9 @@ cannot test it.
For the details of the current situation with calling external programs,
see L<Starting OS/2 (and DOS) programs under Perl>.
-=over
+=over 4
-=item
+=item *
External scripts may be called by name. Perl will try the same extensions
as when processing B<-S> command-line switch.
@@ -1549,7 +1549,7 @@ preliminary.
Most notable problems:
-=over
+=over 4
=item C<COND_WAIT>
diff --git a/README.win32 b/README.win32
index 8e29accdbb..dc90adac30 100644
--- a/README.win32
+++ b/README.win32
@@ -620,11 +620,11 @@ by C<perl -V>.
=over 4
-Gary Ng E<lt>71564.1743@CompuServe.COME<gt>
+=item Gary Ng E<lt>71564.1743@CompuServe.COME<gt>
-Gurusamy Sarathy E<lt>gsar@activestate.comE<gt>
+=item Gurusamy Sarathy E<lt>gsar@activestate.comE<gt>
-Nick Ing-Simmons E<lt>nick@ni-s.u-net.comE<gt>
+=item Nick Ing-Simmons E<lt>nick@ni-s.u-net.comE<gt>
=back
diff --git a/configure.com b/configure.com
index 8063bb6a8e..05fde810bc 100644
--- a/configure.com
+++ b/configure.com
@@ -2367,8 +2367,8 @@ $ echo "you might, for example, want to build GDBM_File instead of"
$ echo "SDBM_File if you have the GDBM library built on your machine."
$ echo ""
$ echo "Which modules do you want to build into perl?"
-$! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
-$ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread Sys::Hostname"
+$! we need to add Byteloader to this list:
+$ dflt = "re Fcntl Encode Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread Sys::Hostname"
$ IF Using_Dec_C .OR. using_cxx
$ THEN
$ dflt = dflt + " POSIX"
@@ -3476,6 +3476,54 @@ $ tmp = "fcntl"
$ GOSUB inlibc
$ d_fcntl = tmp
$!
+$! Check for fcntl locking capability
+$!
+$ echo4 "Checking if fcntl-based file locking works... "
+$ tmp = "undef"
+$ IF d_fcntl .EQS. "define"
+$ THEN
+$ OS
+$ WS "#include <stdio.h>"
+$ WS "#if defined(__DECC) || defined(__DECCXX)"
+$ WS "#include <stdlib.h>"
+$ WS "#endif"
+$ WS "#include <fcntl.h>"
+$ WS "#include <unistd.h>"
+$ WS "int main() {"
+$ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
+$ WS " struct flock flock;"
+$ WS " int retval, fd;"
+$ WS " fd = open(""try.c"", O_RDONLY);"
+$ WS " flock.l_type = F_RDLCK;"
+$ WS " flock.l_whence = SEEK_SET;"
+$ WS " flock.l_start = flock.l_len = 0;"
+$ WS " retval = fcntl(fd, F_SETLK, &flock);"
+$ WS " close(fd);"
+$ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
+$ WS "#else"
+$ WS " printf(""undef\n"");"
+$ WS "#endif"
+$ WS "}"
+$ CS
+$ GOSUB link_ok
+$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
+$ THEN
+$ GOSUB just_mcr_it
+$ IF tmp .EQS. "define"
+$ THEN
+$ echo4 "Yes, it seems to work."
+$ ELSE
+$ echo4 "Nope, it didn't work."
+$ ENDIF
+$ ELSE
+$ echo4 "I'm unable to compile the test program, so I'll assume not."
+$ tmp = "undef"
+$ ENDIF
+$ ELSE
+$ echo4 "Nope, since you don't even have fcntl()."
+$ ENDIF
+$ d_fcntl_can_lock = tmp
+$!
$! Check for memchr
$!
$ OS
@@ -4753,6 +4801,7 @@ $ WC "d_eunice='undef'"
$ WC "d_fchmod='undef'"
$ WC "d_fchown='undef'"
$ WC "d_fcntl='" + d_fcntl + "'"
+$ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
$ WC "d_fd_set='" + d_fd_set + "'"
$ WC "d_fgetpos='define'"
$ WC "d_flexfnam='define'"
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index db1c426ea1..33ea4db16b 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -146,7 +146,7 @@ XS(Cygwin_cwd)
if(items != 0)
Perl_croak(aTHX_ "Usage: Cwd::cwd()");
- if((cwd = getcwd(NULL, 0))) {
+ if((cwd = getcwd(NULL, -1))) {
ST(0) = sv_2mortal(newSVpv(cwd, 0));
safesysfree(cwd);
XSRETURN(1);
diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs
index e5fc8ae2c9..312f5f84ba 100644
--- a/ext/Devel/Peek/Peek.xs
+++ b/ext/Devel/Peek/Peek.xs
@@ -140,6 +140,7 @@ struct mstats_buffer
void
_fill_mstats(struct mstats_buffer *b, int level)
{
+ dTHX;
b->buffer.nfree = b->buf;
b->buffer.ntotal = b->buf + _NBUCKETS;
b->buffer.bucket_mem_size = b->buf + 2*_NBUCKETS;
@@ -151,6 +152,7 @@ _fill_mstats(struct mstats_buffer *b, int level)
void
fill_mstats(SV *sv, int level)
{
+ dTHX;
int nbuckets;
struct mstats_buffer buf;
@@ -166,6 +168,7 @@ fill_mstats(SV *sv, int level)
void
_mstats_to_hv(HV *hv, struct mstats_buffer *b, int level)
{
+ dTHX;
SV **svp;
int type;
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index 728172a0af..266c9d030f 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -34,6 +34,8 @@ $VERSION = 1.04; # avoid typo warning
require AutoLoader;
*AUTOLOAD = \&AutoLoader::AUTOLOAD;
+use Config;
+
# The following require can't be removed during maintenance
# releases, sadly, because of the risk of buggy code that does
# require Carp; Carp::croak "..."; without brackets dying
@@ -61,14 +63,6 @@ sub dl_load_flags { 0x00 }
# = @Config::Config{'dlext', 'dlsrc'};
EOT
-
-if (!$ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
- print OUT <<EOT;
-use Config;
-
-EOT
-}
-
print OUT " (\$dl_dlext, \$dlsrc) = (",
to_string($Config::Config{'dlext'}), ",",
to_string($Config::Config{'dlsrc'}), ")\n;" ;
@@ -107,8 +101,7 @@ if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
if (!$ENV{PERL_BUILD_EXPAND_ENV_VARS}) {
my $dl_library_path = dquoted_comma_list(@dl_library_path);
print OUT <<EOT;
-# This list has been expanded in Perl build time.
-# (%Config expanded, %ENV not)
+# The below \@dl_library_path has been expanded (%Config) in Perl build time.
\@dl_library_path = ($dl_library_path);
@@ -126,32 +119,38 @@ EOT
}
my $ldlibpthname;
+my $ldlibpthname_defined;
my $pthsep;
if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
- $ldlibpthname = qq('$Config::Config{ldlibpthname}');
- $pthsep = qq('$Config::Config{path_sep}');
+ $ldlibpthname = $Config::Config{ldlibpthname};
+ $ldlibpthname_defined = defined $Config::Config{ldlibpthname} ? 1 : 0;
+ $pthsep = $Config::Config{path_sep};
}
else {
- $ldlibpthname = q($Config::Config{ldlibpthname});
- $pthsep = q($Config::Config{path_sep});
+ $ldlibpthname = q($Config::Config{ldlibpthname});
+ $ldlibpthname_defined = q(defined $Config::Config{ldlibpthname});
+ $pthsep = q($Config::Config{path_sep});
print OUT <<EOT;
-my \$ldlibpthname = $ldlibpthname;
-my \$pthsep = $pthsep;
+my \$ldlibpthname = $ldlibpthname;
+my \$ldlibpthname_defined = $ldlibpthname_defined;
+my \$pthsep = $pthsep;
EOT
}
-
-my $env_dl_library_path = <<EOT;
-if (exists \$ENV{$ldlibpthname} && \$ENV{$ldlibpthname} ne '') {
- push(\@dl_library_path, split(/\$pthsep/, \$ENV{$ldlibpthname}));
+my $env_dl_library_path = <<'EOT';
+if ($ldlibpthname_defined &&
+ exists $ENV{$ldlibpthname}) {
+ push(@dl_library_path, split(/$pthsep/, $ENV{$ldlibpthname}));
}
# E.g. HP-UX supports both its native SHLIB_PATH *and* LD_LIBRARY_PATH.
-if ($ldlibpthname ne 'LD_LIBRARY_PATH' && exists \$ENV{LD_LIBRARY_PATH}) {
- push(\@dl_library_path, split(/\$pthsep/, \$ENV{LD_LIBRARY_PATH}));
+if ($ldlibpthname_defined &&
+ $ldlibpthname ne 'LD_LIBRARY_PATH' &&
+ exists $ENV{LD_LIBRARY_PATH}) {
+ push(@dl_library_path, split(/$pthsep/, $ENV{LD_LIBRARY_PATH}));
}
EOT
@@ -171,8 +170,8 @@ EOT
if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS} && $ENV{PERL_BUILD_EXPAND_ENV_VARS}) {
my $dl_library_path = dquoted_comma_list(@dl_library_path);
print OUT <<EOT;
-# This list has been expanded in Perl build time.
-# (%Config expanded, %ENV expanded)
+# The below \@dl_library_path has been expanded (%Config, %ENV)
+# in Perl build time.
\@dl_library_path = ($dl_library_path);
@@ -265,7 +264,7 @@ sub bootstrap {
croak("Can't locate loadable object for module $module in \@INC (\@INC contains: @INC)")
unless $file; # wording similar to error from 'require'
- $file = uc($file) if $Is_VMS && $Config{d_vms_case_sensitive_symbols};
+ $file = uc($file) if $Is_VMS && $Config::Config{d_vms_case_sensitive_symbols};
my $bootname = "boot_$module";
$bootname =~ s/\W/_/g;
@dl_require_symbols = ($bootname);
@@ -393,7 +392,7 @@ print OUT <<'EOT';
# (this is a more complicated issue than it first appears)
if (m:/: && -d $_) { push(@dirs, $_); next; }
- # VMS: we may be using native VMS directry syntax instead of
+ # VMS: we may be using native VMS directory syntax instead of
# Unix emulation, so check this as well
if ($Is_VMS && /[:>\]]/ && -d $_) { push(@dirs, $_); next; }
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 0666b2af60..9ea60416f6 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -29,6 +29,12 @@ sub process_file {
warn "Cannot open '$file'";
return;
}
+ } elsif ($Config{gccversion} ne '') {
+ # With the -dM option, gcc outputs every #define it finds
+ unless(open(FH,"$Config{cc} -E -dM $file |")) {
+ warn "Cannot open '$file'";
+ return;
+ }
} else {
unless(open(FH,"< $file")) {
# This file could be a temporary file created by cppstdin
@@ -79,6 +85,10 @@ sub get_files {
} elsif ($^O eq 'vmesa') {
# OS/390 C compiler doesn't generate #file or #line directives
$file{'../../vmesa/errno.h'} = 1;
+ } elsif ($^O eq 'linux') {
+ # Some Linuxes have weird errno.hs which generate
+ # no #file or #line directives
+ $file{'/usr/include/errno.h'} = 1;
} else {
open(CPPI,"> errno.c") or
die "Cannot open errno.c";
diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs
index 38062e028b..4a10eb90e3 100644
--- a/ext/IPC/SysV/SysV.xs
+++ b/ext/IPC/SysV/SysV.xs
@@ -203,7 +203,7 @@ ftok(path, id)
key_t k = ftok(path, id);
ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k));
#else
- DIE(PL_no_func, "ftok");
+ DIE(aTHX_ PL_no_func, "ftok");
#endif
int
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c
index 64c75cbb20..d41c770dfb 100644
--- a/ext/SDBM_File/sdbm/sdbm.c
+++ b/ext/SDBM_File/sdbm/sdbm.c
@@ -283,6 +283,10 @@ makroom(register DBM *db, long int hash, int need)
{
long newp;
char twin[PBLKSIZ];
+#if defined(DOSISH) || defined(WIN32)
+ char zer[PBLKSIZ];
+ long oldtail;
+#endif
char *pag = db->pagbuf;
char *New = twin;
register int smax = SPLTMAX;
@@ -305,6 +309,23 @@ makroom(register DBM *db, long int hash, int need)
* still looking at the page of interest. current page is not updated
* here, as sdbm_store will do so, after it inserts the incoming pair.
*/
+
+#if defined(DOSISH) || defined(WIN32)
+ /*
+ * Fill hole with 0 if made it.
+ * (hole is NOT read as 0)
+ */
+ oldtail = lseek(db->pagf, 0L, SEEK_END);
+ memset(zer, 0, PBLKSIZ);
+ while (OFF_PAG(newp) > oldtail) {
+ if (lseek(db->pagf, 0L, SEEK_END) < 0 ||
+ write(db->pagf, zer, PBLKSIZ) < 0) {
+
+ return 0;
+ }
+ oldtail += PBLKSIZ;
+ }
+#endif
if (hash & (db->hmask + 1)) {
if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
|| write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
diff --git a/ext/Storable/ChangeLog b/ext/Storable/ChangeLog
index 6b90c741ea..352e6200fd 100644
--- a/ext/Storable/ChangeLog
+++ b/ext/Storable/ChangeLog
@@ -1,3 +1,14 @@
+Sun Nov 5 18:23:48 MET 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
+
+. Description:
+
+ Version 1.0.6.
+
+ Fixed severe "object lost" bug for STORABLE_freeze returns,
+ when refs to lexicals, taken within the hook, were to be
+ serialized by Storable. Enhanced the t/recurse.t test to
+ stress hook a little more with refs to lexicals.
+
Thu Oct 26 19:14:38 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
. Description:
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm
index 5cd06a00c2..7b46317ac1 100644
--- a/ext/Storable/Storable.pm
+++ b/ext/Storable/Storable.pm
@@ -1,4 +1,4 @@
-;# $Id: Storable.pm,v 1.0.1.5 2000/10/26 17:10:18 ram Exp ram $
+;# $Id: Storable.pm,v 1.0.1.5 2000/10/26 17:10:18 ram Exp $
;#
;# Copyright (c) 1995-2000, Raphael Manfredi
;#
@@ -6,6 +6,9 @@
;# in the README file that comes with the distribution.
;#
;# $Log: Storable.pm,v $
+;# Revision 1.0.1.6 2000/11/05 17:20:25 ram
+;# patch6: increased version number
+;#
;# Revision 1.0.1.5 2000/10/26 17:10:18 ram
;# patch5: documented that store() and retrieve() can return undef
;# patch5: added paragraph explaining the auto require for thaw hooks
@@ -35,7 +38,7 @@ package Storable; @ISA = qw(Exporter DynaLoader);
use AutoLoader;
use vars qw($forgive_me $VERSION);
-$VERSION = '1.005';
+$VERSION = '1.006';
*AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr...
#
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index b4066dc137..f7c810a5f0 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -3,7 +3,7 @@
*/
/*
- * $Id: Storable.xs,v 1.0.1.4 2000/10/26 17:11:04 ram Exp ram $
+ * $Id: Storable.xs,v 1.0.1.4 2000/10/26 17:11:04 ram Exp $
*
* Copyright (c) 1995-2000, Raphael Manfredi
*
@@ -11,6 +11,9 @@
* in the README file that comes with the distribution.
*
* $Log: Storable.xs,v $
+ * Revision 1.0.1.5 2000/11/05 17:21:24 ram
+ * patch6: fixed severe "object lost" bug for STORABLE_freeze returns
+ *
* Revision 1.0.1.4 2000/10/26 17:11:04 ram
* patch5: auto requires module of blessed ref when STORABLE_thaw misses
*
@@ -94,14 +97,21 @@ typedef double NV; /* Older perls lack the NV type */
#endif
#ifdef DEBUGME
-#ifndef DASSERT
-#define DASSERT
-#endif
-#define TRACEME(x) do { PerlIO_stdoutf x; PerlIO_stdoutf("\n"); } while (0)
+/*
+ * TRACEME() will only output things when the $Storable::DEBUGME is true.
+ */
+
+#define TRACEME(x) do { \
+ if (SvTRUE(perl_get_sv("Storable::DEBUGME", TRUE))) \
+ { PerlIO_stdoutf x; PerlIO_stdoutf("\n"); } \
+} while (0)
#else
#define TRACEME(x)
#endif
+#ifndef DASSERT
+#define DASSERT
+#endif
#ifdef DASSERT
#define ASSERT(x,y) do { \
if (!(x)) { \
@@ -242,6 +252,7 @@ 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 */
@@ -953,6 +964,15 @@ static void init_store_context(
*/
cxt->hook = newHV(); /* Table where hooks are cached */
+
+ /*
+ * The `hook_seen' array keeps track of all the SVs returned by
+ * STORABLE_freeze hooks for us to serialize, so that they are not
+ * reclaimed until the end of the serialization process. Each SV is
+ * only stored once, the first time it is seen.
+ */
+
+ cxt->hook_seen = newAV(); /* Lists SVs returned by STORABLE_freeze */
}
/*
@@ -993,6 +1013,9 @@ static void clean_store_context(stcxt_t *cxt)
hv_undef(cxt->hook);
sv_free((SV *) cxt->hook);
+ av_undef(cxt->hook_seen);
+ sv_free((SV *) cxt->hook_seen);
+
cxt->entry = 0;
cxt->s_dirty = 0;
}
@@ -2116,11 +2139,14 @@ static int store_hook(
for (i = 1; i < count; i++) {
SV **svh;
- SV *xsv = ary[i];
+ SV *rsv = ary[i];
+ SV *xsv;
+ AV *av_hook = cxt->hook_seen;
- if (!SvROK(xsv))
- CROAK(("Item #%d from hook in %s is not a reference", i, class));
- xsv = SvRV(xsv); /* Follow ref to know what to look for */
+ if (!SvROK(rsv))
+ CROAK(("Item #%d returned by STORABLE_freeze "
+ "for %s is not a reference", i, class));
+ xsv = SvRV(rsv); /* Follow ref to know what to look for */
/*
* Look in hseen and see if we have a tag already.
@@ -2156,11 +2182,34 @@ static int store_hook(
CROAK(("Could not serialize item #%d from hook in %s", i, class));
/*
- * Replace entry with its tag (not a real SV, so no refcnt increment)
+ * It was the first time we serialized `xsv'.
+ *
+ * Keep this SV alive until the end of the serialization: if we
+ * disposed of it right now by decrementing its refcount, and it was
+ * a temporary value, some next temporary value allocated during
+ * another STORABLE_freeze might take its place, and we'd wrongly
+ * assume that new SV was already serialized, based on its presence
+ * in cxt->hseen.
+ *
+ * Therefore, push it away in cxt->hook_seen.
*/
+ av_store(av_hook, AvFILLp(av_hook)+1, SvREFCNT_inc(xsv));
+
sv_seen:
- SvREFCNT_dec(xsv);
+ /*
+ * Dispose of the REF they returned. If we saved the `xsv' away
+ * in the array of returned SVs, that will not cause the underlying
+ * referenced SV to be reclaimed.
+ */
+
+ ASSERT(SvREFCNT(xsv) > 1, ("SV will survive disposal of its REF"));
+ SvREFCNT_dec(rsv); /* Dispose of reference */
+
+ /*
+ * Replace entry with its tag (not a real SV, so no refcnt increment)
+ */
+
ary[i] = *svh;
TRACEME(("listed object %d at 0x%"UVxf" is tag #%"UVuf,
i-1, PTR2UV(xsv), PTR2UV(*svh)));
diff --git a/hints/cygwin.sh b/hints/cygwin.sh
index 7be173557c..c57d3f6fdf 100644
--- a/hints/cygwin.sh
+++ b/hints/cygwin.sh
@@ -25,6 +25,7 @@ libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
libswanted="$libswanted cygipc"
test -z "$optimize" && optimize='-O2'
+ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
# - otherwise i686-cygwin
archname='cygwin'
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm
index ac1fb4736d..cf98cd7a1c 100644
--- a/lib/Class/Struct.pm
+++ b/lib/Class/Struct.pm
@@ -14,7 +14,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(struct);
-$VERSION = '0.58';
+$VERSION = '0.59';
## Tested on 5.002 and 5.003 without class membership tests:
my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95);
@@ -51,6 +51,16 @@ sub printem {
sub DESTROY { }
}
+sub import {
+ my $self = shift;
+
+ if ( @_ ) {
+ &struct;
+ } else {
+ $self->export_to_level( 1, $self, @EXPORT );
+ }
+}
+
sub struct {
# Determine parameter list structure, one of:
@@ -242,6 +252,10 @@ Class::Struct - declare struct-like datatypes as Perl classes
# declare struct, based on array, implicit class name:
struct( ELEMENT_NAME => ELEMENT_TYPE, ... );
+ # Declare struct at compile time
+ use Class::Struct CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ];
+ use Class::Struct CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... };
+
package Myobj;
use Class::Struct;
@@ -326,6 +340,15 @@ element name will be defined as an accessor method unless a
method by that name is explicitly defined; in the latter case, a
warning is issued if the warning flag (B<-w>) is set.
+=head2 Class Creation at Compile Time
+
+C<Class::Struct> can create your class at compile time. The main reason
+for doing this is obvious, so your class acts like every other class in
+Perl. Creating your class at compile time will make the order of events
+similar to using any other class ( or Perl module ).
+
+There is no significant speed gain between compile time and run time
+class creation, there is just a new, more standard order of events.
=head2 Element Types and Accessor Methods
@@ -525,6 +548,10 @@ struct's constructor.
=head1 Author and Modification History
+Modified by Casey Tweten, 2000-11-08, v0.59.
+
+ Added the ability for compile time class creation.
+
Modified by Damian Conway, 1999-03-05, v0.58.
Added handling of hash-like arg list to class ctor.
diff --git a/lib/File/stat.pm b/lib/File/stat.pm
index 0cf7a0b7aa..be14fbcede 100644
--- a/lib/File/stat.pm
+++ b/lib/File/stat.pm
@@ -20,7 +20,7 @@ use vars @EXPORT_OK;
# Class::Struct forbids use of @ISA
sub import { goto &Exporter::import }
-use Class::Struct qw(struct);
+use Class::Struct;
struct 'File::stat' => [
map { $_ => '$' } qw{
dev ino mode nlink uid gid rdev size
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm
index e7a071ab7f..066e36638b 100644
--- a/lib/Math/Complex.pm
+++ b/lib/Math/Complex.pm
@@ -1414,6 +1414,8 @@ sub stringify_polar {
1;
__END__
+=pod
+
=head1 NAME
Math::Complex - complex numbers and associated mathematical functions
diff --git a/lib/ftp.pl b/lib/ftp.pl
index aa6a489665..3f0af1a8d7 100644
--- a/lib/ftp.pl
+++ b/lib/ftp.pl
@@ -74,7 +74,7 @@
# No longer call die expect on fatal errors. Just return fail codes.
# Changed returns so higher up routines can tell whats happening.
# Get expect/accept in correct order for dir listing.
-# When ftp_show is set then print hashes every 1k transfered (like ftp).
+# When ftp_show is set then print hashes every 1k transferred (like ftp).
# Allow for stripping returns out of incoming data.
# Save last error in a global string.
#
diff --git a/malloc.c b/malloc.c
index fc37cb237d..5d9652e869 100644
--- a/malloc.c
+++ b/malloc.c
@@ -291,7 +291,7 @@
# ifndef warn
# define warn(mess, arg) fprintf(stderr, (mess), (arg))
# endif
-# ifndef warn
+# ifndef warn2
# define warn2(mess, arg1) fprintf(stderr, (mess), (arg1), (arg2))
# endif
# ifdef DEBUG_m
@@ -458,6 +458,11 @@ union overhead {
double strut; /* alignment problems */
#endif
struct {
+/*
+ * Keep the ovu_index and ovu_magic in this order, having a char
+ * field first gives alignment indigestion in some systems, such as
+ * MachTen.
+ */
u_char ovu_index; /* bucket # */
u_char ovu_magic; /* magic number */
#ifdef RCHECK
@@ -855,11 +860,7 @@ static void* get_from_bigger_buckets(int bucket, MEM_SIZE size);
static union overhead *getpages (MEM_SIZE needed, int *nblksp, int bucket);
static int getpages_adjacent(MEM_SIZE require);
-#if defined(PERL_EMERGENCY_SBRK) && defined(PERL_CORE)
-
-# ifndef BIG_SIZE
-# define BIG_SIZE (1<<16) /* 64K */
-# endif
+#ifdef PERL_CORE
#ifdef I_MACH_CTHREADS
# undef MUTEX_LOCK
@@ -911,6 +912,12 @@ static u_int start_slack;
static u_int goodsbrk;
+# ifdef PERL_EMERGENCY_SBRK
+
+# ifndef BIG_SIZE
+# define BIG_SIZE (1<<16) /* 64K */
+# endif
+
static char *emergency_buffer;
static MEM_SIZE emergency_buffer_size;
static int no_mem; /* 0 if the last request for more memory succeeded.
@@ -978,9 +985,10 @@ emergency_sbrk(MEM_SIZE size)
return Nullch;
}
-#else /* !(defined(PERL_EMERGENCY_SBRK) && defined(PERL_CORE)) */
+# else /* !defined(PERL_EMERGENCY_SBRK) */
# define emergency_sbrk(size) -1
-#endif /* !(defined(PERL_EMERGENCY_SBRK) && defined(PERL_CORE)) */
+# endif
+#endif /* ifdef PERL_CORE */
#ifdef DEBUGGING
#undef ASSERT
@@ -1057,6 +1065,9 @@ Perl_malloc(register size_t nbytes)
{
dTHX;
if (!PL_nomemok) {
+#if defined(PLAIN_MALLOC) && defined(NO_FANCY_MALLOC)
+ PerlIO_puts(PerlIO_stderr(),"Out of memory!\n");
+#else
char buff[80];
char *eb = buff + sizeof(buff) - 1;
char *s = eb;
@@ -1079,6 +1090,7 @@ Perl_malloc(register size_t nbytes)
} while (n /= 10);
PerlIO_puts(PerlIO_stderr(),s);
PerlIO_puts(PerlIO_stderr()," bytes!\n");
+#endif /* defined(PLAIN_MALLOC) && defined(NO_FANCY_MALLOC) */
my_exit(1);
}
}
@@ -1386,7 +1398,9 @@ getpages(MEM_SIZE needed, int *nblksp, int bucket)
sbrked_remains = require - needed;
last_op = cp;
}
+#if !defined(PLAIN_MALLOC) && !defined(NO_FANCY_MALLOC)
no_mem = 0;
+#endif
last_sbrk_top = cp + require;
#ifdef DEBUGGING_MSTATS
goodsbrk += require;
diff --git a/mg.c b/mg.c
index bec0a82f72..923915dd01 100644
--- a/mg.c
+++ b/mg.c
@@ -936,11 +936,6 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
cur += len+1;
}
FreeEnvironmentStrings(envv);
-# else
-# ifdef __CYGWIN__
- I32 i;
- for (i = 0; environ[i]; i++)
- safesysfree(environ[i]);
# else
# ifndef PERL_USE_SAFE_PUTENV
I32 i;
@@ -951,7 +946,6 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
for (i = 0; environ[i]; i++)
safesysfree(environ[i]);
# endif /* PERL_USE_SAFE_PUTENV */
-# endif /* __CYGWIN__ */
environ[0] = Nullch;
diff --git a/minimod.pl b/minimod.pl
index 8efbd31ffc..18b9c0748c 100644
--- a/minimod.pl
+++ b/minimod.pl
@@ -59,7 +59,7 @@ sub writemain{
my($mname, $cname);
($mname = $pname) =~ s!/!::!g;
($cname = $pname) =~ s!/!__!g;
- print "EXTERN_C void boot_${cname} (CV* cv);\n";
+ print "EXTERN_C void boot_${cname} (pTHX_ CV* cv);\n";
}
my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s );
diff --git a/patchlevel.h b/patchlevel.h
index 40a88a740a..8532e61f6f 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
- ,"DEVEL7523"
+ ,"DEVEL7612"
,NULL
};
diff --git a/perlio.c b/perlio.c
index 7cd3e09ade..1b5bd76a08 100644
--- a/perlio.c
+++ b/perlio.c
@@ -340,7 +340,7 @@ PerlIO_define_layer(PerlIO_funcs *tab)
{
dTHX;
HV *stash = gv_stashpv("perlio::Layer", TRUE);
- SV *sv = sv_bless(newRV_noinc(newSViv((IV) tab)),stash);
+ SV *sv = sv_bless(newRV_noinc(newSViv(PTR2IV(tab))),stash);
hv_store(PerlIO_layer_hv,tab->name,strlen(tab->name),sv,0);
}
@@ -409,7 +409,7 @@ PerlIO_default_layer(I32 n)
svp = av_fetch(PerlIO_layer_av,n,0);
if (svp && (layer = *svp) && SvROK(layer) && SvIOK((layer = SvRV(layer))))
{
- tab = (PerlIO_funcs *) SvIV(layer);
+ tab = INT2PTR(PerlIO_funcs *, SvIV(layer));
}
/* PerlIO_debug("Layer %d is %s\n",n,tab->name); */
return tab;
@@ -1340,8 +1340,7 @@ PerlIO_funcs PerlIO_stdio = {
#ifdef USE_STDIO_PTR
PerlIOStdio_get_ptr,
PerlIOStdio_get_cnt,
-#if (defined(STDIO_PTR_LVALUE) && \
- (defined(STDIO_CNT_LVALUE) || defined(STDIO_PTR_LVAL_SETS_CNT)))
+#if (defined(STDIO_PTR_LVALUE) && (defined(STDIO_CNT_LVALUE) || defined(STDIO_PTR_LVAL_SETS_CNT)))
PerlIOStdio_set_ptrcnt
#else /* STDIO_PTR_LVALUE */
NULL
diff --git a/pod/buildtoc.PL b/pod/buildtoc.PL
index 90deff4fdc..ff8d33c5d4 100644
--- a/pod/buildtoc.PL
+++ b/pod/buildtoc.PL
@@ -332,7 +332,7 @@ podset( @modules[ sort { $modname[$a] cmp $modname[$b] } 0 .. $#modules ] );
Here should be listed all the extra programs' documentation, but they
don't all have manual pages yet:
- =over
+ =over 4
=item a2p
@@ -385,13 +385,13 @@ sub podset {
}
if (s/^=head1 (.*)/=item $1/) {
unhead2();
- output "=over\n\n" unless $inhead1;
+ output "=over 4\n\n" unless $inhead1;
$inhead1 = 1;
output $_; nl(); next;
}
if (s/^=head2 (.*)/=item $1/) {
unitem();
- output "=over\n\n" unless $inhead2;
+ output "=over 4\n\n" unless $inhead2;
$inhead2 = 1;
output $_; nl(); next;
}
@@ -403,7 +403,7 @@ sub podset {
s/\s+$//;
next if /^[\d.]+$/;
next if $pod eq 'perlmodlib' && /^ftp:/;
- ##print "=over\n\n" unless $initem;
+ ##print "=over 4\n\n" unless $initem;
output ", " if $initem;
$initem = 1;
s/\.$//;
diff --git a/pod/perl.pod b/pod/perl.pod
index 9f3824d96e..97514ee839 100644
--- a/pod/perl.pod
+++ b/pod/perl.pod
@@ -189,7 +189,7 @@ But wait, there's more...
Begun in 1993 (see L<perlhist>), Perl version 5 is nearly a complete
rewrite that provides the following additional benefits:
-=over
+=over 4
=item * modularity and reusability using innumerable modules
diff --git a/pod/perl5004delta.pod b/pod/perl5004delta.pod
index 8cec3aba8a..7151d86963 100644
--- a/pod/perl5004delta.pod
+++ b/pod/perl5004delta.pod
@@ -24,7 +24,10 @@ problems. See the F<Changes> file in the distribution for details.
C<%ENV = ()> and C<%ENV = @list> now work as expected (except on VMS
where it generates a fatal error).
-=head2 "Can't locate Foo.pm in @INC" error now lists @INC
+=head2 Change to "Can't locate Foo.pm in @INC" error
+
+The error "Can't locate Foo.pm in @INC" now lists the contents of @INC
+for easier debugging.
=head2 Compilation option: Binary compatibility with 5.003
@@ -198,7 +201,7 @@ hole was just plugged.
The new restrictions when tainting include:
-=over
+=over 4
=item No glob() or <*>
@@ -258,7 +261,7 @@ the F<INSTALL> file for how to use it.
=head2 New and changed syntax
-=over
+=over 4
=item $coderef->(PARAMS)
@@ -276,7 +279,7 @@ S<C<< $table->{FOO}->($bar) >>>.
=head2 New and changed builtin constants
-=over
+=over 4
=item __PACKAGE__
@@ -289,7 +292,7 @@ into strings.
=head2 New and changed builtin variables
-=over
+=over 4
=item $^E
@@ -322,7 +325,7 @@ there is no C<use English> long name for this variable.
=head2 New and changed builtin functions
-=over
+=over 4
=item delete on slices
@@ -544,7 +547,7 @@ subroutine:
The C<UNIVERSAL> package automatically contains the following methods that
are inherited by all other classes:
-=over
+=over 4
=item isa(CLASS)
@@ -593,7 +596,7 @@ have C<isa> available as a plain subroutine in the current package.
See L<perltie> for other kinds of tie()s.
-=over
+=over 4
=item TIEHANDLE classname, LIST
@@ -687,7 +690,7 @@ install the optional module Devel::Peek.)
Three new compilation flags are recognized by malloc.c. (They have no
effect if perl is compiled with system malloc().)
-=over
+=over 4
=item -DPERL_EMERGENCY_SBRK
@@ -779,7 +782,7 @@ See F<README.amigaos> in the perl distribution.
Six new pragmatic modules exist:
-=over
+=over 4
=item use autouse MODULE => qw(sub1 sub2 sub3)
@@ -979,7 +982,7 @@ those who need trigonometric functions only for real numbers.
There have been quite a few changes made to DB_File. Here are a few of
the highlights:
-=over
+=over 4
=item *
@@ -1045,7 +1048,7 @@ For example, you can now say
=head2 pod2html
-=over
+=over 4
=item Sends converted HTML to standard output
@@ -1058,7 +1061,7 @@ Use the B<--outfile=FILENAME> option to write to a file.
=head2 xsubpp
-=over
+=over 4
=item C<void> XSUBs now default to returning nothing
@@ -1083,7 +1086,7 @@ XSUB's return type is really C<SV *>.
=head1 C Language API Changes
-=over
+=over 4
=item C<gv_fetchmethod> and C<perl_call_sv>
@@ -1124,7 +1127,7 @@ which can be more efficient. See L<perlguts> for details.
Many of the base and library pods were updated. These
new pods are included in section 1:
-=over
+=over 4
=item L<perldelta>
@@ -1177,7 +1180,7 @@ increasing order of desperation):
(X) A very fatal error (nontrappable).
(A) An alien error message (not generated by Perl).
-=over
+=over 4
=item "my" variable %s masks earlier declaration in same scope
diff --git a/pod/perl5005delta.pod b/pod/perl5005delta.pod
index b133c0dd81..d863453680 100644
--- a/pod/perl5005delta.pod
+++ b/pod/perl5005delta.pod
@@ -525,7 +525,7 @@ The hints files for most Unix platforms have seen incremental improvements.
=head2 New Modules
-=over
+=over 4
=item B
@@ -596,7 +596,7 @@ Various pragmata to control behavior of regular expressions.
=head2 Changes in existing modules
-=over
+=over 4
=item Benchmark
@@ -702,7 +702,7 @@ L<perlthrtut> gives a tutorial on threads.
=head1 New Diagnostics
-=over
+=over 4
=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
@@ -916,7 +916,7 @@ fix the problem can be found in L<perllocale/"LOCALE PROBLEMS">.
=head1 Obsolete Diagnostics
-=over
+=over 4
=item Can't mktemp()
diff --git a/pod/perl56delta.pod b/pod/perl56delta.pod
index 9f30314aca..d11f908eac 100644
--- a/pod/perl56delta.pod
+++ b/pod/perl56delta.pod
@@ -786,7 +786,7 @@ regardless of whether or not the array has been used or declared
already. The fatal error has been downgraded to an optional warning:
Possible unintended interpolation of @example in string
-
+
This warns you that C<"fred@example.com"> is going to turn into
C<fred.com> if you don't backslash the C<@>.
See http://www.plover.com/~mjd/perl/at-error.html for more details
@@ -1837,7 +1837,8 @@ run in compile-only mode. Since this is typically not the expected
behavior, END blocks are not executed anymore when the C<-c> switch
is used, or if compilation fails.
-See L<CHECK blocks> for how to run things when the compile phase ends.
+See L</"Support for CHECK blocks"> for how to run things when the compile
+phase ends.
=head2 Potential to leak DATA filehandles
@@ -2782,7 +2783,7 @@ See L<perlguts/"Memory Allocation"> for further information about that.
=head2 Compatible C Source API Changes
-=over
+=over 4
=item C<PATCHLEVEL> is now C<PERL_VERSION>
diff --git a/pod/perldebguts.pod b/pod/perldebguts.pod
index 742423bb67..20cc5460fd 100644
--- a/pod/perldebguts.pod
+++ b/pod/perldebguts.pod
@@ -23,7 +23,7 @@ frame was called with are copied to the @DB::args array. The
general mechanisms is enabled by calling Perl with the B<-d> switch, the
following additional features are enabled (cf. L<perlvar/$^P>):
-=over
+=over 4
=item *
@@ -402,7 +402,7 @@ shorter than 7 chars.
The fields of interest which may appear in the last line are
-=over
+=over 4
=item C<anchored> I<STRING> C<at> I<POS>
@@ -693,7 +693,7 @@ Devel::Peek module.
Here is some explanation of that format:
-=over
+=over 4
=item C<buckets SMALLEST(APPROX)..GREATEST(APPROX)>
@@ -840,7 +840,7 @@ per glob - for glob name, and glob stringification magic.
Here are explanations for other I<Id>s above:
-=over
+=over 4
=item C<717>
@@ -894,7 +894,7 @@ these categories.
If warn() string starts with
-=over
+=over 4
=item C<!!!>
diff --git a/pod/perldebtut.pod b/pod/perldebtut.pod
index 2916897893..ece5848269 100644
--- a/pod/perldebtut.pod
+++ b/pod/perldebtut.pod
@@ -495,7 +495,7 @@ And a print to show what values we're currently using:
DB<1> p $deg, $num
f33.3
-
+
We can put another break point on any line beginning with a colon, we'll use
line 17 as that's just as we come out of the subroutine, and we'd like to
pause there later on:
@@ -538,7 +538,7 @@ it for inspection. In this case though, we simply continue down to line 29:
DB<4> c 29
main::f2c(temp:29): return $c;
-
+
And have a look at the return value:
DB<5> p $c
@@ -616,7 +616,7 @@ the DEBUGGING flag for this one:
floating `'$ at 4..2147483647 (checking floating) stclass `EXACTF <pe>'
anchored(BOL) minlen 4
Omitting $` $& $' support.
-
+
EXECUTING...
Freeing REx: `^pe(a)*rl$'
@@ -656,7 +656,7 @@ script from the command-line, try something like this:
> perl -d my_cgi.pl -nodebug
-Of course 'L<perldoc CGI>' and L<perlfaq9> will tell you more.
+Of course L<CGI> and L<perlfaq9> will tell you more.
=head1 GUIs
diff --git a/pod/perldebug.pod b/pod/perldebug.pod
index faff39b2ab..01f35e1eb4 100644
--- a/pod/perldebug.pod
+++ b/pod/perldebug.pod
@@ -82,7 +82,7 @@ recursively, unlike the real C<print> function in Perl.
See L<Dumpvalue> if you'd like to do this yourself.
The output format is governed by multiple options described under
-L<"Options">.
+L<"Configurable Options">.
=item V [pkg [vars]]
@@ -308,8 +308,8 @@ For historical reasons, the C<=value> is optional, but defaults to
1 only where it is safe to do so--that is, mostly for Boolean
options. It is always better to assign a specific value using C<=>.
The C<option> can be abbreviated, but for clarity probably should
-not be. Several options can be set together. See L<"Options"> for
-a list of these.
+not be. Several options can be set together. See L<"Configurable Options">
+for a list of these.
=item < ?
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 72a2904bca..0597ff653e 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -232,8 +232,6 @@ C<%INC> now localised in a Safe compartment so that use/require work.
The Shell module now has an OO interface.
-=item *
-
=back
=head1 Utility Changes
@@ -726,6 +724,8 @@ winsock handle leak fixed.
=back
+=back
+
=head1 New or Changed Diagnostics
All regular expression compilation error messages are now hopefully
@@ -852,6 +852,8 @@ made in other platforms.
st-store.t and st-retrieve may fail with Compaq C 6.2 on OpenVMS Alpha 7.2.
+=back
+
=head2 Threads Are Still Experimental
Multithreading is still an experimental feature. Some platforms
@@ -881,8 +883,6 @@ The compiler suite is slowly getting better but is nowhere near
working order yet. The backend part that has seen perhaps the most
progress is the bytecode compiler.
-=back
-
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 452938cb7c..2fe63ba744 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -651,6 +651,13 @@ If you're getting this error from a here-document, you may have included
unseen whitespace before or after your closing tag. A good programmer's
editor will have a way to help you find these characters.
+=item Can't find %s property definition %s
+
+(F) You may have tried to use C<\p> which means a Unicode property for
+example \p{Lu} is all uppercase letters. Escape the C<\p>, either
+C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
+possible C<\E>).
+
=item Can't fork
(F) A fatal error occurred while trying to fork while opening a
@@ -1086,7 +1093,7 @@ on I<Mastering Regular Expressions>.)
to check the return value of your socket() call? See
L<perlfunc/connect>.
-=item constant(%s): %s
+=item Constant(%s)%s: %s
(F) The parser found inconsistencies either while attempting to define
an overloaded constant, or when trying to find the character name
@@ -1116,8 +1123,8 @@ workarounds.
=item Copy method did not return a reference
-(F) The method which overloads "=" is buggy. See L<overload/Copy
-Constructor>.
+(F) The method which overloads "=" is buggy. See
+L<overload/Copy Constructor>.
=item CORE::%s is not a keyword
@@ -1660,8 +1667,8 @@ shows in the regular expression about where the problem was discovered.
(W syntax) You've run afoul of the rule that says that any list operator
followed by parentheses turns into a function, with all the list
-operators arguments found inside the parentheses. See L<perlop/Terms
-and List Operators (Leftward)>.
+operators arguments found inside the parentheses. See
+L<perlop/Terms and List Operators (Leftward)>.
=item Invalid %s attribute: %s
@@ -3242,7 +3249,7 @@ will deny it.
The function indicated isn't implemented on this architecture, according
to the probings of Configure.
-=item The stat preceding C<-l _> wasn't an lstat
+=item The stat preceding %s wasn't an lstat
(F) It makes no sense to test the current stat buffer for symbolic
linkhood if the last stat that wrote to the stat buffer already went
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 1787e4b2eb..6e3db32b96 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -37,25 +37,25 @@ Read on...
=over 5
-L<Compiling your C program>
+=item Compiling your C program
-L<Adding a Perl interpreter to your C program>
+=item Adding a Perl interpreter to your C program
-L<Calling a Perl subroutine from your C program>
+=item Calling a Perl subroutine from your C program
-L<Evaluating a Perl statement from your C program>
+=item Evaluating a Perl statement from your C program
-L<Performing Perl pattern matches and substitutions from your C program>
+=item Performing Perl pattern matches and substitutions from your C program
-L<Fiddling with the Perl stack from your C program>
+=item Fiddling with the Perl stack from your C program
-L<Maintaining a persistent interpreter>
+=item Maintaining a persistent interpreter
-L<Maintaining multiple interpreter instances>
+=item Maintaining multiple interpreter instances
-L<Using Perl modules, which themselves use C libraries, from your C program>
+=item Using Perl modules, which themselves use C libraries, from your C program
-L<Embedding Perl under Win32>
+=item Embedding Perl under Win32
=back
@@ -258,9 +258,8 @@ and package C<END {}> blocks.
If you want to pass arguments to the Perl subroutine, you can add
strings to the C<NULL>-terminated C<args> list passed to
I<call_argv>. For other data types, or to examine return values,
-you'll need to manipulate the Perl stack. That's demonstrated in the
-last section of this document: L<Fiddling with the Perl stack from
-your C program>.
+you'll need to manipulate the Perl stack. That's demonstrated in
+L<Fiddling with the Perl stack from your C program>.
=head2 Evaluating a Perl statement from your C program
@@ -948,7 +947,7 @@ B<ExtUtils::Embed> can also automate writing the I<xs_init> glue code.
Consult L<perlxs>, L<perlguts>, and L<perlapi> for more details.
-=head1 Embedding Perl under Windows
+=head1 Embedding Perl under Win32
In general, all of the source code shown here should work unmodified under
Windows.
diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod
index ffa4a1756f..d350f6038a 100644
--- a/pod/perlfaq.pod
+++ b/pod/perlfaq.pod
@@ -6,7 +6,7 @@ perlfaq - frequently asked questions about Perl ($Date: 1999/05/23 20:38:02 $)
This document is structured into the following sections:
-=over
+=over 4
=item perlfaq: Structural overview of the FAQ.
diff --git a/pod/perlfaq1.pod b/pod/perlfaq1.pod
index af2ac87af8..a81d7045f6 100644
--- a/pod/perlfaq1.pod
+++ b/pod/perlfaq1.pod
@@ -78,8 +78,8 @@ The 5.0 release is, essentially, a ground-up rewrite of the original
perl source code from releases 1 through 4. It has been modularized,
object-oriented, tweaked, trimmed, and optimized until it almost doesn't
look like the old code. However, the interface is mostly the same, and
-compatibility with previous releases is very high. See L<perltrap/"Perl4
-to Perl5 Traps">.
+compatibility with previous releases is very high.
+See L<perltrap/"Perl4 to Perl5 Traps">.
To avoid the "what language is perl5?" confusion, some people prefer to
simply use "perl" to refer to the latest version of perl and avoid using
diff --git a/pod/perlfaq2.pod b/pod/perlfaq2.pod
index 62aa5dd7fd..f438baa620 100644
--- a/pod/perlfaq2.pod
+++ b/pod/perlfaq2.pod
@@ -80,8 +80,8 @@ part of the output of
% perl -V
-You might also want to check out L<perlfaq8/"How do I keep my own
-module/library directory?">.
+You might also want to check out
+L<perlfaq8/"How do I keep my own module/library directory?">.
=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
@@ -247,7 +247,7 @@ useful. Your mileage may (but, we hope, probably won't) vary.
Recommended books on (or mostly on) Perl follow.
-=over
+=over 4
=item References
diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod
index 94e478abd2..e4ad3fa372 100644
--- a/pod/perlfaq5.pod
+++ b/pod/perlfaq5.pod
@@ -294,8 +294,8 @@ pair to make it easy to sort the hash in insertion order.
}
For passing filehandles to functions, the easiest way is to
-preface them with a star, as in func(*STDIN). See L<perlfaq7/"Passing
-Filehandles"> for details.
+preface them with a star, as in func(*STDIN).
+See L<perlfaq7/"Passing Filehandles"> for details.
If you want to create many anonymous handles, you should check out the
Symbol, FileHandle, or IO::Handle (etc.) modules. Here's the equivalent
@@ -675,8 +675,8 @@ for your own system's idiosyncrasies (sometimes called "features").
Slavish adherence to portability concerns shouldn't get in the way of
your getting your job done.)
-For more information on file locking, see also L<perlopentut/"File
-Locking"> if you have it (new for 5.6).
+For more information on file locking, see also
+L<perlopentut/"File Locking"> if you have it (new for 5.6).
=back
diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod
index 8040f192b2..9e559f7d0e 100644
--- a/pod/perlfaq7.pod
+++ b/pod/perlfaq7.pod
@@ -560,8 +560,8 @@ In summary, local() doesn't make what you think of as private, local
variables. It gives a global variable a temporary value. my() is
what you're looking for if you want private variables.
-See L<perlsub/"Private Variables via my()"> and L<perlsub/"Temporary
-Values via local()"> for excruciating details.
+See L<perlsub/"Private Variables via my()"> and
+L<perlsub/"Temporary Values via local()"> for excruciating details.
=head2 How can I access a dynamic variable while a similarly named lexical is in scope?
diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod
index 1f8a72bfdf..d806ed67e7 100644
--- a/pod/perlfaq8.pod
+++ b/pod/perlfaq8.pod
@@ -571,9 +571,9 @@ scripts inherently insecure. Perl gives you a number of options
The IPC::Open2 module (part of the standard perl distribution) is an
easy-to-use approach that internally uses pipe(), fork(), and exec() to do
the job. Make sure you read the deadlock warnings in its documentation,
-though (see L<IPC::Open2>). See L<perlipc/"Bidirectional Communication
-with Another Process"> and L<perlipc/"Bidirectional Communication with
-Yourself">
+though (see L<IPC::Open2>). See
+L<perlipc/"Bidirectional Communication with Another Process"> and
+L<perlipc/"Bidirectional Communication with Yourself">
You may also use the IPC::Open3 module (part of the standard perl
distribution), but be warned that it has a different order of
diff --git a/pod/perlfilter.pod b/pod/perlfilter.pod
index c3c83153ad..4327809ec9 100644
--- a/pod/perlfilter.pod
+++ b/pod/perlfilter.pod
@@ -2,7 +2,6 @@
perlfilter - Source Filters
-
=head1 DESCRIPTION
This article is about a little-known feature of Perl called
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c502bf7b39..558ae4edd1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -91,7 +91,7 @@ functions, like some keywords and named operators)
arranged by category. Some functions appear in more
than one place.
-=over
+=over 4
=item Functions for SCALARs or strings
@@ -2348,8 +2348,8 @@ it succeeded, false otherwise. See the example in L<perlipc/"Sockets: Client/Se
=item local EXPR
You really probably want to be using C<my> instead, because C<local> isn't
-what most people think of as "local". See L<perlsub/"Private Variables
-via my()"> for details.
+what most people think of as "local". See
+L<perlsub/"Private Variables via my()"> for details.
A local modifies the listed variables to be local to the enclosing
block, file, or eval. If more than one value is listed, the list must
@@ -4265,9 +4265,9 @@ Examples:
If you're using strict, you I<must not> declare $a
and $b as lexicals. They are package globals. That means
if you're in the C<main> package and type
-
+
@articles = sort {$b <=> $a} @files;
-
+
then C<$a> and C<$b> are C<$main::a> and C<$main::b> (or C<$::a> and C<$::b>),
but if you're in the C<FooPack> package, it's the same as typing
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 4d62774477..c069e8801c 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1088,7 +1088,7 @@ an C<ENTER>/C<LEAVE> pair.
Inside such a I<pseudo-block> the following service is available:
-=over
+=over 4
=item C<SAVEINT(int i)>
@@ -1161,7 +1161,7 @@ provide pointers to the modifiable data explicitly (either C pointers,
or Perlish C<GV *>s). Where the above macros take C<int>, a similar
function takes C<int *>.
-=over
+=over 4
=item C<SV* save_scalar(GV *gv)>
diff --git a/pod/perlhack.pod b/pod/perlhack.pod
index 3abc1f7266..4a232ef686 100644
--- a/pod/perlhack.pod
+++ b/pod/perlhack.pod
@@ -194,6 +194,8 @@ around. It refers to the standard distribution. ``Hacking on the
core'' means you're changing the C source code to the Perl
interpreter. ``A core module'' is one that ships with Perl.
+=head2 Keeping in sync
+
The source code to the Perl interpreter, in its different versions, is
kept in a repository managed by a revision control system (which is
currently the Perforce program, see http://perforce.com/). The
@@ -206,20 +208,256 @@ public release are available at this location:
ftp://ftp.linux.activestate.com/pub/staff/gsar/APC/
-Selective parts are also visible via the rsync protocol. To get all
-the individual changes to the mainline since the last development
-release, use the following command:
-
- rsync -avz rsync://ftp.linux.activestate.com/perl-diffs perl-diffs
-
-Use this to get the latest source tree in full:
-
- rsync -avz rsync://ftp.linux.activestate.com/perl-current perl-current
+If you are a member of the perl5-porters mailing list, it is a good
+thing to keep in touch with the most recent changes. If not only to
+verify if what you would have posted as a bug report isn't already
+solved in the most recent available perl development branch, also
+known as perl-current, bleading edge perl, bleedperl or bleadperl.
Needless to say, the source code in perl-current is usually in a perpetual
state of evolution. You should expect it to be very buggy. Do B<not> use
it for any purpose other than testing and development.
+Keeping in sync with the most recent branch can be done in several ways,
+but the most convenient and reliable way is using B<rsync>, available at
+ftp://rsync.samba.org/pub/rsync/ . (You can also get the most recent
+branch by FTP.)
+
+If you choose to keep in sync using rsync, there are two approaches
+to doing so:
+
+=over 4
+
+=item rsync'ing the source tree
+
+Presuming you are in the directory where your perl source resides
+and you have rsync installed and available, you can `upgrade' to
+the bleadperl using:
+
+ # rsync -avz rsync://ftp.linux.activestate.com/perl-current/ .
+
+This takes care of updating every single item in the source tree to
+the latest applied patch level, creating files that are new (to your
+distribution) and setting date/time stamps of existing files to
+reflect the bleadperl status.
+
+You can than check what patch was the latest that was applied by
+looking in the file B<.patch>, which will show the number of the
+latest patch.
+
+If you have more than one machine to keep in sync, and not all of
+them have access to the WAN (so you are not able to rsync all the
+source trees to the real source), there are some ways to get around
+this problem.
+
+=over 4
+
+=item Using rsync over the LAN
+
+Set up a local rsync server which makes the rsynced source tree
+available to the LAN and sync the other machines against this
+directory.
+
+From http://rsync.samba.org/README.html:
+
+ "Rsync uses rsh or ssh for communication. It does not need to be
+ setuid and requires no special privileges for installation. It
+ does not require a inetd entry or a deamon. You must, however,
+ have a working rsh or ssh system. Using ssh is recommended for
+ its security features."
+
+=item Using pushing over the NFS
+
+Having the other systems mounted over the NFS, you can take an
+active pushing approach by checking the just updated tree against
+the other not-yet synced trees. An example would be
+
+ #!/usr/bin/perl -w
+
+ use strict;
+ use File::Copy;
+
+ my %MF = map {
+ m/(\S+)/;
+ $1 => [ (stat $1)[2, 7, 9] ]; # mode, size, mtime
+ } `cat MANIFEST`;
+
+ my %remote = map { $_ => "/$_/pro/3gl/CPAN/perl-5.7.1" } qw(host1 host2);
+
+ foreach my $host (keys %remote) {
+ unless (-d $remote{$host}) {
+ print STDERR "Cannot Xsync for host $host\n";
+ next;
+ }
+ foreach my $file (keys %MF) {
+ my $rfile = "$remote{$host}/$file";
+ my ($mode, $size, $mtime) = (stat $rfile)[2, 7, 9];
+ defined $size or ($mode, $size, $mtime) = (0, 0, 0);
+ $size == $MF{$file}[1] && $mtime == $MF{$file}[2] and next;
+ printf "%4s %-34s %8d %9d %8d %9d\n",
+ $host, $file, $MF{$file}[1], $MF{$file}[2], $size, $mtime;
+ unlink $rfile;
+ copy ($file, $rfile);
+ utime time, $MF{$file}[2], $rfile;
+ chmod $MF{$file}[0], $rfile;
+ }
+ }
+
+though this is not perfect. It could be improved with checking
+file checksums before updating. Not all NFS systems support
+reliable utime support (when used over the NFS).
+
+=back
+
+=item rsync'ing the patches
+
+The source tree is maintained by the pumpking who applies patches to
+the files in the tree. These patches are either created by the
+pumpking himself using C<diff -c> after updating the file manually or
+by applying patches sent in by posters on the perl5-porters list.
+These patches are also saved and rsync'able, so you can apply them
+yourself to the source files.
+
+Presuming you are in a directory where your patches reside, you can
+get them in sync with
+
+ # rsync -avz rsync://ftp.linux.activestate.com/perl-current-diffs/ .
+
+This makes sure the latest available patch is downloaded to your
+patch directory.
+
+It's then up to you to apply these patches, using something like
+
+ # last=`ls -rt1 *.gz | tail -1`
+ # rsync -avz rsync://ftp.linux.activestate.com/perl-current-diffs/ .
+ # find . -name '*.gz' -newer $last -exec gzcat {} \; >blead.patch
+ # cd ../perl-current
+ # patch -p1 -N <../perl-current-diffs/blead.patch
+
+or, since this is only a hint towards how it works, use CPAN-patchaperl
+from Andreas König to have better control over the patching process.
+
+=back
+
+=head2 Why rsync the source tree
+
+=over 4
+
+=item It's easier
+
+Since you don't have to apply the patches yourself, you are sure all
+files in the source tree are in the right state.
+
+=item It's more recent
+
+According to Gurusamy Sarathy:
+
+ "... The rsync mirror is automatic and syncs with the repository
+ every five minutes.
+
+ "Updating the patch area still requires manual intervention
+ (with all the goofiness that implies, which you've noted) and
+ is typically on a daily cycle. Making this process automatic
+ is on my tuit list, but don't ask me when."
+
+=item It's more reliable
+
+Well, since the patches are updated by hand, I don't have to say any
+more ... (see Sarathy's remark).
+
+=back
+
+=head2 Why rsync the patches
+
+=over 4
+
+=item It's easier
+
+If you have more than one machine that you want to keep in track with
+bleadperl, it's easier to rsync the patches only once and then apply
+them to all the source trees on the different machines.
+
+In case you try to keep in pace on 5 different machines, for which
+only one of them has access to the WAN, rsync'ing all the source
+trees should than be done 5 times over the NFS. Having
+rsync'ed the patches only once, I can apply them to all the source
+trees automatically. Need you say more ;-)
+
+=item It's a good reference
+
+If you do not only like to have the most recent development branch,
+but also like to B<fix> bugs, or extend features, you want to dive
+into the sources. If you are a seasoned perl core diver, you don't
+need no manuals, tips, roadmaps, perlguts.pod or other aids to find
+your way around. But if you are a starter, the patches may help you
+in finding where you should start and how to change the bits that
+bug you.
+
+The file B<Changes> is updated on occasions the pumpking sees as his
+own little sync points. On those occasions, he releases a tar-ball of
+the current source tree (i.e. perl@7582.tar.gz), which will be an
+excellent point to start with when choosing to use the 'rsync the
+patches' scheme. Starting with perl@7582, which means a set of source
+files on which the latest applied patch is number 7582, you apply all
+succeeding patches available from than on (7583, 7584, ...).
+
+You can use the patches later as a kind of search archive.
+
+=over 4
+
+=item Finding a start point
+
+If you want to fix/change the behaviour of function/feature Foo, just
+scan the patches for patches that mention Foo either in the subject,
+the comments, or the body of the fix. A good chance the patch shows
+you the files that are affected by that patch which are very likely
+to be the starting point of your journey into the guts of perl.
+
+=item Finding how to fix a bug
+
+If you've found I<where> the function/feature Foo misbehaves, but you
+don't know how to fix it (but you do know the change you want to
+make), you can, again, peruse the patches for similar changes and
+look how others apply the fix.
+
+=item Finding the source of misbehaviour
+
+When you keep in sync with bleadperl, the pumpking would love to
+I<see> that the community efforts realy work. So after each of his
+sync points, you are to 'make test' to check if everything is still
+in working order. If it is, you do 'make ok', which will send an OK
+report to perlbug@perl.org. (If you do not have access to a mailer
+from the system you just finished successfully 'make test', you can
+do 'make okfile', which creates the file C<perl.ok>, which you can
+than take to your favourite mailer and mail yourself).
+
+But of course, as always, things will not allways lead to a success
+path, and one or more test do not pass the 'make test'. Before
+sending in a bug report (using 'make nok' or 'make nokfile'), check
+the mailing list if someone else has reported the bug already and if
+so, confirm it by replying to that message. If not, you might want to
+trace the source of that misbehaviour B<before> sending in the bug,
+which will help all the other porters in finding the solution.
+
+Here the saved patches come in very handy. You can check the list of
+patches to see which patch changed what file and what change caused
+the misbehaviour. If you note that in the bug report, it saves the
+one trying to solve it, looking for that point.
+
+=back
+
+If searching the patches is too bothersome, you might consider using
+perl's bugtron to find more information about discussions and
+ramblings on posted bugs.
+
+=back
+
+If you want to get the best of both worlds, rsync both the source
+tree for convenience, reliability and ease and rsync the patches
+for reference.
+
+=head2 Submitting patches
+
Always submit patches to I<perl5-porters@perl.org>. This lets other
porters review your patch, which catches a surprising number of errors
in patches. Either use the diff program (available in source code
@@ -827,7 +1065,7 @@ the tied C<push> is implemented; see C<av_push> in F<av.c>:
7 call_method("PUSH", G_SCALAR|G_DISCARD);
8 LEAVE;
9 POPSTACK;
-
+
The lines which concern the mark stack are the first, fifth and last
lines: they save away, restore and remove the current position of the
argument stack.
@@ -950,7 +1188,7 @@ useful options are probably
Some of the functionality of the debugging code can be achieved using XS
modules.
-
+
-Dr => use re 'debug'
-Dx => use O 'Debug'
@@ -1012,7 +1250,7 @@ Run until the next breakpoint.
Run until the end of the current function, then stop again.
-=item
+=item 'enter'
Just pressing Enter will do the most recent operation again - it's a
blessing when stepping through miles of source code.
@@ -1256,7 +1494,7 @@ this text in the description of C<pack>:
All done. Now let's create the patch. F<Porting/patching.pod> tells us
that if we're making major changes, we should copy the entire directory
to somewhere safe before we begin fiddling, and then do
-
+
diff -ruN old new > patch
However, we know which files we've changed, and we can simply do this:
@@ -1454,6 +1692,12 @@ working on and the changes they're making.
=item *
+Do read the README associated with your operating system, e.g. README.aix
+on the IBM AIX OS. Don't hesitate to supply patches to that README if
+you find anything missing or changed over a new OS release.
+
+=item *
+
Find an area of Perl that seems interesting to you, and see if you can
work out how it works. Scan through the source, and step over it in the
debugger. Play, poke, investigate, fiddle! You'll probably get to
diff --git a/pod/perlhist.pod b/pod/perlhist.pod
index 2aa928cc2f..f5a96020ed 100644
--- a/pod/perlhist.pod
+++ b/pod/perlhist.pod
@@ -1,5 +1,3 @@
-=pod
-
=head1 NAME
perlhist - the Perl history records
diff --git a/pod/perlipc.pod b/pod/perlipc.pod
index 94b6bdec9b..758f3030df 100644
--- a/pod/perlipc.pod
+++ b/pod/perlipc.pod
@@ -952,7 +952,7 @@ looks like this:
Here are what those parameters to the C<new> constructor mean:
-=over
+=over 4
=item C<Proto>
@@ -1147,7 +1147,7 @@ does nothing but listen on a particular port for incoming connections.
It does this by calling the C<< IO::Socket::INET->new() >> method with
slightly different arguments than the client did.
-=over
+=over 4
=item Proto
diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod
index 3dd3ba977a..b98e3332e4 100644
--- a/pod/perllexwarn.pod
+++ b/pod/perllexwarn.pod
@@ -468,7 +468,7 @@ Consider this example:
bless [], $class ;
}
-
+
1 ;
The code below makes use of both modules, but it only enables warnings from
diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index 3d9a58a007..fb93792fdc 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -124,8 +124,8 @@ B<The POSIX date formatting function> (strftime()) uses C<LC_TIME>.
=back
-C<LC_COLLATE>, C<LC_CTYPE>, and so on, are discussed further in L<LOCALE
-CATEGORIES>.
+C<LC_COLLATE>, C<LC_CTYPE>, and so on, are discussed further in
+L<LOCALE CATEGORIES>.
The default behavior is restored with the S<C<no locale>> pragma, or
upon reaching the end of block enclosing C<use locale>.
@@ -348,8 +348,8 @@ commands. You may see things like "en_US.ISO8859-1", but that isn't
the same. In this case, try running under a locale
that you can list and which somehow matches what you tried. The
rules for matching locale names are a bit vague because
-standardization is weak in this area. See again the L<Finding
-locales> about general rules.
+standardization is weak in this area. See again the
+L<Finding locales> about general rules.
=head2 Fixing system locale configuration
@@ -580,11 +580,12 @@ The C standard defines the C<LC_MONETARY> category, but no function
that is affected by its contents. (Those with experience of standards
committees will recognize that the working group decided to punt on the
issue.) Consequently, Perl takes no notice of it. If you really want
-to use C<LC_MONETARY>, you can query its contents--see L<The localeconv
-function>--and use the information that it returns in your application's
-own formatting of currency amounts. However, you may well find that
-the information, voluminous and complex though it may be, still does not
-quite meet your requirements: currency formatting is a hard nut to crack.
+to use C<LC_MONETARY>, you can query its contents--see
+L<The localeconv function>--and use the information that it returns in your
+application's own formatting of currency amounts. However, you may well
+find that the information, voluminous and complex though it may be, still
+does not quite meet your requirements: currency formatting is a hard nut
+to crack.
=head2 LC_TIME
diff --git a/pod/perlmodlib.pod b/pod/perlmodlib.pod
index f37279d90a..c5afea214e 100644
--- a/pod/perlmodlib.pod
+++ b/pod/perlmodlib.pod
@@ -98,10 +98,6 @@ Compute arithmetic in integer instead of double
Request less of something from the compiler
-=item lib
-
-Manipulate @INC at compile time
-
=item locale
Use and avoid POSIX locales for built-in operations
@@ -146,6 +142,10 @@ Predeclare global variable names (obsolete)
Control optional warnings
+=item warnings::register
+
+Warnings import function
+
=back
=head2 Standard Modules
@@ -220,6 +220,10 @@ Show lexical variables used in functions or files
Helper module for CC backend
+=item B::Stash
+
+Show what stashes are loaded
+
=item B::Terse
Walk Perl syntax tree, printing terse info about ops
@@ -316,6 +320,10 @@ Supply object methods for directory handles
Provides screen dump of Perl data.
+=item Encode
+
+Character encodings
+
=item English
Use nice English (or awk) names for ugly punctuation variables
@@ -572,6 +580,10 @@ Module to convert pod files to HTML
Objects representing POD input paragraphs, commands, etc.
+=item Pod::LaTeX
+
+Convert Pod data to formatted Latex
+
=item Pod::Man
Convert POD data to formatted *roff input
@@ -636,6 +648,10 @@ Run shell commands transparently within perl
Load the C socket.h defines and structure manipulators
+=item Storable
+
+Persistency for perl data structures
+
=item Symbol
Manipulate Perl symbols and their names
@@ -775,7 +791,7 @@ Most importantly, CPAN includes around a thousand unbundled modules,
some of which require a C compiler to build. Major categories of
modules are:
-=over
+=over 4
=item *
Language Extensions and Documentation Tools
@@ -845,7 +861,7 @@ Miscellaneous Modules
Registered CPAN sites as of this writing include the following.
You should try to choose one close to you:
-=over
+=over 4
=item Africa
diff --git a/pod/perlnumber.pod b/pod/perlnumber.pod
index d179d8c74a..44d921cfe6 100644
--- a/pod/perlnumber.pod
+++ b/pod/perlnumber.pod
@@ -91,7 +91,7 @@ Six such conversions are possible:
These conversions are governed by the following general rules:
-=over
+=over 4
=item *
@@ -141,7 +141,7 @@ argument as in modular arithmetic, e.g., C<mod 2**32> on a 32-bit
architecture. C<sprintf "%u", -1> therefore provides the same result as
C<sprintf "%u", ~0>.
-=over
+=over 4
=item Arithmetic operators except, C<no integer>
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 69c8c69337..70fef4565b 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -798,7 +798,7 @@ the trailing delimiter. This avoids expensive run-time recompilations,
and is useful when the value you are interpolating won't change over
the life of the script. However, mentioning C</o> constitutes a promise
that you won't change the variables in the pattern. If you change them,
-Perl won't even notice. See also L<"qr//">.
+Perl won't even notice. See also L<"qr/STRING/imosx">.
If the PATTERN evaluates to the empty string, the last
I<successfully> matched regular expression is used instead.
@@ -1338,7 +1338,7 @@ their results are the same, we consider them individually. For different
quoting constructs, Perl performs different numbers of passes, from
one to five, but these passes are always performed in the same order.
-=over
+=over 4
=item Finding the end
@@ -1392,7 +1392,7 @@ used in parsing.
The next step is interpolation in the text obtained, which is now
delimiter-independent. There are four different cases.
-=over
+=over 4
=item C<<<'EOF'>, C<m''>, C<s'''>, C<tr///>, C<y///>
@@ -1842,8 +1842,8 @@ integer>, if you take the C<sqrt(2)>, you'll still get C<1.4142135623731>
or so.
Used on numbers, the bitwise operators ("&", "|", "^", "~", "<<",
-and ">>") always produce integral results. (But see also L<Bitwise
-String Operators>.) However, C<use integer> still has meaning for
+and ">>") always produce integral results. (But see also
+L<Bitwise String Operators>.) However, C<use integer> still has meaning for
them. By default, their results are interpreted as unsigned integers, but
if C<use integer> is in effect, their results are interpreted
as signed integers. For example, C<~0> usually evaluates to a large
diff --git a/pod/perlopentut.pod b/pod/perlopentut.pod
index 5d2d48e7f1..b4003f4f2e 100644
--- a/pod/perlopentut.pod
+++ b/pod/perlopentut.pod
@@ -73,8 +73,8 @@ from a different file, and forget to trim it before opening:
This is not a bug, but a feature. Because C<open> mimics the shell in
its style of using redirection arrows to specify how to open the file, it
also does so with respect to extra white space around the filename itself
-as well. For accessing files with naughty names, see L<"Dispelling
-the Dweomer">.
+as well. For accessing files with naughty names, see
+L<"Dispelling the Dweomer">.
=head2 Pipe Opens
@@ -107,13 +107,13 @@ In most systems, such an C<open> will not return an error. That's
because in the traditional C<fork>/C<exec> model, running the other
program happens only in the forked child process, which means that
the failed C<exec> can't be reflected in the return value of C<open>.
-Only a failed C<fork> shows up there. See L<perlfaq8/"Why doesn't open()
-return an error when a pipe open fails?"> to see how to cope with this.
-There's also an explanation in L<perlipc>.
+Only a failed C<fork> shows up there. See
+L<perlfaq8/"Why doesn't open() return an error when a pipe open fails?">
+to see how to cope with this. There's also an explanation in L<perlipc>.
If you would like to open a bidirectional pipe, the IPC::Open2
-library will handle this for you. Check out L<perlipc/"Bidirectional
-Communication with Another Process">
+library will handle this for you. Check out
+L<perlipc/"Bidirectional Communication with Another Process">
=head2 The Minus File
@@ -126,8 +126,8 @@ access the standard output.
If minus can be used as the default input or default output, what happens
if you open a pipe into or out of minus? What's the default command it
would run? The same script as you're currently running! This is actually
-a stealth C<fork> hidden inside an C<open> call. See L<perlipc/"Safe Pipe
-Opens"> for details.
+a stealth C<fork> hidden inside an C<open> call. See
+L<perlipc/"Safe Pipe Opens"> for details.
=head2 Mixing Reads and Writes
@@ -684,9 +684,9 @@ also some high-level modules on CPAN that can help you with these games.
Check out Term::ReadKey and Term::ReadLine.
What else can you open? To open a connection using sockets, you won't use
-one of Perl's two open functions. See L<perlipc/"Sockets: Client/Server
-Communication"> for that. Here's an example. Once you have it,
-you can use FH as a bidirectional filehandle.
+one of Perl's two open functions. See
+L<perlipc/"Sockets: Client/Server Communication"> for that. Here's an
+example. Once you have it, you can use FH as a bidirectional filehandle.
use IO::Socket;
local *FH = IO::Socket::INET->new("www.perl.com:80");
diff --git a/pod/perlport.pod b/pod/perlport.pod
index d1887bfbc8..1078e58bf3 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -334,7 +334,10 @@ operating systems put mandatory locks on such files.
Don't count on a specific environment variable existing in C<%ENV>.
Don't count on C<%ENV> entries being case-sensitive, or even
-case-preserving.
+case-preserving. Don't try to clear %ENV by saying C<%ENV = ();>, or,
+if you really have to, make it conditional on C<$^O ne 'VMS'> since in
+VMS the C<%ENV> table is much more than a per-process key-value string
+table.
Don't count on signals or C<%SIG> for anything.
@@ -683,7 +686,7 @@ The ActiveState Pages, http://www.activestate.com/
=item *
The Cygwin environment for Win32; F<README.cygwin> (installed
-as L<perlcygwin>), http://sources.redhat.com/cygwin/
+as L<perlcygwin>), http://www.cygwin.com/
=item *
@@ -1210,7 +1213,7 @@ A free perl5-based PERL.NLM for Novell Netware is available in
precompiled binary and source code form from http://www.novell.com/
as well as from CPAN.
-=item
+=item *
Plan 9, F<README.plan9>
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 380bc5f1f3..8a85241eb5 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -1129,7 +1129,7 @@ one match at a given position is possible. This section describes the
notion of better/worse for combining operators. In the description
below C<S> and C<T> are regular subexpressions.
-=over
+=over 4
=item C<ST>
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 997631674f..ae128ceb59 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -169,8 +169,8 @@ Do not, however, be tempted to do this:
Like the flattened incoming parameter list, the return list is also
flattened on return. So all you have managed to do here is stored
-everything in C<@a> and made C<@b> an empty list. See L<Pass by
-Reference> for alternatives.
+everything in C<@a> and made C<@b> an empty list. See
+L<Pass by Reference> for alternatives.
A subroutine may be called using an explicit C<&> prefix. The
C<&> is optional in modern Perl, as are parentheses if the
@@ -697,7 +697,7 @@ Despite the existence of C<my>, there are still three places where the
C<local> operator still shines. In fact, in these three places, you
I<must> use C<local> instead of C<my>.
-=over
+=over 4
=item 1. You need to give a global variable a temporary value, especially $_.
diff --git a/pod/perltie.pod b/pod/perltie.pod
index 1a5896515f..0c55c6a4d5 100644
--- a/pod/perltie.pod
+++ b/pod/perltie.pod
@@ -71,7 +71,7 @@ calls. Here's the preamble of the class.
use strict;
$Nice::DEBUG = 0 unless defined $Nice::DEBUG;
-=over
+=over 4
=item TIESCALAR classname, LIST
@@ -225,7 +225,7 @@ The preamble code for the class is as follows:
use Carp;
use strict;
-=over
+=over 4
=item TIEARRAY classname, LIST
@@ -400,7 +400,7 @@ that calls it.
Here are the methods for the DotFiles tied hash.
-=over
+=over 4
=item TIEHASH classname, LIST
@@ -655,7 +655,7 @@ In our example we're going to create a shouting handle.
package Shout;
-=over
+=over 4
=item TIEHANDLE classname, LIST
diff --git a/pod/perltoot.pod b/pod/perltoot.pod
index 31a7c76353..e92367359d 100644
--- a/pod/perltoot.pod
+++ b/pod/perltoot.pod
@@ -1700,7 +1700,7 @@ as with any other local().
It would be nice to combine Alias with
something like Class::Struct or Class::MethodMaker.
-=head2 NOTES
+=head1 NOTES
=head2 Object Terminology
diff --git a/pod/perltootc.pod b/pod/perltootc.pod
index 0bcb638a50..ee0bd02f62 100644
--- a/pod/perltootc.pod
+++ b/pod/perltootc.pod
@@ -12,7 +12,7 @@ the class itself.
Here are a few examples where class attributes might come in handy:
-=over
+=over 4
=item *
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index c9954d8e96..e567e183e1 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -10,7 +10,7 @@ WARNING: The implementation of Unicode support in Perl is incomplete.
The following areas need further work.
-=over
+=over 4
=item Input and Output Disciplines
diff --git a/pp_ctl.c b/pp_ctl.c
index 729a438f32..fce163fc3e 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -211,6 +211,21 @@ PP(pp_substcont)
cx->sb_m = m = rx->startp[0] + orig;
sv_catpvn(dstr, s, m-s);
cx->sb_s = rx->endp[0] + orig;
+ { /* Update the pos() information. */
+ SV *sv = cx->sb_targ;
+ MAGIC *mg;
+ I32 i;
+ if (SvTYPE(sv) < SVt_PVMG)
+ SvUPGRADE(sv, SVt_PVMG);
+ if (!(mg = mg_find(sv, 'g'))) {
+ sv_magic(sv, Nullsv, 'g', Nullch, 0);
+ mg = mg_find(sv, 'g');
+ }
+ i = m - orig;
+ if (DO_UTF8(sv))
+ sv_pos_b2u(sv, &i);
+ mg->mg_len = i;
+ }
cx->sb_rxtainted |= RX_MATCH_TAINTED(rx);
rxres_save(&cx->sb_rxres, rx);
RETURNOP(pm->op_pmreplstart);
diff --git a/pp_sys.c b/pp_sys.c
index 239e3f79bb..4b8bfce2bd 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2557,9 +2557,15 @@ PP(pp_stat)
if (PL_op->op_flags & OPf_REF) {
gv = cGVOP_gv;
- if (PL_op->op_type == OP_LSTAT && ckWARN(WARN_IO))
- Perl_warner(aTHX_ WARN_IO,
+ if (PL_op->op_type == OP_LSTAT) {
+ if (PL_laststype != OP_LSTAT)
+ Perl_croak(aTHX_ "The stat preceding lstat() wasn't an lstat");
+ if (ckWARN(WARN_IO) && gv != PL_defgv)
+ Perl_warner(aTHX_ WARN_IO,
"lstat() on filehandle %s", GvENAME(gv));
+ /* Perl_my_lstat (-l) croak's on filehandle, why warn here? */
+ }
+
do_fstat:
if (gv != PL_defgv) {
PL_laststype = OP_STAT;
diff --git a/sv.c b/sv.c
index 6feb4890af..9e6a3361ae 100644
--- a/sv.c
+++ b/sv.c
@@ -2570,7 +2570,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
SvIVX(dstr) = SvIVX(sstr);
if (SvIsUV(sstr))
SvIsUV_on(dstr);
- SvTAINT(dstr);
+ if (SvTAINTED(sstr))
+ SvTAINT(dstr);
return;
}
goto undef_sstr;
@@ -2590,7 +2591,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
}
SvNVX(dstr) = SvNVX(sstr);
(void)SvNOK_only(dstr);
- SvTAINT(dstr);
+ if (SvTAINTED(sstr))
+ SvTAINT(dstr);
return;
}
goto undef_sstr;
@@ -2659,7 +2661,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
GvINTRO_off(dstr); /* one-shot flag */
gp_free((GV*)dstr);
GvGP(dstr) = gp_ref(GvGP(sstr));
- SvTAINT(dstr);
+ if (SvTAINTED(sstr))
+ SvTAINT(dstr);
if (GvIMPORTED(dstr) != GVf_IMPORTED
&& CopSTASH_ne(PL_curcop, GvSTASH(dstr)))
{
@@ -2816,7 +2819,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
SvREFCNT_dec(dref);
if (intro)
SAVEFREESV(sref);
- SvTAINT(dstr);
+ if (SvTAINTED(sstr))
+ SvTAINT(dstr);
return;
}
if (SvPVX(dstr)) {
@@ -2925,7 +2929,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
else
(void)SvOK_off(dstr);
}
- SvTAINT(dstr);
+ if (SvTAINTED(sstr))
+ SvTAINT(dstr);
}
/*
diff --git a/t/comp/proto.t b/t/comp/proto.t
index 9ac1e0f470..4c5b5eee83 100755
--- a/t/comp/proto.t
+++ b/t/comp/proto.t
@@ -9,6 +9,9 @@
# we should test as many as we can.
#
+# XXX known to leak scalars
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
+
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
@@ -487,6 +490,7 @@ sub sreftest (\$$) {
}
# test prototypes when they are evaled and there is a syntax error
+#
for my $p ( "", qw{ () ($) ($@) ($%) ($;$) (&) (&\@) (&@) (%) (\%) (\@) } ) {
no warnings 'redefine';
my $eval = "sub evaled_subroutine $p { &void *; }";
diff --git a/t/lib/st-lock.t b/t/lib/st-lock.t
index c29d0b7cbc..694db16343 100644
--- a/t/lib/st-lock.t
+++ b/t/lib/st-lock.t
@@ -25,7 +25,9 @@ sub BEGIN {
print "1..0 # Skip: Storable was not built\n";
exit 0;
}
- if (!$Config{'d_flock'} && !$Config{'d_fcntl'} && !$Config{'d_lockf'}) {
+ if (!$Config{'d_flock'} &&
+ !$Config{'d_fcntl_can_lock'} &&
+ !$Config{'d_lockf'}) {
print "1..0 # Skip: no flock or flock emulation on this platform\n";
exit 0;
}
diff --git a/t/lib/st-recurse.t b/t/lib/st-recurse.t
index dcf6d1a029..b42974748e 100644
--- a/t/lib/st-recurse.t
+++ b/t/lib/st-recurse.t
@@ -1,6 +1,6 @@
#!./perl
-# $Id: recurse.t,v 1.0.1.1 2000/09/17 16:48:05 ram Exp $
+# $Id: recurse.t,v 1.0.1.2 2000/11/05 17:22:05 ram Exp ram $
#
# Copyright (c) 1995-2000, Raphael Manfredi
#
@@ -8,6 +8,10 @@
# in the README file that comes with the distribution.
#
# $Log: recurse.t,v $
+# Revision 1.0.1.2 2000/11/05 17:22:05 ram
+# patch6: stress hook a little more with refs to lexicals
+#
+# $Log: recurse.t,v $
# Revision 1.0.1.1 2000/09/17 16:48:05 ram
# patch1: added test case for store hook bug
#
@@ -97,15 +101,19 @@ sub make {
sub STORABLE_freeze {
my $self = shift;
- my $t = dclone($self->{sync});
- return ("", [$t, $self->{ext}], $self, $self->{ext});
+ my %copy = %$self;
+ my $r = \%copy;
+ my $t = dclone($r->{sync});
+ return ("", [$t, $self->{ext}], $r, $self, $r->{ext});
}
sub STORABLE_thaw {
my $self = shift;
- my ($cloning, $undef, $a, $obj, $ext) = @_;
+ my ($cloning, $undef, $a, $r, $obj, $ext) = @_;
die "STORABLE_thaw #1" unless $obj eq $self;
die "STORABLE_thaw #2" unless ref $a eq 'ARRAY';
+ die "STORABLE_thaw #3" unless ref $r eq 'HASH';
+ die "STORABLE_thaw #4" unless $a->[1] == $r->{ext};
$self->{ok} = $self;
($self->{sync}, $self->{ext}) = @$a;
}
diff --git a/t/lib/syslog.t b/t/lib/syslog.t
index d73e973b39..05d8b22f4b 100755
--- a/t/lib/syslog.t
+++ b/t/lib/syslog.t
@@ -8,6 +8,18 @@ BEGIN {
print "1..0 # Skip: Sys::Syslog was not built\n";
exit 0;
}
+
+ require Socket;
+
+ # This code inspired by Sys::Syslog::connect():
+ require Sys::Hostname;
+ my ($host_uniq) = Sys::Hostname::hostname();
+ my ($host) = $host_uniq =~ /([A-Za-z0-9_.-]+)/;
+
+ if (! defined Socket::inet_aton($host)) {
+ print "1..0 # Skip: Can't lookup $host\n";
+ exit 0;
+ }
}
use Sys::Syslog qw(:DEFAULT setlogsock);
diff --git a/t/lib/tie-refhash.t b/t/lib/tie-refhash.t
index 7ad2bebd1d..a82c19c743 100644
--- a/t/lib/tie-refhash.t
+++ b/t/lib/tie-refhash.t
@@ -1,19 +1,19 @@
#!/usr/bin/perl -w
-#
+#
# Basic test suite for Tie::RefHash and Tie::RefHash::Nestable.
-#
+#
# The testing is in two parts: first, run lots of tests on both a tied
# hash and an ordinary un-tied hash, and check they give the same
# answer. Then there are tests for those cases where the tied hashes
# should behave differently to normal hashes, that is, when using
# references as keys.
-#
+#
BEGIN {
chdir 't' if -d 't';
- @INC = '.';
+ @INC = '.';
push @INC, '../lib';
-}
+}
use strict;
use Tie::RefHash;
@@ -28,8 +28,9 @@ my $ref = []; my $ref1 = [];
# on a tied hash and on a normal hash, and checking that the results
# are the same. This does of course assume that Perl hashes are not
# buggy :-)
-#
+#
my @tests = standard_hash_tests();
+
my @ordinary_results = runtests(\@tests, undef);
foreach my $class ('Tie::RefHash', 'Tie::RefHash::Nestable') {
my @tied_results = runtests(\@tests, $class);
@@ -39,13 +40,13 @@ foreach my $class ('Tie::RefHash', 'Tie::RefHash::Nestable') {
foreach my $i (0 .. $#ordinary_results) {
my ($or, $ow, $oe) = @{$ordinary_results[$i]};
my ($tr, $tw, $te) = @{$tied_results[$i]};
-
+
my $ok = 1;
local $^W = 0;
$ok = 0 if (defined($or) != defined($tr)) or ($or ne $tr);
$ok = 0 if (defined($ow) != defined($tw)) or ($ow ne $tw);
$ok = 0 if (defined($oe) != defined($te)) or ($oe ne $te);
-
+
if (not $ok) {
print STDERR
"failed for $class: $tests[$i]\n",
@@ -66,7 +67,7 @@ foreach my $class ('Tie::RefHash', 'Tie::RefHash::Nestable') {
# Now test Tie::RefHash's special powers
my (%h, $h);
-eval { $h = tie %h, 'Tie::RefHash' };
+$h = eval { tie %h, 'Tie::RefHash' };
warn $@ if $@;
test(not $@);
test(ref($h) eq 'Tie::RefHash');
@@ -96,7 +97,7 @@ undef $h;
untie %h;
# And now Tie::RefHash::Nestable's differences from Tie::RefHash.
-eval { $h = tie %h, 'Tie::RefHash::Nestable' };
+$h = eval { tie %h, 'Tie::RefHash::Nestable' };
warn $@ if $@;
test(not $@);
test(ref($h) eq 'Tie::RefHash::Nestable');
@@ -113,14 +114,20 @@ test((keys %h)[0] eq $ref);
test((keys %{$h{$ref}}) == 1);
test((keys %{$h{$ref}})[0] eq $ref1);
+
die "expected to run $numtests tests, but ran ", $currtest - 1
if $currtest - 1 != $numtests;
+
+@tests = ();
+undef $ref;
+undef $ref1;
+
exit();
# Print 'ok X' if true, 'not ok X' if false
# Uses global $currtest.
-#
+#
sub test {
my $t = shift;
print 'not ' if not $t;
@@ -128,7 +135,7 @@ sub test {
}
-# Wrapper for Data::Dumper to 'dump' a scalar as an EXPR string.
+# Wrapper for Data::Dumper to 'dump' a scalar as an EXPR string.
sub dumped {
my $s = shift;
my $d = Dumper($s);
@@ -141,7 +148,7 @@ sub dumped {
# Crudely dump a hash into a canonical string representation (because
# hash keys can appear in any order, Data::Dumper may give different
# strings for the same hash).
-#
+#
sub dumph {
my $h = shift;
my $r = '';
@@ -152,24 +159,24 @@ sub dumph {
}
# Run the tests and give results.
-#
+#
# Parameters: reference to list of tests to run
# name of class to use for tied hash, or undef if not tied
-#
+#
# Returns: list of [R, W, E] tuples, one for each test.
# R is the return value from running the test, W any warnings it gave,
# and E any exception raised with 'die'. E and W will be tidied up a
# little to remove irrelevant details like line numbers :-)
-#
+#
# Will also run a few of its own 'ok N' tests.
-#
+#
sub runtests {
my ($tests, $class) = @_;
my @r;
my (%h, $h);
if (defined $class) {
- eval { $h = tie %h, $class };
+ $h = eval { tie %h, $class };
warn $@ if $@;
test(not $@);
test(ref($h) eq $class);
@@ -180,7 +187,11 @@ sub runtests {
my ($result, $warning, $exception);
local $SIG{__WARN__} = sub { $warning .= $_[0] };
$result = scalar(eval $_);
- $exception = $@ if $@;
+ if ($@)
+ {
+ die "$@:$_" unless defined $class;
+ $exception = $@;
+ }
foreach ($warning, $exception) {
next if not defined;
@@ -204,14 +215,14 @@ sub runtests {
# Things that should work just the same for an ordinary hash and a
# Tie::RefHash.
-#
+#
# Each test is a code string to be eval'd, it should do something with
# %h and give a scalar return value. The global $ref and $ref1 may
# also be used.
-#
+#
# One thing we don't test is that the ordering from 'keys', 'values'
# and 'each' is the same. You can't reasonably expect that.
-#
+#
sub standard_hash_tests {
my @r;
@@ -219,17 +230,16 @@ sub standard_hash_tests {
my $STD_TESTS = <<'END'
join $;, sort keys %h;
join $;, sort values %h;
- { my ($v, %tmp); %tmp{$v}++ while (defined($v = each %h)); dumph(\%tmp) }
- { my ($k, $v, %tmp); $tmp{"$k$;$v"}++ while (($k, $v) = each %h); dumph(\%t
-mp) }
+ { my ($v, %tmp); $tmp{$v}++ while (defined($v = each %h)); dumph(\%tmp) }
+ { my ($k, $v, %tmp); $tmp{"$k$;$v"}++ while (($k, $v) = each %h); dumph(\%tmp) }
END
;
-
+
# Tests on the existence of the element 'foo'
my $FOO_TESTS = <<'END'
defined $h{foo};
exists $h{foo};
- $h{foo};
+ $h{foo};
END
;
@@ -268,12 +278,10 @@ END
;
}
}
-
+
# Test hash slices
my @slicetests;
@slicetests = split /\n/, <<'END'
- @h{} = ();
- @h{} = ('a');
@h{'b'} = ();
@h{'c'} = ('d');
@h{'e'} = ('f', 'g');
@@ -290,7 +298,7 @@ END
}
# Test CLEAR
- push @r, 'clear %h', split(/\n/, $STD_TESTS);
+ push @r, '%h = ();', split(/\n/, $STD_TESTS);
return @r;
}
diff --git a/t/op/pos.t b/t/op/pos.t
index 46811b7bbc..f3bc23c84a 100755
--- a/t/op/pos.t
+++ b/t/op/pos.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..3\n";
+print "1..4\n";
$x='banana';
$x=~/.a/g;
@@ -14,3 +14,10 @@ sub f { my $p=$_[0]; return $p }
$x=~/.a/g;
if (f(pos($x))==4) {print "ok 3\n"} else {print "not ok 3\n";}
+# Is pos() set inside //g? (bug id 19990615.008)
+$x = "test string?"; $x =~ s/\w/pos($x)/eg;
+print "not " unless $x eq "0123 5678910?";
+print "ok 4\n";
+
+
+
diff --git a/t/op/taint.t b/t/op/taint.t
index fc3a595c4e..1e3d3964c2 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -99,7 +99,7 @@ print PROG 'print "@ARGV\n"', "\n";
close PROG;
my $echo = "$Invoke_Perl $ECHO";
-print "1..152\n";
+print "1..155\n";
# First, let's make sure that Perl is checking the dangerous
# environment variables. Maybe they aren't set yet, so we'll
@@ -690,4 +690,33 @@ else {
my $b = <IN>;
print "not " unless tainted($a) && tainted($b) && !defined($b);
print "ok 152\n";
+ close IN;
}
+
+{
+ # bug id 20001004.007
+
+ open IN, "./TEST" or warn "$0: cannot read ./TEST: $!" ;
+ my $a = <IN>;
+
+ my $c = { a => 42,
+ b => $a };
+ print "not " unless !tainted($c->{a}) && tainted($c->{b});
+ print "ok 153\n";
+
+ my $d = { a => $a,
+ b => 42 };
+ print "not " unless tainted($d->{a}) && !tainted($d->{b});
+ print "ok 154\n";
+
+ my $e = { a => 42,
+ b => { c => $a, d => 42 } };
+ print "not " unless !tainted($e->{a}) &&
+ !tainted($e->{b}) &&
+ tainted($e->{b}->{c}) &&
+ !tainted($e->{b}->{d});
+ print "ok 155\n";
+
+ close IN;
+}
+
diff --git a/t/pragma/locale.t b/t/pragma/locale.t
index 82fb684f4e..0e11c956d6 100755
--- a/t/pragma/locale.t
+++ b/t/pragma/locale.t
@@ -34,7 +34,9 @@ eval {
# and mingw32 uses said silly CRT
$have_setlocale = 0 if $^O eq 'MSWin32' && $Config{cc} =~ /^(cl|gcc)/i;
-print "1..", ($have_setlocale ? 116 : 98), "\n";
+my $last = $have_setlocale ? 116 : 98;
+
+print "1..$last\n";
use vars qw(&LC_ALL);
@@ -276,7 +278,7 @@ Norsk Norwegian:no no\@nynorsk:no:1 15
Occitan:oc:es:1 15
Polski Polish:pl:pl:2
Rumanian:ro:ro:2
-Russki Russian:ru:ru su ua:5 koi8 koi8r KOI8-R koi8u cp1251
+Russki Russian:ru:ru su ua:5 koi8 koi8r KOI8-R koi8u cp1251 cp866
Serbski Serbian:sr:yu:5
Slovak:sk:sk:2
Slovene Slovenian:sl:si:2
@@ -350,7 +352,14 @@ foreach (0..15) {
trylocale("iso_latin_$_");
}
-$ENV{PATH} = '/bin:/usr/bin';
+# Sanitize the environment so that we can run the external 'locale'
+# program without the taint mode getting grumpy.
+
+# $ENV{PATH} is special in VMS.
+delete $ENV{PATH} if $^O ne 'VMS' or $Config{d_setenv};
+
+# Other subversive stuff.
+delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
while (<LOCALES>) {
@@ -396,6 +405,8 @@ if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
setlocale(LC_ALL, "C");
+sub utf8locale { $_[0] =~ /utf-?8/i }
+
@Locale = sort @Locale;
debug "# Locales = @Locale\n";
@@ -486,7 +497,10 @@ foreach $Locale (@Locale) {
# Test \w.
- {
+ if (utf8locale($Locale)) {
+ # Until the polymorphic regexen arrive.
+ debug "# skipping UTF-8 locale '$Locale'\n";
+ } else {
my $word = join('', @Neoalpha);
$word =~ /^(\w+)$/;
@@ -639,6 +653,9 @@ foreach $Locale (@Locale) {
}
debug "# testing 115 with locale '$Locale'\n";
+ # Does taking lc separately differ from taking
+ # the lc "in-line"? (This was the bug 19990704.002, change #3568.)
+ # The bug was in the caching of the 'o'-magic.
{
use locale;
@@ -662,7 +679,13 @@ foreach $Locale (@Locale) {
}
debug "# testing 116 with locale '$Locale'\n";
- {
+ # Does lc of an UPPER (if different from the UPPER) match
+ # case-insensitively the UPPER, and does the UPPER match
+ # case-insensitively the lc of the UPPER. And vice versa.
+ if (utf8locale($Locale)) {
+ # Until the polymorphic regexen arrive.
+ debug "# skipping UTF-8 locale '$Locale'\n";
+ } else {
use locale;
my @f = ();
@@ -677,15 +700,16 @@ foreach $Locale (@Locale) {
push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
}
tryneoalpha($Locale, 116, @f == 0);
- print "# testing 116 failed for locale '$Locale' for characters @f\n"
- if @f;
+ if (@f) {
+ print "# failed 116 locale '$Locale' characters @f\n"
+ }
}
}
# Recount the errors.
-foreach (99..116) {
+foreach (99..$last) {
if ($Problem{$_} || !defined $Okay{$_} || !@{$Okay{$_}}) {
if ($_ == 102) {
print "# The failure of test 102 is not necessarily fatal.\n";
@@ -701,7 +725,7 @@ foreach (99..116) {
my $didwarn = 0;
-foreach (99..116) {
+foreach (99..$last) {
if ($Problem{$_}) {
my @f = sort keys %{ $Problem{$_} };
my $f = join(" ", @f);
@@ -726,17 +750,18 @@ EOW
}
}
-# Tell which locales were okay.
+# Tell which locales were okay and which were not.
if ($didwarn) {
- my @s;
+ my (@s, @F);
foreach my $l (@Locale) {
my $p = 0;
- foreach my $t (102..116) {
+ foreach my $t (102..$last) {
$p++ if $Problem{$t}{$l};
}
push @s, $l if $p == 0;
+ push @F, $l unless $p == 0;
}
if (@s) {
@@ -748,7 +773,19 @@ if ($didwarn) {
"#\t", $s, "\n#\n",
"# tested okay.\n#\n",
} else {
- warn "# None of your locales was fully okay.\n";
+ warn "# None of your locales were fully okay.\n";
+ }
+
+ if (@F) {
+ my $F = join(" ", @F);
+ $F =~ s/(.{50,60}) /$1\n#\t/g;
+
+ warn
+ "# The following locales\n#\n",
+ "#\t", $F, "\n#\n",
+ "# had problems.\n#\n",
+ } else {
+ warn "# None of your locales were broken.\n";
}
}
diff --git a/t/pragma/warn/pp_sys b/t/pragma/warn/pp_sys
index 2843c70ed3..66f3e750db 100644
--- a/t/pragma/warn/pp_sys
+++ b/t/pragma/warn/pp_sys
@@ -74,7 +74,7 @@
flock STDIN, 8;
flock $a, 8;
- lstat() on filehandle %s [pp_stat]
+ The stat preceding lstat() wasn't an lstat %s [pp_stat]
lstat(STDIN);
warn(warn_nl, "stat"); [pp_stat]
@@ -203,7 +203,9 @@ syswrite() on closed filehandle STDIN at - line 6.
# pp_sys.c [pp_flock]
use Config;
BEGIN {
- if ( $^O eq 'VMS' and ! $Config{d_flock}) {
+ if ( !$Config{d_flock} &&
+ !$Config{d_fcntl_can_lock} &&
+ !$Config{d_lockf} ) {
print <<EOM ;
SKIPPED
# flock not present
@@ -225,11 +227,11 @@ flock STDIN, 8;
flock FOO, 8;
flock $a, 8;
EXPECT
-flock() on closed filehandle STDIN at - line 14.
flock() on closed filehandle STDIN at - line 16.
+flock() on closed filehandle STDIN at - line 18.
(Are you trying to call flock() on dirhandle STDIN?)
-flock() on unopened filehandle FOO at - line 17.
-flock() on unopened filehandle at - line 18.
+flock() on unopened filehandle FOO at - line 19.
+flock() on unopened filehandle at - line 20.
########
# pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername]
use warnings 'io' ;
@@ -352,7 +354,7 @@ lstat(STDIN) ;
no warnings 'io' ;
lstat(STDIN) ;
EXPECT
-lstat() on filehandle STDIN at - line 13.
+The stat preceding lstat() wasn't an lstat at - line 13.
########
# pp_sys.c [pp_fttext]
use warnings qw(unopened closed) ;
diff --git a/toke.c b/toke.c
index 274e506b3b..458e258513 100644
--- a/toke.c
+++ b/toke.c
@@ -2520,8 +2520,32 @@ Perl_yylex(pTHX)
goto retry;
}
do {
- bool bof;
- bof = PL_rsfp && (PerlIO_tell(PL_rsfp) == 0); /* *Before* read! */
+ bool bof = PL_rsfp ? TRUE : FALSE;
+ if (bof) {
+#ifdef PERLIO_IS_STDIO
+# ifdef __GNU_LIBRARY__
+# if __GNU_LIBRARY__ == 1 /* Linux glibc5 */
+# define FTELL_FOR_PIPE_IS_BROKEN
+# endif
+# else
+# ifdef __GLIBC__
+# if __GLIBC__ == 1 /* maybe some glibc5 release had it like this? */
+# define FTELL_FOR_PIPE_IS_BROKEN
+# endif
+# endif
+# endif
+#endif
+#ifdef FTELL_FOR_PIPE_IS_BROKEN
+ /* This loses the possibility to detect the bof
+ * situation on perl -P when the libc5 is being used.
+ * Workaround? Maybe attach some extra state to PL_rsfp?
+ */
+ if (!PL_preprocess)
+ bof = PerlIO_tell(PL_rsfp) == 0;
+#else
+ bof = PerlIO_tell(PL_rsfp) == 0;
+#endif
+ }
s = filter_gets(PL_linestr, PL_rsfp, 0);
if (s == Nullch) {
fake_eof:
@@ -5198,7 +5222,7 @@ Perl_keyword(pTHX_ register char *d, I32 len)
if (strEQ(d,"exit")) return -KEY_exit;
if (strEQ(d,"eval")) return KEY_eval;
if (strEQ(d,"exec")) return -KEY_exec;
- if (strEQ(d,"each")) return KEY_each;
+ if (strEQ(d,"each")) return -KEY_each;
break;
case 5:
if (strEQ(d,"elsif")) return KEY_elsif;
@@ -5342,7 +5366,7 @@ Perl_keyword(pTHX_ register char *d, I32 len)
break;
case 'k':
if (len == 4) {
- if (strEQ(d,"keys")) return KEY_keys;
+ if (strEQ(d,"keys")) return -KEY_keys;
if (strEQ(d,"kill")) return -KEY_kill;
}
break;
@@ -5424,11 +5448,11 @@ Perl_keyword(pTHX_ register char *d, I32 len)
case 'p':
switch (len) {
case 3:
- if (strEQ(d,"pop")) return KEY_pop;
+ if (strEQ(d,"pop")) return -KEY_pop;
if (strEQ(d,"pos")) return KEY_pos;
break;
case 4:
- if (strEQ(d,"push")) return KEY_push;
+ if (strEQ(d,"push")) return -KEY_push;
if (strEQ(d,"pack")) return -KEY_pack;
if (strEQ(d,"pipe")) return -KEY_pipe;
break;
@@ -5535,7 +5559,7 @@ Perl_keyword(pTHX_ register char *d, I32 len)
case 'h':
switch (len) {
case 5:
- if (strEQ(d,"shift")) return KEY_shift;
+ if (strEQ(d,"shift")) return -KEY_shift;
break;
case 6:
if (strEQ(d,"shmctl")) return -KEY_shmctl;
@@ -5564,7 +5588,7 @@ Perl_keyword(pTHX_ register char *d, I32 len)
case 'p':
if (strEQ(d,"split")) return KEY_split;
if (strEQ(d,"sprintf")) return -KEY_sprintf;
- if (strEQ(d,"splice")) return KEY_splice;
+ if (strEQ(d,"splice")) return -KEY_splice;
break;
case 'q':
if (strEQ(d,"sqrt")) return -KEY_sqrt;
@@ -5644,7 +5668,7 @@ Perl_keyword(pTHX_ register char *d, I32 len)
if (strEQ(d,"unlink")) return -KEY_unlink;
break;
case 7:
- if (strEQ(d,"unshift")) return KEY_unshift;
+ if (strEQ(d,"unshift")) return -KEY_unshift;
if (strEQ(d,"ucfirst")) return -KEY_ucfirst;
break;
}
@@ -5749,14 +5773,23 @@ S_new_constant(pTHX_ char *s, STRLEN len, const char *key, SV *sv, SV *pv,
if (!table || !(PL_hints & HINT_LOCALIZE_HH)) {
SV *msg;
- why1 = "%^H is not consistent";
why2 = strEQ(key,"charnames")
- ? " (missing \"use charnames ...\"?)"
+ ? "(possibly a missing \"use charnames ...\")"
: "";
- why3 = "";
+ msg = Perl_newSVpvf(aTHX_ "Constant(%s) unknown: %s",
+ (type ? type: "undef"), why2);
+
+ /* This is convoluted and evil ("goto considered harmful")
+ * but I do not understand the intricacies of all the different
+ * failure modes of %^H in here. The goal here is to make
+ * the most probable error message user-friendly. --jhi */
+
+ goto msgdone;
+
report:
- msg = Perl_newSVpvf(aTHX_ "constant(%s): %s%s%s",
+ msg = Perl_newSVpvf(aTHX_ "Constant(%s): %s%s%s",
(type ? type: "undef"), why1, why2, why3);
+ msgdone:
yyerror(SvPVX(msg));
SvREFCNT_dec(msg);
return sv;
diff --git a/unixish.h b/unixish.h
index 5815a19ea7..f6923b7f66 100644
--- a/unixish.h
+++ b/unixish.h
@@ -129,11 +129,7 @@
# ifdef POSIX_BC
# define PERL_SYS_INIT(c,v) sigignore(SIGFPE); MALLOC_INIT
# else
-# ifdef __CYGWIN__
-# define PERL_SYS_INIT(c,v) Perl_my_setenv_init(&environ); MALLOC_INIT
-# else
-# define PERL_SYS_INIT(c,v) MALLOC_INIT
-# endif
+# define PERL_SYS_INIT(c,v) MALLOC_INIT
# endif
#endif
#endif
diff --git a/utf8.c b/utf8.c
index 5237ac4a1c..8ce0d216a1 100644
--- a/utf8.c
+++ b/utf8.c
@@ -215,7 +215,7 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags)
if (dowarn)
Perl_warner(aTHX_ WARN_UTF8,
"Malformed UTF-8 character (unexpected non-continuation byte 0x%02"UVxf" after byte 0x%02"UVxf")",
- s[1], uv);
+ (UV)s[1], uv);
goto malformed;
}
diff --git a/util.c b/util.c
index 34cdaafe8a..fe88f23414 100644
--- a/util.c
+++ b/util.c
@@ -514,7 +514,7 @@ S_stdize_locale(pTHX_ char *locs)
if (u[1] == 0) {
STRLEN len = u - s;
- Move(t + 1, locs, len, char);
+ Move(s + 1, locs, len, char);
locs[len] = 0;
okay = TRUE;
}
@@ -1981,7 +1981,7 @@ Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args)
#ifdef USE_ENVIRON_ARRAY
/* VMS' and EPOC's my_setenv() is in vms.c and epoc.c */
-#if !defined(WIN32) && !defined(__CYGWIN__)
+#if !defined(WIN32)
void
Perl_my_setenv(pTHX_ char *nam, char *val)
{
@@ -2023,50 +2023,19 @@ Perl_my_setenv(pTHX_ char *nam, char *val)
(void)sprintf(environ[i],"%s=%s",nam,val);/* all that work just for this */
#else /* PERL_USE_SAFE_PUTENV */
+# if defined(__CYGWIN__)
+ setenv(nam, val, 1);
+# else
char *new_env;
new_env = (char*)safesysmalloc((strlen(nam) + strlen(val) + 2) * sizeof(char));
(void)sprintf(new_env,"%s=%s",nam,val);/* all that work just for this */
(void)putenv(new_env);
+# endif /* __CYGWIN__ */
#endif /* PERL_USE_SAFE_PUTENV */
}
-#else /* WIN32 || __CYGWIN__ */
-#if defined(__CYGWIN__)
-/*
- * Save environ of perl.exe, currently Cygwin links in separate environ's
- * for each exe/dll. Probably should be a member of impure_ptr.
- */
-static char ***Perl_main_environ;
-
-EXTERN_C void
-Perl_my_setenv_init(char ***penviron)
-{
- Perl_main_environ = penviron;
-}
-
-void
-Perl_my_setenv(pTHX_ char *nam, char *val)
-{
- /* You can not directly manipulate the environ[] array because
- * the routines do some additional work that syncs the Cygwin
- * environment with the Windows environment.
- */
- char *oldstr = environ[setenv_getix(nam)];
-
- if (!val) {
- if (!oldstr)
- return;
- unsetenv(nam);
- safesysfree(oldstr);
- return;
- }
- setenv(nam, val, 1);
- environ = *Perl_main_environ; /* environ realloc can occur in setenv */
- if(oldstr && environ[setenv_getix(nam)] != oldstr)
- safesysfree(oldstr);
-}
-#else /* if WIN32 */
+#else /* WIN32 */
void
Perl_my_setenv(pTHX_ char *nam,char *val)
@@ -2127,7 +2096,6 @@ Perl_my_setenv(pTHX_ char *nam,char *val)
}
#endif /* WIN32 */
-#endif
I32
Perl_setenv_getix(pTHX_ char *nam)
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index c3e292a9b1..2033eee3fe 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -91,7 +91,7 @@ BEGIN {
$::HaveUtil = ($@ eq "");
};
-my $Version = "1.32";
+my $Version = "1.33";
# Changed in 1.06 to skip Mail::Send and Mail::Util if not available.
# Changed in 1.07 to see more sendmail execs, and added pipe output.
@@ -128,6 +128,7 @@ my $Version = "1.32";
# Changed in 1.30 Added warnings on failure to open files MSTEVENS 13-07-2000
# Changed in 1.31 Add checks on close().Fix my $var unless. TJENNESS 26-07-2000
# Changed in 1.32 Use File::Spec->tmpdir TJENNESS 20-08-2000
+# Changed in 1.33 Don't require -t STDOUT for -ok.
# TODO: - Allow the user to re-name the file on mail failure, and
# make sure failure (transmission-wise) of Mail::Send is
@@ -153,7 +154,6 @@ include a file, you can use the -f switch.
EOF
die "\n";
}
-if (!-t STDOUT && !$outfile) { Dump(*STDOUT); exit; }
Query();
Edit() unless $usefile || ($ok and not $::opt_n);
@@ -896,8 +896,7 @@ Options:
this if you don't give it here.
-e Editor to use.
-t Test mode. The target address defaults to `$testaddress'.
- -d Data mode (the default if you redirect or pipe output.)
- This prints out your configuration data, without mailing
+ -d Data mode. This prints out your configuration data, without mailing
anything. You can use this with -v to get more complete data.
-A Don't send a bug received acknowledgement to the return address.
-ok Report successful build on this system to perl porters
diff --git a/vms/perlvms.pod b/vms/perlvms.pod
index 17e83e5c1b..f43cbb0e46 100644
--- a/vms/perlvms.pod
+++ b/vms/perlvms.pod
@@ -788,6 +788,14 @@ by saying
(You can't just say C<$ENV{$key} = $ENV{$key}>, since the
Perl optimizer is smart enough to elide the expression.)
+Don't try to clear C<%ENV> by saying C<%ENV = ();>, it will throw
+a fatal error. This is equivalent to doing the following from DCL:
+
+ DELETE/LOGICAL *
+
+You can imagine how bad things would be if, for example, the SYS$MANAGER
+or SYS$SYSTEM logicals were deleted.
+
At present, the first time you iterate over %ENV using
C<keys>, or C<values>, you will incur a time penalty as all
logical names are read, in order to fully populate %ENV.
diff --git a/vms/vms.c b/vms/vms.c
index 8fe4f5f104..d0add5534f 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -596,7 +596,7 @@ vmssetenv(char *lnm, char *eqv, struct dsc$descriptor_s **tabvec)
if ((cp1 = strchr(environ[i],'=')) &&
!strncmp(environ[i],lnm,cp1 - environ[i])) {
#ifdef HAS_SETENV
- return setenv(lnm,eqv,1) ? vaxc$errno : 0;
+ return setenv(lnm,"",1) ? vaxc$errno : 0;
}
}
ivenv = 1; retsts = SS$_NOLOGNAM;
diff --git a/vos/config.alpha.h b/vos/config.alpha.h
index 0b264db3f2..5b542a2f94 100644
--- a/vos/config.alpha.h
+++ b/vos/config.alpha.h
@@ -2031,12 +2031,23 @@
* This symbol is defined if the FILE_cnt macro can be used as an
* lvalue.
*/
+/* STDIO_PTR_LVAL_SETS_CNT:
+ * This symbol is defined if using the FILE_ptr macro as an lvalue
+ * to increase the pointer by n has the side effect of decreasing the
+ * value of File_cnt(fp) by n.
+ */
+/* STDIO_PTR_LVAL_NOCHANGE_CNT:
+ * This symbol is defined if using the FILE_ptr macro as an lvalue
+ * to increase the pointer by n leaves File_cnt(fp) unchanged.
+ */
#define USE_STDIO_PTR /**/
#ifdef USE_STDIO_PTR
#define FILE_ptr(fp) ((fp)->_ptr)
#define STDIO_PTR_LVALUE /**/
#define FILE_cnt(fp) ((fp)->_cnt)
#define STDIO_CNT_LVALUE /**/
+/*#define STDIO_PTR_LVAL_SETS_CNT /**/
+/*#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
#endif
/* USE_STDIO_BASE:
diff --git a/vos/config.ga.def b/vos/config.ga.def
index f88060fd2a..465205c27c 100644
--- a/vos/config.ga.def
+++ b/vos/config.ga.def
@@ -235,6 +235,7 @@ $d_statblks='undef'
$d_statfs_f_flags='undef'
$d_statfs_s='undef'
$d_stdio_cnt_lval='define'
+$d_stdio_ptr_lval='define'
$d_stdio_ptr_lval_sets_cnt='undef'
$d_stdio_ptr_lval_nochange_cnt='undef'
$d_stdio_stream_array='define'
diff --git a/vos/config.ga.h b/vos/config.ga.h
index d09b89b5fd..26cb1769f9 100644
--- a/vos/config.ga.h
+++ b/vos/config.ga.h
@@ -2031,12 +2031,23 @@
* This symbol is defined if the FILE_cnt macro can be used as an
* lvalue.
*/
+/* STDIO_PTR_LVAL_SETS_CNT:
+ * This symbol is defined if using the FILE_ptr macro as an lvalue
+ * to increase the pointer by n has the side effect of decreasing the
+ * value of File_cnt(fp) by n.
+ */
+/* STDIO_PTR_LVAL_NOCHANGE_CNT:
+ * This symbol is defined if using the FILE_ptr macro as an lvalue
+ * to increase the pointer by n leaves File_cnt(fp) unchanged.
+ */
#define USE_STDIO_PTR /**/
#ifdef USE_STDIO_PTR
#define FILE_ptr(fp) ((fp)->_ptr)
#define STDIO_PTR_LVALUE /**/
#define FILE_cnt(fp) ((fp)->_cnt)
#define STDIO_CNT_LVALUE /**/
+/*#define STDIO_PTR_LVAL_SETS_CNT /**/
+/*#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
#endif
/* USE_STDIO_BASE:
diff --git a/win32/vdir.h b/win32/vdir.h
index 37cb4a580e..af769f1549 100644
--- a/win32/vdir.h
+++ b/win32/vdir.h
@@ -393,7 +393,7 @@ char *VDir::MapPathA(const char *pInName)
/* has drive letter */
if (IsPathSep(pInName[2])) {
/* absolute with drive letter */
- strcpy(szLocalBufferA, pInName);
+ DoGetFullPathNameA((char*)pInName, sizeof(szLocalBufferA), szLocalBufferA);
}
else {
/* relative path with drive letter */
@@ -409,15 +409,14 @@ char *VDir::MapPathA(const char *pInName)
/* no drive letter */
if (IsPathSep(pInName[1]) && IsPathSep(pInName[0])) {
/* UNC name */
- strcpy(szLocalBufferA, pInName);
+ DoGetFullPathNameA((char*)pInName, sizeof(szLocalBufferA), szLocalBufferA);
}
else {
strcpy(szBuffer, GetDefaultDirA());
if (IsPathSep(pInName[0])) {
/* absolute path */
- szLocalBufferA[0] = szBuffer[0];
- szLocalBufferA[1] = szBuffer[1];
- strcpy(&szLocalBufferA[2], pInName);
+ strcpy(&szBuffer[2], pInName);
+ DoGetFullPathNameA(szBuffer, sizeof(szLocalBufferA), szLocalBufferA);
}
else {
/* relative path */
@@ -620,7 +619,7 @@ WCHAR* VDir::MapPathW(const WCHAR *pInName)
/* has drive letter */
if (IsPathSep(pInName[2])) {
/* absolute with drive letter */
- wcscpy(szLocalBufferW, pInName);
+ DoGetFullPathNameW((WCHAR*)pInName, (sizeof(szLocalBufferW)/sizeof(WCHAR)), szLocalBufferW);
}
else {
/* relative path with drive letter */
@@ -636,15 +635,14 @@ WCHAR* VDir::MapPathW(const WCHAR *pInName)
/* no drive letter */
if (IsPathSep(pInName[1]) && IsPathSep(pInName[0])) {
/* UNC name */
- wcscpy(szLocalBufferW, pInName);
+ DoGetFullPathNameW((WCHAR*)pInName, (sizeof(szLocalBufferW)/sizeof(WCHAR)), szLocalBufferW);
}
else {
wcscpy(szBuffer, GetDefaultDirW());
if (IsPathSep(pInName[0])) {
/* absolute path */
- szLocalBufferW[0] = szBuffer[0];
- szLocalBufferW[1] = szBuffer[1];
- wcscpy(&szLocalBufferW[2], pInName);
+ wcscpy(&szBuffer[2], pInName);
+ DoGetFullPathNameW(szBuffer, (sizeof(szLocalBufferW)/sizeof(WCHAR)), szLocalBufferW);
}
else {
/* relative path */