summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS4
-rw-r--r--Changes454
-rwxr-xr-xConfigure18
-rw-r--r--INSTALL6
-rw-r--r--MANIFEST1
-rw-r--r--NetWare/nwperlsys.c6
-rw-r--r--Porting/Glossary2
-rw-r--r--Porting/config.sh2
-rw-r--r--README.tru648
-rw-r--r--config_h.SH2
-rw-r--r--configure.com11
-rw-r--r--cop.h29
-rw-r--r--embed.fnc3
-rw-r--r--embed.h4
-rw-r--r--epoc/config.sh2
-rw-r--r--ext/B/B.pm9
-rw-r--r--ext/B/B.xs48
-rw-r--r--ext/B/B/Deparse.pm12
-rw-r--r--ext/B/Makefile.PL14
-rw-r--r--ext/B/t/xref.t6
-rw-r--r--ext/List/Util/ChangeLog8
-rw-r--r--ext/List/Util/lib/List/Util.pm2
-rw-r--r--ext/List/Util/lib/Scalar/Util.pm30
-rw-r--r--ext/List/Util/t/openhan.t33
-rw-r--r--ext/threads/t/end.t3
-rw-r--r--hints/dec_osf.sh35
-rw-r--r--hints/hpux.sh51
-rw-r--r--hints/solaris_2.sh7
-rw-r--r--iperlsys.h20
-rw-r--r--lib/Tie/File.pm10
-rw-r--r--lib/Tie/File/t/00_version.t2
-rw-r--r--lib/Tie/File/t/32_defer_misc.t8
-rw-r--r--op.c10
-rw-r--r--patchlevel.h2
-rw-r--r--perl.c5
-rw-r--r--perl.h6
-rw-r--r--pod/perldelta.pod31
-rw-r--r--pod/perlebcdic.pod20
-rw-r--r--pod/perltoc.pod2
-rw-r--r--pod/perluniintro.pod26
-rw-r--r--pp_pack.c22
-rw-r--r--pp_sys.c2
-rw-r--r--proto.h3
-rw-r--r--regexec.c38
-rw-r--r--sv.c6
-rwxr-xr-xt/op/pack.t23
-rwxr-xr-xuconfig.sh2
-rw-r--r--utf8.c2
-rw-r--r--vos/config.alpha.def2
-rw-r--r--vos/config.ga.def2
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/config.win642
54 files changed, 894 insertions, 168 deletions
diff --git a/AUTHORS b/AUTHORS
index 44cef575d2..d4941e5b59 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -90,6 +90,7 @@ Bruce P. Schuck <bruce@aps.org>
Bud Huff <BAHUFF@us.oracle.com>
Byron Brummer <byron@omix.com>
Calle Dybedahl <calle@lysator.liu.se>
+C Aditya <caditya@novell.com>
Carl Eklof <CEklof@endeca.com>
Carl M. Fongheiser <cmf@ins.infonet.net>
Carl Witty <cwitty@newtonlabs.com>
@@ -330,6 +331,7 @@ John Bley <jbb6@acpub.duke.edu>
John Borwick <jhborwic@unity.ncsu.edu>
John Cerney <j-cerney1@ti.com>
John D Groenveld <groenvel@cse.psu.edu>
+John Goodyear <johngood@us.ibm.com>
John Hasstedt <John.Hasstedt@sunysb.edu>
John Holdsworth <coldwave@bigfoot.com>
John Hughes <john@AtlanTech.COM>
@@ -371,6 +373,7 @@ Kaveh Ghazi <ghazi@caip.rutgers.edu>
Kay Röpke <kroepke@dolphin-services.de>
Keith Neufeld <neufeld@fast.pvi.org>
Keith Thompson <kst@cts.com>
+Keith Thompson <kst@SDSC.EDU>
Ken Estes <estes@ms.com>
Ken Fox <kfox@ford.com>
Ken MacLeod <ken@bitsko.slc.ut.us>
@@ -543,6 +546,7 @@ Rich Salz <rsalz@bbn.com>
Richard A. Wells <Rwells@uhs.harvard.edu>
Richard Clamp <richardc@unixbeard.net>
Richard Foley <Richard.Foley@m.dasa.de>
+Richard Hatch <rhatch@austin.ibm.com>
Richard L. England <richard_england@mentorg.com>
Richard L. Maus, Jr. <rmaus@monmouth.com>
Richard Soderberg <p5-authors@crystalflame.net>
diff --git a/Changes b/Changes
index 43166290fa..cb1c4c4b26 100644
--- a/Changes
+++ b/Changes
@@ -28,6 +28,460 @@ example from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
Version v5.7.X Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 15299] By: jhi on 2002/03/18 14:53:11
+ Log: OS/390 update.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 15298] By: jhi on 2002/03/18 14:44:19
+ Log: Forgot from #15288.
+ Branch: perl
+ ! ext/B/B.xs
+____________________________________________________________________________
+[ 15297] By: jhi on 2002/03/18 14:39:15
+ Log: Make regex DEBUGGING faster.
+ Branch: perl
+ ! perl.c perl.h regexec.c
+____________________________________________________________________________
+[ 15296] By: jhi on 2002/03/18 14:28:10
+ Log: Undo accidental perl.h part of #15295 (wait for #15297)
+ Branch: perl
+ ! perl.h
+____________________________________________________________________________
+[ 15295] By: jhi on 2002/03/18 14:26:59
+ Log: Subject: prefix slip
+ From: andreas.koenig@anima.de (Andreas J. Koenig)
+ Date: Mon, 18 Mar 2002 16:24:46 +0100
+ Message-ID: <m3y9gp3nlt.fsf@anima.de>
+
+ (perl.h part accidental, undone by #15296)
+ Branch: perl
+ ! INSTALL perl.h
+____________________________________________________________________________
+[ 15294] By: jhi on 2002/03/18 14:19:29
+ Log: Be tidy.
+ Branch: perl
+ ! ext/B/t/xref.t
+____________________________________________________________________________
+[ 15293] By: jhi on 2002/03/18 14:14:17
+ Log: Subject: [PATCH] re: long double vs. Tru64 UNIX
+ From: Spider Boardman <spider@web.zk3.dec.com>
+ Date: Mon, 18 Mar 2002 10:09:50 -0500
+ Message-Id: <200203181509.KAA419788@leggy.zk3.dec.com>
+ Branch: perl
+ ! README.tru64 hints/dec_osf.sh
+____________________________________________________________________________
+[ 15292] By: jhi on 2002/03/18 13:57:06
+ Log: NetWare tweaks from C Aditya <caditya@novell.com>
+ Branch: perl
+ ! NetWare/nwperlsys.c cop.h iperlsys.h op.c
+____________________________________________________________________________
+[ 15291] By: jhi on 2002/03/18 13:52:40
+ Log: metaconfig unit change for #15290.
+ Branch: metaconfig/U/perl
+ ! perlxv.U
+____________________________________________________________________________
+[ 15290] By: jhi on 2002/03/18 13:52:15
+ Log: Subject: d_nv_preserves_uv_bits
+ From: Nicholas Clark <nick@unfortu.net>
+ Date: Thu, 14 Mar 2002 22:24:19 +0000
+ Message-ID: <20020314222419.GE363@Bagpuss.unfortu.net>
+ Branch: perl
+ ! Configure Porting/Glossary Porting/config.sh config_h.SH
+ ! configure.com epoc/config.sh pod/perltoc.pod t/op/pack.t
+ ! uconfig.sh vos/config.alpha.def vos/config.ga.def
+ ! win32/config.bc win32/config.gc win32/config.vc
+ ! win32/config.win64
+____________________________________________________________________________
+[ 15289] By: jhi on 2002/03/18 13:44:14
+ Log: Subject: Re: perl@15244
+ From: Spider Boardman <spider@web.zk3.dec.com>
+ Date: Mon, 18 Mar 2002 09:38:55 -0500
+ Message-Id: <200203181438.JAA406792@leggy.zk3.dec.com>
+
+ (IA64 work.)
+ Branch: perl
+ ! hints/hpux.sh perl.h
+____________________________________________________________________________
+[ 15288] By: jhi on 2002/03/18 13:41:34
+ Log: Subject: [PATCH B] B::perlstring()
+ From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
+ Date: Sun, 17 Mar 2002 23:06:12 +0100
+ Message-ID: <20020317230612.A24442@rafael>
+ Branch: perl
+ ! ext/B/B.pm ext/B/B/Deparse.pm ext/B/Makefile.PL
+____________________________________________________________________________
+[ 15287] By: jhi on 2002/03/18 13:40:28
+ Log: Subject: [PATCH] another pack "w" thing
+ From: Nicholas Clark <nick@unfortu.net>
+ Date: Sat, 16 Mar 2002 21:52:15 +0000
+ Message-ID: <20020316215215.GF330@Bagpuss.unfortu.net>
+ Branch: perl
+ ! pp_pack.c t/op/pack.t
+____________________________________________________________________________
+[ 15286] By: jhi on 2002/03/18 13:39:20
+ Log: More prototypes blindness in Solaris.
+ (TODO: readdir64_r really needs to be seen.)
+ Branch: perl
+ ! hints/solaris_2.sh
+____________________________________________________________________________
+[ 15285] By: jhi on 2002/03/18 13:24:03
+ Log: Integrate perlio;
+
+ Tidy the "does not map" message for non-characters
+ (e.g. iso-8859-3 "\xA5").
+ Branch: perl
+ !> ext/Encode/Encode.xs
+____________________________________________________________________________
+[ 15284] By: nick on 2002/03/18 11:00:31
+ Log: Integrate mainline
+ Branch: perlio
+ +> lib/Tie/File/t/30_defer.t lib/Tie/File/t/31_autodefer.t
+ +> lib/Tie/File/t/32_defer_misc.t
+ !> MANIFEST embed.fnc embed.h global.sym hints/solaris_2.sh
+ !> lib/Tie/File.pm lib/Tie/File/t/00_version.t
+ !> lib/Tie/File/t/15_pushpop.t lib/Tie/File/t/17_misc_meth.t
+ !> lib/Tie/File/t/22_autochomp.t pod/perlfaq3.pod
+ !> pod/perlhack.pod pp_hot.c pp_sys.c proto.h reentr.c reentr.h
+ !> reentr.pl regexec.c t/op/pat.t util.c
+____________________________________________________________________________
+[ 15283] By: gbarr on 2002/03/18 10:10:55
+ Log: Sync with Scalar-List-Utils-1.07
+ Branch: perl
+ + ext/List/Util/t/openhan.t
+ ! MANIFEST ext/List/Util/ChangeLog
+ ! ext/List/Util/lib/List/Util.pm
+ ! ext/List/Util/lib/Scalar/Util.pm
+____________________________________________________________________________
+[ 15282] By: nick on 2002/03/18 08:11:28
+ Log: Tidy the "does not map" message for non-characters
+ (e.g. iso-8859-3 "\xA5").
+ Branch: perlio
+ ! ext/Encode/Encode.xs
+____________________________________________________________________________
+[ 15281] By: ams on 2002/03/18 04:44:37
+ Log: URL fix from MJD.
+ Branch: perl
+ ! pod/perlfaq3.pod
+____________________________________________________________________________
+[ 15280] By: jhi on 2002/03/18 01:58:51
+ Log: More prototype calming (really should fix the Configure
+ protochk, but not at this point in time).
+ Branch: perl
+ ! hints/solaris_2.sh
+____________________________________________________________________________
+[ 15279] By: jhi on 2002/03/18 01:19:40
+ Log: return at the wrong side of #endif.
+ Branch: perl
+ ! util.c
+____________________________________________________________________________
+[ 15278] By: ams on 2002/03/17 23:45:31
+ Log: Typo fix from Stas Bekman.
+ Branch: perl
+ ! pod/perlhack.pod
+____________________________________________________________________________
+[ 15277] By: ams on 2002/03/17 23:41:35
+ Log: Upgrade to Tie::File 0.21.
+ Branch: perl
+ + lib/Tie/File/t/30_defer.t lib/Tie/File/t/31_autodefer.t
+ + lib/Tie/File/t/32_defer_misc.t
+ ! MANIFEST lib/Tie/File.pm lib/Tie/File/t/00_version.t
+ ! lib/Tie/File/t/15_pushpop.t lib/Tie/File/t/17_misc_meth.t
+ ! lib/Tie/File/t/22_autochomp.t
+____________________________________________________________________________
+[ 15276] By: jhi on 2002/03/17 21:50:26
+ Log: Simple speed gainback (as it was in 5.6): for non-Unicode
+ character classes use inlined macros instead of the full
+ function call.
+ Branch: perl
+ ! regexec.c
+____________________________________________________________________________
+[ 15275] By: jhi on 2002/03/17 20:14:18
+ Log: Integrate perlio;
+
+ Avoid overwrite of un-allocated memory when SvCUR > SvLEN
+
+ Other :encoding oddities
+ - we should really pop while we can still make method calls
+ in case DESTROY does something.
+ - Provide a no-op DESTROY
+ - Use SvPV_only() rather than just SvPV_on()
+ Branch: perl
+ !> ext/Encode/Encode.pm ext/Encode/Encode.xs
+ !> ext/Encode/lib/Encode/Encoding.pm sv.c
+____________________________________________________________________________
+[ 15274] By: nick on 2002/03/17 20:00:12
+ Log: Other :encoding oddities
+ - we should really pop while we can still make method calls
+ in case DESTROY does something.
+ - Provide a no-op DESTROY
+ - Use SvPV_only() rather than just SvPV_on()
+ Branch: perlio
+ ! ext/Encode/Encode.pm ext/Encode/Encode.xs
+ ! ext/Encode/lib/Encode/Encoding.pm
+____________________________________________________________________________
+[ 15273] By: nick on 2002/03/17 19:53:24
+ Log: Avoid overwrite of un-allocated memory when SvCUR > SvLEN
+ Branch: perlio
+ ! sv.c
+____________________________________________________________________________
+[ 15272] By: jhi on 2002/03/17 18:39:22
+ Log: Implement the retry-on-ERANGE for the get*_r().
+ The buffer will keep doubling until 64k.
+ Branch: perl
+ ! embed.fnc embed.h global.sym pp_sys.c proto.h reentr.c
+ ! reentr.h reentr.pl
+____________________________________________________________________________
+[ 15271] By: nick on 2002/03/17 17:38:44
+ Log: Integrate mainline
+ Branch: perlio
+ +> lib/Tie/File/t/22_autochomp.t lib/Tie/File/t/23_rv_ac_splice.t
+ +> t/op/pow.t
+ !> (integrate 28 files)
+____________________________________________________________________________
+[ 15270] By: jhi on 2002/03/17 15:49:38
+ Log: Subject: UTF-8 bug (maybe alreayd known?)
+ From: andreas.koenig@anima.de (Andreas J. Koenig)
+ Date: Fri, 08 Mar 2002 16:36:01 +0100
+ Message-ID: <m3n0xjul5q.fsf@anima.de>
+ Branch: perl
+ ! pp_hot.c t/op/pat.t
+____________________________________________________________________________
+[ 15269] By: nick on 2002/03/17 09:12:39
+ Log: Integarate mainline
+ Branch: perlio
+ +> lib/Tie/File/t/00_version.t lib/Tie/File/t/18_rs_fixrec.t
+ +> lib/Tie/File/t/19_cache.t lib/Tie/File/t/20_cache_full.t
+ +> lib/Tie/File/t/21_win32.t reentr.c reentr.h reentr.pl
+ !> (integrate 69 files)
+____________________________________________________________________________
+[ 15268] By: jhi on 2002/03/17 04:23:49
+ Log: Subject: SEGV in s/// and UTF-8
+ From: andreas.koenig@anima.de (Andreas J. Koenig)
+ Date: Tue, 12 Mar 2002 00:40:09 +0100
+ Message-ID: <m3r8mqad2e.fsf@anima.de>
+ Branch: perl
+ ! regexec.c t/op/pat.t
+____________________________________________________________________________
+[ 15267] By: jhi on 2002/03/16 19:57:03
+ Log: Thwart IRIX long doubles and sloppy pow() (in Perl, **);
+ from Nicholas Clark. Fixes lib/integer.t and t/op/pack.t
+ which assume that 2**someinteger is accurate.
+ Branch: perl
+ + t/op/pow.t
+ ! MANIFEST pp.c t/test.pl
+____________________________________________________________________________
+[ 15266] By: jhi on 2002/03/16 18:55:53
+ Log: _r-ify config.win64, too.
+ Branch: perl
+ ! win32/config.win64
+____________________________________________________________________________
+[ 15265] By: jhi on 2002/03/16 18:51:45
+ Log: Better place to initialize (IRIX cc noticed that
+ the many "goto defchars" bypass the initialization)
+ Branch: perl
+ ! regcomp.c
+____________________________________________________________________________
+[ 15264] By: jhi on 2002/03/16 18:41:19
+ Log: If not building threaded, never mind the threaded prototypes.
+ Branch: perl
+ ! Configure reentr.pl
+____________________________________________________________________________
+[ 15263] By: jhi on 2002/03/16 18:40:53
+ Log: metaconfig: If not using threads, not point probing for the
+ prototypes (since they might be hidden behind many defines
+ we won't have if not building threaded)
+ Branch: metaconfig
+ ! U/threads/d_asctime_r.U U/threads/d_crypt_r.U
+ ! U/threads/d_ctermid_r.U U/threads/d_ctime_r.U
+ ! U/threads/d_drand48_r.U U/threads/d_endgrent_r.U
+ ! U/threads/d_endhostent_r.U U/threads/d_endnetent_r.U
+ ! U/threads/d_endprotoent_r.U U/threads/d_endpwent_r.U
+ ! U/threads/d_endservent_r.U U/threads/d_getgrent_r.U
+ ! U/threads/d_getgrgid_r.U U/threads/d_getgrnam_r.U
+ ! U/threads/d_gethostbyaddr_r.U U/threads/d_gethostbyname_r.U
+ ! U/threads/d_gethostent_r.U U/threads/d_getlogin_r.U
+ ! U/threads/d_getnetbyaddr_r.U U/threads/d_getnetbyname_r.U
+ ! U/threads/d_getnetent_r.U U/threads/d_getprotobyname_r.U
+ ! U/threads/d_getprotobynumber_r.U U/threads/d_getprotoent_r.U
+ ! U/threads/d_getpwent_r.U U/threads/d_getpwnam_r.U
+ ! U/threads/d_getpwuid_r.U U/threads/d_getservbyname_r.U
+ ! U/threads/d_getservbyport_r.U U/threads/d_getservent_r.U
+ ! U/threads/d_getspnam_r.U U/threads/d_gmtime_r.U
+ ! U/threads/d_localtime_r.U U/threads/d_random_r.U
+ ! U/threads/d_readdir64_r.U U/threads/d_readdir_r.U
+ ! U/threads/d_setgrent_r.U U/threads/d_sethostent_r.U
+ ! U/threads/d_setlocale_r.U U/threads/d_setnetent_r.U
+ ! U/threads/d_setprotoent_r.U U/threads/d_setpwent_r.U
+ ! U/threads/d_setservent_r.U U/threads/d_srand48_r.U
+ ! U/threads/d_srandom_r.U U/threads/d_strerror_r.U
+ ! U/threads/d_tmpnam_r.U U/threads/d_ttyname_r.U
+____________________________________________________________________________
+[ 15262] By: jhi on 2002/03/16 18:29:26
+ Log: FreeBSD is lying to us: there is no threadsafe gethostbyaddr_r.
+ Branch: perl
+ ! hints/freebsd.sh
+____________________________________________________________________________
+[ 15261] By: ams on 2002/03/16 18:14:04
+ Log: Upgrade to Tie::File 0.20.
+ Branch: perl
+ + lib/Tie/File/t/22_autochomp.t lib/Tie/File/t/23_rv_ac_splice.t
+ ! MANIFEST lib/Tie/File.pm lib/Tie/File/t/00_version.t
+ ! lib/Tie/File/t/01_gen.t lib/Tie/File/t/02_fetchsize.t
+ ! lib/Tie/File/t/03_longfetch.t lib/Tie/File/t/07_rv_splice.t
+ ! lib/Tie/File/t/08_ro.t lib/Tie/File/t/09_gen_rs.t
+ ! lib/Tie/File/t/11_rv_splice_rs.t
+ ! lib/Tie/File/t/12_longfetch_rs.t lib/Tie/File/t/15_pushpop.t
+ ! lib/Tie/File/t/16_handle.t
+____________________________________________________________________________
+[ 15260] By: jhi on 2002/03/16 18:12:25
+ Log: There seems to be a trend for the *time_r to be hidden.
+ Branch: perl
+ ! hints/irix_6.sh
+____________________________________________________________________________
+[ 15259] By: jhi on 2002/03/16 17:58:08
+ Log: Subject: [PATCH lib/Pod/Html.pm] fix anchor generation code (ID 20020312.006)
+ From: Stas Bekman <stas@stason.org>
+ Date: Sun, 17 Mar 2002 02:11:26 +0800 (SGT)
+ Message-ID: <Pine.LNX.4.44.0203170205130.16962-100000@hope.stason.org>
+ Branch: perl
+ ! lib/Pod/Html.pm
+____________________________________________________________________________
+[ 15258] By: jhi on 2002/03/16 17:54:49
+ Log: Subject: [PATCH] Re: dumpvar.pl bug
+ From: Peter Scott <Peter@PSDT.com>
+ Date: Fri, 15 Mar 2002 18:19:21 -0800
+ Message-id: <4.3.2.7.2.20020315153302.00bac420@shell2.webquarry.com>
+ Branch: perl
+ ! lib/dumpvar.pl lib/perl5db.pl
+____________________________________________________________________________
+[ 15257] By: jhi on 2002/03/16 17:52:29
+ Log: More paranoid _r protochecking. At least Tru64 and
+ Linux need additional hinting help to believe that
+ the time_r protos exist; turn on FreeBSD _THREAD_SAFE
+ to see what goes bang.
+ Branch: perl
+ ! Configure hints/dec_osf.sh hints/freebsd.sh hints/linux.sh
+ ! reentr.pl
+____________________________________________________________________________
+[ 15256] By: jhi on 2002/03/16 17:51:08
+ Log: metaconfig: more paranoid _r protochecking.
+ Branch: metaconfig
+ ! U/threads/d_asctime_r.U U/threads/d_crypt_r.U
+ ! U/threads/d_ctermid_r.U U/threads/d_ctime_r.U
+ ! U/threads/d_drand48_r.U U/threads/d_endgrent_r.U
+ ! U/threads/d_endhostent_r.U U/threads/d_endnetent_r.U
+ ! U/threads/d_endprotoent_r.U U/threads/d_endpwent_r.U
+ ! U/threads/d_endservent_r.U U/threads/d_getgrent_r.U
+ ! U/threads/d_getgrgid_r.U U/threads/d_getgrnam_r.U
+ ! U/threads/d_gethostbyaddr_r.U U/threads/d_gethostbyname_r.U
+ ! U/threads/d_gethostent_r.U U/threads/d_getlogin_r.U
+ ! U/threads/d_getnetbyaddr_r.U U/threads/d_getnetbyname_r.U
+ ! U/threads/d_getnetent_r.U U/threads/d_getprotobyname_r.U
+ ! U/threads/d_getprotobynumber_r.U U/threads/d_getprotoent_r.U
+ ! U/threads/d_getpwent_r.U U/threads/d_getpwnam_r.U
+ ! U/threads/d_getpwuid_r.U U/threads/d_getservbyname_r.U
+ ! U/threads/d_getservbyport_r.U U/threads/d_getservent_r.U
+ ! U/threads/d_getspnam_r.U U/threads/d_gmtime_r.U
+ ! U/threads/d_localtime_r.U U/threads/d_random_r.U
+ ! U/threads/d_readdir64_r.U U/threads/d_readdir_r.U
+ ! U/threads/d_setgrent_r.U U/threads/d_sethostent_r.U
+ ! U/threads/d_setlocale_r.U U/threads/d_setnetent_r.U
+ ! U/threads/d_setprotoent_r.U U/threads/d_setpwent_r.U
+ ! U/threads/d_setservent_r.U U/threads/d_srand48_r.U
+ ! U/threads/d_srandom_r.U U/threads/d_strerror_r.U
+ ! U/threads/d_tmpnam_r.U U/threads/d_ttyname_r.U
+____________________________________________________________________________
+[ 15255] By: jhi on 2002/03/16 16:23:07
+ Log: HP-UX gcc 3 warnings found by Sarathy.
+ Branch: perl
+ ! regcomp.c sv.c
+____________________________________________________________________________
+[ 15254] By: jhi on 2002/03/16 16:18:49
+ Log: Subject: Re: [ID 20020315.003] timelocal does not return fractal values anymore
+ From: Slaven Rezic <slaven.rezic@berlin.de>
+ Date: 16 Mar 2002 15:29:18 +0100
+ Message-ID: <877kocwpq9.fsf@vran.herceg.de>
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 15253] By: jhi on 2002/03/16 16:11:49
+ Log: HP-UX has also endgrent_r/endpwent_r marked obsolete.
+ Branch: perl
+ ! Porting/findrfuncs reentr.h reentr.pl
+____________________________________________________________________________
+[ 15252] By: gsar on 2002/03/16 15:36:16
+ Log: UIN32_MAX with borken under HP-UX+gcc
+ Branch: perl
+ ! handy.h
+____________________________________________________________________________
+[ 15251] By: ams on 2002/03/16 02:38:08
+ Log: Subject: [PATCH @15047] Use of inherited AUTOLOAD for non-method
+ *::DESTROY() is deprecated
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Date: Thu, 14 Mar 2002 18:39:22 -0500
+ Message-Id: <20020314183922.A8448@math.ohio-state.edu>
+
+ Subject: Re: [PATCH @15047] Use of inherited AUTOLOAD for non-method
+ *::DESTROY() is deprecated
+ From: Dave Mitchell <davem@fdgroup.com>
+ Date: Fri, 15 Mar 2002 19:22:49 +0000
+ Message-Id: <20020315192249.A22389@fdgroup.com>
+ Branch: perl
+ ! gv.c t/op/method.t
+____________________________________________________________________________
+[ 15250] By: ams on 2002/03/16 02:14:41
+ Log: Plural nit.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 15249] By: jhi on 2002/03/15 20:46:10
+ Log: Doesn't make sense to test for protos if the
+ functions are not to be used (!= functions exist!)
+ This might be the key (well, a key) to the HP-UX
+ problems.
+ Branch: perl
+ ! reentr.h reentr.pl
+____________________________________________________________________________
+[ 15248] By: jhi on 2002/03/15 20:05:46
+ Log: Typo in #15247.
+ Branch: perl
+ ! hints/hpux.sh
+____________________________________________________________________________
+[ 15247] By: jhi on 2002/03/15 19:41:43
+ Log: The UINT32_MAX_BROKEN is still needed for pre-gcc-3
+ in HP-UX (from H.Merijn Brand)
+ Branch: perl
+ ! hints/hpux.sh
+____________________________________________________________________________
+[ 15246] By: ams on 2002/03/15 17:53:23
+ Log: Subject: minor corrections in perldelta.pod
+ From: mjd@plover.com
+ Date: 15 Mar 2002 18:48:42 -0000
+ Message-Id: <20020315184842.13573.qmail@plover.com>
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 15245] By: ams on 2002/03/15 17:37:52
+ Log: Upgrade to Tie::File 0.19.
+ Branch: perl
+ + lib/Tie/File/t/00_version.t lib/Tie/File/t/18_rs_fixrec.t
+ + lib/Tie/File/t/19_cache.t lib/Tie/File/t/20_cache_full.t
+ + lib/Tie/File/t/21_win32.t
+ ! MANIFEST lib/Tie/File.pm lib/Tie/File/t/01_gen.t
+ ! lib/Tie/File/t/02_fetchsize.t lib/Tie/File/t/03_longfetch.t
+ ! lib/Tie/File/t/04_splice.t lib/Tie/File/t/05_size.t
+ ! lib/Tie/File/t/06_fixrec.t lib/Tie/File/t/07_rv_splice.t
+ ! lib/Tie/File/t/08_ro.t lib/Tie/File/t/09_gen_rs.t
+ ! lib/Tie/File/t/10_splice_rs.t lib/Tie/File/t/13_size_rs.t
+ ! lib/Tie/File/t/15_pushpop.t lib/Tie/File/t/16_handle.t
+ ! lib/Tie/File/t/17_misc_meth.t
+____________________________________________________________________________
+[ 15244] By: jhi on 2002/03/15 17:13:33
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 15243] By: jhi on 2002/03/15 16:18:16
Log: Forgot from #15241.
Branch: perl
diff --git a/Configure b/Configure
index 6ba787fe0f..9678a6ee91 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 Sat Mar 16 21:39:24 EET 2002 [metaconfig 3.0 PL70]
+# Generated on Mon Mar 18 16:52:30 EET 2002 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -965,7 +965,6 @@ perl5=''
perladmin=''
perlpath=''
d_nv_preserves_uv=''
-d_nv_preserves_uv_bits=''
i16size=''
i16type=''
i32size=''
@@ -976,6 +975,7 @@ i8size=''
i8type=''
ivsize=''
ivtype=''
+nv_preserves_uv_bits=''
nvsize=''
nvtype=''
u16size=''
@@ -13520,18 +13520,18 @@ set try
d_nv_preserves_uv="$undef"
if eval $compile; then
- d_nv_preserves_uv_bits="`$run ./try`"
+ nv_preserves_uv_bits="`$run ./try`"
fi
-case "$d_nv_preserves_uv_bits" in
+case "$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
+ nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits`
+ $echo "Your NVs can preserve all $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
+[1-9]*) $echo "Your NVs can preserve only $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" ;;
+ nv_preserves_uv_bits="$undef" ;;
esac
$rm -f try.* try
@@ -19737,7 +19737,6 @@ d_mymalloc='$d_mymalloc'
d_nice='$d_nice'
d_nl_langinfo='$d_nl_langinfo'
d_nv_preserves_uv='$d_nv_preserves_uv'
-d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
d_off64_t='$d_off64_t'
d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
d_oldpthreads='$d_oldpthreads'
@@ -20180,6 +20179,7 @@ nroff='$nroff'
nvEUformat='$nvEUformat'
nvFUformat='$nvFUformat'
nvGUformat='$nvGUformat'
+nv_preserves_uv_bits='$nv_preserves_uv_bits'
nveformat='$nveformat'
nvfformat='$nvfformat'
nvgformat='$nvgformat'
diff --git a/INSTALL b/INSTALL
index 2a42ab3223..45064a6db2 100644
--- a/INSTALL
+++ b/INSTALL
@@ -490,9 +490,9 @@ for you to use to distribute add-on modules.
These are normally empty, but may be set as needed. For example,
a vendor might choose the following settings:
- $prefix /usr/bin
- $siteprefix /usr/local/bin
- $vendorprefix /usr/bin
+ $prefix /usr
+ $siteprefix /usr/local
+ $vendorprefix /usr
This would have the effect of setting the following:
diff --git a/MANIFEST b/MANIFEST
index 696fd32e8b..07ee1a336a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -459,6 +459,7 @@ ext/List/Util/t/max.t List::Util
ext/List/Util/t/maxstr.t List::Util
ext/List/Util/t/min.t List::Util
ext/List/Util/t/minstr.t List::Util
+ext/List/Util/t/openhan.t Scalar::Util
ext/List/Util/t/readonly.t Scalar::Util
ext/List/Util/t/reduce.t List::Util
ext/List/Util/t/reftype.t Scalar::Util
diff --git a/NetWare/nwperlsys.c b/NetWare/nwperlsys.c
index 4fc65d31f0..9eca5225f7 100644
--- a/NetWare/nwperlsys.c
+++ b/NetWare/nwperlsys.c
@@ -87,9 +87,8 @@ perl_alloc(void)
WCValHashTable<void*>* m_allocList;
m_allocList = new WCValHashTable<void*> (fnAllocListHash, 256);
fnInsertHashListAddrs(m_allocList, FALSE);
-
my_perl = perl_alloc_using(&perlMem,
- NULL,
+ &perlMem,
NULL,
&perlEnv,
&perlStdIO,
@@ -169,9 +168,8 @@ perl_alloc_override(struct IPerlMem** ppMem, struct IPerlMem** ppMemShared,
lpProc=&perlProc;
else
lpProc=*ppProc;
-
my_perl = perl_alloc_using(lpMem,
- NULL,
+ lpMem,
NULL,
lpEnv,
lpStdio,
diff --git a/Porting/Glossary b/Porting/Glossary
index f8f5470ec5..a9b86e2fad 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -1315,7 +1315,7 @@ d_nv_preserves_uv (perlxv.U):
This variable indicates whether a variable of type nvtype
can preserve all the bits a variable of type uvtype.
-d_nv_preserves_uv_bits (perlxv.U):
+nv_preserves_uv_bits (perlxv.U):
This variable indicates how many of bits type uvtype
a variable nvtype can preserve.
diff --git a/Porting/config.sh b/Porting/config.sh
index a504dcefc0..416c87be06 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -308,7 +308,7 @@ d_mymalloc='undef'
d_nice='define'
d_nl_langinfo='define'
d_nv_preserves_uv='undef'
-d_nv_preserves_uv_bits='53'
+nv_preserves_uv_bits='53'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
diff --git a/README.tru64 b/README.tru64
index d65175a4c0..ce2181a4ef 100644
--- a/README.tru64
+++ b/README.tru64
@@ -48,6 +48,14 @@ You cannot Configure Perl to use long doubles unless you have at least
Tru64 V5.0, the long double support simply wasn't functional before
that.
+At the time of this writing, there's a bug in the Tru64 libc printing
+of long doubles when not using "e" notation. The values are correct
+and usable, but you only get a limited number of digits displayed
+unless you force the issue by using C<printf "%.33e",$num> or the like.
+For Tru64 versions V5.0A through V5.1A, a patch is expected sometime after
+perl 5.8.0 is released. If your libc has not yet been patched, you'll get
+a warning from Configure when selecting long doubles.
+
=head2 64-bit Perl on Tru64
In Tru64 Perl's integers are automatically 64-bit wide, there is
diff --git a/config_h.SH b/config_h.SH
index a65ebb29d2..b788f099b2 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -3168,7 +3168,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#endif
#define NVSIZE $nvsize /**/
#$d_nv_preserves_uv NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS $d_nv_preserves_uv_bits
+#define NV_PRESERVES_UV_BITS $nv_preserves_uv_bits
/* IVdf:
* This symbol defines the format string used for printing a Perl IV
diff --git a/configure.com b/configure.com
index 553d79a121..d7d0479fa7 100644
--- a/configure.com
+++ b/configure.com
@@ -4916,7 +4916,7 @@ $ IF tmp .EQS. "preserve"
$ THEN
$ d_nv_preserves_uv = "define"
$ echo "Yes, they can."
-$ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
+$ nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
$ ELSE
$ d_nv_preserves_uv = "undef"
$ echo "No, they can't."
@@ -4940,7 +4940,7 @@ $ WS " exit(0);"
$ WS "}"
$ CS
$ GOSUB compile
-$ d_nv_preserves_uv_bits = tmp
+$ nv_preserves_uv_bits = tmp
$ ENDIF
$!
$ echo4 "Checking whether your kill() uses SYS$FORCEX..."
@@ -4948,15 +4948,16 @@ $ kill_by_sigprc = "undef"
$ OS
$ WS "#include <stdio.h>"
$ WS "#include <signal.h>"
+$ WS "#include <unistd.h>"
$ WS "void handler(int s) { printf(""%d\n"",s); } "
$ WS "main(){"
$ WS " printf(""0"");"
-$ WS " signal(1,handler); kill(0,1);"
+$ WS " signal(1,handler); kill(getpid(),1);"
$ WS "}"
$ CS
$ ON ERROR THEN CONTINUE
$ GOSUB compile
-$ IF tmp .NES. "0"
+$ IF tmp .NES. "01"
$ THEN
$ echo4 "Yes, it does."
$ echo4 "Checking whether we can use SYS$SIGPRC instead"
@@ -5275,7 +5276,7 @@ $ WC "d_mymalloc='" + d_mymalloc + "'"
$ WC "d_nice='define'"
$ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
-$ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
+$ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
$ WC "d_off64_t='" + d_off64_t + "'"
$ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
$ WC "d_oldarchlib='define'"
diff --git a/cop.h b/cop.h
index d617bfc32a..3b2699e401 100644
--- a/cop.h
+++ b/cop.h
@@ -30,13 +30,25 @@ struct cop {
# define CopFILE(c) ((c)->cop_file)
# define CopFILEGV(c) (CopFILE(c) \
? gv_fetchfile(CopFILE(c)) : Nullgv)
-# define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv))
+
+ #ifdef NETWARE
+ #define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
+ #else
+ #define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv))
+ #endif
+
# define CopFILESV(c) (CopFILE(c) \
? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
# define CopFILEAV(c) (CopFILE(c) \
? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
# define CopSTASHPV(c) ((c)->cop_stashpv)
-# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savesharedpv(pv))
+
+ #ifdef NETWARE
+ #define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
+ #else
+ #define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savesharedpv(pv))
+ #endif
+
# define CopSTASH(c) (CopSTASHPV(c) \
? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
@@ -44,8 +56,17 @@ struct cop {
&& (CopSTASHPV(c) == HvNAME(hv) \
|| (CopSTASHPV(c) && HvNAME(hv) \
&& strEQ(CopSTASHPV(c), HvNAME(hv)))))
-# define CopSTASH_free(c) PerlMemShared_free(CopSTASHPV(c))
-# define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = Nullch))
+ #ifdef NETWARE
+ #define CopSTASH_free(c) SAVECOPSTASH_FREE(c)
+ #else
+ #define CopSTASH_free(c) PerlMemShared_free(CopSTASHPV(c))
+ #endif
+
+ #ifdef NETWARE
+ #define CopFILE_free(c) SAVECOPFILE_FREE(c)
+ #else
+ #define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = Nullch))
+ #endif
#else
# define CopFILEGV(c) ((c)->cop_filegv)
# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
diff --git a/embed.fnc b/embed.fnc
index 469a727275..16c006616e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1157,8 +1157,7 @@ s |I32 |regmatch |regnode *prog
s |I32 |regrepeat |regnode *p|I32 max
s |I32 |regrepeat_hard |regnode *p|I32 max|I32 *lp
s |I32 |regtry |regexp *prog|char *startpos
-s |bool |reginclass |regnode *n|U8 *p|bool do_utf8sv_is_utf8
-s |bool |reginclasslen |regnode *n|U8 *p|STRLEN *lenp|bool do_utf8sv_is_utf8
+s |bool |reginclass |regnode *n|U8 *p|STRLEN *lenp|bool do_utf8sv_is_utf8
s |CHECKPOINT|regcppush |I32 parenfloor
s |char*|regcppop
s |char*|regcp_set_to |I32 ss
diff --git a/embed.h b/embed.h
index 457c786677..787a045d1c 100644
--- a/embed.h
+++ b/embed.h
@@ -1079,7 +1079,6 @@
#define regrepeat_hard S_regrepeat_hard
#define regtry S_regtry
#define reginclass S_reginclass
-#define reginclasslen S_reginclasslen
#define regcppush S_regcppush
#define regcppop S_regcppop
#define regcp_set_to S_regcp_set_to
@@ -2630,8 +2629,7 @@
#define regrepeat(a,b) S_regrepeat(aTHX_ a,b)
#define regrepeat_hard(a,b,c) S_regrepeat_hard(aTHX_ a,b,c)
#define regtry(a,b) S_regtry(aTHX_ a,b)
-#define reginclass(a,b,c) S_reginclass(aTHX_ a,b,c)
-#define reginclasslen(a,b,c,d) S_reginclasslen(aTHX_ a,b,c,d)
+#define reginclass(a,b,c,d) S_reginclass(aTHX_ a,b,c,d)
#define regcppush(a) S_regcppush(aTHX_ a)
#define regcppop() S_regcppop(aTHX)
#define regcp_set_to(a) S_regcp_set_to(aTHX_ a)
diff --git a/epoc/config.sh b/epoc/config.sh
index ad19c35f45..fad379c6af 100644
--- a/epoc/config.sh
+++ b/epoc/config.sh
@@ -949,7 +949,7 @@ d_strtold='undef'
d_strtoll='undef'
d_strtouq='undef'
d_nv_preserves_uv='define'
-d_nv_preserves_uv_bits='32'
+nv_preserves_uv_bits='32'
use5005threads='undef'
useithreads='undef'
inc_version_list=' '
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 46c834a2c4..305c5b86de 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -7,7 +7,7 @@
#
package B;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
use XSLoader ();
require Exporter;
@@ -18,7 +18,7 @@ require Exporter;
@EXPORT_OK = qw(minus_c ppname save_BEGINs
class peekop cast_I32 cstring cchar hash threadsv_names
main_root main_start main_cv svref_2object opnumber
- amagic_generation
+ amagic_generation perlstring
walkoptree_slow walkoptree walkoptree_exec walksymtable
parents comppadlist sv_undef compile_stats timing_info
begin_av init_av end_av regex_padav);
@@ -941,6 +941,11 @@ is only useful in a BEGIN block or else the flag is set too late.
Returns a double-quote-surrounded escaped version of STR which can
be used as a string in C source code.
+=item perlstring(STR)
+
+Returns a double-quote-surrounded escaped version of STR which can
+be used as a string in Perl source code.
+
=item class(OBJ)
Returns the class of an object without the part of the classname
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 155c3dabfe..885a73c6d9 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -224,7 +224,7 @@ make_mg_object(pTHX_ SV *arg, MAGIC *mg)
}
static SV *
-cstring(pTHX_ SV *sv)
+cstring(pTHX_ SV *sv, bool perlstyle)
{
SV *sstr = newSVpvn("", 0);
STRLEN len;
@@ -233,6 +233,34 @@ cstring(pTHX_ SV *sv)
if (!SvOK(sv))
sv_setpvn(sstr, "0", 1);
+ else if (perlstyle && SvUTF8(sv))
+ {
+ SV *tmpsv = sv_newmortal(); /* Temporary SV to feed sv_uni_display */
+ len = SvCUR(sv);
+ s = sv_uni_display(tmpsv, sv, 8*len, UNI_DISPLAY_QQ);
+ sv_setpv(sstr,"\"");
+ while (*s)
+ {
+ if (*s == '"')
+ sv_catpv(sstr, "\\\"");
+ else if (*s == '$')
+ sv_catpv(sstr, "\\$");
+ else if (*s == '@')
+ sv_catpv(sstr, "\\@");
+ else if (*s == '\\')
+ {
+ if (strchr("nrftax\\",*(s+1)))
+ sv_catpvn(sstr, s++, 2);
+ else
+ sv_catpv(sstr, "\\\\");
+ }
+ else /* should always be printable */
+ sv_catpvn(sstr, s, 1);
+ ++s;
+ }
+ sv_catpv(sstr, "\"");
+ return sstr;
+ }
else
{
/* XXX Optimise? */
@@ -246,11 +274,15 @@ cstring(pTHX_ SV *sv)
else if (*s == '\\')
sv_catpv(sstr, "\\\\");
/* trigraphs - bleagh */
- else if (*s == '?' && len>=3 && s[1] == '?')
+ else if (!perlstyle && *s == '?' && len>=3 && s[1] == '?')
{
sprintf(escbuff, "\\%03o", '?');
sv_catpv(sstr, escbuff);
}
+ else if (perlstyle && *s == '$')
+ sv_catpv(sstr, "\\$");
+ else if (perlstyle && *s == '@')
+ sv_catpv(sstr, "\\@");
#ifdef EBCDIC
else if (isPRINT(*s))
#else
@@ -269,7 +301,7 @@ cstring(pTHX_ SV *sv)
sv_catpv(sstr, "\\b");
else if (*s == '\f')
sv_catpv(sstr, "\\f");
- else if (*s == '\v')
+ else if (!perlstyle && *s == '\v')
sv_catpv(sstr, "\\v");
else
{
@@ -561,7 +593,15 @@ SV *
cstring(sv)
SV * sv
CODE:
- RETVAL = cstring(aTHX_ sv);
+ RETVAL = cstring(aTHX_ sv, 0);
+ OUTPUT:
+ RETVAL
+
+SV *
+perlstring(sv)
+ SV * sv
+ CODE:
+ RETVAL = cstring(aTHX_ sv, 1);
OUTPUT:
RETVAL
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index c405ef385e..39b38d1bd8 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -8,7 +8,7 @@
package B::Deparse;
use Carp;
-use B qw(class main_root main_start main_cv svref_2object opnumber cstring
+use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
OPf_WANT OPf_WANT_VOID OPf_WANT_SCALAR OPf_WANT_LIST
OPf_KIDS OPf_REF OPf_STACKED OPf_SPECIAL OPf_MOD
OPpLVAL_INTRO OPpOUR_INTRO OPpENTERSUB_AMPER OPpSLICE OPpCONST_BARE
@@ -542,14 +542,14 @@ sub compile {
my $self = B::Deparse->new(@args);
# First deparse command-line args
if (defined $^I) { # deparse -i
- print q(BEGIN { $^I = ).cstring($^I).qq(; }\n);
+ print q(BEGIN { $^I = ).perlstring($^I).qq(; }\n);
}
if ($^W) { # deparse -w
print qq(BEGIN { \$^W = $^W; }\n);
}
if ($/ ne "\n" or defined $O::savebackslash) { # deparse -l and -0
- my $fs = cstring($/) || 'undef';
- my $bs = cstring($O::savebackslash) || 'undef';
+ my $fs = perlstring($/) || 'undef';
+ my $bs = perlstring($O::savebackslash) || 'undef';
print qq(BEGIN { \$/ = $fs; \$\\ = $bs; }\n);
}
my @BEGINs = B::begin_av->isa("B::AV") ? B::begin_av->ARRAY : ();
@@ -1265,9 +1265,7 @@ sub declare_warnings {
elsif (($to & WARN_MASK) eq "\0"x length($to)) {
return "no warnings;\n";
}
- my $wb = cstring($to);
- $wb =~ s/([\$@])/\\$1/g;
- return "BEGIN {\${^WARNING_BITS} = $wb}\n";
+ return "BEGIN {\${^WARNING_BITS} = ".perlstring($to)."}\n";
}
sub declare_hints {
diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL
index 10e90b0f81..d39d3b5f9c 100644
--- a/ext/B/Makefile.PL
+++ b/ext/B/Makefile.PL
@@ -15,14 +15,14 @@ if ($^O eq 'MSWin32') {
}
WriteMakefile(
- NAME => "B",
- VERSION => "1.00",
- PL_FILES => { 'defsubs_h.PL' => 'defsubs.h' },
- MAN3PODS => {},
- clean => {
- FILES => "perl$e *$o B.c defsubs.h *~"
+ NAME => "B",
+ VERSION_FROM => "B.pm",
+ PL_FILES => { 'defsubs_h.PL' => 'defsubs.h' },
+ MAN3PODS => {},
+ clean => {
+ FILES => "perl$e *$o B.c defsubs.h *~"
}
-);
+);
package MY;
diff --git a/ext/B/t/xref.t b/ext/B/t/xref.t
index 8268e3f898..8b143556e3 100644
--- a/ext/B/t/xref.t
+++ b/ext/B/t/xref.t
@@ -93,6 +93,11 @@ is(
'1001', 'glob FOO used in subroutine foo'
);
+END {
+ close XREF;
+ 1 while unlink $file;
+}
+
# End of tests.
# Now some stuff to feed B::Xref
@@ -100,3 +105,4 @@ is(
package Testing::Xref;
sub foo { print FOO %::xreftable; }
sub bar { print FOO foo; }
+
diff --git a/ext/List/Util/ChangeLog b/ext/List/Util/ChangeLog
index 5ab668b155..934643ace1 100644
--- a/ext/List/Util/ChangeLog
+++ b/ext/List/Util/ChangeLog
@@ -1,3 +1,11 @@
+Change 713 on 2002/03/18 by <gbarr@pobox.com> (Graham Barr)
+
+ Add Scalar::Util::openhandle()
+
+Change 647 on 2001/09/18 by <gbarr@pobox.com> (Graham Barr)
+
+ Release 1.06
+
Change 645 on 2001/09/07 by <gbarr@pobox.com> (Graham Barr)
Some platforms require the main executable to export symbols
diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm
index 91dbcdb7b6..1843873e5e 100644
--- a/ext/List/Util/lib/List/Util.pm
+++ b/ext/List/Util/lib/List/Util.pm
@@ -11,7 +11,7 @@ require DynaLoader;
our @ISA = qw(Exporter DynaLoader);
our @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle);
-our $VERSION = "1.06_00";
+our $VERSION = "1.07_00";
bootstrap List::Util $VERSION;
diff --git a/ext/List/Util/lib/Scalar/Util.pm b/ext/List/Util/lib/Scalar/Util.pm
index 1329d1a48a..e518a4c445 100644
--- a/ext/List/Util/lib/Scalar/Util.pm
+++ b/ext/List/Util/lib/Scalar/Util.pm
@@ -10,9 +10,27 @@ require Exporter;
require List::Util; # List::Util loads the XS
our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly);
+our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle);
our $VERSION = $List::Util::VERSION;
+sub openhandle ($) {
+ my $fh = shift;
+ my $rt = reftype($fh) || '';
+
+ return defined(fileno($fh)) ? $fh : undef
+ if $rt eq 'IO';
+
+ if (reftype(\$fh) eq 'GLOB') { # handle openhandle(*DATA)
+ $fh = \(my $tmp=$fh);
+ }
+ elsif ($rt ne 'GLOB') {
+ return undef;
+ }
+
+ (tied(*$fh) or defined(fileno($fh)))
+ ? $fh : undef;
+}
+
1;
__END__
@@ -69,6 +87,16 @@ If EXPR is a scalar which is a weak reference the result is true.
weaken($ref);
$weak = isweak($ref); # true
+=item openhandle FH
+
+Returns FH if FH may be used as a filehandle and is open, or FH is a tied
+handle. Otherwise C<undef> is returned.
+
+ $fh = openhandle(*STDIN); # \*STDIN
+ $fh = openhandle(\*STDIN); # \*STDIN
+ $fh = openhandle(*NOTOPEN); # undef
+ $fh = openhandle("scalar"); # undef
+
=item readonly SCALAR
Returns true if SCALAR is readonly.
diff --git a/ext/List/Util/t/openhan.t b/ext/List/Util/t/openhan.t
new file mode 100644
index 0000000000..9eed5b9488
--- /dev/null
+++ b/ext/List/Util/t/openhan.t
@@ -0,0 +1,33 @@
+#!./perl
+
+BEGIN {
+ unless (-d 'blib') {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Config; import Config;
+ keys %Config; # Silence warning
+ if ($Config{extensions} !~ /\bList\/Util\b/) {
+ print "1..0 # Skip: List::Util was not built\n";
+ exit 0;
+ }
+ }
+}
+
+
+use Scalar::Util qw(openhandle);
+
+print "1..4\n";
+
+print "not " unless defined &openhandle;
+print "ok 1\n";
+
+my $fh = \*STDERR;
+print "not " unless openhandle($fh) == $fh;
+print "ok 2\n";
+
+print "not " unless fileno(openhandle(*STDERR)) == fileno(STDERR);
+print "ok 3\n";
+
+print "not " if openhandle(CLOSED);
+print "ok 4\n";
+
diff --git a/ext/threads/t/end.t b/ext/threads/t/end.t
index 199ca4771a..f3dd92c900 100644
--- a/ext/threads/t/end.t
+++ b/ext/threads/t/end.t
@@ -1,4 +1,7 @@
+# test that END blocks are run in the thread that created them and
+# not in any child threads
+
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index dcaa2832ce..b30f218945 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -310,6 +310,41 @@ Cannot continue, aborting.
EOF
exit 1
;;
+ *)
+ # Test whether libc's been fixed yet.
+ cat >try.c <<\TRY
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ unsigned long uvmax = ~0UL;
+ long double ld = uvmax + 0.0L;
+ char buf1[30], buf2[30];
+
+ (void) sprintf(buf1, "%lu", uvmax);
+ (void) sprintf(buf2, "%.0Lf", ld);
+ return strcmp(buf1, buf2) != 0;
+}
+TRY
+ # Don't bother trying to work with Configure's idea of
+ # cc and the various flags. This might not work as-is
+ # with gcc -- but we're testing libc, not the compiler.
+ if cc -o try -std try.c && ./try
+ then
+ : ok
+ else
+ cat <<\UGLY >&4
+!
+Warning! Your libc has not yet been patched so that its "%Lf" format for
+printing long doubles shows all the significant digits. You will get errors
+in the t/op/numconvert test because of this. (The data is still good
+internally, and the "%e" format of printf() or sprintf() in perl will still
+produce valid results.) See README.tru64 for additional details.
+
+Continuing anyway.
+!
+UGLY
+ fi
+ $rm -f try try.c
esac
;;
esac
diff --git a/hints/hpux.sh b/hints/hpux.sh
index f8ea087c71..f2363039b1 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -20,7 +20,7 @@ if [ "$xxOsRevMajor" -ge 10 ]; then
xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
archname=`sed -n -e "s/^#[ \t]*define[ \t]*CPU_//p" /usr/include/sys/unistd.h |
sed -n -e "s/[ \t]*$xxcpu[ \t].*//p" |
- sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./`;
+ sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`;
else
# This system is running <= 9.x
# Tested on 9.0[57] PA and [78].0 MC680[23]0. Idea: After removing
@@ -162,14 +162,23 @@ case "$usemorebits" in
$define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
esac
-case "$uselongdouble" in
- $define|true|[yY]*)
- cat <<EOM >&4
+case "$archname" in
+ IA64*)
+ # While here, override so=sl auto-detection
+ so='so'
+ ;;
+ *)
+ case "$uselongdouble" in
+ *) ;;
+ $define|true|[yY]*)
+ cat <<EOM >&4
*** long doubles are not (yet) supported on HP-UX (any version)
*** Until it does, we cannot continue, aborting.
EOM
- exit 1 ;;
+ exit 1 ;;
+ esac
+ ;;
esac
case "$use64bitint" in
@@ -227,6 +236,7 @@ EOM
# Reset the library checker to make sure libraries
# are the right type
+ # (NOTE: on IA64, this doesn't work with .a files.)
libscheck='case "`/usr/bin/file $xxx`" in
*ELF-64*|*LP64*|*PA-RISC2.0*) ;;
*) xxx=/no/64-bit$xxx ;;
@@ -294,6 +304,7 @@ optimization, raise the 'maxdsiz' kernel configuration parameter
to at least 0x08000000 (128 Mb) and rebuild your kernel.
EOM
regexec_cflags=''
+doop_cflags=''
fi
case "$ccisgcc" in
@@ -336,15 +347,22 @@ case "$ccisgcc" in
"") optimize="+O2 +Onolimit" ;;
*O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
esac
- if [ $maxdsiz -le 64 ]; then
- case "$optimize" in
- *-O*|\
- *O2*) opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'`
- toke_cflags="$toke_cflags;optimize=\"$opt\""
- regexec_cflags="optimize=\"$opt\""
- ;;
+ case "$optimize" in
+ *-O*|\
+ *O2*) opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'`
+ ;;
+ *) opt="$optimize"
+ ;;
esac
+ if [ $maxdsiz -le 64 ]; then
+ toke_cflags="$toke_cflags;optimize=\"$opt\""
+ regexec_cflags="optimize=\"$opt\""
fi
+ case "$archname" in
+ IA64*)
+ doop_cflags="optimize=\"$opt\""
+ ;;
+ esac
ld=/usr/bin/ld
cccdlflags='+Z'
lddlflags='-b +vnocompatwarnings'
@@ -374,8 +392,8 @@ case "$uselargefiles" in
# but we cheat for now. (Keep that in the left margin.)
ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- case "$ccflags" in
- *" $ccflags_uselargefiles") ;;
+ case " $ccflags " in
+ *" $ccflags_uselargefiles "*) ;;
*) ccflags="$ccflags $ccflags_uselargefiles" ;;
esac
@@ -494,4 +512,9 @@ EOM
EOCBU
# fpclassify() is a macro, the library call is Fpclassify
+# Similarly with the others below.
d_fpclassify='define'
+d_isnan='define'
+d_isinf='define'
+d_isfinite='define'
+d_unordered='define'
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index a9055c7398..37142d04b6 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -394,7 +394,8 @@ EOM
# These prototypes should be visible since we using
# -D_REENTRANT, but that does not seem to work.
- # It does seem to work for getnetbyaddr_r, weirdly enough.
+ # It does seem to work for getnetbyaddr_r, weirdly enough,
+ # and other _r functions. (Solaris 8)
d_ctermid_r_proto="$define"
d_gethostbyaddr_r_proto="$define"
@@ -405,6 +406,10 @@ EOM
d_getservbyname_r_proto="$define"
d_getservbyport_r_proto="$define"
+ # Ditto. (Solaris 7)
+ d_readdir_r_proto="$define"
+ d_readdir64_r_proto="$define"
+
;;
esac
EOCBU
diff --git a/iperlsys.h b/iperlsys.h
index 7eda973426..b2b21727e4 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -795,6 +795,25 @@ struct IPerlMemInfo
(*PL_Mem->pIsLocked)(PL_Mem)
/* Shared memory macros */
+#ifdef NETWARE
+
+ #define PerlMemShared_malloc(size) \
+ (*PL_Mem->pMalloc)(PL_Mem, (size))
+#define PerlMemShared_realloc(buf, size) \
+ (*PL_Mem->pRealloc)(PL_Mem, (buf), (size))
+#define PerlMemShared_free(buf) \
+ (*PL_Mem->pFree)(PL_Mem, (buf))
+#define PerlMemShared_calloc(num, size) \
+ (*PL_Mem->pCalloc)(PL_Mem, (num), (size))
+#define PerlMemShared_get_lock() \
+ (*PL_Mem->pGetLock)(PL_Mem)
+#define PerlMemShared_free_lock() \
+ (*PL_Mem->pFreeLock)(PL_Mem)
+#define PerlMemShared_is_locked() \
+ (*PL_Mem->pIsLocked)(PL_Mem)
+
+#else
+
#define PerlMemShared_malloc(size) \
(*PL_MemShared->pMalloc)(PL_MemShared, (size))
#define PerlMemShared_realloc(buf, size) \
@@ -810,6 +829,7 @@ struct IPerlMemInfo
#define PerlMemShared_is_locked() \
(*PL_MemShared->pIsLocked)(PL_MemShared)
+#endif
/* Parse tree memory macros */
#define PerlMemParse_malloc(size) \
diff --git a/lib/Tie/File.pm b/lib/Tie/File.pm
index ec9a8207c7..92d16ce9a1 100644
--- a/lib/Tie/File.pm
+++ b/lib/Tie/File.pm
@@ -5,7 +5,7 @@ use POSIX 'SEEK_SET';
use Fcntl 'O_CREAT', 'O_RDWR', 'LOCK_EX';
require 5.005;
-$VERSION = "0.21";
+$VERSION = "0.50";
my $DEFAULT_MEMORY_SIZE = 1<<21; # 2 megabytes
my %good_opt = map {$_ => 1, "-$_" => 1}
@@ -318,9 +318,9 @@ sub EXTEND {
sub DELETE {
my ($self, $n) = @_;
- $self->_delete_deferred($n) if $self->{defer};
my $lastrec = $self->FETCHSIZE-1;
my $rec = $self->FETCH($n);
+ $self->_delete_deferred($n) if $self->{defer};
if ($n == $lastrec) {
$self->_seek($n);
$self->_chop_file;
@@ -960,7 +960,7 @@ Tie::File - Access the lines of a disk file via a Perl array
=head1 SYNOPSIS
- # This file documents Tie::File version 0.21
+ # This file documents Tie::File version 0.50
tie @array, 'Tie::File', filename or die ...;
@@ -1486,7 +1486,7 @@ any news of importance, will be available at
=head1 LICENSE
-C<Tie::File> version 0.21 is copyright (C) 2002 Mark Jason Dominus.
+C<Tie::File> version 0.50 is copyright (C) 2002 Mark Jason Dominus.
This library is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
@@ -1514,7 +1514,7 @@ For licensing inquiries, contact the author at:
=head1 WARRANTY
-C<Tie::File> version 0.21 comes with ABSOLUTELY NO WARRANTY.
+C<Tie::File> version 0.50 comes with ABSOLUTELY NO WARRANTY.
For details, see the license.
=head1 THANKS
diff --git a/lib/Tie/File/t/00_version.t b/lib/Tie/File/t/00_version.t
index 5d950b9c20..ce8c96499c 100644
--- a/lib/Tie/File/t/00_version.t
+++ b/lib/Tie/File/t/00_version.t
@@ -2,7 +2,7 @@
print "1..1\n";
-my $testversion = "0.21";
+my $testversion = "0.50";
use Tie::File;
if ($Tie::File::VERSION != $testversion) {
diff --git a/lib/Tie/File/t/32_defer_misc.t b/lib/Tie/File/t/32_defer_misc.t
index 8e6edf94a4..5193cf0ca3 100644
--- a/lib/Tie/File/t/32_defer_misc.t
+++ b/lib/Tie/File/t/32_defer_misc.t
@@ -11,7 +11,7 @@ $: = Tie::File::_default_recsep();
my $data = "rec0$:rec1$:rec2$:";
my ($o, $n);
-print "1..42\n";
+print "1..53\n";
my $N = 1;
use Tie::File;
@@ -101,16 +101,16 @@ $del = delete $a[3]; # shortens file!
check_contents("0$:1$:2$:"); # deferred writes NOT flushed
expect($a[3], undef);
expect($a[2], "");
-exoect($del, "3");
+expect($del, "3");
$a[2] = "cookies";
$del = delete $a[2]; # shortens file!
expect($a[2], undef);
-exoect($del, 'cookies');
+expect($del, 'cookies');
check_contents("0$:1$:");
$a[0] = "crackers";
$del = delete $a[0]; # file unchanged
expect($a[0], "");
-exoect($del, 'crackers');
+expect($del, 'crackers');
check_contents("0$:1$:"); # no change yet
$o->flush;
check_contents("$:1$:"); # record 0 is NOT 'cookies';
diff --git a/op.c b/op.c
index d00abec749..c755d1142e 100644
--- a/op.c
+++ b/op.c
@@ -45,8 +45,8 @@ S_Slab_Alloc(pTHX_ int m, size_t sz)
*/
sz = (sz + 2*sizeof(I32 *) -1)/sizeof(I32 *);
if ((PL_OpSpace -= sz) < 0) {
- PL_OpPtr = (I32 **) PerlMemShared_malloc(PERL_SLAB_SIZE*sizeof(I32*));
- if (!PL_OpPtr) {
+ PL_OpPtr = (I32 **) PerlMemShared_malloc(PERL_SLAB_SIZE*sizeof(I32*));
+ if (!PL_OpPtr) {
return NULL;
}
Zero(PL_OpPtr,PERL_SLAB_SIZE,I32 **);
@@ -82,7 +82,11 @@ S_Slab_Free(pTHX_ void *op)
assert( ptr < ( (I32 **) slab + PERL_SLAB_SIZE) );
assert( *slab > 0 );
if (--(*slab) == 0) {
- PerlMemShared_free(slab);
+ #ifdef NETWARE
+ #define PerlMemShared PerlMem
+ #endif
+
+ PerlMemShared_free(slab);
if (slab == PL_OpSlab) {
PL_OpSpace = 0;
}
diff --git a/patchlevel.h b/patchlevel.h
index bb546d83d8..e78d6805ec 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -79,7 +79,7 @@
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
- ,"DEVEL15243"
+ ,"DEVEL15299"
,NULL
};
diff --git a/perl.c b/perl.c
index 13df3e453d..ebf5ca121d 100644
--- a/perl.c
+++ b/perl.c
@@ -258,6 +258,11 @@ perl_construct(pTHXx)
PL_fdpid = newAV(); /* for remembering popen pids by fd */
PL_modglobal = newHV(); /* pointers to per-interpreter module globals */
PL_errors = newSVpvn("",0);
+#ifdef DEBUGGING
+ sv_setpvn(PERL_DEBUG_PAD(0), "", 0); /* For regex debugging. */
+ sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
+ sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
+#endif
#ifdef USE_ITHREADS
PL_regex_padav = newAV();
av_push(PL_regex_padav,(SV*)newAV()); /* First entry is an array of empty elements */
diff --git a/perl.h b/perl.h
index f91cb0bee4..6b32ffd86c 100644
--- a/perl.h
+++ b/perl.h
@@ -1233,7 +1233,7 @@ typedef NVTYPE NV;
# else
# define Perl_frexp(x,y) ((long double)frexp((double)(x),y))
# endif
-# ifndef Perl_isinf
+# ifndef Perl_isnan
# ifdef HAS_ISNANL
# define Perl_isnan(x) isnanl(x)
# endif
@@ -1341,7 +1341,7 @@ typedef NVTYPE NV;
#if !defined(Perl_fp_class) && defined(HAS_FPCLASSIFY)
# include <math.h>
# define Perl_fp_class(x) fpclassify(x)
-# define Perl_fp_class_nan(x) (fp_classify(x)==FP_SNAN|FP|_fp_classify(x)==QNAN)
+# define Perl_fp_class_nan(x) (fp_classify(x)==FP_SNAN||fp_classify(x)==FP_QNAN)
# define Perl_fp_class_inf(x) (fp_classify(x)==FP_INFINITE)
# define Perl_fp_class_norm(x) (fp_classify(x)==FP_NORMAL)
# define Perl_fp_class_denorm(x) (fp_classify(x)==FP_SUBNORMAL)
@@ -3183,7 +3183,7 @@ struct perl_debug_pad {
};
#define PERL_DEBUG_PAD(i) &(PL_debug_pad.pad[i])
-#define PERL_DEBUG_PAD_ZERO(i) (sv_setpvn(PERL_DEBUG_PAD(i), "", 0), PERL_DEBUG_PAD(i))
+#define PERL_DEBUG_PAD_ZERO(i) (SvPVX(PERL_DEBUG_PAD(i))[0] = 0, SvCUR(PERL_DEBUG_PAD(i)) = 0, PERL_DEBUG_PAD(i))
/* Enable variables which are pointers to functions */
typedef void (CPERLscope(*peep_t))(pTHX_ OP* o);
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 10c031bcfe..f973b31264 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -2614,21 +2614,22 @@ OS/390 has rather many test failures but the situation is actually
better than it was in 5.6.0, it's just that so many new modules and
tests have been added.
- ../ext/B/t/deparse.t 17 1 5.88% 14
- ../ext/IO/lib/IO/t/io_unix.t 5 4 80.00% 2-5
- ../lib/utf8.t 94 13 13.83% 27 30-31 43 46 73
- 76 79 82 85 88 91
- 94
- ../lib/Benchmark.t 1 256 159 1 0.63% 75
- ../lib/ExtUtils/t/Embed.t 9 9 100.00% 1-9
- ../lib/ExtUtils/t/ExtUtils.t 27 19 70.37% 5-23
- op/pat.t 858 9 1.05% 242-243 665 776 785
- 832-834 845
- op/sprintf.t 224 3 1.34% 98 100 136
- op/tr.t 97 5 5.15% 63 71-74
- uni/fold.t 767 8 1.04% 25-26 62 169 196
- 648 697-698
-57 tests and 377 subtests skipped.
+ ../ext/B/t/deparse.t 17 1 5.88% 14
+ ../ext/Data/Dumper/t/dumper.t 321 2 0.62% 311 314
+ ../ext/IO/lib/IO/t/io_unix.t 5 4 80.00% 2-5
+ ../lib/utf8.t 94 13 13.83% 27 30-31 43 46 73
+ 76 79 82 85 88 91
+ 94
+ ../lib/Benchmark.t 1 256 159 1 0.63% 75
+ ../lib/ExtUtils/t/Embed.t 9 9 100.00% 1-9
+ ../lib/ExtUtils/t/ExtUtils.t 27 19 70.37% 5-23
+ op/pat.t 864 9 1.04% 242-243 665 776
+ 785 832-834 845
+ op/sprintf.t 224 3 1.34% 98 100 136
+ op/tr.t 97 5 5.15% 63 71-74
+ uni/fold.t 767 8 1.04% 25-26 62 169 196
+ 648 697-698
+ 60 tests and 384 subtests skipped.
=head2 op/sprintf tests 129 and 130
diff --git a/pod/perlebcdic.pod b/pod/perlebcdic.pod
index 6339bb4c2e..0053d91a38 100644
--- a/pod/perlebcdic.pod
+++ b/pod/perlebcdic.pod
@@ -97,6 +97,26 @@ for VM/ESA. CCSID 1047 differs from CCSID 0037 in eight places.
The EBCDIC code page in use on Siemens' BS2000 system is distinct from
1047 and 0037. It is identified below as the POSIX-BC set.
+=head2 Unicode code points versus EBCDIC code points
+
+In Unicode terminology a I<code point> is the number assigned to a
+character: for example, in EBCDIC the character "A" is usually assigned
+the number 193. In Unicode the character "A" is assigned the number 65.
+This causes a problem with the semantics of the pack/unpack "U", which
+are supposed to pack Unicode code points to characters and back to numbers.
+The problem is: which code points to use for code points less than 256?
+(for 256 and over there's no problem: Unicode code points are used)
+In EBCDIC, for the low 256 the EBCDIC code points are used. This
+means that the equivalences
+
+ pack("U", ord($character)) eq $character
+ unpack("U", $character) == ord $character
+
+will hold. (If Unicode code points were applied consistently over
+all the possible code points, pack("U",ord("A")) would in EBCDIC
+equal I<A with acute> or chr(101), and unpack("U", "A") would equal
+65, or I<non-breaking space>, not 193, or ord "A".)
+
=head2 Unicode and UTF
UTF is a Unicode Transformation Format. UTF-8 is a Unicode conforming
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index 94c22077d9..dcc990738f 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -10416,7 +10416,7 @@ C<d_modfl>, C<d_modfl_pow32_bug>, C<d_mprotect>, C<d_msg>, C<d_msg_ctrunc>,
C<d_msg_dontroute>, C<d_msg_oob>, C<d_msg_peek>, C<d_msg_proxy>,
C<d_msgctl>, C<d_msgget>, C<d_msghdr_s>, C<d_msgrcv>, C<d_msgsnd>,
C<d_msync>, C<d_munmap>, C<d_mymalloc>, C<d_nice>, C<d_nl_langinfo>,
-C<d_nv_preserves_uv>, C<d_nv_preserves_uv_bits>, C<d_off64_t>,
+C<d_nv_preserves_uv>, C<nv_preserves_uv_bits>, C<d_off64_t>,
C<d_old_pthread_create_joinable>, C<d_oldpthreads>, C<d_oldsock>,
C<d_open3>, C<d_pathconf>, C<d_pause>, C<d_perl_otherlibdirs>,
C<d_phostname>, C<d_pipe>, C<d_poll>, C<d_portable>, C<d_PRId64>,
diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod
index 8a7a055935..e36bb07dd7 100644
--- a/pod/perluniintro.pod
+++ b/pod/perluniintro.pod
@@ -169,15 +169,23 @@ To output UTF-8 always, use the ":utf8" output discipline. Prepending
to this sample program ensures the output is completely UTF-8, and
of course, removes the warning.
-Perl 5.8.0 also supports Unicode on EBCDIC platforms. There, the
-support is somewhat harder to implement since additional conversions
-are needed at every step. Because of these difficulties, the Unicode
-support isn't quite as full as in other, mainly ASCII-based, platforms
-(the Unicode support is better than in the 5.6 series, which didn't
-work much at all for EBCDIC platform). On EBCDIC platforms, the
-internal Unicode encoding form is UTF-EBCDIC instead of UTF-8 (the
-difference is that as UTF-8 is "ASCII-safe" in that ASCII characters
-encode to UTF-8 as-is, UTF-EBCDIC is "EBCDIC-safe").
+=head2 Unicode and EBCDIC
+
+Perl 5.8.0 also supports Unicode on EBCDIC platforms. There,
+the Unicode support is somewhat more complex to implement since
+additional conversions are needed at every step. Some problems
+remain, but they all seem to be related to the combination of
+the extra mapping just described and case-insensitive matching:
+for example, "\x{131}" (LATIN SMALL LETTER DOTLESS I) does not
+match "I" case-insensitively, as it should under Unicode.
+(The match succeeds in ASCII-derived platforms.)
+
+In any case, the Unicode support on EBCDIC platforms is better than
+in the 5.6 series, which didn't work much at all for EBCDIC platform.
+On EBCDIC platforms, the internal Unicode encoding form is UTF-EBCDIC
+instead of UTF-8 (the difference is that as UTF-8 is "ASCII-safe" in
+that ASCII characters encode to UTF-8 as-is, UTF-EBCDIC is
+"EBCDIC-safe").
=head2 Creating Unicode
diff --git a/pp_pack.c b/pp_pack.c
index 51b8772bc9..b653362039 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2163,26 +2163,21 @@ Perl_pack_cat(pTHX_ SV *cat, char *pat, register char *patend, register SV **beg
case 'w':
while (len-- > 0) {
fromstr = NEXTFROM;
- adouble = Perl_floor(SvNV(fromstr));
+ adouble = SvNV(fromstr);
if (adouble < 0)
Perl_croak(aTHX_ "Cannot compress negative numbers");
- if (
-#if UVSIZE > 4 && UVSIZE >= NVSIZE
- adouble <= 0xffffffff
-#else
-# ifdef CXUX_BROKEN_CONSTANT_CONVERT
- adouble <= UV_MAX_cxux
-# else
- adouble <= UV_MAX
-# endif
-#endif
- )
+ /* 0xFFFFFFFFFFFFFFFF may cast to 18446744073709551616.0,
+ which is == UV_MAX_P1. IOK is fine (instead of UV_only), as
+ any negative IVs will have already been got by the croak()
+ above. IOK is untrue for fractions, so we test them
+ against UV_MAX_P1. */
+ if (SvIOK(fromstr) || adouble < UV_MAX_P1)
{
char buf[1 + sizeof(UV)];
char *in = buf + sizeof(buf);
- UV auv = U_V(adouble);
+ UV auv = SvUV(fromstr);
do {
*--in = (auv & 0x7f) | 0x80;
@@ -2216,6 +2211,7 @@ Perl_pack_cat(pTHX_ SV *cat, char *pat, register char *patend, register SV **beg
char buf[sizeof(double) * 2]; /* 8/7 <= 2 */
char *in = buf + sizeof(buf);
+ adouble = Perl_floor(adouble);
do {
double next = floor(adouble / 128);
*--in = (unsigned char)(adouble - (next * 128)) | 0x80;
diff --git a/pp_sys.c b/pp_sys.c
index 47602103cd..941760bd73 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -82,6 +82,8 @@ extern int h_errno;
# ifdef HAS_GETPWENT
#ifndef getpwent
struct passwd *getpwent (void);
+#elif defined (VMS) && defined (my_getpwent)
+ struct passwd *Perl_my_getpwent (void);
#endif
# endif
#endif
diff --git a/proto.h b/proto.h
index b7515be6ab..dad9b57299 100644
--- a/proto.h
+++ b/proto.h
@@ -1196,8 +1196,7 @@ STATIC I32 S_regmatch(pTHX_ regnode *prog);
STATIC I32 S_regrepeat(pTHX_ regnode *p, I32 max);
STATIC I32 S_regrepeat_hard(pTHX_ regnode *p, I32 max, I32 *lp);
STATIC I32 S_regtry(pTHX_ regexp *prog, char *startpos);
-STATIC bool S_reginclass(pTHX_ regnode *n, U8 *p, bool do_utf8sv_is_utf8);
-STATIC bool S_reginclasslen(pTHX_ regnode *n, U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8);
+STATIC bool S_reginclass(pTHX_ regnode *n, U8 *p, STRLEN *lenp, bool do_utf8sv_is_utf8);
STATIC CHECKPOINT S_regcppush(pTHX_ I32 parenfloor);
STATIC char* S_regcppop(pTHX);
STATIC char* S_regcp_set_to(pTHX_ I32 ss);
diff --git a/regexec.c b/regexec.c
index 9264b8639a..e676568bdd 100644
--- a/regexec.c
+++ b/regexec.c
@@ -96,7 +96,7 @@
#define STATIC static
#endif
-#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclasslen(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
+#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclass(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
/*
* Forwards.
@@ -926,7 +926,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
STRLEN skip = do_utf8 ? UTF8SKIP(s) : 1;
if (do_utf8 ?
- reginclasslen(c, (U8*)s, 0, do_utf8) :
+ reginclass(c, (U8*)s, 0, do_utf8) :
REGINCLASS(c, (U8*)s) ||
(ANYOF_FOLD_SHARP_S(c, s, strend) &&
/* The assignment of 2 is intentional:
@@ -2054,12 +2054,6 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
New(22,PL_reg_start_tmp, PL_reg_start_tmpl, char*);
}
-#ifdef DEBUGGING
- sv_setpvn(PERL_DEBUG_PAD(0), "", 0);
- sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
- sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
-#endif
-
/* XXXX What this code is doing here?!!! There should be no need
to do this again and again, PL_reglastparen should take care of
this! --ilya*/
@@ -2425,11 +2419,11 @@ S_regmatch(pTHX_ regnode *prog)
if (do_utf8) {
STRLEN inclasslen = PL_regeol - locinput;
- if (!reginclasslen(scan, (U8*)locinput, &inclasslen, do_utf8))
+ if (!reginclass(scan, (U8*)locinput, &inclasslen, do_utf8))
sayNO_ANYOF;
if (locinput >= PL_regeol)
sayNO;
- locinput += inclasslen ? inclasslen : 1;
+ locinput += inclasslen ? inclasslen : UTF8SKIP(locinput);
nextchr = UCHARAT(locinput);
break;
}
@@ -3954,7 +3948,7 @@ S_regrepeat(pTHX_ regnode *p, I32 max)
if (do_utf8) {
loceol = PL_regeol;
while (hardcount < max && scan < loceol &&
- reginclasslen(p, (U8*)scan, 0, do_utf8)) {
+ reginclass(p, (U8*)scan, 0, do_utf8)) {
scan += UTF8SKIP(scan);
hardcount++;
}
@@ -4226,7 +4220,7 @@ Perl_regclass_swash(pTHX_ register regnode* node, bool doinit, SV** listsvp, SV
}
/*
- - reginclasslen - determine if a character falls into a character class
+ - reginclass - determine if a character falls into a character class
The n is the ANYOF regnode, the p is the target string, lenp
is pointer to the maximum length of how far to go in the p
@@ -4236,7 +4230,7 @@ Perl_regclass_swash(pTHX_ register regnode* node, bool doinit, SV** listsvp, SV
*/
STATIC bool
-S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register bool do_utf8)
+S_reginclass(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, register bool do_utf8)
{
char flags = ANYOF_FLAGS(n);
bool match = FALSE;
@@ -4246,7 +4240,7 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe
c = do_utf8 ? utf8_to_uvchr(p, &len) : *p;
- plen = lenp ? *lenp : UNISKIP(c);
+ plen = lenp ? *lenp : UNISKIP(NATIVE_TO_UNI(c));
if (do_utf8 || (flags & ANYOF_UNICODE)) {
if (lenp)
*lenp = 0;
@@ -4291,7 +4285,7 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe
}
}
if (match && lenp && *lenp == 0)
- *lenp = UNISKIP(c);
+ *lenp = UNISKIP(NATIVE_TO_UNI(c));
}
if (!match && c < 256) {
if (ANYOF_BITMAP_TEST(n, c))
@@ -4352,20 +4346,6 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe
return (flags & ANYOF_INVERT) ? !match : match;
}
-/*
- - reginclass - determine if a character falls into a character class
-
- The n is the ANYOF regnode, the p is the target string, do_utf8 tells
- whether the target string is in UTF-8.
-
- */
-
-STATIC bool
-S_reginclass(pTHX_ register regnode *n, register U8* p, register bool do_utf8)
-{
- return S_reginclasslen(aTHX_ n, p, 0, do_utf8);
-}
-
STATIC U8 *
S_reghop(pTHX_ U8 *s, I32 off)
{
diff --git a/sv.c b/sv.c
index d0759d1d63..ac4090052c 100644
--- a/sv.c
+++ b/sv.c
@@ -9988,6 +9988,12 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
#endif
PL_encoding = sv_dup(proto_perl->Iencoding, param);
+#ifdef DEBUGGING
+ sv_setpvn(PERL_DEBUG_PAD(0), "", 0); /* For regex debugging. */
+ sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
+ sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
+#endif
+
/* Clone the regex array */
PL_regex_padav = newAV();
{
diff --git a/t/op/pack.t b/t/op/pack.t
index 6b812363b2..42be19e598 100755
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 5619;
+plan tests => 5625;
use strict;
use warnings;
@@ -122,11 +122,28 @@ sub list_eq ($$) {
$y = pack('w*', Math::BigInt::->new(5000000000));
};
is($x, $y);
+
+ $x = pack 'w', ~0;
+ $y = pack 'w', (~0).'';
+ is($x, $y);
+ is(unpack ('w',$x), ~0);
+ is(unpack ('w',$y), ~0);
+
+ $x = pack 'w', ~0 - 1;
+ $y = pack 'w', (~0) - 2;
+
+ if (~0 - 1 == (~0) - 2) {
+ is($x, $y, "NV arithmetic");
+ } else {
+ isnt($x, $y, "IV/NV arithmetic");
+ }
+ cmp_ok(unpack ('w',$x), '==', ~0 - 1);
+ cmp_ok(unpack ('w',$y), '==', ~0 - 2);
}
{
- # test exeptions
+ # test exceptions
my $x;
eval { $x = unpack 'w', pack 'C*', 0xff, 0xff};
like($@, qr/^Unterminated compressed integer/);
@@ -319,7 +336,7 @@ sub numbers_with_total {
# UVs (in which case ~0 is NV, ~0-1 will be the same NV) then we can't
# correctly in perl calculate UV totals for long checksums, as pp_unpack
# is using UV maths, and we've only got NVs.
- $skip_if_longer_than = $Config{d_nv_preserves_uv_bits};
+ $skip_if_longer_than = $Config{nv_preserves_uv_bits};
}
foreach ('', 1, 2, 3, 15, 16, 17, 31, 32, 33, 53, 54, 63, 64, 65) {
diff --git a/uconfig.sh b/uconfig.sh
index 78e405ceb5..4fedcfc6ab 100755
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -239,7 +239,7 @@ d_mymalloc='undef'
d_nice='undef'
d_nl_langinfo='undef'
d_nv_preserves_uv='undef'
-d_nv_preserves_uv_bits='0'
+nv_preserves_uv_bits='0'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
diff --git a/utf8.c b/utf8.c
index 82c1f508fa..f16cb66be4 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1751,7 +1751,7 @@ Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
case '\a':
Perl_sv_catpvf(aTHX_ dsv, "\\a"); ok = TRUE; break;
case '\\':
- Perl_sv_catpvf(aTHX_ dsv, "\\" ); ok = TRUE; break;
+ Perl_sv_catpvf(aTHX_ dsv, "\\\\" ); ok = TRUE; break;
default: break;
}
}
diff --git a/vos/config.alpha.def b/vos/config.alpha.def
index 3131ce7449..0425ba4da3 100644
--- a/vos/config.alpha.def
+++ b/vos/config.alpha.def
@@ -219,7 +219,7 @@ $d_mymalloc='undef'
$d_nice='undef'
$d_nl_langinfo='undef'
$d_nv_preserves_uv='define'
-$d_nv_preserves_uv_bits='32'
+$nv_preserves_uv_bits='32'
$d_off64_t='undef'
$d_old_pthread_create_joinable='undef'
$d_oldpthreads='undef'
diff --git a/vos/config.ga.def b/vos/config.ga.def
index eb1c703571..98193700dc 100644
--- a/vos/config.ga.def
+++ b/vos/config.ga.def
@@ -219,7 +219,7 @@ $d_mymalloc='undef'
$d_nice='undef'
$d_nl_langinfo='undef'
$d_nv_preserves_uv='define'
-$d_nv_preserves_uv_bits='32'
+$nv_preserves_uv_bits='32'
$d_off64_t='undef'
$d_old_pthread_create_joinable='undef'
$d_oldpthreads='undef'
diff --git a/win32/config.bc b/win32/config.bc
index c0cd79bafe..69cb885ba2 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -292,7 +292,7 @@ d_mymalloc='undef'
d_nice='undef'
d_nl_langinfo='undef'
d_nv_preserves_uv='define'
-d_nv_preserves_uv_bits='32'
+nv_preserves_uv_bits='32'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
diff --git a/win32/config.gc b/win32/config.gc
index d0be63bcb9..5597d8eabd 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -354,7 +354,7 @@ d_mymalloc='undef'
d_nice='undef'
d_nl_langinfo='undef'
d_nv_preserves_uv='define'
-d_nv_preserves_uv_bits='32'
+nv_preserves_uv_bits='32'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
diff --git a/win32/config.vc b/win32/config.vc
index 1ac9ab788c..3eb41e6bb3 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -292,7 +292,7 @@ d_mymalloc='undef'
d_nice='undef'
d_nl_langinfo='undef'
d_nv_preserves_uv='define'
-d_nv_preserves_uv_bits='32'
+nv_preserves_uv_bits='32'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
diff --git a/win32/config.win64 b/win32/config.win64
index 9e37008d53..91cbfdb1cf 100644
--- a/win32/config.win64
+++ b/win32/config.win64
@@ -248,7 +248,7 @@ d_munmap='undef'
d_mymalloc='undef'
d_nice='undef'
d_nv_preserves_uv='define'
-d_nv_preserves_uv_bits='64'
+nv_preserves_uv_bits='64'
d_off64_t='undef'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'