diff options
87 files changed, 3738 insertions, 2713 deletions
@@ -17,6 +17,7 @@ Abe Timmerman <abe@ztreet.demon.nl> Abhijit Menon-Sen <ams@wiw.org> Abigail <abigail@foad.org> Achim Bohnet <ach@mpe.mpg.de> +Adam <carmiac@nmt.edu> Adam Krolnik <adamk@gypsy.cyrix.com> Akim Demaille <akim@epita.fr> Alan Burlison <Alan.Burlison@uk.sun.com> @@ -117,6 +118,7 @@ Clark Cooper <coopercc@netheaven.com> Clinton A. Pierce <clintp@geeksalad.org> Colin Kuskie <ckuskie@cadence.com> Colin McMillen <mcmi0073@tc.umn.edu> +Colin Meyer <cmeyer@helvella.org> Conrad Augustin Conrad E. Kimball <cek@tblv021.ca.boeing.com> Craig A. Berry <craig.berry@psinetcs.com> @@ -569,6 +571,7 @@ SADAHIRO Tomoyuki <BQW10602@nifty.com> SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp> Sam Tregar <sam@tregar.com> Samuli Kärkkäinen <skarkkai@woods.iki.fi> +Schuyler Erle <schuyler@oreilly.com> Scott Bronson <bronson@rinspin.com> Scott Gifford <sgifford@tir.com> Scott Henry <scotth@sgi.com> @@ -3,8 +3,9 @@ changes that went into every version of Perl. If you'd like more detailed information, please consult the comments in the individual patches posted to the perl5-porters mailing list. Patches for each individual change may also be obtained through ftp and rsync--see -perlhack.pod for the details. +pod/perlhack.pod for the details. +For information on what's new in this release, see pod/perldelta.pod. [The "CAST AND CREW" list has been moved to AUTHORS.] @@ -23,14 +24,511 @@ The Message-Ids in the change entries refer to the email messages sent to the perl5-porters mailing list. You can retrieve the messages for example from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ -This file contains only changes that affect the mainline branch, -not those that affect the (now decommissioned) cfgperl, or vmsperl, -or any other branch. - -------------- -Version v5.7.2 Development release working toward v5.8 +Version v5.7.X Development release working toward v5.8 -------------- ____________________________________________________________________________ +[ 15108] By: jhi on 2002/03/08 14:59:50 + Log: Subject: Cygwin cygipc support skipped + From: "Gerrit P. Haase" <gerrit@familiehaase.de> + Date: Fri, 8 Mar 2002 16:59:34 +0100 + Message-ID: <113694157285.20020308165934@familiehaase.de> + Branch: perl + ! hints/cygwin.sh +____________________________________________________________________________ +[ 15107] By: jhi on 2002/03/08 14:48:36 + Log: metaconfig unit change for #15106. + Branch: metaconfig + ! U/compline/d_gconvert.U +____________________________________________________________________________ +[ 15106] By: jhi on 2002/03/08 14:48:14 + Log: Subject: Re: [PATCH] tests for Gconvert + From: sthoenna@efn.org (Yitzchak Scott-Thoennes) + Date: Thu, 07 Mar 2002 16:48:10 -0800 + Message-ID: <KpAi8gzkganW092yn@efn.org> + Branch: perl + ! Configure config_h.SH t/base/num.t +____________________________________________________________________________ +[ 15105] By: jhi on 2002/03/08 14:32:55 + Log: The new test has some teething problems. + Branch: perl + - ext/B/t/lint.t + ! MANIFEST +____________________________________________________________________________ +[ 15104] By: jhi on 2002/03/08 13:42:24 + Log: Subject: [PATCH] B::Lint tests + From: Rafael Garcia-Suarez <rgarciasuarez@free.fr> + Date: Fri, 8 Mar 2002 14:47:19 +0100 + Message-ID: <20020308144719.A2663@rafael> + Branch: perl + + ext/B/t/lint.t + ! MANIFEST ext/B/B/Lint.pm +____________________________________________________________________________ +[ 15103] By: jhi on 2002/03/08 13:40:35 + Log: Subject: [PATCH] hints/powerux.sh for perl-5.7.3 + From: Tom Horsley <Tom.Horsley@mail.ccur.com> + Date: Fri, 8 Mar 2002 13:24:14 GMT + Message-Id: <200203081324.NAA00642@cleo> + Branch: perl + ! hints/powerux.sh +____________________________________________________________________________ +[ 15102] By: jhi on 2002/03/08 13:37:04 + Log: Subject: HP has some new models + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Fri, 08 Mar 2002 13:07:02 +0100 + Message-Id: <20020308130529.E335.H.M.BRAND@hccnet.nl> + Branch: perl + ! README.hpux +____________________________________________________________________________ +[ 15101] By: ams on 2002/03/08 09:11:40 + Log: Subject: [PATCH: pod/perlguts.pod] pod markup fixes + From: Stas Bekman <stas@stason.org> + Date: Fri, 8 Mar 2002 15:29:53 +0800 (SGT) + Message-Id: <Pine.LNX.4.44.0203081529050.5375-100000@hope.stason.org> + Branch: perl + ! pod/perlguts.pod +____________________________________________________________________________ +[ 15100] By: pudge on 2002/03/08 03:23:17 + Log: Update Changes + Branch: maint-5.6/macperl + ! macos/Changes +____________________________________________________________________________ +[ 15099] By: pudge on 2002/03/08 03:20:06 + Log: Replace macperlbundled with macperldelta + Branch: maint-5.6/macperl + ! macos/macperl/MacPerl.podhelp +____________________________________________________________________________ +[ 15098] By: pudge on 2002/03/08 03:19:44 + Log: Comsetic fixes (Thomas Wegner) + Branch: maint-5.6/macperl + ! macos/macperl/MPBalloons.ball macos/macperl/MacPerl.r +____________________________________________________________________________ +[ 15097] By: pudge on 2002/03/08 03:19:08 + Log: Bump OS version + Branch: maint-5.6/macperl + ! macos/config.sh +____________________________________________________________________________ +[ 15096] By: jhi on 2002/03/08 03:14:41 + Log: Thought I deleted this already? + Branch: perl + - ext/I18N/Langinfo/fallback.c +____________________________________________________________________________ +[ 15095] By: jhi on 2002/03/08 03:06:20 + Log: perlport updates from Pudge. + Branch: perl + ! pod/perlport.pod +____________________________________________________________________________ +[ 15094] By: ams on 2002/03/08 03:06:03 + Log: Nitpick. + Branch: perl + ! MANIFEST +____________________________________________________________________________ +[ 15093] By: jhi on 2002/03/08 03:00:46 + Log: Wrong test. + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15091] By: jhi on 2002/03/08 02:25:23 + Log: Integrate change 14064 from macperl to blead. + Branch: perl + !> pod/perlmodinstall.pod pod/perlport.pod +____________________________________________________________________________ +[ 15090] By: pudge on 2002/03/08 02:15:01 + Log: Integrate recent perlport changes + Branch: maint-5.6/macperl + !> pod/perlport.pod +____________________________________________________________________________ +[ 15089] By: ams on 2002/03/08 01:54:03 + Log: Subject: [ID 20020307.010] [Patch docs] A _very_ small patch to correct a + minor typo in perlguts.pod + From: Anton Tagunov <tagunov@motor.ru> + Date: Fri, 8 Mar 2002 05:26:59 +0300 + Message-Id: <4649821189.20020308052659@motor.ru> + Branch: perl + ! pod/perlguts.pod +____________________________________________________________________________ +[ 15088] By: jhi on 2002/03/08 01:40:41 + Log: Subject: Re[2]: [ID 20020307.006] [BUG][use encoding] use encoding 'greek'; print "not" unless pack("U*", 0x3af) eq pack("C*", 0xdf) prints "not"! + From: Anton Tagunov <tagunov@newmail.ru> + Date: Fri, 8 Mar 2002 04:31:44 +0300 + Message-ID: <13946506773.20020308043144@newmail.ru> + + (one test changed) + Branch: perl + ! lib/encoding.t sv.c +____________________________________________________________________________ +[ 15087] By: jhi on 2002/03/08 00:15:08 + Log: Subject: [PATCH perldelta] some more deltas + From: Rafael Garcia-Suarez <rgarciasuarez@free.fr> + Date: Thu, 7 Mar 2002 23:13:23 +0100 + Message-ID: <20020307231323.A13068@rafael> + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15086] By: jhi on 2002/03/07 22:43:31 + Log: Subject: [PATCH] perl/t/io/fs.t -- VOS bug + From: Paul_GreenVOS@vos.stratus.com + Date: Thu, 7 Mar 02 14:25 est + Message-Id: <200203071924.OAA03273@mailhub2.stratus.com> + Branch: perl + ! t/io/fs.t +____________________________________________________________________________ +[ 15085] By: jhi on 2002/03/07 22:37:51 + Log: As suggested by Anton Tagunov, eq and cmp now obey the + encoding pragma (by remapping their byte argument if the + other argument is in Unicode). Also fix a bug found by + Anton where ord undef under the encoding pragma would barf. + ([ID 20020307.009] A null pointer dereference with 'use encoding') + Finally, use the nicer form of sv_recode_to_utf8. + Branch: perl + ! lib/encoding.pm lib/encoding.t pp.c regcomp.c sv.c toke.c +____________________________________________________________________________ +[ 15084] By: jhi on 2002/03/07 20:54:02 + Log: Retract #14985, #14899, and #14990, following the principles + "Do no harm." and "If it ain't broke, don't fix it." + + Firstly, the #14985 broke badly on UTF-EBCDIC, #14990 fixed + some, but still broken, and I do not have the extra brain + cells for the EBCDIC backport. Secondly, the old version + worked both in EBCDIC and non-. Thirdly, the old version + may be more amenable for the behaviour suggsted by Anton + Tagunov regarding the encoding pragma. + Branch: perl + ! embed.fnc embed.h global.sym proto.h sv.c util.c +____________________________________________________________________________ +[ 15083] By: jhi on 2002/03/07 20:26:36 + Log: Long doubles give you long doubles. + Branch: perl + ! t/base/num.t +____________________________________________________________________________ +[ 15082] By: jhi on 2002/03/07 18:16:39 + Log: Forgotten deMANIFESTation. + Branch: perl + ! MANIFEST +____________________________________________________________________________ +[ 15081] By: jhi on 2002/03/07 17:29:17 + Log: Obsolete unused file, noticed by Dank Kogai. + Branch: perl + - ext/Encode/lib/Encode/JP/Tr.pm +____________________________________________________________________________ +[ 15080] By: ams on 2002/03/07 11:31:46 + Log: Subject: [PATCH Changes] Changes should mirror version number + From: Robin Barker <rmb1@cise.npl.co.uk> + Date: Thu, 7 Mar 2002 11:04:24 GMT + Message-Id: <200203071104.LAA17200@tempest.npl.co.uk> + Branch: perl + ! Porting/pumpkin.pod +____________________________________________________________________________ +[ 15079] By: jhi on 2002/03/07 04:40:06 + Log: metaconfig unit change for #15078. + Branch: metaconfig + ! U/compline/d_gconvert.U +____________________________________________________________________________ +[ 15078] By: jhi on 2002/03/07 04:39:39 + Log: Subject: Re: [PATCH] tests for Gconvert + From: sthoenna@efn.org (Yitzchak Scott-Thoennes) + Date: Wed, 06 Mar 2002 20:22:54 -0800 + Message-ID: <esuh8gzkg2/b092yn@efn.org> + Branch: perl + ! Configure pod/perldelta.pod t/base/num.t +____________________________________________________________________________ +[ 15077] By: jhi on 2002/03/07 03:27:38 + Log: Mac OS X UFS does not do ctime. + Branch: perl + ! pod/perldelta.pod pod/perlport.pod +____________________________________________________________________________ +[ 15076] By: jhi on 2002/03/07 02:40:09 + Log: AUTHORS updates. + Branch: perl + ! AUTHORS +____________________________________________________________________________ +[ 15075] By: jhi on 2002/03/07 01:48:46 + Log: Continued Chinese puzzles from Autrijus. + Branch: perl + + ext/Encode/t/CN.t ext/Encode/t/TW.t + ! MANIFEST ext/Encode/lib/Encode/CN/HZ.pm +____________________________________________________________________________ +[ 15074] By: jhi on 2002/03/07 00:16:10 + Log: Subject: [PATCH bleadperl] reordering conditions in Win32.pm + From: Nikola Knezevic <indy@tesla.rcub.bg.ac.yu> + Date: Wed, 6 Mar 2002 18:13:51 +0100 + Message-ID: <16925657426.20020306181351@tesla.rcub.bg.ac.yu> + Branch: perl + ! lib/File/Spec/Win32.pm +____________________________________________________________________________ +[ 15073] By: jhi on 2002/03/07 00:15:11 + Log: perlport tweaks. + Branch: perl + ! pod/perlport.pod +____________________________________________________________________________ +[ 15072] By: jhi on 2002/03/07 00:05:11 + Log: Subject: Re: [PATCH docs] Re: Bug with -M + From: Michael G Schwern <schwern@pobox.com> + Date: Wed, 6 Mar 2002 16:20:27 -0500 + Message-ID: <20020306212027.GC4257@blackrider> + Branch: perl + ! pod/perlfunc.pod pod/perlport.pod +____________________________________________________________________________ +[ 15071] By: jhi on 2002/03/06 20:20:29 + Log: perldelta updates. + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15070] By: jhi on 2002/03/06 20:06:37 + Log: 5005threads wasn't even compiling. + Branch: perl + ! perl.c +____________________________________________________________________________ +[ 15069] By: jhi on 2002/03/06 15:06:33 + Log: Subject: Re: perl@15047 New format tests for still existing bugs + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 12:59:29 +0100 + Message-Id: <20020306125854.C6F5.H.M.BRAND@hccnet.nl> + Branch: perl + ! t/op/write.t +____________________________________________________________________________ +[ 15068] By: jhi on 2002/03/06 15:04:41 + Log: Regen Glossary et al. + Branch: perl + ! Porting/Glossary Porting/config.sh Porting/config_H +____________________________________________________________________________ +[ 15067] By: jhi on 2002/03/06 14:39:58 + Log: Use HAS_TM_TM_ZONE (from #15065). Should help + [ID 20020305.022] POSIX::strftime dumps core: STRUCT_TM_HASZONE should be set + Branch: perl + ! util.c +____________________________________________________________________________ +[ 15066] By: jhi on 2002/03/06 14:39:40 + Log: metaconfig unit change for #15065. + Branch: metaconfig + ! U/compline/i_time.U +____________________________________________________________________________ +[ 15065] By: jhi on 2002/03/06 14:39:18 + Log: Scan for tm_zone (and tm_gmtoff, while we are at it). + Branch: perl + ! Configure config_h.SH +____________________________________________________________________________ +[ 15064] By: jhi on 2002/03/06 14:14:02 + Log: Must remove fallback.c also from here. + Branch: perl + ! MANIFEST +____________________________________________________________________________ +[ 15063] By: jhi on 2002/03/06 13:37:31 + Log: Subject: Re: perl@15047 WinCE + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 13:41:30 +0100 + Message-Id: <20020306134107.C6F8.H.M.BRAND@hccnet.nl> + + Subject: Re: perl@15047 Win32 + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 13:46:02 +0100 + Message-Id: <20020306134539.C6FB.H.M.BRAND@hccnet.nl> + + Subject: Re: perl@15047 Epoc + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 13:48:31 +0100 + Message-Id: <20020306134811.C6FE.H.M.BRAND@hccnet.nl> + + Subject: Re: perl@15047 NetWare + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 13:55:46 +0100 + Message-Id: <20020306135406.C701.H.M.BRAND@hccnet.nl> + Branch: perl + ! NetWare/config_H.wc epoc/config.sh win32/Makefile + ! win32/config_H.bc win32/config_H.gc win32/config_H.vc + ! wince/Makefile.ce wince/config.h +____________________________________________________________________________ +[ 15062] By: ams on 2002/03/06 09:26:49 + Log: Subject: Re: perl@15047 + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 11:25:50 +0100 + Message-Id: <20020306112536.C6E9.H.M.BRAND@hccnet.nl> + Branch: perl + ! cygwin/perlld.in +____________________________________________________________________________ +[ 15061] By: ams on 2002/03/06 08:44:12 + Log: Subject: Re: perl@15047 + From: "H.Merijn Brand" <h.m.brand@hccnet.nl> + Date: Wed, 06 Mar 2002 10:38:02 +0100 + Message-Id: <20020306103741.C6E3.H.M.BRAND@hccnet.nl> + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15060] By: ams on 2002/03/06 08:30:33 + Log: Subject: Update perlhist.pod + From: mjd@plover.com + Date: 6 Mar 2002 07:11:55 -0000 + Message-Id: <20020306071155.10240.qmail@plover.com> + + Subject: [PATCH pod/perlvar.pod] $^V => string + From: Stas Bekman <stas@stason.org> + Date: Wed, 06 Mar 2002 14:56:55 +0800 + Message-Id: <3C85BDB7.7050700@stason.org> + Branch: perl + ! pod/perlhist.pod pod/perlvar.pod +____________________________________________________________________________ +[ 15059] By: ams on 2002/03/06 04:15:38 + Log: Subject: [PATCH] assorted configure.com fix-ups + From: "Craig A. Berry" <craigberry@mac.com> + Date: Tue, 5 Mar 2002 23:11:22 -0600 + Message-Id: <a05101507b8ab5389f9be@[172.16.52.1]> + Branch: perl + ! configure.com +____________________________________________________________________________ +[ 15058] By: jhi on 2002/03/06 04:01:27 + Log: IRIX failure with long doubles. + Branch: perl + ! t/op/pack.t +____________________________________________________________________________ +[ 15057] By: jhi on 2002/03/06 03:12:15 + Log: Make reality and Changes coincide. + Branch: perl + ! Changes +____________________________________________________________________________ +[ 15056] By: jhi on 2002/03/06 00:49:03 + Log: Subject: Re[2]: [ID 20020303.005] Patch ... C API description + From: Anton Tagunov <tagunov@motor.ru> + Date: Wed, 6 Mar 2002 02:10:21 +0300 + Message-ID: <11152782757.20020306021021@motor.ru> + + (reworded) + Branch: perl + ! pod/perluniintro.pod +____________________________________________________________________________ +[ 15055] By: jhi on 2002/03/06 00:35:22 + Log: Subject: [PATCH] B::Lint doesn't work + From: Rafael Garcia-Suarez <rgarciasuarez@free.fr> + Date: Tue, 5 Mar 2002 22:51:18 +0100 + Message-ID: <20020305225118.C733@rafael> + Branch: perl + ! ext/B/B/Lint.pm +____________________________________________________________________________ +[ 15054] By: jhi on 2002/03/06 00:34:32 + Log: Subject: Re: [PATCH] Re: [ID 20000922.001] Implicit comparison to $. not performed before filehandle read + From: sthoenna@efn.org (Yitzchak Scott-Thoennes) + Date: Mon, 04 Mar 2002 16:24:32 -0800 + Message-ID: <ABBh8gzkgezX092yn@efn.org> + Branch: perl + ! op.h pp_ctl.c t/op/flip.t +____________________________________________________________________________ +[ 15053] By: jhi on 2002/03/06 00:31:02 + Log: Subject: [PATCH] Re: [ID 20020305.018] test failures with perl5.7.3 on FreeBSD 4.3 + From: Nicholas Clark <nick@unfortu.net> + Date: Tue, 5 Mar 2002 22:30:49 +0000 + Message-ID: <20020305223049.GH1693@Bagpuss.unfortu.net> + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15052] By: jhi on 2002/03/06 00:28:40 + Log: Subject: [PATCH] tests for Gconvert + From: sthoenna@efn.org (Yitzchak Scott-Thoennes) + Date: Tue, 05 Mar 2002 16:35:45 -0800 + Message-ID: <hRWh8gzkgONX092yn@efn.org> + Branch: perl + ! t/base/num.t +____________________________________________________________________________ +[ 15051] By: jhi on 2002/03/06 00:25:27 + Log: Subject: [PATCH] toplevel Makefile.SH + From: Paul_GreenVOS@vos.stratus.com + Date: Tue, 5 Mar 02 17:34 est + Message-Id: <200203052233.RAA18424@mailhub2.stratus.com> + Branch: perl + ! Makefile.SH +____________________________________________________________________________ +[ 15050] By: jhi on 2002/03/05 20:46:40 + Log: Subject: [PATCH] pointer to perldelta in Changes + From: Chris Nandor <pudge@pobox.com> + Date: Tue, 05 Mar 2002 16:04:50 -0500 + Message-ID: <pudge-920238.16045005032002@onion.valueclick.com> + Branch: perl + ! Changes +____________________________________________________________________________ +[ 15049] By: jhi on 2002/03/05 20:45:33 + Log: Subject: [PATCH perldelta] chom?p overridability is the other way + From: Rafael Garcia-Suarez <rgarciasuarez@free.fr> + Date: Tue, 5 Mar 2002 22:26:20 +0100 + Message-ID: <20020305222620.A733@rafael> + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15048] By: jhi on 2002/03/05 20:43:45 + Log: Solaris: allow for /usr/bin/df not to exist. + + Subject: [ID 20020305.014] Configure: /usr/bin/df: not found + From: Kingpin <mthurn@copper.dulles.tasc.com> + Date: Tue, 5 Mar 2002 15:26:55 -0500 (EST) + Message-Id: <200203052026.g25KQtV24683@copper.dulles.tasc.com> + Branch: perl + ! hints/solaris_2.sh +____________________________________________________________________________ +[ 15047] By: jhi on 2002/03/05 15:36:10 + Log: Update Changes. + Branch: perl + ! Changes patchlevel.h +____________________________________________________________________________ +[ 15046] By: jhi on 2002/03/05 14:56:19 + Log: Double MANIFESTing. + Branch: perl + ! ext/Encode/MANIFEST +____________________________________________________________________________ +[ 15045] By: jhi on 2002/03/05 14:29:41 + Log: Remove HanZi and 7bit-kr, from SADAHIRO Tomoyuki. + Branch: perl + - ext/Encode/Encode/7bit-kr.enc + - ext/Encode/lib/Encode/Tcl/HanZi.pm + ! MANIFEST ext/Encode/lib/Encode/Tcl.pm +____________________________________________________________________________ +[ 15044] By: jhi on 2002/03/05 13:40:31 + Log: Subject: [PATCH] Re: [ID 20020227.024] unexpected warning getc() on unopened filehandle STDIN + From: Rafael Garcia-Suarez <rgarciasuarez@free.fr> + Date: Tue, 5 Mar 2002 14:35:57 +0100 + Message-ID: <20020305143557.C695@rafael> + Branch: perl + ! pp_sys.c t/lib/warnings/pp_sys +____________________________________________________________________________ +[ 15043] By: jhi on 2002/03/05 13:36:30 + Log: Subject: [PATCH Devel::PPPort] + From: Robin Barker <rmb1@cise.npl.co.uk> + Date: Tue, 5 Mar 2002 13:37:59 GMT + Message-Id: <200203051337.NAA14686@tempest.npl.co.uk> + Branch: perl + ! ext/Devel/PPPort/Makefile.PL +____________________________________________________________________________ +[ 15042] By: jhi on 2002/03/05 13:33:55 + Log: Real patch from SADAHIRO Tomoyuki to remove the HZ tests. + Branch: perl + ! ext/Encode/t/Tcl.t +____________________________________________________________________________ +[ 15041] By: nick on 2002/03/05 07:23:58 + Log: Integrate mainline (5.7.3) + Branch: perlio + +> ext/Encode/lib/Encode/CN/HZ.pm + - ext/Encode/Encode/HZ.enc ext/Encode/Encode/gbk.enc + !> (integrate 54 files) +____________________________________________________________________________ +[ 15040] By: ams on 2002/03/05 05:10:33 + Log: Subject: DOC PATCH 5.7.3 (perldelta) + From: mjd@plover.com + Date: 5 Mar 2002 05:35:58 -0000 + Message-Id: <20020305053558.31677.qmail@plover.com> + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 15039] By: jhi on 2002/03/05 03:32:07 + Log: This is 5.7.3. + Branch: perl + ! patchlevel.h +____________________________________________________________________________ +[ 15038] By: jhi on 2002/03/05 03:31:32 + Log: Shoo. + Branch: perl + ! ext/Encode/t/Tcl.t +____________________________________________________________________________ +[ 15037] By: jhi on 2002/03/05 03:15:17 + Log: Update Changes. + Branch: perl + ! Changes patchlevel.h +____________________________________________________________________________ [ 15036] By: jhi on 2002/03/05 03:11:17 Log: Regen perlapi. Branch: perl @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Mar 4 21:46:28 EET 2002 [metaconfig 3.0 PL70] +# Generated on Fri Mar 8 23:12:53 EET 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -756,6 +756,8 @@ i_syswait='' i_sgtty='' i_termio='' i_termios='' +d_tm_tm_gmtoff='' +d_tm_tm_zone='' i_systime='' i_systimek='' i_time='' @@ -8810,11 +8812,17 @@ int main() checkit("123.456", buf); /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */ - Gconvert((DOUBLETYPE)1e30, 8, 0, buf); + Gconvert((DOUBLETYPE)1e34, 8, 0, buf); + /* 34 should be enough to scare even long double + * places into using the e notation. */ if (strlen(buf) > 5) - checkit("1e+030", buf); /* for Microsoft */ + checkit("1e+034", buf); /* for Microsoft */ else - checkit("1e+30", buf); + checkit("1e+34", buf); + + /* For Perl, if you add additional tests here, also add them to + * t/base/num.t for benefit of platforms not using Configure or + * overriding d_Gconvert */ exit(0); } @@ -10472,6 +10480,40 @@ EOCP esac $rm -f try.c try fi +: see if struct tm knows about tm_zone +case "$i_systime$i_time" in +*$define*) + echo " " + echo "Checking to see if your struct tm has tm_zone field..." >&4 + set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h + eval $hasfield + ;; +*) val="$undef" + set d_tm_tm_zone + eval $setvar + ;; +esac +case "$d_tm_tm_zone" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac +: see if struct tm knows about tm_gmtoff +case "$i_systime$i_time" in +*$define*) + echo " " + echo "Checking to see if your struct tm has tm_gmtoff field..." >&4 + set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h + eval $hasfield + ;; +*) val="$undef" + set d_tm_tm_gmtoff + eval $setvar + ;; +esac +case "$d_tm_tm_gmtoff" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac : check for fd_set items $cat <<EOM @@ -11763,9 +11805,33 @@ $rm -f reflect set d_procselfexe eval $setvar +: see whether the pthread_atfork exists +$cat >try.c <<EOP +#include <pthread.h> +#include <stdio.h> +int main() { +#ifdef PTHREAD_ATFORK + pthread_atfork(NULL,NULL,NULL); +#endif +} +EOP + : see if pthread_atfork exists -set pthread_atfork d_pthread_atfork -eval $inlibc +set try -DPTHREAD_ATFORK +if eval $compile; then + val="$define" +else + val="$undef" +fi +case "$usethreads" in +$define) + case "$val" in + $define) echo 'pthread_atfork found.' >&4 ;; + *) echo 'pthread_atfork NOT found.' >&4 ;; + esac +esac +set d_pthread_atfork +eval $setvar : see whether the various POSIXish _yields exist @@ -17405,6 +17471,8 @@ d_telldir='$d_telldir' d_telldirproto='$d_telldirproto' d_time='$d_time' d_times='$d_times' +d_tm_tm_gmtoff='$d_tm_tm_gmtoff' +d_tm_tm_zone='$d_tm_tm_zone' d_truncate='$d_truncate' d_tzname='$d_tzname' d_u32align='$d_u32align' @@ -878,7 +878,7 @@ your system supports it. If you want to force perl to be compiled statically, you can either choose this when Configure prompts you or you can use the Configure command line option -Uusedl. -=head2 Building a shared libperl.so Perl library +=head2 Building a shared Perl library Currently, for most systems, the main perl executable is built by linking the "perl library" libperl.a with perlmain.o, your static @@ -922,7 +922,10 @@ NeXTSTEP/OPENSTEP/Darwin, LIBRARY_PATH for BeOS, LD_LIBRARY_PATH/SHLIB_PATH for HP-UX, LIBPATH for AIX, PATH for Cygwin) must be set up to include the Perl build directory because that's where the shared libperl will be created. Configure arranges makefile to have the correct shared -library search settings. +library search settings. You can find the name of the environment +variable Perl thinks works in your your system by + + grep ldlibpthname config.sh However, there are some special cases where manually setting the shared library path might be required. For example, if you want to run @@ -943,7 +946,8 @@ for Bourne-style shells, or setenv LD_LIBRARY_PATH `pwd` for Csh-style shells. (This procedure may also be needed if for some -unexpected reason Configure fails to set up makefile correctly.) +unexpected reason Configure fails to set up makefile correctly.) (And +again, it may be something else than LD_LIBRARY_PATH for you, see above.) You can often recognize failures to build/use a shared libperl from error messages complaining about a missing libperl.so (or libperl.sl in HP-UX), @@ -1893,10 +1897,23 @@ individual subtests is to cd to the t directory and run ./perl harness (this assumes that most basic tests succeed, since harness uses -complicated constructs). +complicated constructs). For extension and library tests you +need a little bit more: you need to setup your environment variable +PERL_CORE to a true value (like "1"), and you need to supply the +right Perl library path: + + setenv PERL_CORE 1 + ./perl -I../lib ../ext/Socket/Socket.t + ./perl -I../lib ../lib/less.t +(For csh-like shells on UNIX, adjust appropriately for other platforms.) You should also read the individual tests to see if there are any helpful -comments that apply to your system. +comments that apply to your system. You may also need to setup your +shared library path if you get errors like: + + /sbin/loader: Fatal Error: cannot map libperl.so + +See L</"Building a shared Perl library"> earlier in this document. =over 4 @@ -102,6 +102,7 @@ ext/B/t/bblock.t See if B::Bblock works ext/B/t/concise.t See whether B::Concise works ext/B/t/debug.t See if B::Debug works ext/B/t/deparse.t See if B::Deparse works +ext/B/t/lint.t See if B::Lint works ext/B/t/showlex.t See if B::ShowLex works ext/B/t/stash.t See if B::Stash works ext/B/t/terse.t See if B::Terse works @@ -212,7 +213,6 @@ ext/Encode/Encode/2022.enc Encode table ext/Encode/Encode/7bit-greek.enc Encode table ext/Encode/Encode/7bit-jis.enc Encode table ext/Encode/Encode/7bit-kana.enc Encode table -ext/Encode/Encode/7bit-kr.enc Encode table ext/Encode/Encode/7bit-latin1.enc Encode table ext/Encode/Encode/8859-1.enc Encode table ext/Encode/Encode/8859-1.ucm Encode table @@ -337,7 +337,7 @@ ext/Encode/JP/JP.pm Encode extension ext/Encode/JP/Makefile.PL Encode extension ext/Encode/KR/KR.pm Encode extension ext/Encode/KR/Makefile.PL Encode extension -ext/Encode/lib/Encode/CN/HZ.pm Encode table +ext/Encode/lib/Encode/CN/HZ.pm Encode extension ext/Encode/lib/Encode/Encoding.pm Encode extension ext/Encode/lib/Encode/Internal.pm Encode extension ext/Encode/lib/Encode/iso10646_1.pm Encode extension @@ -345,11 +345,9 @@ ext/Encode/lib/Encode/JP/Constants.pm Encode extension ext/Encode/lib/Encode/JP/H2Z.pm Encode extension ext/Encode/lib/Encode/JP/ISO_2022_JP.pm Encode extension ext/Encode/lib/Encode/JP/JIS.pm Encode extension -ext/Encode/lib/Encode/JP/Tr.pm Encode extension ext/Encode/lib/Encode/Tcl.pm Encode extension ext/Encode/lib/Encode/Tcl/Escape.pm Encode extension ext/Encode/lib/Encode/Tcl/Extended.pm Encode extension -ext/Encode/lib/Encode/Tcl/HanZi.pm Encode extension ext/Encode/lib/Encode/Tcl/Table.pm Encode extension ext/Encode/lib/Encode/ucs2_le.pm Encode extension ext/Encode/lib/Encode/Unicode.pm Encode extension @@ -359,12 +357,14 @@ ext/Encode/lib/EncodeFormat.pod Encode extension ext/Encode/Makefile.PL Encode extension makefile writer ext/Encode/MANIFEST Encode extension ext/Encode/README Encode extension +ext/Encode/t/CN.t Encode extension test ext/Encode/t/Encode.t Encode extension test ext/Encode/t/japanese.pl Encode extension ext/Encode/t/JP.t Encode extension test ext/Encode/t/table.euc Encode extension test ext/Encode/t/table.ref Encode extension test ext/Encode/t/Tcl.t Encode extension test +ext/Encode/t/TW.t Encode extension test ext/Encode/TW/Makefile.PL Encode extension ext/Encode/TW/TW.pm Encode extension ext/Errno/ChangeLog Errno perl module change log @@ -397,7 +397,6 @@ ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines ext/GDBM_File/hints/sco.pl Hint for GDBM_File for named architecture ext/GDBM_File/Makefile.PL GDBM extension makefile writer ext/GDBM_File/typemap GDBM extension interface types -ext/I18N/Langinfo/fallback.c I18N::Langinfo ext/I18N/Langinfo/fallback.xs I18N::Langinfo ext/I18N/Langinfo/Langinfo.pm I18N::Langinfo ext/I18N/Langinfo/Langinfo.t I18N::Langinfo @@ -2058,6 +2057,7 @@ Porting/config.sh Sample config.sh Porting/config_H Sample config.h Porting/Contract Social contract for contributed modules in Perl core Porting/findvars Find occurrences of words +Porting/findrfuncs Find reentrant variants of functions used in an executable Porting/fixCORE Find and fix modules that generate warnings Porting/fixvars Find undeclared variables with C compiler and fix em Porting/genlog Generate formatted changelogs by querying p4d diff --git a/Makefile.SH b/Makefile.SH index 5f58ab7635..091b154a38 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -652,13 +652,16 @@ sperl$(OBJ_EXT): perl.c $(h) # We have to call our ./makedir because Ultrix 4.3 make can't handle the line # test -d lib/auto || mkdir lib/auto +# We need to autosplit in two steps because VOS can't handle so many args # .PHONY: preplibrary preplibrary: miniperl$(EXE_EXT) lib/Config.pm lib/lib.pm $(PREPLIBRARY_LIBPERL) @sh ./makedir lib/auto @echo " AutoSplitting perl library" $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \ - autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm + autosplit_lib_modules(@ARGV)' lib/*.pm + $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \ + autosplit_lib_modules(@ARGV)' lib/*/*.pm $(MAKE) lib/re.pm # Take care to avoid modifying lib/Config.pm without reason diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index 104610fcf8..8adcbaae0b 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -1027,7 +1027,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.7.2\\lib\\NetWare-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.7.3\\lib\\NetWare-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1058,8 +1058,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.7.2\\bin\\NetWare-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.7.2\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.7.3\\bin\\NetWare-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.7.3\\bin\\NetWare-x86-multi-thread" /**/ /* PERL_BINCOMPAT_5005: * This symbol, if defined, indicates that this version of Perl should be @@ -2998,7 +2998,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.7.2\\lib\\NetWare-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.7.3\\lib\\NetWare-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3021,8 +3021,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\5.7.2\\lib" /**/ -#define SITELIB_EXP (nw_get_sitelib("5.7.2")) /**/ +#define SITELIB "c:\\perl\\site\\5.7.3\\lib" /**/ +#define SITELIB_EXP (nw_get_sitelib("5.7.3")) /**/ #define SITELIB_STEM "" /**/ /* Size_t_size: @@ -3259,7 +3259,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.2\\lib\\NetWare-x86-multi-thread for older + * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.3\\lib\\NetWare-x86-multi-thread for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3278,7 +3278,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.7.2\\lib for older directories across major versions + * search in c:\\perl\\site\\5.7.3\\lib for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's diff --git a/Porting/Glossary b/Porting/Glossary index 200200bab0..c267c5e070 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1795,6 +1795,14 @@ d_times (d_times.U): that the times() routine exists. The times() routine is normaly provided on UNIX systems. You may have to include <sys/times.h>. +d_tm_tm_gmtoff (i_time.U): + This variable conditionally defines HAS_TM_TM_GMTOFF, which indicates + indicates to the C program that the struct tm has the tm_gmtoff field. + +d_tm_tm_zone (i_time.U): + This variable conditionally defines HAS_TM_TM_ZONE, which indicates + indicates to the C program that the struct tm has the tm_zone field. + d_truncate (d_truncate.U): This variable conditionally defines HAS_TRUNCATE if truncate() is available to truncate files. diff --git a/Porting/config.sh b/Porting/config.sh index 6baf2bd9c0..a04fc266db 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Mon Mar 4 21:48:13 EET 2002 +# Configuration time: Wed Mar 6 18:01:27 EET 2002 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -36,8 +36,8 @@ api_subversion='0' api_version='5' api_versionstring='5.005' ar='ar' -archlib='/opt/perl/lib/5.7.2/alpha-dec_osf' -archlibexp='/opt/perl/lib/5.7.2/alpha-dec_osf' +archlib='/opt/perl/lib/5.7.3/alpha-dec_osf' +archlibexp='/opt/perl/lib/5.7.3/alpha-dec_osf' archname64='' archname='alpha-dec_osf' archobjs='' @@ -55,7 +55,7 @@ castflags='0' cat='cat' cc='cc' cccdlflags=' ' -ccdlflags=' -Wl,-rpath,/opt/perl/lib/5.7.2/alpha-dec_osf/CORE' +ccdlflags=' -Wl,-rpath,/opt/perl/lib/5.7.3/alpha-dec_osf/CORE' ccflags='-std -D_INTRINSICS -fprm d -ieee -DLANGUAGE_C' ccflags_uselargefiles='' ccname='cc' @@ -63,7 +63,7 @@ ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_ ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Mon Mar 4 21:48:13 EET 2002' +cf_time='Wed Mar 6 18:01:27 EET 2002' charsize='1' chgrp='' chmod='chmod' @@ -403,6 +403,8 @@ d_telldir='define' d_telldirproto='define' d_time='define' d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' d_truncate='define' d_tzname='define' d_u32align='define' @@ -574,17 +576,17 @@ inc_version_list=' ' inc_version_list_init='0' incpath='' inews='' -installarchlib='/opt/perl/lib/5.7.2/alpha-dec_osf' +installarchlib='/opt/perl/lib/5.7.3/alpha-dec_osf' installbin='/opt/perl/bin' installman1dir='/opt/perl/man/man1' installman3dir='/opt/perl/man/man3' installprefix='/opt/perl' installprefixexp='/opt/perl' -installprivlib='/opt/perl/lib/5.7.2' +installprivlib='/opt/perl/lib/5.7.3' installscript='/opt/perl/bin' -installsitearch='/opt/perl/lib/site_perl/5.7.2/alpha-dec_osf' +installsitearch='/opt/perl/lib/site_perl/5.7.3/alpha-dec_osf' installsitebin='/opt/perl/bin' -installsitelib='/opt/perl/lib/site_perl/5.7.2' +installsitelib='/opt/perl/lib/site_perl/5.7.3' installstyle='lib' installusrbinperl='undef' installvendorarch='' @@ -687,10 +689,10 @@ patchlevel='7' path_sep=':' perl5='perl' perl='' -perl_patchlevel='15000' +perl_patchlevel='15046' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -lutil' -perlpath='/opt/perl/bin/perl5.7.2' +perlpath='/opt/perl/bin/perl5.7.3' pg='pg' phostname='' pidtype='pid_t' @@ -700,8 +702,8 @@ pmake='' pr='' prefix='/opt/perl' prefixexp='/opt/perl' -privlib='/opt/perl/lib/5.7.2' -privlibexp='/opt/perl/lib/5.7.2' +privlib='/opt/perl/lib/5.7.3' +privlibexp='/opt/perl/lib/5.7.3' procselfexe='' prototype='define' ptrsize='8' @@ -752,13 +754,13 @@ sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 6, 6, 16, 20, 23, 23, 23, 29, 48, 0' sig_size='58' signal_t='void' -sitearch='/opt/perl/lib/site_perl/5.7.2/alpha-dec_osf' -sitearchexp='/opt/perl/lib/site_perl/5.7.2/alpha-dec_osf' +sitearch='/opt/perl/lib/site_perl/5.7.3/alpha-dec_osf' +sitearchexp='/opt/perl/lib/site_perl/5.7.3/alpha-dec_osf' sitebin='/opt/perl/bin' sitebinexp='/opt/perl/bin' -sitelib='/opt/perl/lib/site_perl/5.7.2' +sitelib='/opt/perl/lib/site_perl/5.7.3' sitelib_stem='/opt/perl/lib/site_perl' -sitelibexp='/opt/perl/lib/site_perl/5.7.2' +sitelibexp='/opt/perl/lib/site_perl/5.7.3' siteprefix='/opt/perl' siteprefixexp='/opt/perl' sizesize='8' @@ -774,7 +776,7 @@ spackage='Perl5' spitshell='cat' src='.' ssizetype='ssize_t' -startperl='#!/opt/perl/bin/perl5.7.2' +startperl='#!/opt/perl/bin/perl5.7.3' startsh='#!/bin/sh' static_ext=' ' stdchar='unsigned char' @@ -786,7 +788,7 @@ stdio_ptr='((fp)->_ptr)' stdio_stream_array='_iob' strings='/usr/include/string.h' submit='' -subversion='2' +subversion='3' sysman='/usr/share/man/man1' tail='' tar='' @@ -855,8 +857,8 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.7.2' -version_patchlevel_string='version 7 subversion 2 patch 15000' +version='5.7.3' +version_patchlevel_string='version 7 subversion 3 patch 15046' versiononly='define' vi='' voidflags='15' @@ -882,11 +884,11 @@ config_arg9='-dE' config_arg10='-Dusedevel' PERL_REVISION=5 PERL_VERSION=7 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=15000 +PERL_PATCHLEVEL=15046 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 573bfb476f..4ff3c4837b 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Mon Mar 4 21:48:13 EET 2002 + * Configuration time: Wed Mar 6 18:01:27 EET 2002 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -984,8 +984,8 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "/opt/perl/lib/5.7.2/alpha-dec_osf" /**/ -#define ARCHLIB_EXP "/opt/perl/lib/5.7.2/alpha-dec_osf" /**/ +#define ARCHLIB "/opt/perl/lib/5.7.3/alpha-dec_osf" /**/ +#define ARCHLIB_EXP "/opt/perl/lib/5.7.3/alpha-dec_osf" /**/ /* ARCHNAME: * This symbol holds a string representing the architecture name. @@ -2649,9 +2649,14 @@ * This symbol, if defined, indicates to the C program that it should * include <sys/time.h> with KERNEL defined. */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ /*#define I_TIME / **/ #define I_SYS_TIME /**/ /*#define I_SYS_TIME_KERNEL / **/ +#define HAS_TM_TM_ZONE /**/ /* I_USTAT: * This symbol, if defined, indicates that <ustat.h> exists and @@ -2963,8 +2968,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "/opt/perl/lib/5.7.2" /**/ -#define PRIVLIB_EXP "/opt/perl/lib/5.7.2" /**/ +#define PRIVLIB "/opt/perl/lib/5.7.3" /**/ +#define PRIVLIB_EXP "/opt/perl/lib/5.7.3" /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -3067,8 +3072,8 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "/opt/perl/lib/site_perl/5.7.2/alpha-dec_osf" /**/ -#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.7.2/alpha-dec_osf" /**/ +#define SITEARCH "/opt/perl/lib/site_perl/5.7.3/alpha-dec_osf" /**/ +#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.7.3/alpha-dec_osf" /**/ /* SITELIB: * This symbol contains the name of the private library for this package. @@ -3090,8 +3095,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "/opt/perl/lib/site_perl/5.7.2" /**/ -#define SITELIB_EXP "/opt/perl/lib/site_perl/5.7.2" /**/ +#define SITELIB "/opt/perl/lib/site_perl/5.7.3" /**/ +#define SITELIB_EXP "/opt/perl/lib/site_perl/5.7.3" /**/ #define SITELIB_STEM "/opt/perl/lib/site_perl" /**/ /* Size_t_size: @@ -3128,7 +3133,7 @@ * script to make sure (one hopes) that it runs with perl and not * some shell. */ -#define STARTPERL "#!/opt/perl/bin/perl5.7.2" /**/ +#define STARTPERL "#!/opt/perl/bin/perl5.7.3" /**/ /* STDCHAR: * This symbol is defined to be the type of char used in stdio.h. @@ -3328,7 +3333,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in /opt/perl/lib/site_perl/5.7.2/alpha-dec_osf for older + * lib/lib.pm will automatically search in /opt/perl/lib/site_perl/5.7.3/alpha-dec_osf for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3347,7 +3352,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in /opt/perl/lib/site_perl/5.7.2 for older directories across major versions + * search in /opt/perl/lib/site_perl/5.7.3 for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's diff --git a/Porting/findrfuncs b/Porting/findrfuncs new file mode 100644 index 0000000000..36fb7e8fa6 --- /dev/null +++ b/Porting/findrfuncs @@ -0,0 +1,90 @@ +#!/usr/bin/perl -w + +# +# findrfuncs: find reentrant variants of functions used in an executable. +# Requires a functional "nm -u". Searches headers in /usr/include +# to find available *_r functions and looks for non-reentrant +# variants used in the supplied executable. +# +# Gurusamy Sarathy +# gsar@ActiveState.com +# +# Hacked to automatically find the executable and shared objects. +# --jhi + +use strict; +use File::Find; + +my @EXES; +my $NMU = 'nm -u'; +my @INCDIRS = qw(/usr/include); +my $SO = 'so'; +my $EXE = ''; + +if (open(CONFIG, "config.sh")) { + local $/; + my $CONFIG = <CONFIG>; + $SO = $1 if $CONFIG =~ /^so='(\w+)'/m; + $EXE = $1 if $CONFIG =~ /^_exe='\.(\w+)'/m; + close(CONFIG); +} + +push @EXES, "perl$EXE"; + +find(sub {push @EXES, $File::Find::name if /\.$SO$/}, '.' ); + +push @EXES, @ARGV; + +if ($^O eq 'dec_osf') { + $NMU = 'nm -Bu'; +} elsif ($^O eq 'irix') { + $NMU = 'nm -pu'; +} + +my %rfuncs; +my @syms; +find(sub { + return unless -f $File::Find::name; + local *F; + open F, "<$File::Find::name" + or die "Can't open $File::Find::name: $!"; + my $line; + while (defined ($line = <F>)) { + if ($line =~ /\b(\w+_r)\b/) { + #warn "$1 => $File::Find::name\n"; + $rfuncs{$1}->{$File::Find::name}++; + } + } + close F; + }, @INCDIRS); + +# delete bogus symbols grepped out of comments and such +delete $rfuncs{setlocale_r} if $^O eq 'linux'; + +my %syms; + +for my $exe (@EXES) { + # warn "#--- $exe\n"; + for my $sym (`$NMU $exe`) { + chomp $sym; + $sym =~ s/^\s+//; + $sym =~ s/^([0-9A-Fa-f]+\s+)?[Uu]\s+//; + $sym =~ s/\s+[Uu]\s+-$//; + next if /\s/; + $sym =~ s/\@.*\z//; # remove @@GLIBC_2.0 etc + # warn "#### $sym\n"; + if (exists $rfuncs{"${sym}_r"} && ! $syms{"$sym:$exe"}++) { + push @syms, $sym; + } + } + + if (@syms) { + print "\nFollowing symbols in $exe have reentrant versions:\n"; + for my $sym (@syms) { + my @f = sort keys %{$rfuncs{$sym . '_r'}}; + print "$sym => $sym" . "_r (@f)\n"; + } + } + @syms = (); +} + diff --git a/Porting/makerel b/Porting/makerel index 3bfb855655..2024915bbb 100644 --- a/Porting/makerel +++ b/Porting/makerel @@ -96,8 +96,13 @@ my @exe = qw( vms/ext/Stdio/test.pl vms/ext/filespec.t x2p/*.SH - Porting/patchls + Porting/findrfuncs + Porting/genlog Porting/makerel + Porting/p4d2p + Porting/p4desc + Porting/patchls + Porting/*.pl mpeix/nm mpeix/relink ); diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod index d1784e46e4..fe4d9c8e2c 100644 --- a/Porting/pumpkin.pod +++ b/Porting/pumpkin.pod @@ -1,6 +1,6 @@ =head1 NAME -Pumpkin - Notes on handling the Perl Patch Pumpkin +Pumpkin - Notes on handling the Perl Patch Pumpkin And Porting Perl =head1 SYNOPSIS @@ -350,6 +350,9 @@ need feedback on your patch, go ahead and issue it and promise to incorporate that feedback quickly (e.g. within 1 week) and send out a second patch. +If you update the subversion number, you may need to change the version +number near the top of the F<Changes> file. + =head2 run metaconfig If you need to make changes to Configure or config_h.SH, it may be best to @@ -582,6 +585,9 @@ ought to go in the Changes file or whether they ought to be available separately in the patch file (or both). There is no disagreement that detailed descriptions ought to be easily available somewhere. +If you update the subversion number in F<patchlevel.h>, you may need +to change the version number near the top of the F<Changes> file. + =head2 Todo The F<Todo> file contains a roughly-catgorized unordered list of @@ -1300,6 +1306,97 @@ Here, in no particular order, are some Configure and build-related items that merit consideration. This list isn't exhaustive, it's just what I came up with off the top of my head. +=head2 Adding missing library functions to Perl + +The perl Configure script automatically determines which headers and +functions you have available on your system and arranges for them to be +included in the compilation and linking process. Occasionally, when porting +perl to an operating system for the first time, you may find that the +operating system is missing a key function. While perl may still build +without this function, no perl program will be able to reference the missing +function. You may be able to write the missing function yourself, or you +may be able to find the missing function in the distribution files for +another software package. In this case, you need to instruct the perl +configure-and-build process to use your function. Perform these steps. + +=over 3 + +=item * + +Code and test the function you wish to add. Test it carefully; you will +have a much easier time debugging your code independently than when it is a +part of perl. + +=item * + +Here is an implementation of the POSIX truncate function for an operating +system (VOS) that does not supply one, but which does supply the ftruncate() +function. + + /* Beginning of modification history */ + /* Written 02-01-02 by Nick Ing-Simmons (nick@ing-simmons.net) */ + /* End of modification history */ + + /* VOS doesn't supply a truncate function, so we build one up + from the available POSIX functions. */ + + #include <fcntl.h> + #include <sys/types.h> + #include <unistd.h> + + int + truncate(const char *path, off_t len) + { + int fd = open(path,O_WRONLY); + int code = -1; + if (fd >= 0) { + code = ftruncate(fd,len); + close(fd); + } + return code; + } + +Place this file into a subdirectory that has the same name as the operating +system. This file is named perl/vos/vos.c + +=item * + +If your operating system has a hints file (in perl/hints/XXX.sh for an +operating system named XXX), then start with it. If your operating system +has no hints file, then create one. You can use a hints file for a similar +operating system, if one exists, as a template. + +=item * + +Add lines like the following to your hints file. The first line +(d_truncate="define") instructs Configure that the truncate() function +exists. The second line (archobjs="vos.o") instructs the makefiles that the +perl executable depends on the existence of a file named "vos.o". (Make +will automatically look for "vos.c" and compile it with the same options as +the perl source code). The final line ("test -h...") adds a symbolic link +to the top-level directory so that make can find vos.c. Of course, you +should use your own operating system name for the source file of extensions, +not "vos.c". + + # VOS does not have truncate() but we supply one in vos.c + d_truncate="define" + archobjs="vos.o" + + # Help gmake find vos.c + test -h vos.c || ln -s vos/vos.c vos.c + +The hints file is a series of shell commands that are run in the top-level +directory (the "perl" directory). Thus, these commands are simply executed +by Configure at an appropriate place during its execution. + +=item * + +At this point, you can run the Configure script and rebuild perl. Carefully +test the newly-built perl to ensure that normal paths, and error paths, +behave as you expect. + +=back + =head2 Good ideas waiting for round tuits =over 4 diff --git a/README.hpux b/README.hpux index 39802dc081..c21e20a33f 100644 --- a/README.hpux +++ b/README.hpux @@ -97,7 +97,7 @@ The most recent upgrade to the PA-RISC design, it added support for 64-bit integer data. As of the date of this document's last update, the following systems -contain PA-RISC 2.0 chips (this is very likely to be out of date): +contain PA-RISC 2.0 chips: 700, 780, 781, 782, 783, 785, 802, 804, 810, 820, 861, 871, 879, 889, 893, 895, 896, 898, 899, A400, A500, B1000, B2000, C130, C140, C160, @@ -105,9 +105,9 @@ contain PA-RISC 2.0 chips (this is very likely to be out of date): D280, D370, D380, D390, D650, J220, J2240, J280, J282, J400, J410, J5000, J5500XM, J5600, J7000, J7600, K250, K260, K260-EG, K270, K360, K370, K380, K450, K460, K460-EG, K460-XP, K470, K570, K580, L1000, - L2000, L3000, N4000, R380, R390, RP5400, RP5430, RP5450, RP5470, - RP7400, RP8400, SD16000, SD32000, SD64000, T540, T600, V2000, V2200, - V2250, V2500, V2600 + L2000, L3000, N4000, R380, R390, RP2400, RP2430, RP2450, RP2470, + RP5400, RP5430, RP5450, RP5470, RP7400, RP7410, RP8400, SD16000, + SD32000, SD64000, T540, T600, V2000, V2200, V2250, V2500, V2600 =head2 Itanium diff --git a/config_h.SH b/config_h.SH index 26206b0ce2..2088967fd8 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2669,9 +2669,14 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol, if defined, indicates to the C program that it should * include <sys/time.h> with KERNEL defined. */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ #$i_time I_TIME /**/ #$i_systime I_SYS_TIME /**/ #$i_systimek I_SYS_TIME_KERNEL /**/ +#$d_tm_tm_zone HAS_TM_TM_ZONE /**/ /* I_USTAT: * This symbol, if defined, indicates that <ustat.h> exists and diff --git a/configure.com b/configure.com index 76c137b5ad..fd262b1bf7 100644 --- a/configure.com +++ b/configure.com @@ -1275,6 +1275,12 @@ $ revision = baserev - ".0" $!: get the patchlevel $ echo "" $ echo4 "Getting the current patchlevel..." +$ patchlevel="0" +$ subversion="0" +$ api_revision="0" +$ api_version="0" +$ api_subversion="0" +$ perl_patchlevel="0" $ patchlevel_h = F$SEARCH("[-]patchlevel.h") $ IF (patchlevel_h.NES."") $ THEN @@ -1333,13 +1339,6 @@ $ IF (.NOT. got_patch) .OR. - THEN GOTO Patchlevel_h_loop $Close_patch: $ CLOSE CONFIG -$ ELSE -$ patchlevel="0" -$ subversion="0" -$ api_revision="0" -$ api_version="0" -$ api_subversion="0" -$ perl_patchlevel="0" $ ENDIF $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'" $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0" @@ -2519,7 +2518,10 @@ $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN - $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit $ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit $ IF xxx .EQS. "Devel/PPPort/harness" THEN goto ext_loop ! sub extension - omit -$ IF xxx .EQS. "Encode/EUC_JP" THEN goto ext_loop ! sub extension - omit +$ IF xxx .EQS. "Encode/CN" THEN goto ext_loop ! sub extension - omit +$ IF xxx .EQS. "Encode/JP" THEN goto ext_loop ! sub extension - omit +$ IF xxx .EQS. "Encode/KR" THEN goto ext_loop ! sub extension - omit +$ IF xxx .EQS. "Encode/TW" THEN goto ext_loop ! sub extension - omit $ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN - xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line) $ known_extensions = known_extensions + " ''xxx'" @@ -4954,9 +4956,9 @@ $ WS "}" $ CS $ ON ERROR THEN CONTINUE $ GOSUB compile -$ IF tmp .NES. "01" +$ IF tmp .NES. "0" $ THEN -$ echo "Yes, it does." +$ echo4 "Yes, it does." $ echo4 "Checking whether we can use SYS$SIGPRC instead" $ OS $ WS "#include <stdio.h>" @@ -4977,7 +4979,7 @@ $ CS $ GOSUB compile $ IF tmp .EQS. "1" $ THEN -$ echo "looks like we can" +$ echo4 "Yep, we can." $ kill_by_sigprc = "define" $! $! since SIGBUS and SIGSEGV indistinguishable, make them the same here. @@ -5001,7 +5003,11 @@ $ sig_num="0 1 2 3 4 5 6 7 8 9 10 10 12 13 14 15 6"",0" $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,10,12,13,14,15,6,0" $ sig_size="17" $ endif +$ ELSE +$ echo4 "Nope, we can't." $ ENDIF +$ ELSE +$ echo4 "Nope, it doesn't." $ ENDIF $ DELETE/SYMBOL tmp $! @@ -5396,6 +5402,14 @@ $ WC "d_tcsetpgrp='undef'" $ WC "d_telldir='define'" $ WC "d_telldirproto='define'" $ WC "d_times='define'" +$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0") +$ THEN +$ WC "d_tm_tm_gmtoff='define'" +$ WC "d_tm_tm_zone='define'" +$ ELSE +$ WC "d_tm_tm_gmtoff='undef'" +$ WC "d_tm_tm_zone='undef'" +$ ENDIF $ WC "d_truncate='" + d_truncate + "'" $ WC "d_tzname='" + d_tzname + "'" $ WC "d_u32align='define'" diff --git a/cygwin/perlld.in b/cygwin/perlld.in index 513edf4946..85d4996197 100644 --- a/cygwin/perlld.in +++ b/cygwin/perlld.in @@ -46,7 +46,7 @@ if ($args !~ /\-o (\S+)/) { $path =~ s,[/\\](\.[/\\])*,/,g; } if ($dllname =~ /\./) { $libname =$`; } else { $libname =$dllname; }; - my $v_e_r_s = '5_7_2'; + my $v_e_r_s = '5_7_3'; if ( $dllname =~ /.*perl.*/) { $dllname ="cygperl$v_e_r_s.dll"; } else { @@ -1439,7 +1439,7 @@ Perl_debop(pTHX_ OP *o) PerlIO_printf(Perl_debug_log, "[%"UVuf"]", (UV)o->op_targ); break; default: - return 0; + break; } PerlIO_printf(Perl_debug_log, "\n"); return 0; @@ -427,7 +427,6 @@ Ap |void |markstack_grow #if defined(USE_LOCALE_COLLATE) p |char* |mem_collxfrm |const char* s|STRLEN len|STRLEN* xlen #endif -Apd |int |memcmp_byte_utf8 |char *sbyte|STRLEN lbyte|char *sutf|STRLEN lutf Afp |SV* |mess |const char* pat|... Ap |SV* |vmess |const char* pat|va_list* args p |void |qerror |SV* err @@ -555,6 +554,9 @@ dopM |PerlIO*|start_glob |SV* pattern|IO *io #if defined(USE_5005THREADS) Ap |struct perl_thread* |new_struct_thread|struct perl_thread *t #endif +#if defined(USE_REENTRANT_API) +Ap |void |reentrant_init +#endif Ap |void |call_atexit |ATEXIT_t fn|void *ptr Apd |I32 |call_argv |const char* sub_name|I32 flags|char** argv Apd |I32 |call_method |const char* methname|I32 flags @@ -411,7 +411,6 @@ #if defined(USE_LOCALE_COLLATE) #define mem_collxfrm Perl_mem_collxfrm #endif -#define memcmp_byte_utf8 Perl_memcmp_byte_utf8 #define mess Perl_mess #define vmess Perl_vmess #define qerror Perl_qerror @@ -534,6 +533,9 @@ #if defined(USE_5005THREADS) #define new_struct_thread Perl_new_struct_thread #endif +#if defined(USE_REENTRANT_API) +#define reentrant_init Perl_reentrant_init +#endif #define call_atexit Perl_call_atexit #define call_argv Perl_call_argv #define call_method Perl_call_method @@ -1970,7 +1972,6 @@ #if defined(USE_LOCALE_COLLATE) #define mem_collxfrm(a,b,c) Perl_mem_collxfrm(aTHX_ a,b,c) #endif -#define memcmp_byte_utf8(a,b,c,d) Perl_memcmp_byte_utf8(aTHX_ a,b,c,d) #define vmess(a,b) Perl_vmess(aTHX_ a,b) #define qerror(a) Perl_qerror(aTHX_ a) #define sortsv(a,b,c) Perl_sortsv(aTHX_ a,b,c) @@ -2091,6 +2092,9 @@ #if defined(USE_5005THREADS) #define new_struct_thread(a) Perl_new_struct_thread(aTHX_ a) #endif +#if defined(USE_REENTRANT_API) +#define reentrant_init() Perl_reentrant_init(aTHX) +#endif #define call_atexit(a,b) Perl_call_atexit(aTHX_ a,b) #define call_argv(a,b,c) Perl_call_argv(aTHX_ a,b,c) #define call_method(a,b) Perl_call_method(aTHX_ a,b) diff --git a/epoc/config.sh b/epoc/config.sh index 6909d55ffe..266960fd19 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -33,8 +33,8 @@ apirevision='' apisubversion='' apiversion='' ar='arm-epoc-pe-ar' -archlib='?:/perl/lib/5.7.2/epoc' -archlibexp='?:/perl/lib/5.7.2/epoc' +archlib='?:/perl/lib/5.7.3/epoc' +archlibexp='?:/perl/lib/5.7.3/epoc' archname64='' archname='epoc' archobjs='epoc.o epocish.o epoc_stubs.o' @@ -644,8 +644,8 @@ pmake='' pr='' prefix='' prefixexp='' -privlib='?:/perl/lib/5.7.2' -privlibexp='?:/perl/lib/5.7.2' +privlib='?:/perl/lib/5.7.3' +privlibexp='?:/perl/lib/5.7.3' prototype='define' procselfexe='' ptrsize='4' @@ -690,11 +690,11 @@ sig_num='0' sig_num_init='0, 0' sig_size='1' signal_t='void' -sitearch='?:/perl/lib/site_perl/5.7.2/epoc' -sitearchexp='?:/perl/lib/site_perl/5.7.2/epoc' -sitelib='?:/perl/lib/site_perl/5.7.2/' +sitearch='?:/perl/lib/site_perl/5.7.3/epoc' +sitearchexp='?:/perl/lib/site_perl/5.7.3/epoc' +sitelib='?:/perl/lib/site_perl/5.7.3/' sitelib_stem='?:/perl/lib/site_perl' -sitelibexp='?:/perl/lib/site_perl/5.7.2/' +sitelibexp='?:/perl/lib/site_perl/5.7.3/' siteprefix='' siteprefixexp='' sizesize='4' @@ -766,7 +766,7 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.7.2' +version='5.7.3' versiononly='undef' vi='' voidflags='15' @@ -898,7 +898,7 @@ vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.7.2' +version='5.7.3' vi='' voidflags='15' xlibpth='' diff --git a/ext/B/B/Lint.pm b/ext/B/B/Lint.pm index 35378efa42..0115d2f00a 100644 --- a/ext/B/B/Lint.pm +++ b/ext/B/B/Lint.pm @@ -1,6 +1,6 @@ package B::Lint; -our $VERSION = '1.00'; +our $VERSION = '1.01'; =head1 NAME @@ -111,6 +111,8 @@ include other package names whose subs are then checked by Lint. This is only a very preliminary version. +This module doesn't work correctly on thread-enabled perls. + =head1 AUTHOR Malcolm Beattie, mbeattie@sable.ox.ac.uk. @@ -118,7 +120,7 @@ Malcolm Beattie, mbeattie@sable.ox.ac.uk. =cut use strict; -use B qw(walkoptree main_root walksymtable svref_2object parents +use B qw(walkoptree_slow main_root walksymtable svref_2object parents OPf_WANT_LIST OPf_WANT OPf_STACKED G_ARRAY ); @@ -164,7 +166,7 @@ sub gimme { my $op = shift; my $flags = $op->flags; if ($flags & OPf_WANT) { - return(($flags & OPf_WANT_LIST) ? 1 : 0); + return(($flags & OPf_WANT) == OPf_WANT_LIST ? 1 : 0); } return undef; } @@ -279,12 +281,12 @@ sub B::GV::lintcv { return if !$$cv || $done_cv{$$cv}++; my $root = $cv->ROOT; #warn " root = $root (0x$$root)\n";#debug - walkoptree($root, "lint") if $$root; + walkoptree_slow($root, "lint") if $$root; } sub do_lint { my %search_pack; - walkoptree(main_root, "lint") if ${main_root()}; + walkoptree_slow(main_root, "lint") if ${main_root()}; # Now do subs in main no strict qw(vars refs); diff --git a/ext/B/t/lint.t b/ext/B/t/lint.t new file mode 100644 index 0000000000..142e470b00 --- /dev/null +++ b/ext/B/t/lint.t @@ -0,0 +1,89 @@ +#!./perl -w + +BEGIN { + chdir 't' if -d 't'; + @INC = qw(../lib); + require './test.pl'; +} + +plan tests => 13; + +# Runs a separate perl interpreter with the appropriate lint options +# turned on +sub runlint ($$$;$) { + my ($opts,$prog,$result,$testname) = @_; + my $res = runperl( + switches => [ "-MO=Lint,$opts" ], + prog => $prog, + stderr => 1, + ); + $res =~ s/-e syntax OK\n$//; + is( $res, $result, $testname || $opts ); +} + +runlint 'context', '$foo = @bar', <<'RESULT'; +Implicit scalar context for array in scalar assignment at -e line 1 +RESULT + +runlint 'context', '$foo = length @bar', <<'RESULT'; +Implicit scalar context for array in length at -e line 1 +RESULT + +runlint 'implicit-read', '/foo/', <<'RESULT'; +Implicit match on $_ at -e line 1 +RESULT + +runlint 'implicit-write', 's/foo/bar/', <<'RESULT'; +Implicit substitution on $_ at -e line 1 +RESULT + +SKIP : { + + use Config; + skip("Doesn't work with threaded perls",9) + if $Config{useithreads} || $Config{use5005threads}; + + runlint 'implicit-read', '1 for @ARGV', <<'RESULT', 'implicit-read in foreach'; +Implicit use of $_ in foreach at -e line 1 +RESULT + + runlint 'dollar-underscore', '$_ = 1', <<'RESULT'; +Use of $_ at -e line 1 +RESULT + + runlint 'dollar-underscore', 'print', <<'RESULT', 'dollar-underscore in print'; +Use of $_ at -e line 1 +RESULT + + runlint 'private-names', 'sub A::_f{};A::_f()', <<'RESULT'; +Illegal reference to private name _f at -e line 1 +RESULT + + runlint 'private-names', '$A::_x', <<'RESULT'; +Illegal reference to private name _x at -e line 1 +RESULT + + { + local $TODO = q/doesn't catch methods/; + runlint 'private-names', 'sub A::_f{};A->_f()', <<'RESULT', +Illegal reference to private method name _f at -e line 1 +RESULT + 'private-names'; + } + + runlint 'undefined-subs', 'foo()', <<'RESULT'; +Undefined subroutine foo called at -e line 1 +RESULT + + runlint 'regexp-variables', 'print $&', <<'RESULT'; +Use of regexp variable $& at -e line 1 +RESULT + + { + local $TODO = 'bug'; + runlint 'regexp-variables', 's/./$&/', <<'RESULT'; +Use of regexp variable $& at -e line 1 +RESULT + } + +} diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index 83271cfcec..189ad007cb 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -446,11 +446,12 @@ sub _dump { elsif (!defined($val)) { $out .= "undef"; } - elsif ($val =~ /^(?:0|-?[1-9]\d{0,8})$/) { # safe decimal number + elsif ($val =~ /^(?:0|-?[1-9]\d{0,8})\z/) { # safe decimal number $out .= $val; } else { # string - if ($s->{useqq}) { + if ($s->{useqq} or $val =~ tr/\0-\377//c) { + # Fall back to qq if there's unicode $out .= qquote($val, $s->{useqq}); } else { @@ -623,6 +624,7 @@ sub qquote { # leave it as it is } else { s/([\200-\377])/'\\'.sprintf('%03o',ord($1))/eg; + s/([^\040-\176])/sprintf "\\x{%04x}", ord($1)/ge; } } else { # ebcdic diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 7bfb7a3466..30c6558cea 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -708,7 +708,26 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, else (void) sprintf(tmpbuf, "%"IVdf, SvIV(val)); len = strlen(tmpbuf); - sv_catpvn(retval, tmpbuf, len); + /* For 5.6.x and earlier will need to change this test to check + NV if NOK, as there NOK trumps IOK, and NV=3.5,IV=3 is valid. + Current code will Dump that as $VAR1 = 3; + Changes in 5.7 series mean that now IOK is only set if scalar + is precisely integer. */ + if (SvPOK(val)) { + /* Need to check to see if this is a string such as " 0". + I'm assuming from sprintf isn't going to clash with utf8. + Is this valid on EBCDIC? */ + STRLEN pvlen; + const char *pv = SvPV(val, pvlen); + if (pvlen != len || memNE(pv, tmpbuf, len)) + goto integer_came_from_string; + } + if (len > 10) { + /* Looks like we're on a 64 bit system. Make it a string so that + if a 32 bit system reads the number it will cope better. */ + sv_catpvf(retval, "'%s'", tmpbuf); + } else + sv_catpvn(retval, tmpbuf, len); } else if (realtype == SVt_PVGV) {/* GLOBs can end up with scribbly names */ c = SvPV(val, i); @@ -781,6 +800,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, sv_catpvn(retval, "undef", 5); } else { + integer_came_from_string: c = SvPV(val, i); if (DO_UTF8(val)) i += esc_q_utf8(aTHX_ retval, c, i); diff --git a/ext/Data/Dumper/t/dumper.t b/ext/Data/Dumper/t/dumper.t index b8730038ed..01a386eacd 100755 --- a/ext/Data/Dumper/t/dumper.t +++ b/ext/Data/Dumper/t/dumper.t @@ -25,6 +25,7 @@ my $WANT = ''; sub TEST { my $string = shift; + my $name = shift; my $t = eval $string; ++$TNUM; $t =~ s/([A-Z]+)\(0x[0-9a-f]+\)/$1(0xdeadbeef)/g @@ -37,8 +38,9 @@ sub TEST { $t = join("\n",sort(split(/\n/,$t))); $t =~ s/\,$//mg; } - print( ($t eq $WANT and not $@) ? "ok $TNUM\n" - : "not ok $TNUM\n--Expected--\n$WANT\n--Got--\n$@$t\n"); + $name = $name ? " - $name" : ''; + print( ($t eq $WANT and not $@) ? "ok $TNUM$name\n" + : "not ok $TNUM$name\n--Expected--\n$WANT\n--Got--\n$@$t\n"); ++$TNUM; eval "$t"; @@ -59,17 +61,22 @@ sub TEST { : "not ok $TNUM\n--Expected--\n$WANT\n--Got--\n$@$t\n"); } +# Force Data::Dumper::Dump to use perl. We test Dumpxs explicitly by calling +# it direct. Out here it lets us knobble the next if to test that the perl +# only tests do work (and count correctly) +$Data::Dumper::Useperl = 1; if (defined &Data::Dumper::Dumpxs) { print "### XS extension loaded, will run XS tests\n"; - $TMAX = 213; $XS = 1; + $TMAX = 321; $XS = 1; } else { print "### XS extensions not loaded, will NOT run XS tests\n"; - $TMAX = 108; $XS = 0; + $TMAX = 162; $XS = 0; } print "1..$TMAX\n"; +#XXXif (0) { ############# ############# @@ -817,8 +824,9 @@ TEST q(Data::Dumper->new([$b],['b'])->Purity(1)->Dumpxs;) #$a = "\x{9c10}"; EOT - TEST q(Data::Dumper->Dump([$a], ['a'])); - TEST q(Data::Dumper->Dumpxs([$a], ['a'])); + TEST q(Data::Dumper->Dump([$a], ['a'])), "\\x{9c10}"; + TEST q(Data::Dumper->Dumpxs([$a], ['a'])), "XS \\x{9c10}" + if $XS; } @@ -861,19 +869,22 @@ TEST q(Data::Dumper->new([$a])->Dumpxs;) ## $WANT = <<'EOT'; #$VAR1 = { -# '14' => 'QQQ', -# '13' => 'PPP', -# '12' => 'OOO', -# '11' => 'NNN', -# '10' => 'MMM', -# '9' => 'LLL', -# '8' => 'KKK', -# '7' => 'JJJ', -# '6' => 'III' +# 14 => 'QQQ', +# 13 => 'PPP', +# 12 => 'OOO', +# 11 => 'NNN', +# 10 => 'MMM', +# 9 => 'LLL', +# 8 => 'KKK', +# 7 => 'JJJ', +# 6 => 'III' #}; EOT +# perl code does keys and values as numbers if possible TEST q(Data::Dumper->new([$c])->Dump;); +# XS code always does them as strings +$WANT =~ s/ (\d+)/ '$1'/gs; TEST q(Data::Dumper->new([$c])->Dumpxs;) if $XS; } @@ -896,31 +907,32 @@ TEST q(Data::Dumper->new([$c])->Dumpxs;) $WANT = <<'EOT'; #$VAR1 = [ # { -# '6' => 'III', -# '7' => 'JJJ', -# '8' => 'KKK', -# '9' => 'LLL', -# '10' => 'MMM', -# '11' => 'NNN', -# '12' => 'OOO', -# '13' => 'PPP', -# '14' => 'QQQ' +# 6 => 'III', +# 7 => 'JJJ', +# 8 => 'KKK', +# 9 => 'LLL', +# 10 => 'MMM', +# 11 => 'NNN', +# 12 => 'OOO', +# 13 => 'PPP', +# 14 => 'QQQ' # }, # { -# QQQ => '14', -# PPP => '13', -# OOO => '12', -# NNN => '11', -# MMM => '10', -# LLL => '9', -# KKK => '8', -# JJJ => '7', -# III => '6' +# QQQ => 14, +# PPP => 13, +# OOO => 12, +# NNN => 11, +# MMM => 10, +# LLL => 9, +# KKK => 8, +# JJJ => 7, +# III => 6 # } #]; EOT TEST q(Data::Dumper->new([[$c, $d]])->Dump;); +$WANT =~ s/ (\d+)/ '$1'/gs; TEST q(Data::Dumper->new([[$c, $d]])->Dumpxs;) if $XS; } @@ -941,3 +953,318 @@ EOT TEST q(Data::Dumper->new([{ foo => sub { print "foo"; } }])->Dump); } + +############# 214 +## + +# This is messy. +# The controls (bare numbers) are stored either as integers or floating point. +# [depending on whether the tokeniser sees things like ".". +# The peephole optimiser only runs for constant folding, not single constants, +# so I already have some NVs, some IVs +# The string versions are not. They are all PV + +# This is arguably all far too chummy with the implementation, but I really +# want to ensure that we don't go wrong when flags on scalars get as side +# effects of reading them. + +# These tests are actually testing the precise output of the current +# implementation, so will most likely fail if the implementation changes, +# even if the new implementation produces different but correct results. +# It would be nice to test for wrong answers, but I can't see how to do that, +# so instead I'm checking for unexpected answers. (ie -2 becoming "-2" is not +# wrong, but I can't see an easy, reliable way to code that knowledge) + +# Numbers (seen by the tokeniser as numbers, stored as numbers. + @numbers = + ( + 0, +1, -2, 3.0, +4.0, -5.0, 6.5, +7.5, -8.5, + 9, +10, -11, 12.0, +13.0, -14.0, 15.5, +16.25, -17.75, + ); +# Strings + @strings = + ( + "0", "+1", "-2", "3.0", "+4.0", "-5.0", "6.5", "+7.5", "-8.5", " 9", + " +10", " -11", " 12.0", " +13.0", " -14.0", " 15.5", " +16.25", " -17.75", + ); + +# The perl code always does things the same way for numbers. + $WANT_PL_N = <<'EOT'; +#$VAR1 = 0; +#$VAR2 = 1; +#$VAR3 = -2; +#$VAR4 = 3; +#$VAR5 = 4; +#$VAR6 = -5; +#$VAR7 = '6.5'; +#$VAR8 = '7.5'; +#$VAR9 = '-8.5'; +#$VAR10 = 9; +#$VAR11 = 10; +#$VAR12 = -11; +#$VAR13 = 12; +#$VAR14 = 13; +#$VAR15 = -14; +#$VAR16 = '15.5'; +#$VAR17 = '16.25'; +#$VAR18 = '-17.75'; +EOT +# The perl code knows that 0 and -2 stringify exactly back to the strings, +# so it dumps them as numbers, not strings. + $WANT_PL_S = <<'EOT'; +#$VAR1 = 0; +#$VAR2 = '+1'; +#$VAR3 = -2; +#$VAR4 = '3.0'; +#$VAR5 = '+4.0'; +#$VAR6 = '-5.0'; +#$VAR7 = '6.5'; +#$VAR8 = '+7.5'; +#$VAR9 = '-8.5'; +#$VAR10 = ' 9'; +#$VAR11 = ' +10'; +#$VAR12 = ' -11'; +#$VAR13 = ' 12.0'; +#$VAR14 = ' +13.0'; +#$VAR15 = ' -14.0'; +#$VAR16 = ' 15.5'; +#$VAR17 = ' +16.25'; +#$VAR18 = ' -17.75'; +EOT + +# The XS code differs. +# These are the numbers as seen by the tokeniser. Constants aren't folded +# (which makes IVs where possible) so values the tokeniser thought were +# floating point are stored as NVs. The XS code outputs these as strings, +# but as it has converted them from NVs, leading + signs will not be there. + $WANT_XS_N = <<'EOT'; +#$VAR1 = 0; +#$VAR2 = 1; +#$VAR3 = -2; +#$VAR4 = '3'; +#$VAR5 = '4'; +#$VAR6 = '-5'; +#$VAR7 = '6.5'; +#$VAR8 = '7.5'; +#$VAR9 = '-8.5'; +#$VAR10 = 9; +#$VAR11 = 10; +#$VAR12 = -11; +#$VAR13 = '12'; +#$VAR14 = '13'; +#$VAR15 = '-14'; +#$VAR16 = '15.5'; +#$VAR17 = '16.25'; +#$VAR18 = '-17.75'; +EOT + +# These are the strings as seen by the tokeniser. The XS code will output +# these for all cases except where the scalar has been used in integer context + $WANT_XS_S = <<'EOT'; +#$VAR1 = '0'; +#$VAR2 = '+1'; +#$VAR3 = '-2'; +#$VAR4 = '3.0'; +#$VAR5 = '+4.0'; +#$VAR6 = '-5.0'; +#$VAR7 = '6.5'; +#$VAR8 = '+7.5'; +#$VAR9 = '-8.5'; +#$VAR10 = ' 9'; +#$VAR11 = ' +10'; +#$VAR12 = ' -11'; +#$VAR13 = ' 12.0'; +#$VAR14 = ' +13.0'; +#$VAR15 = ' -14.0'; +#$VAR16 = ' 15.5'; +#$VAR17 = ' +16.25'; +#$VAR18 = ' -17.75'; +EOT + +# These are the numbers as IV-ized by & +# These will differ from WANT_XS_N because now IV flags will be set on all +# values that were actually integer, and the XS code will then output these +# as numbers not strings. + $WANT_XS_I = <<'EOT'; +#$VAR1 = 0; +#$VAR2 = 1; +#$VAR3 = -2; +#$VAR4 = 3; +#$VAR5 = 4; +#$VAR6 = -5; +#$VAR7 = '6.5'; +#$VAR8 = '7.5'; +#$VAR9 = '-8.5'; +#$VAR10 = 9; +#$VAR11 = 10; +#$VAR12 = -11; +#$VAR13 = 12; +#$VAR14 = 13; +#$VAR15 = -14; +#$VAR16 = '15.5'; +#$VAR17 = '16.25'; +#$VAR18 = '-17.75'; +EOT + +# Some of these tests will be redundant. +@numbers_s = @numbers_i = @numbers_is = @numbers_n = @numbers_ns = @numbers_ni + = @numbers_nis = @numbers; +@strings_s = @strings_i = @strings_is = @strings_n = @strings_ns = @strings_ni + = @strings_nis = @strings; +# Use them in an integer context +foreach (@numbers_i, @numbers_ni, @numbers_nis, @numbers_is, + @strings_i, @strings_ni, @strings_nis, @strings_is) { + my $b = sprintf "%d", $_; +} +# Use them in a floating point context +foreach (@numbers_n, @numbers_ni, @numbers_nis, @numbers_ns, + @strings_n, @strings_ni, @strings_nis, @strings_ns) { + my $b = sprintf "%e", $_; +} +# Use them in a string context +foreach (@numbers_s, @numbers_is, @numbers_nis, @numbers_ns, + @strings_s, @strings_is, @strings_nis, @strings_ns) { + my $b = sprintf "%s", $_; +} + +# use Devel::Peek; Dump ($_) foreach @vanilla_c; + +$WANT=$WANT_PL_N; +TEST q(Data::Dumper->new(\@numbers)->Dump), 'Numbers'; +TEST q(Data::Dumper->new(\@numbers_s)->Dump), 'Numbers PV'; +TEST q(Data::Dumper->new(\@numbers_i)->Dump), 'Numbers IV'; +TEST q(Data::Dumper->new(\@numbers_is)->Dump), 'Numbers IV,PV'; +TEST q(Data::Dumper->new(\@numbers_n)->Dump), 'Numbers NV'; +TEST q(Data::Dumper->new(\@numbers_ns)->Dump), 'Numbers NV,PV'; +TEST q(Data::Dumper->new(\@numbers_ni)->Dump), 'Numbers NV,IV'; +TEST q(Data::Dumper->new(\@numbers_nis)->Dump), 'Numbers NV,IV,PV'; +$WANT=$WANT_PL_S; +TEST q(Data::Dumper->new(\@strings)->Dump), 'Strings'; +TEST q(Data::Dumper->new(\@strings_s)->Dump), 'Strings PV'; +TEST q(Data::Dumper->new(\@strings_i)->Dump), 'Strings IV'; +TEST q(Data::Dumper->new(\@strings_is)->Dump), 'Strings IV,PV'; +TEST q(Data::Dumper->new(\@strings_n)->Dump), 'Strings NV'; +TEST q(Data::Dumper->new(\@strings_ns)->Dump), 'Strings NV,PV'; +TEST q(Data::Dumper->new(\@strings_ni)->Dump), 'Strings NV,IV'; +TEST q(Data::Dumper->new(\@strings_nis)->Dump), 'Strings NV,IV,PV'; +if ($XS) { + $WANT=$WANT_XS_N; + TEST q(Data::Dumper->new(\@numbers)->Dumpxs), 'XS Numbers'; + TEST q(Data::Dumper->new(\@numbers_s)->Dumpxs), 'XS Numbers PV'; + $WANT=$WANT_XS_I; + TEST q(Data::Dumper->new(\@numbers_i)->Dumpxs), 'XS Numbers IV'; + TEST q(Data::Dumper->new(\@numbers_is)->Dumpxs), 'XS Numbers IV,PV'; + $WANT=$WANT_XS_N; + TEST q(Data::Dumper->new(\@numbers_n)->Dumpxs), 'XS Numbers NV'; + TEST q(Data::Dumper->new(\@numbers_ns)->Dumpxs), 'XS Numbers NV,PV'; + $WANT=$WANT_XS_I; + TEST q(Data::Dumper->new(\@numbers_ni)->Dumpxs), 'XS Numbers NV,IV'; + TEST q(Data::Dumper->new(\@numbers_nis)->Dumpxs), 'XS Numbers NV,IV,PV'; + + $WANT=$WANT_XS_S; + TEST q(Data::Dumper->new(\@strings)->Dumpxs), 'XS Strings'; + TEST q(Data::Dumper->new(\@strings_s)->Dumpxs), 'XS Strings PV'; + # This one used to really mess up. New code actually emulates the .pm code + $WANT=$WANT_PL_S; + TEST q(Data::Dumper->new(\@strings_i)->Dumpxs), 'XS Strings IV'; + TEST q(Data::Dumper->new(\@strings_is)->Dumpxs), 'XS Strings IV,PV'; + $WANT=$WANT_XS_S; + TEST q(Data::Dumper->new(\@strings_n)->Dumpxs), 'XS Strings NV'; + TEST q(Data::Dumper->new(\@strings_ns)->Dumpxs), 'XS Strings NV,PV'; + # This one used to really mess up. New code actually emulates the .pm code + $WANT=$WANT_PL_S; + TEST q(Data::Dumper->new(\@strings_ni)->Dumpxs), 'XS Strings NV,IV'; + TEST q(Data::Dumper->new(\@strings_nis)->Dumpxs), 'XS Strings NV,IV,PV'; +} + +{ + $a = "1\n"; +############# 310 +## Perl code was using /...$/ and hence missing the \n. + $WANT = <<'EOT'; +my $VAR1 = '42 +'; +EOT + + # Can't pad with # as the output has an embedded newline. + local $Data::Dumper::Pad = "my "; + TEST q(Data::Dumper->Dump(["42\n"])), "number with trailing newline"; + TEST q(Data::Dumper->Dumpxs(["42\n"])), "XS number with trailing newline" + if $XS; +} + +#XXX} + + +{ + @a = ( + 999999999, + 1000000000, + 9999999999, + 10000000000, + -999999999, + -1000000000, + -9999999999, + -10000000000, + 4294967295, + 4294967296, + -2147483648, + -2147483649, + ); +############# 316 +## Perl code flips over at 10 digits. + $WANT = <<'EOT'; +#$VAR1 = 999999999; +#$VAR2 = '1000000000'; +#$VAR3 = '9999999999'; +#$VAR4 = '10000000000'; +#$VAR5 = -999999999; +#$VAR6 = '-1000000000'; +#$VAR7 = '-9999999999'; +#$VAR8 = '-10000000000'; +#$VAR9 = '4294967295'; +#$VAR10 = '4294967296'; +#$VAR11 = '-2147483648'; +#$VAR12 = '-2147483649'; +EOT + + TEST q(Data::Dumper->Dump(\@a)), "long integers"; + + if ($XS) { +## XS code flips over at 11 characters ("-" is a char) or larger than int. + if (~0 == 0xFFFFFFFF) { + # 32 bit system + $WANT = <<'EOT'; +#$VAR1 = 999999999; +#$VAR2 = 1000000000; +#$VAR3 = '9999999999'; +#$VAR4 = '10000000000'; +#$VAR5 = -999999999; +#$VAR6 = '-1000000000'; +#$VAR7 = '-9999999999'; +#$VAR8 = '-10000000000'; +#$VAR9 = 4294967295; +#$VAR10 = '4294967296'; +#$VAR11 = '-2147483648'; +#$VAR12 = '-2147483649'; +EOT + } else { + $WANT = <<'EOT'; +#$VAR1 = 999999999; +#$VAR2 = 1000000000; +#$VAR3 = 9999999999; +#$VAR4 = '10000000000'; +#$VAR5 = -999999999; +#$VAR6 = '-1000000000'; +#$VAR7 = '-9999999999'; +#$VAR8 = '-10000000000'; +#$VAR9 = 4294967295; +#$VAR10 = 4294967296; +#$VAR11 = '-2147483648'; +#$VAR12 = '-2147483649'; +EOT + } + TEST q(Data::Dumper->Dumpxs(\@a)), "XS long integers"; + } +} + diff --git a/ext/Devel/PPPort/Makefile.PL b/ext/Devel/PPPort/Makefile.PL index 0259a05e5a..f4cf6f5996 100644 --- a/ext/Devel/PPPort/Makefile.PL +++ b/ext/Devel/PPPort/Makefile.PL @@ -5,7 +5,8 @@ WriteMakefile( DISTNAME => "Devel-PPPort", VERSION_FROM=> 'PPPort.pm', - #PM => {'PPPort.pm' => '$(INST_LIBDIR)/PPPort.pm'}, + PL_FILES => { 'ppport_h.PL' => 'ppport.h' }, + 'depend' => { '$(OBJECT)' => '$(H_FILES)' }, C => [qw(module2.c module3.c)], H => [qw(ppport.h)], OBJECT => '$(BASEEXT)$(OBJ_EXT) $(O_FILES)', @@ -13,14 +14,3 @@ WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }, 'clean' => { FILES => qw($(H_FILES))} ); - -sub MY::postamble { - return <<"EOM"; - -\$(H_FILES) : ppport_h.PL - \$(PERLRUNINST) ppport_h.PL - -\$(OBJECT) : \$(H_FILES) - -EOM -} diff --git a/ext/Encode/CN/CN.pm b/ext/Encode/CN/CN.pm index b2d1795e30..185c0cf297 100644 --- a/ext/Encode/CN/CN.pm +++ b/ext/Encode/CN/CN.pm @@ -6,9 +6,6 @@ use Encode::CN::HZ; use XSLoader; XSLoader::load('Encode::CN',$VERSION); -local $@; -eval "use Encode::HanExtra"; # load extra encodings if they exist - 1; __END__ =head1 NAME @@ -17,9 +14,9 @@ Encode::CN - China-based Chinese Encodings =head1 SYNOPSIS - use Encode::CN; - $euc_cn = encode("euc-cn", $utf8); - $utf8 = encode("euc-cn", $euc_cn); + use Encode 'encode'; + $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly + $utf8 = encode("euc-cn", $euc_cn); # ditto =head1 DESCRIPTION @@ -41,9 +38,6 @@ Due to size concerns, C<GB 18030> (an extension to C<GBK>) is distributed separately on CPAN, under the name L<Encode::HanExtra>. That module also contains extra Taiwan-based encodings. -This module will automatically load L<Encode::HanExtra> if you have it on -your machine. - =head1 BUGS ASCII part (0x00-0x7f) is preserved for all encodings, even though it diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 445dd2401b..20843545da 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -57,6 +57,29 @@ our %winlatin2cp = ( 'Vietnamese' => 1258, ); +our %external_tables = + ( + 'euc-cn' => 'Encode/CN.pm', + gb2312 => 'Encode/CN.pm', + gb12345 => 'Encode/CN.pm', + gbk => 'Encode/CN.pm', + cp936 => 'Encode/CN.pm', + 'iso-ir-165' => 'Encode/CN.pm', + 'euc-jp' => 'Encode/JP.pm', + shiftjis => 'Encode/JP.pm', + macjapan => 'Encode/JP.pm', + cp932 => 'Encode/JP.pm', + 'euc-kr' => 'Encode/KR.pm', + ksc5601 => 'Encode/KR.pm', + cp949 => 'Encode/KR.pm', + big5 => 'Encode/TW.pm', + 'big5-hkscs' => 'Encode/TW.pm', + cp950 => 'Encode/TW.pm', + gb18030 => 'Encode/HanExtra.pm', + big5plus => 'Encode/HanExtra.pm', + 'euc-tw' => 'Encode/HanExtra.pm', + ); + sub encodings { my ($class) = @_; @@ -220,6 +243,11 @@ sub getEncoding { return $encoding{$lc}; } + if (exists $external_tables{$lc}) + { + require $external_tables{$lc}; + return $encoding{$name} if exists $encoding{$name}; + } my $oc = $class->findAlias($name); return $oc if defined $oc; @@ -302,11 +330,6 @@ Encode - character encodings use Encode; - use Encode::TW; # for Taiwan-based Chinese encodings - use Encode::CN; # for China-based Chinese encodings - use Encode::JP; # for Japanese encodings - use Encode::KR; # for Korean encodings - =head1 DESCRIPTION The C<Encode> module provides the interfaces between Perl's strings @@ -330,9 +353,12 @@ When Perl is processing "binary data" the programmer wants Perl to process "sequences of bytes". This is not a problem for Perl - as a byte has 256 possible values it easily fits in Perl's much larger "logical character". -Due to size concerns, before using B<CJK> (Chinese, Japanese & Korean) -encodings, you have to C<use> the corresponding -B<Encode::>(B<TW>|B<CN>|B<JP>|B<KR>) modules first. +Due to size concerns, each of B<CJK> (Chinese, Japanese & Korean) modules +are not loaded in memory until the first time they're used. Although you +don't have to C<use> the corresponding B<Encode::>(B<TW>|B<CN>|B<JP>|B<KR>) +modules first, be aware that those encodings will not be in C<%encodings> +until their module is loaded (either implicitly through using encodings +contained in the same module, or via an explicit C<use>). =head2 TERMINOLOGY diff --git a/ext/Encode/Encode/7bit-kr.enc b/ext/Encode/Encode/7bit-kr.enc deleted file mode 100644 index 30c53952ff..0000000000 --- a/ext/Encode/Encode/7bit-kr.enc +++ /dev/null @@ -1,7 +0,0 @@ -# Encoding file: 7bit-kr, escape-driven -E -name 7bit-kr -init \x1b$)C -final {} -ascii \x0f -ksc5601 \x0e diff --git a/ext/Encode/JP/JP.pm b/ext/Encode/JP/JP.pm index d36323e589..aadf339a5d 100644 --- a/ext/Encode/JP/JP.pm +++ b/ext/Encode/JP/JP.pm @@ -20,9 +20,9 @@ Encode::JP - Japanese Encodings =head1 SYNOPSIS - use Encode::JP; - $euc_jp = encode("euc-jp", $utf8); - $utf8 = encode("euc-jp", $euc_jp); + use Encode 'encode'; + $euc_jp = encode("euc-jp", $utf8); # loads Encode::JP implicitly + $utf8 = encode("euc-jp", $euc_jp); # ditto =head1 ABSTRACT diff --git a/ext/Encode/KR/KR.pm b/ext/Encode/KR/KR.pm index 9936c5d22a..fabe33490c 100644 --- a/ext/Encode/KR/KR.pm +++ b/ext/Encode/KR/KR.pm @@ -13,9 +13,9 @@ Encode::KR - Korean Encodings =head1 SYNOPSIS - use Encode::CN; - $euc_kr = encode("euc-kr", $utf8); - $utf8 = encode("euc-kr", $euc_kr); + use Encode 'encode'; + $euc_kr = encode("euc-kr", $utf8); # loads Encode::KR implicitly + $utf8 = encode("euc-kr", $euc_kr); # ditto =head1 DESCRIPTION diff --git a/ext/Encode/MANIFEST b/ext/Encode/MANIFEST index 6300a735c2..736a018bcd 100644 --- a/ext/Encode/MANIFEST +++ b/ext/Encode/MANIFEST @@ -12,7 +12,6 @@ Encode/2022.enc Encode/7bit-greek.enc Encode/7bit-jis.enc Encode/7bit-kana.enc -Encode/7bit-kr.enc Encode/7bit-latin1.enc Encode/8859-1.enc Encode/8859-1.ucm @@ -157,9 +156,7 @@ lib/Encode/XS.pm lib/Encode/CN/HZ.pm lib/Encode/Tcl/Escape.pm lib/Encode/Tcl/Extended.pm -lib/Encode/Tcl/HanZi.pm lib/Encode/Tcl/Table.pm -lib/Encode/JP/Tr.pm lib/Encode/JP/ISO_2022_JP.pm lib/Encode/JP/H2Z.pm lib/Encode/JP/Constants.pm @@ -169,7 +166,5 @@ t/Tcl.t t/Encode.t t/table.euc t/table.ref -t/table.utf8 -t/table.rnd t/japanese.pl t/JP.t diff --git a/ext/Encode/TW/TW.pm b/ext/Encode/TW/TW.pm index c3f64fdd25..20402c2138 100644 --- a/ext/Encode/TW/TW.pm +++ b/ext/Encode/TW/TW.pm @@ -5,9 +5,6 @@ use Encode; use XSLoader; XSLoader::load('Encode::TW',$VERSION); -local $@; -eval "use Encode::HanExtra"; # load extra encodings if they exist - 1; __END__ =head1 NAME @@ -16,9 +13,9 @@ Encode::TW - Taiwan-based Chinese Encodings =head1 SYNOPSIS - use Encode::CN; - $big5 = encode("big5", $utf8); - $utf8 = encode("big5", $big5); + use Encode 'encode'; + $big5 = encode("big5", $utf8); # loads Encode::TW implicitly + $utf8 = encode("big5", $big5); # ditto =head1 DESCRIPTION @@ -37,9 +34,6 @@ Due to size concerns, C<EUC-TW> (Extended Unix Character) and C<BIG5PLUS> (CMEX's Big5+) are distributed separately on CPAN, under the name L<Encode::HanExtra>. That module also contains extra China-based encodings. -This module will automatically load L<Encode::HanExtra> if you have it on -your machine. - =head1 BUGS The C<CNS11643> encoding files are not complete (only the first two planes, diff --git a/ext/Encode/lib/Encode/CN/HZ.pm b/ext/Encode/lib/Encode/CN/HZ.pm index a57ae8a971..e4c2a8f18e 100644 --- a/ext/Encode/lib/Encode/CN/HZ.pm +++ b/ext/Encode/lib/Encode/CN/HZ.pm @@ -1,11 +1,12 @@ package Encode::CN::HZ; +use strict; +no warnings 'redefine'; # to quell the "use Encode" below + use Encode::CN; use Encode qw|encode decode|; use base 'Encode::Encoding'; -use strict; - # HZ is but escaped GB, so we implement it with the # GB2312(raw) encoding here. Cf. RFC 1842 & 1843. @@ -18,8 +19,30 @@ sub decode my ($obj,$str,$chk) = @_; my $gb = Encode::find_encoding('gb2312'); - $str =~ s{~(?:(~)|\n|{([^~]*)~}|)} - {$1 ? '~' : defined $2 ? $gb->decode($2, $chk) : ''}eg; + $str =~ s{~ # starting tilde + (?: + (~) # another tilde - escaped (set $1) + | # or + \n # \n - output nothing + | # or + \{ # opening brace of GB data + ( # set $2 to any number of... + (?: + [^~] # non-tilde GB character + | # or + ~(?!\}) # tilde not followed by a closing brace + )* + ) + ~\} # closing brace of GB data + | # XXX: invalid escape - maybe die on $chk? + ) + }{ + (defined $1) ? '~' # two tildes make one tilde + : + (defined $2) ? $gb->decode($2, $chk) # decode the characters + : + '' # '' on ~\n and invalid escape + }egx; return $str; } @@ -27,23 +50,41 @@ sub decode sub encode { my ($obj,$str,$chk) = @_; + my ($out, $in_gb); my $gb = Encode::find_encoding('gb2312'); $str =~ s/~/~~/g; - $str =~ s/((?: - \p{InCJKCompatibility}| - \p{InCJKCompatibilityForms}| - \p{InCJKCompatibilityIdeographs}| - \p{InCJKCompatibilityIdeographsSupplement}| - \p{InCJKRadicalsSupplement}| - \p{InCJKSymbolsAndPunctuation}| - \p{InCJKUnifiedIdeographsExtensionA}| - \p{InCJKUnifiedIdeographs}| - \p{InCJKUnifiedIdeographsExtensionB}| - \p{InEnclosedCJKLettersAndMonths} - )+)/'~{'.$gb->encode($1, $chk).'~}'/egx; - return $str; + # XXX: Since CHECK and partial decoding has not been implemented yet, + # we'll use a very crude way to test for GB2312ness. + + for my $index (0 .. length($str) - 1) { + no warnings 'utf8'; + + my $char = substr($str, $index, 1); + my $try = $gb->encode($char); # try encode this char + + if (defined($try)) { # is a GB character + if ($in_gb) { + $out .= $try; # in GB mode - just append it + } + else { + $out .= "~{$try"; # enter GB mode, then append it + $in_gb = 1; + } + } + elsif ($in_gb) { + $out .= "~}$char"; # leave GB mode, then append it + $in_gb = 0; + } + else { + $out .= $char; # not in GB mode - just append it + } + } + + $out .= '~}' if $in_gb; # add closing brace as needed + + return $out; } 1; diff --git a/ext/Encode/lib/Encode/JP/Tr.pm b/ext/Encode/lib/Encode/JP/Tr.pm deleted file mode 100644 index 28aac78360..0000000000 --- a/ext/Encode/lib/Encode/JP/Tr.pm +++ /dev/null @@ -1,90 +0,0 @@ -# -# $Id: Tr.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $ -# - -package Jcode::Tr; - -use strict; -use vars qw($VERSION $RCSID); - -$RCSID = q$Id: Tr.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 0.77 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; - -use Carp; - -use Jcode::Constants qw(:all); -use vars qw(%_TABLE); - -sub tr { - # $prev_from, $prev_to, %table are persistent variables - my ($r_str, $from, $to, $opt) = @_; - my (@from, @to); - my $n = 0; - - undef %_TABLE; - &_maketable($from, $to, $opt); - - $$r_str =~ s( - ([\x80-\xff][\x00-\xff]|[\x00-\xff]) - ) - {defined($_TABLE{$1}) && ++$n ? - $_TABLE{$1} : $1}ogex; - - return $n; -} - -sub _maketable{ - my( $from, $to, $opt ) = @_; - - $from =~ s/($RE{EUC_0212}-$RE{EUC_0212})/&_expnd3($1)/geo; - $from =~ s/($RE{EUC_KANA}-$RE{EUC_KANA})/&_expnd2($1)/geo; - $from =~ s/($RE{EUC_C }-$RE{EUC_C })/&_expnd2($1)/geo; - $from =~ s/($RE{ASCII }-$RE{ASCII })/&_expnd1($1)/geo; - $to =~ s/($RE{EUC_0212}-$RE{EUC_0212})/&_expnd3($1)/geo; - $to =~ s/($RE{EUC_KANA}-$RE{EUC_KANA})/&_expnd2($1)/geo; - $to =~ s/($RE{EUC_C }-$RE{EUC_C })/&_expnd2($1)/geo; - $to =~ s/($RE{ASCII }-$RE{ASCII })/&_expnd1($1)/geo; - - my @from = $from =~ /$RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|[\x00-\xff]/go; - my @to = $to =~ /$RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|[\x00-\xff]/go; - - push @to, ($opt =~ /d/ ? '' : $to[-1]) x ($#from - $#to) if $#to < $#from; - @_TABLE{@from} = @to; - -} - -sub _expnd1 { - my ($str) = @_; - # s/\\(.)/$1/og; # I dunno what this was doing!? - my($c1, $c2) = unpack('CxC', $str); - if ($c1 <= $c2) { - for ($str = ''; $c1 <= $c2; $c1++) { - $str .= pack('C', $c1); - } - } - return $str; -} - -sub _expnd2 { - my ($str) = @_; - my ($c1, $c2, $c3, $c4) = unpack('CCxCC', $str); - if ($c1 == $c3 && $c2 <= $c4) { - for ($str = ''; $c2 <= $c4; $c2++) { - $str .= pack('CC', $c1, $c2); - } - } - return $str; -} - -sub _expnd3 { - my ($str) = @_; - my ($c1, $c2, $c3, $c4, $c5, $c6) = unpack('CCCxCCC', $str); - if ($c1 == $c4 && $c2 == $c5 && $c3 <= $c6) { - for ($str = ''; $c3 <= $c6; $c3++) { - $str .= pack('CCC', $c1, $c2, $c3); - } - } - return $str; -} - -1; diff --git a/ext/Encode/lib/Encode/Tcl.pm b/ext/Encode/lib/Encode/Tcl.pm index 916e175854..812dcd171e 100644 --- a/ext/Encode/lib/Encode/Tcl.pm +++ b/ext/Encode/lib/Encode/Tcl.pm @@ -1,7 +1,7 @@ package Encode::Tcl; BEGIN { if (ord("A") == 193) { - die "Encode::JP not supported on EBCDIC\n"; + die "Encode::Tcl not supported on EBCDIC\n"; } } use strict; @@ -103,8 +103,7 @@ sub loadEncoding } my $subclass = ($type eq 'X') ? 'Extended' : - ($type eq 'H') ? 'HanZi' : - ($type eq 'E') ? 'Escape' : 'Table'; + ($type eq 'E') ? 'Escape' : 'Table'; my $class = ref($obj) . '::' . $subclass; # carp "Loading $file"; bless $obj,$class; @@ -132,7 +131,6 @@ sub INC_find require Encode::Tcl::Table; require Encode::Tcl::Escape; require Encode::Tcl::Extended; -require Encode::Tcl::HanZi; 1; __END__ diff --git a/ext/Encode/lib/Encode/Tcl/HanZi.pm b/ext/Encode/lib/Encode/Tcl/HanZi.pm deleted file mode 100644 index 3a6a5c0d96..0000000000 --- a/ext/Encode/lib/Encode/Tcl/HanZi.pm +++ /dev/null @@ -1,151 +0,0 @@ -package Encode::Tcl::HanZi; -our $VERSION = do {my @r=(q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r}; -use base 'Encode::Encoding'; - -use Carp; - -sub read -{ - my ($obj,$fh,$name) = @_; - my(%tbl, @seq, $enc); - while (<$fh>) - { - next unless /^(\S+)\s+(.*)$/; - my ($key,$val) = ($1,$2); - $val =~ s/^\{(.*?)\}/$1/g; - $val =~ s/\\x([0-9a-f]{2})/chr(hex($1))/ge; - if($enc = Encode->getEncoding($key)) - { - $tbl{$val} = ref($enc) eq 'Encode::Tcl' ? $enc->loadEncoding : $enc; - push @seq, $val; - } - else - { - $obj->{$key} = $val; - } - } - $obj->{'Seq'} = \@seq; # escape sequences - $obj->{'Tbl'} = \%tbl; # encoding tables - return $obj; -} - -sub decode -{ - my ($obj,$str,$chk) = @_; - my $name = $obj->{'Name'}; - my $tbl = $obj->{'Tbl'}; - my $seq = $obj->{'Seq'}; - my $std = $seq->[0]; - my $cur = $std; - my $uni; - while (length($str)){ - my $cc = substr($str,0,1,''); - if($cc eq "~") - { - if($str =~ s/^\cJ//) - { - next; - } - elsif($str =~ s/^\~//) - { - 1; # no-op - } - elsif($str =~ s/^([{}])//) - { - $cur = "~$1"; - next; - } - elsif(! length $str) - { - $str = '~'; - last; - } - else - { - $str =~ s/^([^~])//; - croak "unknown HanZi escape sequence: ~$1"; - next; - } - } - if(ref($tbl->{$cur}) ne 'Encode::Tcl::Table') - { - $uni .= $tbl->{$cur}->decode($cc); - next; - } - my $ch = ord($cc); - my $rep = $tbl->{$cur}->{'Rep'}; - my $touni = $tbl->{$cur}->{'ToUni'}; - my $x; - if (&$rep($ch) eq 'C') - { - $x = $touni->[0][$ch]; - } - else - { - if(! length $str) - { - $str = $cc; # split leading byte - last; - } - my $c2 = substr($str,0,1,''); - $cc .= $c2; - $x = $touni->[$ch][ord($c2)]; - } - unless (defined $x) - { - Encode::Tcl::no_map_in_decode($name, $cc.$str); - } - $uni .= $x; - } - if($chk) - { - $_[1] = $cur eq $std ? $str : $cur.$str; - } - return $uni; -} - -sub encode -{ - my ($obj,$uni,$chk) = @_; - my $name = $obj->{'Name'}; - my $tbl = $obj->{'Tbl'}; - my $seq = $obj->{'Seq'}; - my $std = $seq->[0]; - my $str; - my $pre = $std; - my $cur = $pre; - - while (length($uni)) - { - my $ch = substr($uni,0,1,''); - my $x; - foreach my $e_seq (@$seq) - { - $x = ref($tbl->{$e_seq}) eq 'Encode::Tcl::Table' - ? $tbl->{$e_seq}->{FmUni}->{$ch} - : $tbl->{$e_seq}->encode($ch,1); - $cur = $e_seq and last if defined $x; - } - unless (defined $x) - { - unless($chk) - { - Encode::Tcl::no_map_in_encode(ord($ch), $name) - } - return undef; - } - if(ref($tbl->{$cur}) eq 'Encode::Tcl::Table') - { - my $def = $tbl->{$cur}->{'Def'}; - my $rep = $tbl->{$cur}->{'Rep'}; - $x = pack(&$rep($x),$x); - } - $str .= $cur eq $pre ? $x : ($pre = $cur).$x; - $str .= '~' if $x eq '~'; # to '~~' - } - $str .= $std unless $cur eq $std; - $_[1] = $uni if $chk; - return $str; -} -1; -__END__ diff --git a/ext/Encode/t/CN.t b/ext/Encode/t/CN.t new file mode 100644 index 0000000000..2185a0791e --- /dev/null +++ b/ext/Encode/t/CN.t @@ -0,0 +1,145 @@ +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bEncode\b/) { + print "1..0 # Skip: Encode was not built\n"; + exit 0; + } + unless (find PerlIO::Layer 'perlio') { + print "1..0 # Skip: PerlIO was not built\n"; + exit 0; + } + if (ord("A") == 193) { + print "1..0 # Skip: EBCDIC\n"; + exit 0; + } + $| = 1; +} + +use strict; +use Test::More tests => 29; +use Encode; + +use_ok('Encode::CN'); + +# Since JP.t already test basic file IO, we will just focus on +# internal encode / decode test here. Unfortunately, to test +# against all the UniHan characters will take a huge disk space, +# not to mention the time it will take, and the fact that Perl +# did not bundle UniHan.txt anyway. + +# So, here we just test a typical snippet spanning multiple Unicode +# blocks, and hope it can point out obvious errors. + +run_tests('Simplified Chinese only', { + 'utf' => ( +12298.26131.32463.12299.31532.19968.21350. +24406.26352.65306. +22823.21705.20094.20803.65292.19975.29289.36164.22987.65292. +20035.32479.22825.12290. +20113.34892.38632.26045.65292.21697.29289.27969.24418.12290. +22823.26126.22987.32456.65292.20845.20301.26102.25104.65292. +26102.20056.20845.40857.20197.24481.22825.12290. +20094.36947.21464.21270.65292.21508.27491.24615.21629.65292. +20445.21512.22823.21644.65292.20035.21033.36126.12290. +39318.20986.24246.29289.65292.19975.22269.21688.23425.12290 + ), + + 'euc-cn' => join('', +'¡¶Ò×¾¡·µÚÒ»ØÔ', +'åèÔ»£º', +'´óÔÕǬԪ£¬ÍòÎï×Êʼ£¬', +'ÄËͳÌì¡£', +'ÔÆÐÐÓêÊ©£¬Æ·ÎïÁ÷ÐΡ£', +'´óÃ÷ʼÖÕ£¬Áùλʱ³É£¬', +'ʱ³ËÁùÁúÒÔÓùÌì¡£', +'ǬµÀ±ä»¯£¬¸÷ÕýÐÔÃü£¬', +'±£ºÏ´óºÍ£¬ÄËÀûÕê¡£', +'Ê׳öÊüÎÍò¹úÏÌÄþ¡£', + ), + + 'gb2312' => join('', +'!6RW>-!75ZR;XT', +'ehT;#:', +'4sTUG,T*#,MrNoWJJ<#,', +'DKM3Ll!#', +'TFPPSjJ)#,F7NoAwPN!#', +'4sCwJ<VU#,AyN;J13I#,', +'J13KAyAzRTSyLl!#', +'G,5@1d;/#,8wU}PTC|#,', +'1#:O4s:M#,DK@{Uj!#', +'JW3vJ|No#,Mr9zOLD~!#' + ), + + 'iso-ir-165'=> join('', +'!6RW>-!75ZR;XT', +'ehT;#:', +'4sTUG,T*#,MrNoWJJ<#,', +'DKM3Ll!#', +'TFPPSjJ)#,F7NoAwPN!#', +'4sCwJ<VU#,AyN;J13I#,', +'J13KAyAzRTSyLl!#', +'G,5@1d;/#,8wU}PTC|#,', +'1#:O4s:M#,DK@{Uj!#', +'JW3vJ|No#,Mr9zOLD~!#' + ), +}); + +run_tests('Simplified Chinese + ASCII', { + 'utf' => ( +35937.26352.65306.10. +22825.34892.20581.65292.21531.23376.20197.33258.24378.19981.24687.12290.10. +28508.40857.21247.29992.65292.38451.22312.19979.20063.12290.32. +35265.40857.22312.30000.65292.24503.26045.26222.20063.12290.32. +32456.26085.20094.20094.65292.21453.22797.36947.20063.12290.10. +25110.36291.22312.28170.65292.36827.26080.21646.20063.12290.39134. +40857.22312.22825.65292.22823.20154.36896.20063.12290.32. +20130.40857.26377.24724.65292.30408.19981.21487.20037.20063.12290.10. +29992.20061.65292.22825.24503.19981.21487.20026.39318.20063.12290 + ), + + 'cp936' => join(chr(10), +'ÏóÔ»£º', +'ÌìÐн¡£¬¾ý×ÓÒÔ×ÔÇ¿²»Ï¢¡£', +'DZÁúÎðÓã¬ÑôÔÚÏÂÒ²¡£ ¼ûÁúÔÚÌµÂÊ©ÆÕÒ²¡£ ÖÕÈÕǬǬ£¬·´¸´µÀÒ²¡£', +'»òÔ¾ÔÚÔ¨£¬½øÎÞ¾ÌÒ²¡£·ÉÁúÔÚÌ죬´óÈËÔìÒ²¡£ ¿ºÁúÓлڣ¬Ó¯²»¿É¾ÃÒ²¡£', +'Óþţ¬ÌìµÂ²»¿ÉΪÊ×Ò²¡£', + ), + + 'hz' => join(chr(10), +'~{OsT;#:~}', +'~{LlPP=!#,>}WSRTWTG?2;O"!#~}', +'~{G1AzNpSC#,QtTZOBR2!#~} ~{<{AzTZLo#,5BJ)FUR2!#~} ~{VUHUG,G,#,74845@R2!#~}', +'~{;rT>TZT(#,=xN^>LR2!#7IAzTZLl#,4sHKTlR2!#~} ~{?:AzSP;Z#,S/2;?I>CR2!#~}', +'~{SC>E#,Ll5B2;?IN*JWR2!#~}', + ), +}); + +run_tests('Traditional Chinese', { + 'utf', => 20094.65306.20803.12289.20136.12289.21033.12289.35998, + 'gb12345' => 'G,#:T*!":`!"@{!"Uj', + 'gbk' => 'Ǭ£ºÔª¡¢ºà¡¢Àû¡¢Ø‘', +}); + +sub run_tests { + my ($title, $tests) = @_; + my $utf = delete $tests->{'utf'}; + + # $enc = encoding, $str = content + foreach my $enc (sort keys %{$tests}) { + my $str = $tests->{$enc}; + + is(Encode::decode($enc, $str), $utf, "[$enc] decode - $title"); + is(Encode::encode($enc, $utf), $str, "[$enc] encode - $title"); + + my $str2 = $str; + my $utf8 = Encode::encode('utf-8', $utf); + + Encode::from_to($str2, $enc, 'utf-8'); + is($str2, $utf8, "[$enc] from_to => utf8 - $title"); + + Encode::from_to($utf8, 'utf-8', $enc); # convert $utf8 as $enc + is($utf8, $str, "[$enc] utf8 => from_to - $title"); + } +} diff --git a/ext/Encode/t/TW.t b/ext/Encode/t/TW.t new file mode 100644 index 0000000000..b125a8f53a --- /dev/null +++ b/ext/Encode/t/TW.t @@ -0,0 +1,94 @@ +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bEncode\b/) { + print "1..0 # Skip: Encode was not built\n"; + exit 0; + } + unless (find PerlIO::Layer 'perlio') { + print "1..0 # Skip: PerlIO was not built\n"; + exit 0; + } + if (ord("A") == 193) { + print "1..0 # Skip: EBCDIC\n"; + exit 0; + } + $| = 1; +} + +use strict; +use Test::More tests => 17; +use Encode; + +use_ok('Encode::TW'); + +# Since JP.t already test basic file IO, we will just focus on +# internal encode / decode test here. Unfortunately, to test +# against all the UniHan characters will take a huge disk space, +# not to mention the time it will take, and the fact that Perl +# did not bundle UniHan.txt anyway. + +# So, here we just test a typical snippet spanning multiple Unicode +# blocks, and hope it can point out obvious errors. + +run_tests('Basic Big5 range', { + 'utf' => ( +24093.39640.38525.20043.33495.35028.20846.65292. +26389.30343.32771.26352.20271.24248.65108. +25885.25552.35998.20110.23391.38508.20846.65292. +24799.24218.23493.21566.20197.38477.65108 + ), + + 'big5' => (join('', +'«Ò°ª¶§¤§]¸Ç¤¼¡A®Ó¬Ó¦Ò¤ê§B±e¡Q', +'Äá´£s¤_©s³µ¤¼¡A±©©°±G§^¥H°¡Q', + )), + + 'big5-hkscs'=> (join('', +'«Ò°ª¶§¤§]¸Ç¤¼¡A®Ó¬Ó¦Ò¤ê§B±e¡Q', +'Äá´£s¤_©s³µ¤¼¡A±©©°±G§^¥H°¡Q', + )), + + 'cp950' => (join('', +'«Ò°ª¶§¤§]¸Ç¤¼¡A®Ó¬Ó¦Ò¤ê§B±e¡Q', +'Äá´£s¤_©s³µ¤¼¡A±©©°±G§^¥H°¡Q', + )), +}); + +run_tests('Hong Kong Extensions', { + 'utf' => ( +24863.35613.25152.26377.20351.29992.32.80.101.114.108.32. +22021.26379.21451.65292.32102.25105.21707.22021. +25903.25345.12289.24847.35211.21644.40723.21237. +22914.26524.32232.30908.26377.20219.20309.37679.28431. +65292.35531.21578.35380.25105.21707.12290 + ), + + 'big5-hkscs' => join('', +'·PÁ©Ҧ³¨Ï¥Î Perl ïªB¤Í¡Aµ¹§Ú’]ï¤ä«ù¡B·N¨£©M¹ªÀy', +'¦pªG½s½X¦³¥ô¦ó¿ùº|¡A½Ð§i¶D§Ú’]¡C' + ), +}); + +sub run_tests { + my ($title, $tests) = @_; + my $utf = delete $tests->{'utf'}; + + # $enc = encoding, $str = content + foreach my $enc (sort keys %{$tests}) { + my $str = $tests->{$enc}; + + is(Encode::decode($enc, $str), $utf, "[$enc] decode - $title"); + is(Encode::encode($enc, $utf), $str, "[$enc] encode - $title"); + + my $str2 = $str; + my $utf8 = Encode::encode('utf-8', $utf); + + Encode::from_to($str2, $enc, 'utf-8'); + is($str2, $utf8, "[$enc] from_to => utf8 - $title"); + + Encode::from_to($utf8, 'utf-8', $enc); # convert $utf8 as $enc + is($utf8, $str, "[$enc] utf8 => from_to - $title"); + } +} diff --git a/ext/Encode/t/Tcl.t b/ext/Encode/t/Tcl.t index 578af1257d..4f4419132a 100644 --- a/ext/Encode/t/Tcl.t +++ b/ext/Encode/t/Tcl.t @@ -1,6 +1,6 @@ BEGIN { chdir 't' if -d 't'; -# @INC = '../lib'; + @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) { print "1..0 # Skip: Encode was not built\n"; @@ -74,24 +74,6 @@ $esc_str{$kr} = {qw( my $num_esc = $n * keys(%esc_str); foreach (values %esc_str){ $num_esc += $n * keys %$_ } -my $FS_preserves_case = 1; # Unix e.g. -if ($^O eq 'VMS') { # || $^O eq ... - $FS_preserves_case = 0; -} -my $hz = 'HZ'; # HanZi -if (!$FS_preserves_case) { - $hz = 'hz'; # HanZi -} - -my @hz_txt = ( - "~~in GB.~{<:Ky2;S{#,NpJ)l6HK!#~}Bye.~~", - "~~in GB.~{<:Ky2;S{#,~}~\cJ~{NpJ)l6HK!#~}Bye.~~", - "~~in GB.~\cJ~{<:Ky2;S{#,NpJ)l6HK!#~}~\cJBye.~~", -); - -my $hz_exp = '007e0069006e002000470042002e5df162404e0d6b32' - . 'ff0c52ff65bd65bc4eba3002004200790065002e007e'; - use constant BUFSIZ => 64; # for test use constant hiragana => "\x{3042}\x{3044}\x{3046}\x{3048}\x{304A}"; use constant han_kana => "\x{FF71}\x{FF72}\x{FF73}\x{FF74}\x{FF75}"; @@ -111,7 +93,7 @@ my @ary_buff = ( # [ encoding, decoded, encoded ] ["2022-cn", hiragana, "\e\$)A\cN". '$"$$$&$($*' . "\cO" ], ["2022-jp", hiragana, "\e\$B".'$"$$$&$($*'."\e(B" ], ["2022-kr", hiragana, "\e\$)C\cN". '*"*$*&*(**' . "\cO" ], - [ $jis, han_kana, "\e\(I".'12345'."\e(B" ], +# [ $jis, han_kana, "\e\(I".'12345'."\e(B" ], ["2022-jp1", macron, "\e\$(D\x2A\x27\x2A\x37\x2A\x45\x2A\x57\x2A\x69\e(B"], ["2022-jp2", "\x{C0}" . macron . "\x{C1}", "\e\$(D\e.A\eN\x40\x2A\x27\x2A\x37\x2A\x45\x2A\x57\x2A\x69\e(B\eN\x41"], @@ -120,16 +102,10 @@ my @ary_buff = ( # [ encoding, decoded, encoded ] ["euc-jp-0212", han_kana, "\x8E\xB1\x8E\xB2\x8E\xB3\x8E\xB4\x8E\xB5" ], ["euc-jp-0212", macron, "\x8F\xAA\xA7\x8F\xAA\xB7\x8F\xAA\xC5\x8F\xAA\xD7\x8F\xAA\xE9" ], -# type-H - [ $hz, hiragana, "~{". '$"$$$&$($*' . "~}" ], - [ $hz, hiragana, "~{". '$"$$' ."~\cJ". '$&$($*' . "~}" ], ); plan test => $n*@encodings + $n*@encodings*@greek - + $n*@encodings*@ideodigit + $num_esc + -# + $n + @hz_txt # no HZ for now - + @ary_buff - - 2; # no HZ for now + + $n*@encodings*@ideodigit + $num_esc + @ary_buff; foreach my $enc (@encodings) { @@ -202,40 +178,9 @@ foreach my $enc (@encodings) } } - -{ - my $hz_to_unicode = sub - { - return unpack('H*', pack 'n*', unpack 'U*', decode $hz, shift); - }; - - my $hz_from_unicode = sub - { - return encode($hz, pack 'U*', unpack 'n*', pack 'H*', shift); - }; - - if(0){ - foreach my $enc ($hz) - { - my $tab = Encode->getEncoding($enc); - ok(1,defined($tab),"Could not load $enc"); - - ok(&$hz_from_unicode($hz_exp), $hz_txt[0], - "$enc mangled translating from Unicode"); - - foreach my $str (@hz_txt) - { - ok(&$hz_to_unicode($str), $hz_exp, - "$enc mangled translating to Unicode"); - } - } - } -} - for my $ary (@ary_buff) { my $NG = 0; my $enc = $ary->[0]; - next if $enc eq 'HZ'; for my $n ( int(BUFSIZ/2) .. 2*BUFSIZ+4 ){ my $dst = "a"x$n. $ary->[1] . TAIL; my $src = "a"x$n. $ary->[2] . TAIL; diff --git a/ext/I18N/Langinfo/fallback.c b/ext/I18N/Langinfo/fallback.c deleted file mode 100644 index 538a9f753c..0000000000 --- a/ext/I18N/Langinfo/fallback.c +++ /dev/null @@ -1,724 +0,0 @@ -#define PERL_constant_NOTFOUND 1 -#define PERL_constant_NOTDEF 2 -#define PERL_constant_ISIV 3 -#define PERL_constant_ISNO 4 -#define PERL_constant_ISNV 5 -#define PERL_constant_ISPV 6 -#define PERL_constant_ISPVN 7 -#define PERL_constant_ISSV 8 -#define PERL_constant_ISUNDEF 9 -#define PERL_constant_ISUV 10 -#define PERL_constant_ISYES 11 - -#ifndef NVTYPE -typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ -#endif - -static int -constant_5 (pTHX_ const char *name, IV *iv_return) { - /* When generated this function returned values for the list of names given - here. However, subsequent manual editing may have added or removed some. - DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7 D_FMT MON_1 MON_2 MON_3 MON_4 - MON_5 MON_6 MON_7 MON_8 MON_9 NOSTR T_FMT */ - /* Offset 4 gives the best switch position. */ - switch (name[4]) { - case '1': - if (memEQ(name, "DAY_1", 5)) { - /* ^ */ -#ifdef DAY_1 - *iv_return = DAY_1; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_1", 5)) { - /* ^ */ -#ifdef MON_1 - *iv_return = MON_1; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '2': - if (memEQ(name, "DAY_2", 5)) { - /* ^ */ -#ifdef DAY_2 - *iv_return = DAY_2; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_2", 5)) { - /* ^ */ -#ifdef MON_2 - *iv_return = MON_2; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '3': - if (memEQ(name, "DAY_3", 5)) { - /* ^ */ -#ifdef DAY_3 - *iv_return = DAY_3; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_3", 5)) { - /* ^ */ -#ifdef MON_3 - *iv_return = MON_3; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '4': - if (memEQ(name, "DAY_4", 5)) { - /* ^ */ -#ifdef DAY_4 - *iv_return = DAY_4; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_4", 5)) { - /* ^ */ -#ifdef MON_4 - *iv_return = MON_4; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '5': - if (memEQ(name, "DAY_5", 5)) { - /* ^ */ -#ifdef DAY_5 - *iv_return = DAY_5; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_5", 5)) { - /* ^ */ -#ifdef MON_5 - *iv_return = MON_5; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '6': - if (memEQ(name, "DAY_6", 5)) { - /* ^ */ -#ifdef DAY_6 - *iv_return = DAY_6; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_6", 5)) { - /* ^ */ -#ifdef MON_6 - *iv_return = MON_6; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '7': - if (memEQ(name, "DAY_7", 5)) { - /* ^ */ -#ifdef DAY_7 - *iv_return = DAY_7; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_7", 5)) { - /* ^ */ -#ifdef MON_7 - *iv_return = MON_7; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '8': - if (memEQ(name, "MON_8", 5)) { - /* ^ */ -#ifdef MON_8 - *iv_return = MON_8; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '9': - if (memEQ(name, "MON_9", 5)) { - /* ^ */ -#ifdef MON_9 - *iv_return = MON_9; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'R': - if (memEQ(name, "NOSTR", 5)) { - /* ^ */ -#ifdef NOSTR - *iv_return = NOSTR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'T': - if (memEQ(name, "D_FMT", 5)) { - /* ^ */ -#ifdef D_FMT - *iv_return = D_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "T_FMT", 5)) { - /* ^ */ -#ifdef T_FMT - *iv_return = T_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - -static int -constant_6 (pTHX_ const char *name, IV *iv_return) { - /* When generated this function returned values for the list of names given - here. However, subsequent manual editing may have added or removed some. - AM_STR MON_10 MON_11 MON_12 NOEXPR PM_STR YESSTR */ - /* Offset 0 gives the best switch position. */ - switch (name[0]) { - case 'A': - if (memEQ(name, "AM_STR", 6)) { - /* ^ */ -#ifdef AM_STR - *iv_return = AM_STR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'M': - if (memEQ(name, "MON_10", 6)) { - /* ^ */ -#ifdef MON_10 - *iv_return = MON_10; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_11", 6)) { - /* ^ */ -#ifdef MON_11 - *iv_return = MON_11; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "MON_12", 6)) { - /* ^ */ -#ifdef MON_12 - *iv_return = MON_12; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'N': - if (memEQ(name, "NOEXPR", 6)) { - /* ^ */ -#ifdef NOEXPR - *iv_return = NOEXPR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'P': - if (memEQ(name, "PM_STR", 6)) { - /* ^ */ -#ifdef PM_STR - *iv_return = PM_STR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'Y': - if (memEQ(name, "YESSTR", 6)) { - /* ^ */ -#ifdef YESSTR - *iv_return = YESSTR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - -static int -constant_7 (pTHX_ const char *name, IV *iv_return) { - /* When generated this function returned values for the list of names given - here. However, subsequent manual editing may have added or removed some. - ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7 ABMON_1 ABMON_2 - ABMON_3 ABMON_4 ABMON_5 ABMON_6 ABMON_7 ABMON_8 ABMON_9 CODESET D_T_FMT - THOUSEP YESEXPR */ - /* Offset 6 gives the best switch position. */ - switch (name[6]) { - case '1': - if (memEQ(name, "ABDAY_1", 7)) { - /* ^ */ -#ifdef ABDAY_1 - *iv_return = ABDAY_1; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_1", 7)) { - /* ^ */ -#ifdef ABMON_1 - *iv_return = ABMON_1; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '2': - if (memEQ(name, "ABDAY_2", 7)) { - /* ^ */ -#ifdef ABDAY_2 - *iv_return = ABDAY_2; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_2", 7)) { - /* ^ */ -#ifdef ABMON_2 - *iv_return = ABMON_2; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '3': - if (memEQ(name, "ABDAY_3", 7)) { - /* ^ */ -#ifdef ABDAY_3 - *iv_return = ABDAY_3; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_3", 7)) { - /* ^ */ -#ifdef ABMON_3 - *iv_return = ABMON_3; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '4': - if (memEQ(name, "ABDAY_4", 7)) { - /* ^ */ -#ifdef ABDAY_4 - *iv_return = ABDAY_4; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_4", 7)) { - /* ^ */ -#ifdef ABMON_4 - *iv_return = ABMON_4; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '5': - if (memEQ(name, "ABDAY_5", 7)) { - /* ^ */ -#ifdef ABDAY_5 - *iv_return = ABDAY_5; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_5", 7)) { - /* ^ */ -#ifdef ABMON_5 - *iv_return = ABMON_5; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '6': - if (memEQ(name, "ABDAY_6", 7)) { - /* ^ */ -#ifdef ABDAY_6 - *iv_return = ABDAY_6; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_6", 7)) { - /* ^ */ -#ifdef ABMON_6 - *iv_return = ABMON_6; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '7': - if (memEQ(name, "ABDAY_7", 7)) { - /* ^ */ -#ifdef ABDAY_7 - *iv_return = ABDAY_7; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "ABMON_7", 7)) { - /* ^ */ -#ifdef ABMON_7 - *iv_return = ABMON_7; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '8': - if (memEQ(name, "ABMON_8", 7)) { - /* ^ */ -#ifdef ABMON_8 - *iv_return = ABMON_8; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '9': - if (memEQ(name, "ABMON_9", 7)) { - /* ^ */ -#ifdef ABMON_9 - *iv_return = ABMON_9; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'P': - if (memEQ(name, "THOUSEP", 7)) { - /* ^ */ -#ifdef THOUSEP - *iv_return = THOUSEP; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'R': - if (memEQ(name, "YESEXPR", 7)) { - /* ^ */ -#ifdef YESEXPR - *iv_return = YESEXPR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'T': - if (memEQ(name, "CODESET", 7)) { - /* ^ */ -#ifdef CODESET - *iv_return = CODESET; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - if (memEQ(name, "D_T_FMT", 7)) { - /* ^ */ -#ifdef D_T_FMT - *iv_return = D_T_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - -static int -constant_8 (pTHX_ const char *name, IV *iv_return) { - /* When generated this function returned values for the list of names given - here. However, subsequent manual editing may have added or removed some. - ABMON_10 ABMON_11 ABMON_12 CRNCYSTR */ - /* Offset 7 gives the best switch position. */ - switch (name[7]) { - case '0': - if (memEQ(name, "ABMON_10", 8)) { - /* ^ */ -#ifdef ABMON_10 - *iv_return = ABMON_10; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '1': - if (memEQ(name, "ABMON_11", 8)) { - /* ^ */ -#ifdef ABMON_11 - *iv_return = ABMON_11; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case '2': - if (memEQ(name, "ABMON_12", 8)) { - /* ^ */ -#ifdef ABMON_12 - *iv_return = ABMON_12; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'R': - if (memEQ(name, "CRNCYSTR", 8)) { - /* ^ */ -#ifdef CRNCYSTR - *iv_return = CRNCYSTR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - -static int -constant_9 (pTHX_ const char *name, IV *iv_return) { - /* When generated this function returned values for the list of names given - here. However, subsequent manual editing may have added or removed some. - ERA_D_FMT ERA_T_FMT RADIXCHAR */ - /* Offset 4 gives the best switch position. */ - switch (name[4]) { - case 'D': - if (memEQ(name, "ERA_D_FMT", 9)) { - /* ^ */ -#ifdef ERA_D_FMT - *iv_return = ERA_D_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'T': - if (memEQ(name, "ERA_T_FMT", 9)) { - /* ^ */ -#ifdef ERA_T_FMT - *iv_return = ERA_T_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'X': - if (memEQ(name, "RADIXCHAR", 9)) { - /* ^ */ -#ifdef RADIXCHAR - *iv_return = RADIXCHAR; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - -static int -constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { - /* Initially switch on the length of the name. */ - /* When generated this function returned values for the list of names given - in this section of perl code. Rather than manually editing these functions - to add or remove constants, which would result in this comment and section - of code becoming inaccurate, we recommend that you edit this section of - code, and use it to regenerate a new set of constant functions which you - then use to replace the originals. - - Regenerate these constant functions by feeding this entire source file to - perl -x - -#!../../../miniperl -w -use ExtUtils::Constant qw (constant_types C_constant XS_constant); - -my $types = {map {($_, 1)} qw(IV)}; -my @names = (qw(ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7 ABMON_1 - ABMON_10 ABMON_11 ABMON_12 ABMON_2 ABMON_3 ABMON_4 ABMON_5 - ABMON_6 ABMON_7 ABMON_8 ABMON_9 ALT_DIGITS AM_STR CODESET - CRNCYSTR DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7 D_FMT D_T_FMT - ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT MON_1 MON_10 MON_11 MON_12 - MON_2 MON_3 MON_4 MON_5 MON_6 MON_7 MON_8 MON_9 NOEXPR NOSTR - PM_STR RADIXCHAR THOUSEP T_FMT T_FMT_AMPM YESEXPR YESSTR)); - -print constant_types(); # macro defs -foreach (C_constant ("I18N::Langinfo", 'constant', 'IV', $types, undef, 3, @names) ) { - print $_, "\n"; # C constant subs -} -print "#### XS Section:\n"; -print XS_constant ("I18N::Langinfo", $types); -__END__ - */ - - switch (len) { - case 3: - if (memEQ(name, "ERA", 3)) { -#ifdef ERA - *iv_return = ERA; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 5: - return constant_5 (aTHX_ name, iv_return); - break; - case 6: - return constant_6 (aTHX_ name, iv_return); - break; - case 7: - return constant_7 (aTHX_ name, iv_return); - break; - case 8: - return constant_8 (aTHX_ name, iv_return); - break; - case 9: - return constant_9 (aTHX_ name, iv_return); - break; - case 10: - /* Names all of length 10. */ - /* ALT_DIGITS T_FMT_AMPM */ - /* Offset 7 gives the best switch position. */ - switch (name[7]) { - case 'I': - if (memEQ(name, "ALT_DIGITS", 10)) { - /* ^ */ -#ifdef ALT_DIGITS - *iv_return = ALT_DIGITS; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - case 'M': - if (memEQ(name, "T_FMT_AMPM", 10)) { - /* ^ */ -#ifdef T_FMT_AMPM - *iv_return = T_FMT_AMPM; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - break; - case 11: - if (memEQ(name, "ERA_D_T_FMT", 11)) { -#ifdef ERA_D_T_FMT - *iv_return = ERA_D_T_FMT; - return PERL_constant_ISIV; -#else - return PERL_constant_NOTDEF; -#endif - } - break; - } - return PERL_constant_NOTFOUND; -} - diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 79e1dfd22a..d844775e4f 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -263,8 +263,9 @@ inet_ntoa(ip_address_sv) addrlen, sizeof(addr)); /* We could use inet_ntoa() but that is broken * in HP-UX + GCC + 64bitint (returns "0.0.0.0"), - * so let's use this sprintf() workaround everywhere. */ - New(1138, addr_str, 4 * 3 + 3 + 1, char); + * so let's use this sprintf() workaround everywhere. + * This is also more threadsafe than using inet_ntoa(). */ + New(1138, addr_str, 4 * 3 + 3 + 1, char); /* IPv6? */ sprintf(addr_str, "%d.%d.%d.%d", ((addr.s_addr >> 24) & 0xFF), ((addr.s_addr >> 16) & 0xFF), diff --git a/ext/Socket/socketpair.t b/ext/Socket/socketpair.t index 161a119a09..242e61cd89 100644 --- a/ext/Socket/socketpair.t +++ b/ext/Socket/socketpair.t @@ -7,7 +7,10 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; - $can_fork = $Config{d_fork} || ($^O eq 'MSWin32' && $Config{useithreads}); + $can_fork = $Config{'d_fork'} + || ($^O eq 'MSWin32' && $Config{useithreads} + && $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS\b/); + if ($^O eq "hpux" or $Config{'extensions'} !~ /\bSocket\b/ && !(($^O eq 'VMS') && $Config{d_socket})) { diff --git a/global.sym b/global.sym index a477a0bf3d..760606c0ae 100644 --- a/global.sym +++ b/global.sym @@ -229,7 +229,6 @@ Perl_grok_number Perl_grok_numeric_radix Perl_grok_oct Perl_markstack_grow -Perl_memcmp_byte_utf8 Perl_mess Perl_vmess Perl_sortsv @@ -322,6 +321,7 @@ Perl_ninstr Perl_op_free Perl_pad_sv Perl_new_struct_thread +Perl_reentrant_init Perl_call_atexit Perl_call_argv Perl_call_method diff --git a/hints/cygwin.sh b/hints/cygwin.sh index c57d3f6fdf..e42be6461d 100644 --- a/hints/cygwin.sh +++ b/hints/cygwin.sh @@ -23,7 +23,6 @@ so='dll' libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` # - eliminate -lm, symlink to libcygwin.a 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 diff --git a/hints/linux.sh b/hints/linux.sh index 971e491536..90bcb78c58 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -249,7 +249,7 @@ esac cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) - ccflags="-D_REENTRANT $ccflags" + ccflags="-D_GNU_SOURCE -D_REENTRANT $ccflags" set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` shift libswanted="$*" diff --git a/hints/powerux.sh b/hints/powerux.sh index dc1b3d07f0..c95e0e9ef5 100644 --- a/hints/powerux.sh +++ b/hints/powerux.sh @@ -1,32 +1,30 @@ -# Hints for the PowerUX operating system running on Concurrent (formerly -# Harris) NightHawk machines. Written by Tom.Horsley@mail.ccur.com +# Hints for the Power MAX OS operating system (formerly PowerUX - hence the +# name) running on Concurrent (formerly Harris) NightHawk machines. Written +# by Tom.Horsley@ccur.com # -# Note: The OS is fated to change names again to PowerMAX OS, but this -# PowerUX file should still work (I wish marketing would make up their mind -# about the name :-). -# -# This config uses dynamic linking and the Concurrent C compiler. It has -# been tested on Power PC based 6000 series machines running PowerUX. +# This hint uses dynamic linking and the new Concurrent C compiler (based +# on the Edison front end). This hint file was produced for a build of the +# 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system +# (but it should work on any Power MAX release using the newer "ec" (versus +# "cc") compiler, and hopefully will also work for the upcoming 5.8 +# development release of perl). -# Internally at Concurrent, we use a source management tool which winds up -# giving us read-only copies of source trees that are mostly symbolic links. -# That upsets the perl build process when it tries to edit opcode.h and -# embed.h or touch perly.c or perly.h, so turn those files into "real" files -# when Configure runs. (If you already have "real" source files, this won't -# do anything). -# -if [ -x /usr/local/mkreal ] +# First find out where the root of the source tree is located. + +SRCROOT="" +if [ -f ./INSTALL ] then - for i in '.' '..' - do - for j in embed.h opcode.h perly.h perly.c - do - if [ -h $i/$j ] - then - ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j ) - fi - done - done + SRCROOT="." +else + if [ -f ../INSTALL ] + then + SRCROOT=".." + fi +fi +if [ -z "$SRCROOT" ] +then + echo "powerux hint file cannot locate root perl source!" 1>&2 + exit 2 fi # We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so @@ -44,17 +42,123 @@ glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'` # d_csh='undef' -# Need to use Concurrent cc for most of these options to be meaningful (if you +# Need to use Concurrent ec for most of these options to be meaningful (if you # want to get this to work with gcc, you're on your own :-). Passing # -Bexport to the linker when linking perl is important because it leaves # the interpreter internal symbols visible to the shared libs that will be -# loaded on demand (and will try to reference those symbols). +# loaded on demand (and will try to reference those symbols). The -usys_nerr +# drags in some stuff from libc that perl proper doesn't reference but +# some dynamically linked extension will need to be in the static part +# of perl (there are probably more of these that might be useful, but +# for the extensions I build, this turned out to be enough). The -uldexp +# makes sure the custom ldexp.o I add to archobjs actually gets pulled +# into perl from libperl.a # -cc='/bin/cc' +cc='/usr/ccs/bin/ec' cccdlflags='-Zpic' -ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-Bexport' +ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-Bexport' lddlflags='-Zlink=so' +# Sigh... Various versions of Power MAX went out with a broken ldexp runtime +# routine in libc (it is fixed for sure in the upcoming SR4 release, but +# that hasn't made it out the door yet). Since libc is linked dynamically, +# and the perl you build might try to run on one of the broken systems, we +# need to statically link a corrected copy of ldexp.o into perl. What the +# following code does is determine if the ldexp.o on the current system +# works right. If it does, it simply extracts the ldexp.o from the system C +# library and uses that .o file. If the system .o is broken, the btoa +# encoded copy of a correct ldexp.o file included in this hint file is used +# (what a pain...) +# +if [ ! -f $SRCROOT/ldexp.o ] +then + echo Finding a correct copy of ldexp.o to link with... 1>&2 + cat > $SRCROOT/UU/ldexptest.c <<'EOF' +#include <stdio.h> +#include <math.h> +#include <string.h> +int +main(int argc, char ** argv) { + double result = pow(2.0, 38.0); + char buf[100]; + sprintf(buf, "%g", result); + if (strncmp(buf, "inf", 3) == 0) { + exit(2); + } + return 0; +} +EOF + GOODLDEXP="no" + $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1 + if [ $? -eq 0 ] + then + $SRCROOT/UU/ldexptest + if [ $? -eq 0 ] + then + LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'` + if [ -s "$LDEXPLIB" ] + then + if [ -f "$LDEXPLIB" ] + then + GOODLDEXP="yes" + fi + fi + fi + fi + if [ "$GOODLDEXP" = "yes" ] + then + echo Congratulations! The ldexp.o on this system looks good! 1>&2 + echo Using ldexp.o from $LDEXPLIB 1>&2 + ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o ) + else + echo Sorry, the ldexp.o on this system is busted. 1>&2 + echo Using the ldexp.o from the powerux hint file 1>&2 + atob > $SRCROOT/ldexp.o << 'EOF' +xbtoa Begin +Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\ +s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB +5)5`!%om?A7^")?Yj7aG]7#$DI``"/o5'0G]7#+A7^")?N:'+5\stBG]7#+Bl7KhF*(i2F9"RBA7^" +)?YjFoARB"dA,nl2A7^")?YjFoARAnXB5)5`5\stBG]7#/Ec5c4B6@cmASu#Y5\stBG]7#/Ec5c4B6 +@cm@V'1dD?'ZQA7^")!+0)TBQ@HkEcQ&9!+p7_G]3XiCh[?cG%G]8Bl@kh?XIJhB4YFn@;GorEb0&q +/p(ZLF9!q6ASbd-FC\s(@fS-%ASbd-A7]4mB4#IhDIieJz3$J<@IAd4EOoYQ5HuL$L3Pb]og;*c.rk +Jf$0+\*`g>N$VfHC6nOeDcBJaNL<r#i5*<UF@H/I_sb5`,PtJ;sU43WK.'.>.[$5ct)L<TXBJ5b\68 +8,rVja<:P^38ac\OQ-<@b/"'sb2E>Fr#l&\JY<(2JcPk%3$A9`IAd7F:4N<e<U"H%5b\5i3FDgf;/_ +p@OmW2L8,rVjOok[aa<:P^b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<e6(.iX4J2ZSb2iU's-C.p6 +,!Blr#i5*3+2eP8,rVjJH5a9/J%m^4[8uI/!'`P5`#LiIF(:p4CCN1/WKr63FDgf5ck%!8,rVj4[8u +I3T'l]4obQ_OlHEAJP#nB/d_RY5dCAdrg(%ob2E>F4eMcT^b#Nd5a26gb/"'sJY<(2JcPk%3$A9`IA +d7F:4N<eb/"'s4J2ZS^a/s\JY<(2JcPk%3$A9`IAd7F:4N<eaKPXErt`*EJY<(25aVNob/"'sr#dCa +IAd7Fb2E>FJcPk%3$A9`:4N<eb/"'sr#dDL4TGH^IAd7Fb2E>FJcPk%3$A9`:4N<eaQ`a*5b.lp4Wj +_)b,G@@3Y;>Nrmh6n.M)S$6';3>OC8,cI;FEfb2E>FD1mE>OF[C2aT2B<JY<(2JcPk%r5^iGIAd7Fr +&+S]b/"'s3$A9`:4N<eI'>pO3T0qs/VX)J4[;@g3<0$[I1UWg5car>8,rVj35>M<r#iM2OM_%ub/"' +sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<eJY<(25_oC_4hq$tb)QH%3Y29438jhrrmh6.IulWT6(IuEO[ +/tTILlM+IAd7Fb2E>FI11W[4obQ_a\Vs;D1mE>OF[CBa^G0WJcPk%r@:\mr&.(kb/"'s3$A9`:4N<e +b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<ezzzs*t(KzIt.Luz6-oT3z6SJK?J,fQL4qI\oz!!!!s! +!!!$zz!s/HG!!!"\!!!!)s8W,W!!!*$!!!"@!!3-#!"]85q[3`2!<E3%!!!!"!!!!&!WW3#!!WNU!W +rH*If]fT!sSf.!Cp$,"p9>V!<FMOCe,mh8j5@-)[6Co!W`<V"u5N)49bn;!W`<+-`^N""p9>V!<F,D +Bh&@0If]WO"t'Ld!Y>A:>Q=d*zz"98E)zzzzzzzzzz!!!!\zz"9AJl!!!!dzz!rr<&!!!!ezz!!!!# +!!!"(zz!rr<'!!!")!!!)]z!!!!#!!!";!!!!Mz!!!!#!!!"Jzz!rr<(!!!"Kzz!rr<)!!!"Lzz!!! +!&!!!"^!!!"Dz!!!!&!!!"n!!!!%z!!!!&!!!#+!!!!;z!!!!&!!!#?!!!!+z!!!!&!!!#Uzz!rr<* +!!!#Vz!!!)]&c_n5!!!#\zz&-)\1!!!#hzz&-)\1!!!#nzz&-)\1!!!$&zz&-)\1!!!"$!!!Q<z!!! +"h!!!Q<z!!!#A!!!-Gz!!!#E!!!-Hz!!!#W!!!T=z!!!#e!!!-G!!!!A!!!$.!!!Q<z!!!$4!!!WUz +!!!$<!!!ZVz!!!$D!!!WVz!!!$X!!!-G!!!!)!!!$\!!!-H!!!!)!!!%+!!!-G!!!!1!!!%/!!!-H! +!!!1!!!%G!!!ZWz!!!&&!!!ZVz!!!&>!!!-H!!!!A!!!&F!!!-G!!!!9!!!&J!!!-H!!!!9!!!'[!! +!Q<z!!!(<!!!-G!!!!I!!!(@!!!-H!!!!I!!!(l!!!-G!!!!A!!!(p!!!-H!!!!A!!!!)!!!3Gz!!! +!-!!!'C!!!)]!!!!>!!!*Ezzzzzzzzzzz!!!!"!!!!$zz!!!!U!!!$Yzz!!!!"z!!!!*!!!!"!!!!' +z!!!%=!!!)]zz!!!!1z!!!!0!!!!"!!!!#z!!!.(!!!!Qzz!!!!)z!!!!8!!!!"!!!!#z!!!.X!!!! +Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!! +#zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!! +$<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!! +!!- +xbtoa End N 2436 984 E ad S 1bf43 R a7867666 +EOF + fi + ( cd $SRCROOT/UU ; rm -f ldexptest* ) +fi +if [ -f $SRCROOT/ldexp.o ] +then + archobjs='ldexp.o' +fi + # Configure sometime finds what it believes to be ndbm header files on the # system and imagines that we have the NDBM library, but we really don't. # There is something there that once resembled ndbm, but it is purely @@ -63,15 +167,18 @@ lddlflags='-Zlink=so' # i_ndbm='undef' -# I have no clue what perl thinks it wants <sys/mode.h> for, but if -# you include it in a program in PowerMAX without first including -# <sys/vnode.h> the code don't compile... +# I have no clue what perl thinks it wants <sys/mode.h> for, but if you +# include it in a program in PowerMAX without first including <sys/vnode.h> +# the code don't compile (apparently some other operating system has +# something completely different in its sys/mode.h) # i_sysmode='undef' -# There is a bug in memcmp (which I hope will be fixed soon) which sometimes -# fails to provide the correct compare status (it is data dependant), so just -# pretend there is no memcmp... +# There was a bug in memcmp (which was fixed a while ago) which sometimes +# fails to provide the correct compare status (it is data dependant). I +# don't wnat to figure out if you are building with the correct version or +# not, so just pretend there is no memcmp (since perl has its own handy +# substitute). # d_memcmp='undef' @@ -108,3 +215,4 @@ d_mymalloc='undef' usemymalloc='n' ssizetype='ssize_t' usevfork='false' + diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index d6571668d7..5b574334e7 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -119,7 +119,7 @@ esac # Check that /dev/fd is mounted. If it is not mounted, let the # user know that suid scripts may not work. -/usr/bin/df /dev/fd 2>&1 > /dev/null +df /dev/fd 2>&1 > /dev/null case $? in 0) ;; *) diff --git a/installperl b/installperl index 6b702bd221..827e30a160 100755 --- a/installperl +++ b/installperl @@ -395,6 +395,10 @@ if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VM # MPE doesn't support hard links, so use a symlink. # We don't want another cloned copy. symlink($Config{perlpath}, "$installbin/perl$exe_ext"); + } elsif ($^O eq 'vos') { + # VOS doesn't support hard links, so use a symlink. + symlink("$installbin/$perl_verbase$ver$exe_ext", + "$installbin/$perl$exe_ext"); } else { link("$installbin/$perl_verbase$ver$exe_ext", "$installbin/$perl$exe_ext"); @@ -409,8 +413,8 @@ if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VM if ($archname && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS) { my $archperl = "$perl_verbase$ver-$Config{archname}$exe_ext"; safe_unlink("$installbin/$archperl"); - if ($^O eq 'mpeix') { - # MPE doesn't support hard links, so use a symlink. + if ($^O eq 'mpeix' || $^O eq 'vos') { + # MPE and VOS don't support hard links, so use a symlink. # We don't want another cloned copy. symlink($Config{perlpath}, "$installbin/$archperl"); } else { @@ -480,6 +484,9 @@ sub script_alias { if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') { copy("$installscript/$orig$scr_ext", "$installscript/$alias$scr_ext"); + } elsif ($^O eq 'vos') { + symlink("$installscript/$orig$scr_ext", + "$installscript/$alias$scr_ext"); } else { link("$installscript/$orig$scr_ext", "$installscript/$alias$scr_ext"); diff --git a/intrpvar.h b/intrpvar.h index dccbdb65b6..f113def0fe 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -487,7 +487,7 @@ PERLVAR(Iregex_pad, SV**) /* All regex objects */ PERLVAR(Iregex_padav, AV*) /* All regex objects */ #ifdef USE_REENTRANT_API -PERLVAR(Ireentrant_buffer, REBUF*) /* here we store the _r buffers */ +PERLVAR(Ireentrant_buffer, REENTBUF*) /* here we store the _r buffers */ #endif #endif diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index fe2527c2dc..55dd1a4123 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -602,7 +602,7 @@ sub OVERLOAD_handler() for (; !/^$BLOCK_re/o; $_ = shift(@line)) { next unless /\S/; TrimWhitespace($_) ; - while ( s/^\s*([\w:"\\)\+\-\*\/\%\<\>\.\&\|\^\!\~\{\}]+)\s*//) { + while ( s/^\s*([\w:"\\)\+\-\*\/\%\<\>\.\&\|\^\!\~\{\}\=]+)\s*//) { $Overload = 1 unless $Overload; my $overload = "$Package\::(".$1 ; push(@InitFileCode, diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index c2e463b80c..ea9a62029e 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -266,12 +266,12 @@ sub abs2rel { } # Figure out the effective $base and clean it up. - if ( ! $self->file_name_is_absolute( $base ) ) { - $base = $self->rel2abs( $base ) ; - } - elsif ( !defined( $base ) || $base eq '' ) { + if ( !defined( $base ) || $base eq '' ) { $base = cwd() ; } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } else { $base = $self->canonpath( $base ) ; } diff --git a/lib/encoding.pm b/lib/encoding.pm index 1504a92639..44fc2fdc00 100644 --- a/lib/encoding.pm +++ b/lib/encoding.pm @@ -52,10 +52,15 @@ encoding - pragma to control the conversion of legacy data into Unicode print "tera\n" if ord(pack("C", 0xdf)) == 0x3af; - # but pack/unpack are not affected, in case you still + # ... as are eq and cmp ... + + print "peta\n" if "\x{3af}" eq pack("C", 0xdf); + print "exa\n" if "\x{3af}" cmp pack("C", 0xdf) == 0; + + # ... but pack/unpack C are not affected, in case you still # want back to your native encoding - print "peta\n" if unpack("C", (pack("C", 0xdf))) == 0xdf; + print "zetta\n" if unpack("C", (pack("C", 0xdf))) == 0xdf; =head1 DESCRIPTION diff --git a/lib/encoding.t b/lib/encoding.t index bc7437f2f0..aaec973c2b 100644 --- a/lib/encoding.t +++ b/lib/encoding.t @@ -1,5 +1,3 @@ -print "1..19\n"; - BEGIN { if (ord("A") == 193) { print "1..0 # encoding pragma does not support EBCDIC platforms\n"; @@ -7,6 +5,8 @@ BEGIN { } } +print "1..29\n"; + use encoding "latin1"; # ignored (overwritten by the next line) use encoding "greek"; # iso 8859-7 (no "latin" alias, surprise...) @@ -89,3 +89,93 @@ print "ok 18\n"; print "not " unless "\x{3AF}" =~ /\x{3AF}/; print "ok 19\n"; +# eq, cmp + +my ($byte,$bytes,$U,$Ub,$g1,$g2,$l) = ( + pack("C*", 0xDF ), # byte + pack("C*", 0xDF, 0x20), # ($bytes2 cmp $U) > 0 + pack("U*", 0x3AF), # $U eq $byte + pack("U*", 0xDF ), # $Ub would eq $bytev w/o use encoding + pack("U*", 0x3B1), # ($g1 cmp $byte) > 0; === chr(0xe1) + pack("U*", 0x3AF, 0x20), # ($g2 cmp $byte) > 0; + pack("U*", 0x3AB), # ($l cmp $byte) < 0; === chr(0xdb) +); + +# all the tests in this section that compare a byte encoded string +# ato UTF-8 encoded are run in all possible vairants +# all of the eq, ne, cmp operations tested, +# $v z $u tested as well as $u z $v + +sub alleq($$){ + my ($a,$b) = (shift, shift); + $a eq $b && $b eq $a && + !( $a ne $b ) && !( $b ne $a ) && + ( $a cmp $b ) == 0 && ( $b cmp $a ) == 0; +} + +sub anyeq($$){ + my ($a,$b) = (shift, shift); + $a eq $b || $b eq $a || + !( $a ne $b ) || !( $b ne $a ) || + ( $a cmp $b ) == 0 || ( $b cmp $a ) == 0; +} + +sub allgt($$){ + my ($a,$b) = (shift, shift); + ( $a cmp $b ) == 1 && ( $b cmp $a ) == -1; +} +#match the correct UTF-8 string +print "not " unless alleq($byte, $U); +print "ok 20\n"; + +#do not match a wrong UTF-8 string +print "not " if anyeq($byte, $Ub); +print "ok 21\n"; + +#string ordering +print "not " unless allgt ( $g1, $byte ) && + allgt ( $g2, $byte ) && + allgt ( $byte, $l ) && + allgt ( $bytes, $U ); +print "ok 22\n"; + +# upgrade, downgrade + +my ($u,$v,$v2); +$u = $v = $v2 = pack("C*", 0xDF); +utf8::upgrade($v); #explicit upgrade +$v2 = substr( $v2."\x{410}", 0, -1); #implicit upgrade + +# implicit upgrade === explicit upgrade +print "not " if do{{use bytes; $v ne $v2}} || $v ne $v2; +print "ok 23\n"; + +# utf8::upgrade is transparent and does not break equality +print "not " unless alleq( $u, $v ); +print "ok 24\n"; + +$u = $v = pack("C*", 0xDF); +utf8::upgrade($v); +#test for a roundtrip, we should get back from where we left +eval {utf8::downgrade( $v )}; +print "not " if $@ !~ /^Wide / || do{{use bytes; $u eq $v}} || $u ne $v; +print "ok 25\n"; + +# some more eq, cmp + +my $byte=pack("C*", 0xDF); + +print "not " unless pack("U*", 0x3AF) eq $byte; +print "ok 26\n"; + +print "not " if chr(0xDF) cmp $byte; +print "ok 27\n"; + +print "not " unless ((pack("U*", 0x3B0) cmp $byte) == 1) && + ((pack("U*", 0x3AE) cmp $byte) == -1) && + ((pack("U*", 0x3AF, 0x20) cmp $byte) == 1) && + ((pack("U*", 0x3AF) cmp pack("C*",0xDF,0x20))==-1); +print "ok 28\n"; + +# Used to core dump in 5.7.3 +print ord undef == 0 ? "ok 29\n" : "not ok 29\n"; @@ -105,6 +105,7 @@ Deprecated. Use C<GIMME_V> instead. /* On pushre, re is /\s+/ imp. by split " " */ /* On regcomp, "use re 'eval'" was in scope */ /* On OP_READLINE, was <$filehandle> */ + /* On RV2[SG]V, don't create GV--in defined()*/ /* old names; don't use in new code, but don't break them, either */ #define OPf_LIST OPf_WANT_LIST @@ -478,11 +479,11 @@ struct loop { #ifdef USE_REENTRANT_API typedef struct { - struct tm* tmbuff; -} REBUF; + struct tm* tmbuf; +} REENTBUF; -#define localtime(a) (localtime_r((a),PL_reentrant_buffer->tmbuff) ? PL_reentrant_buffer->tmbuff : NULL) -#define gmtime(a) (gmtime_r((a),PL_reentrant_buffer->tmbuff) ? PL_reentrant_buffer->tmbuff : NULL) +#define localtime(a) (localtime_r((a),PL_reentrant_buffer->tmbuf) ? PL_reentrant_buffer->tmbuf : NULL) +#define gmtime(a) (gmtime_r((a),PL_reentrant_buffer->tmbuf) ? PL_reentrant_buffer->tmbuf : NULL) #ifdef OLD_PTHREADS_API @@ -492,8 +493,8 @@ typedef struct { #undef localtime #undef gmtime -#define localtime(a) ((localtime_r((a),PL_reentrant_buffer->tmbuff) == 0) ? PL_reentrant_buffer->tmbuff : NULL) -#define gmtime(a) ((gmtime_r((a),PL_reentrant_buffer->tmbuff) == 0) ? PL_reentrant_buffer->tmbuff : NULL) +#define localtime(a) ((localtime_r((a),PL_reentrant_buffer->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL) +#define gmtime(a) ((gmtime_r((a),PL_reentrant_buffer->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL) #endif /* HP-UX 10.20 */ #endif diff --git a/patchlevel.h b/patchlevel.h index c364fd117d..d78c1a3281 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -79,6 +79,7 @@ #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static char *local_patches[] = { NULL + ,"DEVEL15108" ,NULL }; @@ -115,6 +115,9 @@ PerlInterpreter * perl_alloc(void) { PerlInterpreter *my_perl; +#ifdef USE_5005THREADS + dTHX; +#endif /* New() needs interpreter, so call malloc() instead */ my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); @@ -261,8 +264,7 @@ perl_construct(pTHXx) PL_regex_pad = AvARRAY(PL_regex_padav); #endif #ifdef USE_REENTRANT_API - New(31337, PL_reentrant_buffer,1, REBUF); - New(31337, PL_reentrant_buffer->tmbuff,1, struct tm); + Perl_reentrant_init(aTHX); #endif /* Note that strtab is a rather special HV. Assumptions are made @@ -833,7 +835,7 @@ perl_destruct(pTHXx) #endif /* USE_5005THREADS */ #ifdef USE_REENTRANT_API - Safefree(PL_reentrant_buffer->tmbuff); + Safefree(PL_reentrant_buffer->tmbuf); Safefree(PL_reentrant_buffer); #endif diff --git a/pod/perldelta.pod b/pod/perldelta.pod index e9d35eccf6..65e7fcffd5 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -114,12 +114,6 @@ C<\p{InTibetan}> refers to the block. When there is no name conflict, you can omit the C<In> from the block name (e.g. C<\p{BraillePatterns}>), but to be safe, it's probably best to always use the C<In>). -=head2 Perl Parser Stress Tested - -The Perl parser has been stress tested using both random input and -Markov chain input and the few found crashes and lockups have been -fixed. - =head2 REF(...) Instead Of SCALAR(...) A reference to a reference now stringifies as "REF(0x81485ec)" instead @@ -131,7 +125,7 @@ value of ref(). The undocumented pack/unpack template letters D/F have been recycled for better use: now they stand for long double (if supported by the platform) and NV (Perl internal floating point type). (They used -to be aliases for f/d, but you never knew that.) +to be aliases for d/f, but you never knew that.) =head2 Deprecations @@ -331,7 +325,8 @@ doing, like finishing an internal operation (like sort()) or an external operation (like an I/O operation), and only then look at any arrived signals (and before starting the next operation). No more corrupt internal state since the current operation is always finished first, -but the signal may take more time to get heard. +but the signal may take more time to get heard. Note that breaking +out from potentially blocking operations should still work, though. =head2 Unicode Overhaul @@ -408,9 +403,9 @@ removed/changed in future releases.) =item * -chomp() and chop() have been demoted back to I<not> being overridable -because they cannot really be overridden-- the problem is that their -prototype cannot be expressed and therefore one really cannot write +chomp() and chop() are now overridable. Note, however, that their +prototype (as given by C<prototype("CORE::chomp")> is undefined, +because it cannot be expressed and therefore one cannot really write replacements to override these builtins. =item * @@ -537,6 +532,20 @@ Rather than relying on C's argv[0] (which may not contain a full pathname) where possible $^X is now set by asking the operating system. (eg by reading F</proc/self/exe> on Linux, F</proc/curproc/file> on FreeBSD) +=item * + +A new variable, C<${^TAINT}>, indicates whether taint mode is enabled. + +=item * + +You can now override the readline() builtin, and this overrides also +the <FILEHANDLE> angle bracket operator. + +=item * + +The command-line options -s and -F are now recognized on the shebang +(#!) line. + =back =head1 Modules and Pragmata @@ -1002,6 +1011,11 @@ more portable. =item * +The warnings issued by File::Find now belong to their own category. +You can enable/disable them with C<use/no warnings 'File::Find';>. + +=item * + File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid prototype mismatch with CORE::glob(). @@ -1579,6 +1593,13 @@ Thread extension requires being Configured with C<-Duse5005threads>). But note that the Thread.pm interface is now shared by both thread models. +=item * + +The Gconvert macro ($Config{d_Gconvert}) used by perl for stringifying +floating-point numbers is now more picky about using sprintf %.*g +rules for the conversion. Some platforms that used to use gcvt may +now resort to the slower sprintf. + =back =head2 New Or Improved Platforms @@ -1973,6 +1994,11 @@ Allow read-only string on left hand side of non-modifying tr///. =item * +If C<STDERR> is tied, warnings caused by C<warn> and C<die> now +correctly pass to it. + +=item * + Several Unicode fixes. =over 8 @@ -2056,7 +2082,7 @@ Setting C<$0> now works (as much as possible; see L<perlvar> for details). Cygwin -Numerous updates; currently synchronised with Cygwin 1.1.4. +Numerous updates; currently synchronised with Cygwin 1.3.10. =item * @@ -2078,7 +2104,7 @@ Perl now works on post-3.0 FreeBSDs. HP-UX -README.hpux updated; C<Configure -Duse64bitall> now almost works. +README.hpux updated; C<Configure -Duse64bitall> now works. =item * @@ -2280,6 +2306,12 @@ Windows 9x. winsock handle leak fixed. +=item * + +The Perl parser has been stress tested using both random input and +Markov chain input and the few found crashes and lockups have been +fixed. + =back =back @@ -2361,6 +2393,11 @@ the entire regex. You will an optional warning if you try to do otherwise. Using arrays or hashes as references (e.g. C<< %foo->{bar} >> has been deprecated for a while. Now you will get an optional warning. +=item * + +Using C<sort> in scalar context now issues an optional warning. +This didn't do anything useful, as the sort was not performed. + =back =head1 Changed Internals @@ -2475,8 +2512,8 @@ such as sudo (see http://www.courtesan.com/sudo/). =head1 New Tests Several new tests have been added, especially for the F<lib> -subsection. There are now about 34 000 individual tests (spread over -about 530 test scripts), in the regression suite (5.6.1 has about +subsection. There are now about 56 000 individual tests (spread over +about 620 test scripts), in the regression suite (5.6.1 has about 11700 tests, in 258 test scripts) Many of the new tests are introduced by the new modules, but still in general Perl is now more thoroughly tested. @@ -2484,7 +2521,7 @@ tested. Because of the large number of tests, running the regression suite will take considerably longer time than it used to: expect the suite to take up to 4-5 times longer to run than in perl 5.6. In a really -fast machine you can hope to finish the suite in about 5 minutes +fast machine you can hope to finish the suite in about 6-8 minutes (wallclock time). The tests are now reported in a different order than in earlier Perls. @@ -2515,7 +2552,7 @@ The AIX C compiler vac version 5.0.0.0 may produce buggy code, resulting in few random tests failing, but when the failing tests are run by hand, they succeed. We suggest upgrading to at least vac version 5.0.1.0, that has been known to compile Perl correctly. -"lslpp -L|grep vac.C" will tell you the vac version. +"lslpp -L|grep vac.C" will tell you the vac version. See README.aix. =back @@ -2529,28 +2566,18 @@ known but the current suspect is the F<ixemul> library. Don't panic. Read INSTALL 'make test' section instead. -=head2 Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12 - -The subtests 11 and 12 sometimes fail and sometimes work. +=head2 FreeBSD 4.3, 4.4, 4.5 fail lib/File/Spec/t/rel2abs2rel.t -=head2 FreeBSD 4.5 fails lib/File/Spec/t/rel2abs2rel.t - -F<lib/File/Spec/t/rel2abs2rel.t> tests that "`` works" by running a -a perl 1 liner in backticks, using "$^X" as the path to perl. -It is failing on FreeBSD 4.5, but only when run as part of make test. +F<lib/File/Spec/t/rel2abs2rel.t> tests that "`` works" by running a a perl 1 +liner in backticks, using "$^X" as the path to perl. It is known to be +failing on FreeBSD 4.3, 4.4 and 4.5, but only when run as part of make test. This seems to be a kernel problem rather than perl - reading the symlink F</proc/curproc/file> returns "unknown" rather than the path to perl, and a kernel debugger reveals that variable C<numfullpathfail2> in F</usr/src/sys/kern/vfs_cache.c> is being incremented whenever F</proc/curproc/file> fails to return the perl executable's path. - -=head2 HP-UX lib/io_multihomed Fails When LP64-Configured - -The lib/io_multihomed test may hang in HP-UX if Perl has been -configured to be 64-bit. Because other 64-bit platforms do not hang in -this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The -test attempts to create and connect to "multihomed" sockets (sockets -which have multiple IP addresses). +[If you find that if fails on other versions of FreeBSD, please use perlbug +to report them to us. If you are able to fix the bug, even better.] =head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured @@ -2573,29 +2600,30 @@ The following tests are known to fail: ../ext/DB_File/t/db-recno.t 149 3 2.01% 61 63 65 ../ext/POSIX/t/posix.t 31 1 3.23% 10 +If you are building on a UFS partition, you will also probably see +t/op/stat.t subtest #9 fail. This is caused by Darwin's UFS not +supporting inode change time. + =head2 OS/390 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. -Failed 10/611 test scripts, 98.36% okay. 72/53809 subtests failed, 99.87% okay. -Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------------------- -../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 + ../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. =head2 op/sprintf tests 129 and 130 @@ -2616,21 +2644,24 @@ The following tests are known to fail due to fundamental problems in the 5.005 threading implementation. These are not new failures--Perl 5.005_0x has the same bugs, but didn't have these tests. - ext/List/Util/t/first 2 - lib/autouse 4 - ext/Thread/thr5005 19-20 + ../ext/List/Util/t/first.t 255 65280 7 4 57.14% 2 5-7 + ../lib/English.t 2 512 54 2 3.70% 2-3 + ../lib/Filter/Simple/t/data.t 6 3 50.00% 1-3 + ../lib/Filter/Simple/t/filter_onl 9 3 33.33% 1-2 5 + ../lib/autouse.t 10 1 10.00% 4 + op/flip.t 15 1 6.67% 15 These failures are unlikely to get fixed as the 5.005-style threads are considered fundamentally broken. =head2 UNICOS - ../ext/Socket/socketpair.t 1 256 45 1 2.22% 12 - ../lib/Math/Trig.t 26 1 3.85% 25 - ../lib/warnings.t 460 1 0.22% 425 - io/fs.t 36 1 2.78% 31 - op/numconvert.t 1440 13 0.90% 208 509-510 - 657-658 665-666 829-830 989-990 1149-1150 + ../ext/Socket/socketpair.t 1 256 45 1 2.22% 12 + ../lib/Math/Trig.t 26 1 3.85% 25 + ../lib/warnings.t 460 1 0.22% 425 + io/fs.t 36 1 2.78% 31 + op/numconvert.t 1440 13 0.90% 208 509-510 + 657-658 665-666 829-830 989-990 1149-1150 =head2 UNICOS and UNICOS/mk diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 99caa8849b..63d12d70ab 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -294,9 +294,9 @@ X<-S>X<-b>X<-c>X<-t>X<-u>X<-g>X<-k>X<-T>X<-B>X<-M>X<-A>X<-C> -T File is an ASCII text file (heuristic guess). -B File is a "binary" file (opposite of -T). - -M Age of file in days when script started. + -M Script start time minus file modification time, in days. -A Same for access time. - -C Same for inode change time. + -C Same for inode change time (Unix, may differ for other platforms) Example: diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 2b8faf007f..9af82a54cc 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -54,7 +54,7 @@ To change the value of an *already-existing* SV, there are seven routines: void sv_setpv(SV*, const char*); void sv_setpvn(SV*, const char*, int) void sv_setpvf(SV*, const char*, ...); - void sv_vsetpvfn(SV*, const char*, STRLEN, va_list *, SV **, I32, bool); + void sv_vsetpvfn(SV*, const char*, STRLEN, va_list *, SV **, I32, bool *); void sv_setsv(SV*, SV*); Notice that you can choose to specify the length of the string to be @@ -833,7 +833,7 @@ SV. The C<name> and C<namlen> arguments are used to associate a string with the magic, typically the name of a variable. C<namlen> is stored in the -C<mg_len> field and if C<name> is non-null and C<namlen> >= 0 a malloc'd +C<mg_len> field and if C<name> is non-null and C<namlen> E<gt>= 0 a malloc'd copy of the name is stored in C<mg_ptr> field. The sv_magic function uses C<how> to determine which, if any, predefined @@ -2386,15 +2386,15 @@ the Perl interpreter. =head1 AUTHORS Until May 1997, this document was maintained by Jeff Okamoto -<okamoto@corp.hp.com>. It is now maintained as part of Perl itself -by the Perl 5 Porters <perl5-porters@perl.org>. +E<lt>okamoto@corp.hp.comE<gt>. It is now maintained as part of Perl +itself by the Perl 5 Porters E<lt>perl5-porters@perl.orgE<gt>. With lots of help and suggestions from Dean Roehrich, Malcolm Beattie, Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer, Stephen McCamant, and Gurusamy Sarathy. -API Listing originally by Dean Roehrich <roehrich@cray.com>. +API Listing originally by Dean Roehrich E<lt>roehrich@cray.comE<gt>. Modifications to autogenerate the API listing (L<perlapi>) by Benjamin Stuhl. diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 1afd0caea0..2db0d3a23f 100644 --- a/pod/perlhist.pod +++ b/pod/perlhist.pod @@ -392,10 +392,16 @@ explained below. 5.004_73 1874 76 1467 152 762 102 506 196 1883 61 5.004_75 1877 76 1467 152 770 103 508 196 1896 62 5.005 1896 76 1469 152 795 103 509 197 1945 63 - 5.005_03 1936 77 1541 153 813 104 551 201 2176 72 - 5.005_50 1969 78 1842 301 795 103 514 198 1948 63 - 5.005_53 1999 79 1885 303 806 104 602 224 2002 67 + 5.005_03 1936 77 1541 153 813 104 551 201 2176 72 + 5.005_50 1969 78 1842 301 795 103 514 198 1948 63 + 5.005_53 1999 79 1885 303 806 104 602 224 2002 67 5.005_56 2086 79 1970 307 866 113 672 238 2221 75 + 5.6.0 2930 80 2626 364 1096 129 868 281 2841 93 + 5.7.0 2977 80 2801 425 1250 132 975 307 3206 100 + 5.6.1 3049 80 3764 484 1924 159 1025 304 3593 119 + 5.7.1 3351 84 3442 455 1944 167 1334 357 3698 124 + 5.7.2 3491 87 4858 618 3290 298 1598 449 3910 139 + 5.7.3 3415 87 5367 630 14448 410 2205 640 4491 148 The "core"..."doc" mean the following files from the Perl source code distribution. The glob notation ** means recursively, (.) means @@ -404,7 +410,7 @@ regular files. core *.[hcy] lib lib/**/*.p[ml] ext ext/**/*.{[hcyt],xs,pm} - t t/**/*(.) + t t/**/*(.) (for 1-5.005_56) or **/*.t (for 5.6.0-5.7.3) doc {README*,INSTALL,*[_.]man{,.?},pod/**/*.pod} Here are some statistics for the other subdirectories and one file in @@ -566,8 +572,9 @@ context diff output format. Jarkko Hietaniemi <F<jhi@iki.fi>>. Thanks to the collective memory of the Perlfolk. In addition to the -Keepers of the Pumpkin also Alan Champion, Andreas König, John -Macdonald, Matthias Neeracher, Jeff Okamoto, Michael Peppler, -Randal Schwartz, and Paul D. Smith sent corrections and additions. +Keepers of the Pumpkin also Alan Champion, Mark Dominus, +Andreas König, John Macdonald, Matthias Neeracher, Jeff Okamoto, +Michael Peppler, Randal Schwartz, and Paul D. Smith sent corrections +and additions. =cut diff --git a/pod/perlport.pod b/pod/perlport.pod index bc3f1d996b..9ca3f15e8c 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -262,6 +262,9 @@ timestamp (meaning that about the only portable timestamp is the modification timestamp), or one second granularity of any timestamps (e.g. the FAT filesystem limits the time granularity to two seconds). +The "inode change timestamp" (the <-C> filetest) may really be the +"creation timestamp" (which it is not in UNIX). + VOS perl can emulate Unix filenames with C</> as path separator. The native pathname characters greater-than, less-than, number-sign, and percent-sign are always accepted. @@ -359,6 +362,10 @@ many networking schemes and utilities for separating the nodename and the pathname, and so on). For the same reasons, avoid C<@>, C<;> and C<|>. +Don't assume that in pathnames you can collapse two leading slashes +C<//> into one: some networking and clustering filesystems have special +semantics for that. Let the operating system to sort it out. + The I<portable filename characters> as defined by ANSI C are a b c d e f g h i j k l m n o p q r t u v w x y z @@ -367,11 +374,11 @@ The I<portable filename characters> as defined by ANSI C are . _ - and the "-" shouldn't be the first character. If you want to be -hypercorrect, stay within the 8.3 naming convention (all the files and -directories have to be unique within one directory if their names are -lowercased and truncated to eight characters before the C<.>, if any, -and to three characters after the C<.>, if any). (And do not use -C<.>s in directory names.) +hypercorrect, stay case-insensitive and within the 8.3 naming +convention (all the files and directories have to be unique within one +directory if their names are lowercased and truncated to eight +characters before the C<.>, if any, and to three characters after the +C<.>, if any). (And do not use C<.>s in directory names.) =head2 System Interaction @@ -673,6 +680,7 @@ are a few of the more popular Unix flavors: -------------------------------------------- AIX aix aix BSD/OS bsdos i386-bsdos + Darwin darwin darwin dgux dgux AViiON-dgux DYNIX/ptx dynixptx i386-dynixptx FreeBSD freebsd freebsd-i386 @@ -1782,7 +1790,11 @@ as '', so numeric comparison or manipulation of these fields may cause 'not numeric' warnings. mtime and atime are the same thing, and ctime is creation time instead of -inode change time. (S<Mac OS>) +inode change time. (S<Mac OS>). + +ctime not supported on UFS (S<Mac OS X>). + +ctime is creation time instead of inode change time (Win32). device and inode are not meaningful. (Win32) @@ -2187,7 +2199,7 @@ Andrew M. Langmead <aml@world.std.com>, Larry Moore <ljmoore@freespace.net>, Paul Moore <Paul.Moore@uk.origin-it.com>, Chris Nandor <pudge@pobox.com>, -Matthias Neeracher <neeri@iis.ee.ethz.ch>, +Matthias Neeracher <neeracher@mac.com>, Philip Newton <pne@cpan.org>, Gary Ng <71564.1743@CompuServe.COM>, Tom Phoenix <rootbeer@teleport.com>, @@ -2200,6 +2212,3 @@ Michael G Schwern <schwern@pobox.com>, Dan Sugalski <dan@sidhe.org>, Nathan Torkington <gnat@frii.com>. -=head1 VERSION - -Version 1.50, last modified 10 Jul 2001 diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 44bd568b79..a885555640 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -483,7 +483,7 @@ These block names are supported: =item * -The special pattern C<\X> match matches any extended Unicode sequence +The special pattern C<\X> matches any extended Unicode sequence (a "combining character sequence" in Standardese), where the first character is a base character and subsequent characters are mark characters that apply to the base character. It is equivalent to @@ -588,18 +588,7 @@ And finally, C<scalar reverse()> reverses by character rather than by byte. See L<Encode>. -=head1 CAVEATS - -Whether an arbitrary piece of data will be treated as "characters" or -"bytes" by internal operations cannot be divined at the current time. - -Use of locales with Unicode data may lead to odd results. Currently -there is some attempt to apply 8-bit locale info to characters in the -range 0..255, but this is demonstrably incorrect for locales that use -characters above that range when mapped into Unicode. It will also -tend to run slower. Avoidance of locales is strongly encouraged. - -=head1 UNICODE REGULAR EXPRESSION SUPPORT LEVEL +=head2 Unicode Regular Expression Support Level The following list of Unicode regular expression support describes feature by feature the Unicode support implemented in Perl as of Perl @@ -692,7 +681,7 @@ numbers. To use these numbers various encodings are needed. =over 4 -=item +=item * UTF-8 @@ -730,13 +719,13 @@ As you can see, the continuation bytes all begin with C<10>, and the leading bits of the start byte tell how many bytes the are in the encoded character. -=item +=item * UTF-EBCDIC Like UTF-8, but EBCDIC-safe, as UTF-8 is ASCII-safe. -=item +=item * UTF-16, UTF-16BE, UTF16-LE, Surrogates, and BOMs (Byte Order Marks) @@ -789,7 +778,7 @@ sequence of bytes 0xFF 0xFE is unambiguously "BOM, represented in little-endian format" and cannot be "0xFFFE, represented in big-endian format". -=item +=item * UTF-32, UTF-32BE, UTF32-LE @@ -798,7 +787,7 @@ the units are 32-bit, and therefore the surrogate scheme is not needed. The BOM signatures will be 0x00 0x00 0xFE 0xFF for BE and 0xFF 0xFE 0x00 0x00 for LE. -=item +=item * UCS-2, UCS-4 @@ -806,7 +795,7 @@ Encodings defined by the ISO 10646 standard. UCS-2 is a 16-bit encoding, UCS-4 is a 32-bit encoding. Unlike UTF-16, UCS-2 is not extensible beyond 0xFFFF, because it does not use surrogates. -=item +=item * UTF-7 @@ -937,6 +926,67 @@ as usual.) For more information, see L<perlapi>, and F<utf8.c> and F<utf8.h> in the Perl source code distribution. +=head1 BUGS + +Use of locales with Unicode data may lead to odd results. Currently +there is some attempt to apply 8-bit locale info to characters in the +range 0..255, but this is demonstrably incorrect for locales that use +characters above that range when mapped into Unicode. It will also +tend to run slower. Avoidance of locales is strongly encouraged. + +Some functions are slower when working on UTF-8 encoded strings than +on byte encoded strings. All functions that need to hop over +characters such as length(), substr() or index() can work B<much> +faster when the underlying data are byte-encoded. Witness the +following benchmark: + + % perl -e ' + use Benchmark; + use strict; + our $l = 10000; + our $u = our $b = "x" x $l; + substr($u,0,1) = "\x{100}"; + timethese(-2,{ + LENGTH_B => q{ length($b) }, + LENGTH_U => q{ length($u) }, + SUBSTR_B => q{ substr($b, $l/4, $l/2) }, + SUBSTR_U => q{ substr($u, $l/4, $l/2) }, + }); + ' + Benchmark: running LENGTH_B, LENGTH_U, SUBSTR_B, SUBSTR_U for at least 2 CPU seconds... + LENGTH_B: 2 wallclock secs ( 2.36 usr + 0.00 sys = 2.36 CPU) @ 5649983.05/s (n=13333960) + LENGTH_U: 2 wallclock secs ( 2.11 usr + 0.00 sys = 2.11 CPU) @ 12155.45/s (n=25648) + SUBSTR_B: 3 wallclock secs ( 2.16 usr + 0.00 sys = 2.16 CPU) @ 374480.09/s (n=808877) + SUBSTR_U: 2 wallclock secs ( 2.11 usr + 0.00 sys = 2.11 CPU) @ 6791.00/s (n=14329) + +The numbers show an incredible slowness on long UTF-8 strings and you +should carefully avoid to use these functions within tight loops. For +example if you want to iterate over characters, it is infinitely +better to split into an array than to use substr, as the following +benchmark shows: + + % perl -e ' + use Benchmark; + use strict; + our $l = 10000; + our $u = our $b = "x" x $l; + substr($u,0,1) = "\x{100}"; + timethese(-5,{ + SPLIT_B => q{ for my $c (split //, $b){} }, + SPLIT_U => q{ for my $c (split //, $u){} }, + SUBSTR_B => q{ for my $i (0..length($b)-1){my $c = substr($b,$i,1);} }, + SUBSTR_U => q{ for my $i (0..length($u)-1){my $c = substr($u,$i,1);} }, + }); + ' + Benchmark: running SPLIT_B, SPLIT_U, SUBSTR_B, SUBSTR_U for at least 5 CPU seconds... + SPLIT_B: 6 wallclock secs ( 5.29 usr + 0.00 sys = 5.29 CPU) @ 56.14/s (n=297) + SPLIT_U: 5 wallclock secs ( 5.17 usr + 0.01 sys = 5.18 CPU) @ 55.21/s (n=286) + SUBSTR_B: 5 wallclock secs ( 5.34 usr + 0.00 sys = 5.34 CPU) @ 123.22/s (n=658) + SUBSTR_U: 7 wallclock secs ( 6.20 usr + 0.00 sys = 6.20 CPU) @ 0.81/s (n=5) + +You see, the algorithm based on substr() was faster with byte encoded +data but it is pathologically slow with UTF-8 data. + =head1 SEE ALSO L<perluniintro>, L<encoding>, L<Encode>, L<open>, L<utf8>, L<bytes>, diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index c94f3d289f..8a7a055935 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -596,9 +596,21 @@ string are necessary UTF-8 encoded, or that any of the characters have code points greater than 0xFF (255) or even 0x80 (128), or that the string has any characters at all. All the C<is_utf8()> does is to return the value of the internal "utf8ness" flag attached to the -$string. If the flag is on, characters added to that string will be -automatically upgraded to UTF-8 (and even then only if they really -need to be upgraded, that is, if their code point is greater than 0xFF). +$string. If the flag is off, the bytes in the scalar are interpreted +as a single byte encoding. If the flag is on, the bytes in the scalar +are interpreted as the (multibyte, variable-length) UTF-8 encoded code +points of the characters. Bytes added to an UTF-8 encoded string are +automatically upgraded to UTF-8. If mixed non-UTF8 and UTF-8 scalars +are merged (doublequoted interpolation, explicit concatenation, and +printf/sprintf parameter substitution), the result will be UTF-8 encoded +as if copies of the byte strings were upgraded to UTF-8: for example, + + $a = "ab\x80c"; + $b = "\x{100}"; + print "$a = $b\n"; + +the output string will be UTF-8-encoded "ab\x80c\x{100}\n", but note +that C<$a> will stay single byte encoded. Sometimes you might really need to know the byte length of a string instead of the character length. For that use the C<bytes> pragma diff --git a/pod/perlvar.pod b/pod/perlvar.pod index ac4ebf828a..5d04e224a7 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -1077,6 +1077,11 @@ Control.) Example: warn "No \"our\" declarations!\n" if $^V and $^V lt v5.6.0; +To convert C<$^V> into its string representation use sprintf()'s +C<"%vd"> conversion: + + printf "version is v%vd\n", $^V; # Perl's version + See the documentation of C<use VERSION> and C<require VERSION> for a convenient way to fail if the running Perl interpreter is too old. @@ -3147,9 +3147,9 @@ PP(pp_ord) U8 *s = (U8*)SvPVx(argsv, len); SV *tmpsv; - if (PL_encoding && !DO_UTF8(argsv)) { + if (PL_encoding && SvPOK(argsv) && !DO_UTF8(argsv)) { tmpsv = sv_2mortal(newSVsv(argsv)); - s = (U8*)Perl_sv_recode_to_utf8(aTHX_ tmpsv, PL_encoding); + s = (U8*)sv_recode_to_utf8(tmpsv, PL_encoding); argsv = tmpsv; } @@ -3184,7 +3184,7 @@ PP(pp_chr) *tmps = '\0'; (void)SvPOK_only(TARG); if (PL_encoding) - Perl_sv_recode_to_utf8(aTHX_ TARG, PL_encoding); + sv_recode_to_utf8(TARG, PL_encoding); XPUSHs(TARG); RETURN; } @@ -896,13 +896,16 @@ PP(pp_flip) else { dTOPss; SV *targ = PAD_SV(PL_op->op_targ); - int flip; + int flip = 0; if (PL_op->op_private & OPpFLIP_LINENUM) { - struct io *gp_io; - flip = PL_last_in_gv - && (gp_io = GvIO(PL_last_in_gv)) - && SvIV(sv) == (IV)IoLINES(gp_io); + if (GvIO(PL_last_in_gv)) { + flip = SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv)); + } + else { + GV *gv = gv_fetchpv(".", TRUE, SVt_PV); + if (gv && GvSV(gv)) flip = SvIV(sv) == SvIV(GvSV(gv)); + } } else { flip = SvTRUE(sv); } @@ -980,11 +983,23 @@ PP(pp_flop) else { dTOPss; SV *targ = PAD_SV(cUNOP->op_first->op_targ); + int flop = 0; sv_inc(targ); - if ((PL_op->op_private & OPpFLIP_LINENUM) - ? (GvIO(PL_last_in_gv) - && SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv))) - : SvTRUE(sv) ) { + + if (PL_op->op_private & OPpFLIP_LINENUM) { + if (GvIO(PL_last_in_gv)) { + flop = SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv)); + } + else { + GV *gv = gv_fetchpv(".", TRUE, SVt_PV); + if (gv && GvSV(gv)) flop = SvIV(sv) == SvIV(GvSV(gv)); + } + } + else { + flop = SvTRUE(sv); + } + + if (flop) { sv_setiv(PAD_SV(((UNOP*)cUNOP->op_first)->op_first->op_targ), 0); sv_catpv(targ, "E0"); } @@ -984,18 +984,7 @@ PP(pp_sselect) } /* little endians can use vecs directly */ -#if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 -# if SELECT_MIN_BITS > 1 - /* If SELECT_MIN_BITS is greater than one we most probably will want - * to align the sizes with SELECT_MIN_BITS/8 because for example - * in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital - * UNIX, Solaris, NeXT, Darwin) the smallest quantum select() operates - * on (sets/tests/clears bits) is 32 bits. */ - growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); -# else - growsize = sizeof(fd_set); -# endif -# else +#if BYTEORDER != 0x1234 && BYTEORDER != 0x12345678 # ifdef NFDBITS # ifndef NBBY @@ -1006,10 +995,20 @@ PP(pp_sselect) # else masksize = sizeof(long); /* documented int, everyone seems to use long */ # endif - growsize = maxlen + (masksize - (maxlen % masksize)); Zero(&fd_sets[0], 4, char*); #endif +# if SELECT_MIN_BITS > 1 + /* If SELECT_MIN_BITS is greater than one we most probably will want + * to align the sizes with SELECT_MIN_BITS/8 because for example + * in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital + * UNIX, Solaris, NeXT, Darwin) the smallest quantum select() operates + * on (sets/tests/clears bits) is 32 bits. */ + growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); +# else + growsize = sizeof(fd_set); +# endif + sv = SP[4]; if (SvOK(sv)) { value = SvNV(sv); @@ -1158,7 +1157,8 @@ PP(pp_getc) RETURN; } if (!gv || do_eof(gv)) { /* make sure we have fp with something */ - if (ckWARN2(WARN_UNOPENED,WARN_CLOSED) && IoTYPE(io) != IoTYPE_WRONLY) + if (ckWARN2(WARN_UNOPENED,WARN_CLOSED) + && (!io || (!IoIFP(io) && IoTYPE(io) != IoTYPE_WRONLY))) report_evil_fh(gv, io, PL_op->op_type); RETPUSHUNDEF; } @@ -4618,9 +4618,9 @@ PP(pp_ghostent) register char **elem; register SV *sv; #ifndef HAS_GETHOST_PROTOS /* XXX Do we need individual probes? */ - struct hostent *PerlSock_gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int); - struct hostent *PerlSock_gethostbyname(Netdb_name_t); - struct hostent *PerlSock_gethostent(void); + struct hostent *gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int); + struct hostent *gethostbyname(Netdb_name_t); + struct hostent *gethostent(void); #endif struct hostent *hent; unsigned long len; @@ -4727,9 +4727,9 @@ PP(pp_gnetent) register char **elem; register SV *sv; #ifndef HAS_GETNET_PROTOS /* XXX Do we need individual probes? */ - struct netent *PerlSock_getnetbyaddr(Netdb_net_t, int); - struct netent *PerlSock_getnetbyname(Netdb_name_t); - struct netent *PerlSock_getnetent(void); + struct netent *getnetbyaddr(Netdb_net_t, int); + struct netent *getnetbyname(Netdb_name_t); + struct netent *getnetent(void); #endif struct netent *nent; STRLEN n_a; @@ -4815,9 +4815,9 @@ PP(pp_gprotoent) register char **elem; register SV *sv; #ifndef HAS_GETPROTO_PROTOS /* XXX Do we need individual probes? */ - struct protoent *PerlSock_getprotobyname(Netdb_name_t); - struct protoent *PerlSock_getprotobynumber(int); - struct protoent *PerlSock_getprotoent(void); + struct protoent *getprotobyname(Netdb_name_t); + struct protoent *getprotobynumber(int); + struct protoent *getprotoent(void); #endif struct protoent *pent; STRLEN n_a; @@ -4898,9 +4898,9 @@ PP(pp_gservent) register char **elem; register SV *sv; #ifndef HAS_GETSERV_PROTOS /* XXX Do we need individual probes? */ - struct servent *PerlSock_getservbyname(Netdb_name_t, Netdb_name_t); - struct servent *PerlSock_getservbyport(int, Netdb_name_t); - struct servent *PerlSock_getservent(void); + struct servent *getservbyname(Netdb_name_t, Netdb_name_t); + struct servent *getservbyport(int, Netdb_name_t); + struct servent *getservent(void); #endif struct servent *sent; STRLEN n_a; @@ -463,7 +463,6 @@ PERL_CALLCONV void Perl_markstack_grow(pTHX); #if defined(USE_LOCALE_COLLATE) PERL_CALLCONV char* Perl_mem_collxfrm(pTHX_ const char* s, STRLEN len, STRLEN* xlen); #endif -PERL_CALLCONV int Perl_memcmp_byte_utf8(pTHX_ char *sbyte, STRLEN lbyte, char *sutf, STRLEN lutf); PERL_CALLCONV SV* Perl_mess(pTHX_ const char* pat, ...) #ifdef CHECK_FORMAT __attribute__((format(printf,pTHX_1,pTHX_2))) @@ -596,6 +595,9 @@ PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV* pattern, IO *io); #if defined(USE_5005THREADS) PERL_CALLCONV struct perl_thread* Perl_new_struct_thread(pTHX_ struct perl_thread *t); #endif +#if defined(USE_REENTRANT_API) +PERL_CALLCONV void Perl_reentrant_init(pTHX); +#endif PERL_CALLCONV void Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr); PERL_CALLCONV I32 Perl_call_argv(pTHX_ const char* sub_name, I32 flags, char** argv); PERL_CALLCONV I32 Perl_call_method(pTHX_ const char* methname, I32 flags); @@ -3285,7 +3285,7 @@ tryagain: if (RExC_utf8) SvUTF8_on(sv); if (sv_utf8_downgrade(sv, TRUE)) { - char *s = Perl_sv_recode_to_utf8(aTHX_ sv, PL_encoding); + char *s = sv_recode_to_utf8(sv, PL_encoding); STRLEN newlen = SvCUR(sv); if (!SIZE_ONLY) { @@ -3359,7 +3359,7 @@ Perl_sv_utf8_upgrade_flags(pTHX_ register SV *sv, I32 flags) } if (PL_encoding) - Perl_sv_recode_to_utf8(aTHX_ sv, PL_encoding); + sv_recode_to_utf8(sv, PL_encoding); else { /* Assume Latin-1/EBCDIC */ /* This function could be much more efficient if we * had a FLAG in SVs to signal if there are any hibit @@ -5349,6 +5349,8 @@ Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2) char *pv2; STRLEN cur2; I32 eq = 0; + char *tpv = Nullch; + SV* svrecode = Nullsv; if (!sv1) { pv1 = ""; @@ -5364,13 +5366,59 @@ Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2) else pv2 = SvPV(sv2, cur2); - if (SvUTF8(sv1) == SvUTF8(sv2) || IN_BYTES) - eq = (cur1 == cur2) && memEQ(pv1, pv2, cur1); - else if (SvUTF8(sv1)) /* do not utf8ize the comparands as a side-effect */ - eq = !memcmp_byte_utf8(pv2, cur2, pv1, cur1); - else - eq = !memcmp_byte_utf8(pv1, cur1, pv2, cur2); + if (cur1 && cur2 && SvUTF8(sv1) != SvUTF8(sv2) && !IN_BYTES) { + /* Differing utf8ness. + * Do not UTF8size the comparands as a side-effect. */ + if (PL_encoding) { + if (SvUTF8(sv1)) { + svrecode = newSVpvn(pv2, cur2); + sv_recode_to_utf8(svrecode, PL_encoding); + pv2 = SvPV(svrecode, cur2); + } + else { + svrecode = newSVpvn(pv1, cur1); + sv_recode_to_utf8(svrecode, PL_encoding); + pv1 = SvPV(svrecode, cur1); + } + /* Now both are in UTF-8. */ + if (cur1 != cur2) + return FALSE; + } + else { + bool is_utf8 = TRUE; + + if (SvUTF8(sv1)) { + /* sv1 is the UTF-8 one, + * if is equal it must be downgrade-able */ + char *pv = (char*)bytes_from_utf8((U8*)pv1, + &cur1, &is_utf8); + if (pv != pv1) + pv1 = tpv = pv; + } + else { + /* sv2 is the UTF-8 one, + * if is equal it must be downgrade-able */ + char *pv = (char *)bytes_from_utf8((U8*)pv2, + &cur2, &is_utf8); + if (pv != pv2) + pv2 = tpv = pv; + } + if (is_utf8) { + /* Downgrade not possible - cannot be eq */ + return FALSE; + } + } + } + + if (cur1 == cur2) + eq = memEQ(pv1, pv2, cur1); + if (svrecode) + SvREFCNT_dec(svrecode); + + if (tpv) + Safefree(tpv); + return eq; } @@ -5389,8 +5437,9 @@ I32 Perl_sv_cmp(pTHX_ register SV *sv1, register SV *sv2) { STRLEN cur1, cur2; - char *pv1, *pv2; - I32 retval; + char *pv1, *pv2, *tpv = Nullch; + I32 cmp; + SV *svrecode = Nullsv; if (!sv1) { pv1 = ""; @@ -5399,35 +5448,61 @@ Perl_sv_cmp(pTHX_ register SV *sv1, register SV *sv2) else pv1 = SvPV(sv1, cur1); - if (!sv2){ + if (!sv2) { pv2 = ""; cur2 = 0; } else pv2 = SvPV(sv2, cur2); + if (cur1 && cur2 && SvUTF8(sv1) != SvUTF8(sv2) && !IN_BYTES) { + /* Differing utf8ness. + * Do not UTF8size the comparands as a side-effect. */ + if (SvUTF8(sv1)) { + if (PL_encoding) { + svrecode = newSVpvn(pv2, cur2); + sv_recode_to_utf8(svrecode, PL_encoding); + pv2 = SvPV(svrecode, cur2); + } + else { + pv2 = tpv = (char*)bytes_to_utf8((U8*)pv2, &cur2); + } + } + else { + if (PL_encoding) { + svrecode = newSVpvn(pv1, cur1); + sv_recode_to_utf8(svrecode, PL_encoding); + pv1 = SvPV(svrecode, cur1); + } + else { + pv1 = tpv = (char*)bytes_to_utf8((U8*)pv1, &cur1); + } + } + } + if (!cur1) { - return cur2 ? -1 : 0; + cmp = cur2 ? -1 : 0; } else if (!cur2) { - return 1; - } else if (SvUTF8(sv1) == SvUTF8(sv2) || IN_BYTES) { - retval = memcmp((void*)pv1, (void*)pv2, cur1 < cur2 ? cur1 : cur2); + cmp = 1; + } else { + I32 retval = memcmp((void*)pv1, (void*)pv2, cur1 < cur2 ? cur1 : cur2); if (retval) { - return retval < 0 ? -1 : 1; + cmp = retval < 0 ? -1 : 1; } else if (cur1 == cur2) { - return 0; - } else { - return cur1 < cur2 ? -1 : 1; + cmp = 0; + } else { + cmp = cur1 < cur2 ? -1 : 1; } - } else if (SvUTF8(sv1)) /* do not utf8ize the comparands as a side-effect */ - retval = -memcmp_byte_utf8(pv2, cur2, pv1, cur1); - else - retval = memcmp_byte_utf8(pv1, cur1, pv2, cur2); + } - if (retval) /* CURs taken into account already */ - return retval < 0 ? -1 : 1; - return 0; + if (svrecode) + SvREFCNT_dec(svrecode); + + if (tpv) + Safefree(tpv); + + return cmp; } /* @@ -9792,8 +9867,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_debug = proto_perl->Idebug; #ifdef USE_REENTRANT_API - New(31337, PL_reentrant_buffer,1, REBUF); - New(31337, PL_reentrant_buffer->tmbuff,1, struct tm); + Perl_reentrant_init(aTHX); #endif /* create SV map for pointer relocation */ diff --git a/t/base/num.t b/t/base/num.t index f75e73d428..37ef9fa1ce 100644 --- a/t/base/num.t +++ b/t/base/num.t @@ -1,6 +1,6 @@ #!./perl -print "1..30\n"; +print "1..45\n"; # First test whether the number stringification works okay. # (Testing with == would exercize the IV/NV part, not the PV.) @@ -105,3 +105,51 @@ print $a + 1 == 0x101 ? "ok 29\n" : "not ok 29 #" . $a + 1 . "\n"; $a = 1000; "$a"; print $a + 1 == 1001 ? "ok 30\n" : "not ok 30 #" . $a + 1 . "\n"; + +# back to some basic stringify tests +# we expect NV stringification to work according to C sprintf %.*g rules + +$a = 0.01; "$a"; +print $a eq "0.01" ? "ok 31\n" : "not ok 31 # $a\n"; + +$a = 0.001; "$a"; +print $a eq "0.001" ? "ok 32\n" : "not ok 32 # $a\n"; + +$a = 0.0001; "$a"; +print $a eq "0.0001" ? "ok 33\n" : "not ok 33 # $a\n"; + +$a = 0.00009; "$a"; +print $a eq "9e-05" || $a eq "9e-005" ? "ok 34\n" : "not ok 34 # $a\n"; + +$a = 1.1; "$a"; +print $a eq "1.1" ? "ok 35\n" : "not ok 35 # $a\n"; + +$a = 1.01; "$a"; +print $a eq "1.01" ? "ok 36\n" : "not ok 36 # $a\n"; + +$a = 1.001; "$a"; +print $a eq "1.001" ? "ok 37\n" : "not ok 37 # $a\n"; + +$a = 1.0001; "$a"; +print $a eq "1.0001" ? "ok 38\n" : "not ok 38 # $a\n"; + +$a = 1.00001; "$a"; +print $a eq "1.00001" ? "ok 39\n" : "not ok 39 # $a\n"; + +$a = 1.000001; "$a"; +print $a eq "1.000001" ? "ok 40\n" : "not ok 40 # $a\n"; + +$a = 0.; "$a"; +print $a eq "0" ? "ok 41\n" : "not ok 41 # $a\n"; + +$a = 100000.; "$a"; +print $a eq "100000" ? "ok 42\n" : "not ok 42 # $a\n"; + +$a = -100000.; "$a"; +print $a eq "-100000" ? "ok 43\n" : "not ok 43 # $a\n"; + +$a = 123.456; "$a"; +print $a eq "123.456" ? "ok 44\n" : "not ok 44 # $a\n"; + +$a = 1e34; "$a"; +print $a eq "1e+34" || $a eq "1e+034" ? "ok 45\n" : "not ok 45 $a\n"; @@ -275,7 +275,11 @@ SKIP: { close (FH); open (FH, ">>Iofs.tmp") or die "Can't reopen Iofs.tmp"; } - is(-s "Iofs.tmp", 200, "fh resize to 200 working (filename check)"); + if ($^O eq 'vos') { + is(-s "Iofs.tmp", 200, "TODO - hit VOS bug posix-973 - fh resize to 200 working (filename check)"); + } else { + is(-s "Iofs.tmp", 200, "fh resize to 200 working (filename check)"); + } ok(truncate(FH, 0), "fh resize to zero"); diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index 5349f505f7..8dc0bf90a4 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -419,9 +419,19 @@ use warnings qw(unopened closed) ; getc FOO; close STDIN; getc STDIN; +# Create an empty file +$file = 'getcwarn.tmp'; +open FH1, ">$file" or die "# $!"; close FH1; +open FH2, $file or die "# $!"; +getc FH2; # Should not warn at EOF +close FH2; +getc FH2; # Warns, now +unlink $file; no warnings qw(unopened closed) ; getc FOO; getc STDIN; +getc FH2; EXPECT getc() on unopened filehandle FOO at - line 3. getc() on closed filehandle STDIN at - line 5. +getc() on closed filehandle FH2 at - line 12. diff --git a/t/op/flip.t b/t/op/flip.t index d9fa736d54..70666ac658 100755 --- a/t/op/flip.t +++ b/t/op/flip.t @@ -4,7 +4,7 @@ chdir 't' if -d 't'; -print "1..10\n"; +print "1..15\n"; @a = (1,2,3,4,5,6,7,8,9,10,11,12); @@ -19,6 +19,9 @@ if ($y eq '12E0123E0') {print "ok 7\n";} else {print "not ok 7\n";} @a = ('a','b','c','d','e','f','g'); +{ +local $.; + open(of,'harness') or die "Can't open harness: $!"; while (<of>) { (3 .. 5) && ($foo .= $_); @@ -34,5 +37,32 @@ if (($x...$x) eq "1") {print "ok 9\n";} else {print "not ok 9\n";} # coredump reported in bug 20001018.008 readline(UNKNOWN); $. = 1; - print "ok 10\n" unless 1 .. 10; + $x = 1..10; + print "ok 10\n"; +} + } + +if (!defined $.) { print "ok 11\n" } else { print "not ok 11 # $.\n" } + +use warnings; +my $warn=''; +$SIG{__WARN__} = sub { $warn .= join '', @_ }; + +if (0..2) { print "ok 12\n" } else { print "not ok 12\n" } + +if ($warn =~ /uninitialized/) { print "ok 13\n" } else { print "not ok 13\n" } +$warn = ''; + +$x = "foo".."bar"; + +if ((() = ($warn =~ /isn't numeric/g)) == 2) { + print "ok 14\n" +} +else { + print "not ok 14\n" +} +$warn = ''; + +$. = 15; +if (15..0) { print "ok 15\n" } else { print "not ok 15\n" } diff --git a/t/op/pack.t b/t/op/pack.t index 0782d46855..6b812363b2 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -840,7 +840,9 @@ is(scalar unpack('A /A /A Z20', '3004bcde'), 'bcde'); ok( length $p); my @b = unpack "$t X[$t] $t", $p; # Extract, step back, extract again is(scalar @b, 2 * scalar @a); - is("@b", "@a @a"); + $b = "@b"; + $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble + is($b, "@a @a"); my $warning; local $SIG{__WARN__} = sub { @@ -850,7 +852,9 @@ is(scalar unpack('A /A /A Z20', '3004bcde'), 'bcde'); is($warning, undef); is(scalar @b, scalar @a); - is("@b", "@a"); + $b = "@b"; + $b =~ s/(?:17000+|16999+)\d+(e-45) /17$1 /gi; # stringification is gamble + is($b, "@a"); } is(length(pack("j", 0)), $Config{ivsize}); diff --git a/t/op/pat.t b/t/op/pat.t index b3db7ded17..4fb3d45e5e 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..858\n"; +print "1..860\n"; BEGIN { chdir 't' if -d 't'; @@ -2675,22 +2675,6 @@ print "# some Unicode properties\n"; } { - print "# [ID 20020124.005]\n"; - - # Fixed by #14795. - - $char = "\x{f00f}"; - $x = "$char b $char"; - - $x =~ s{($char)}{ - "c" =~ /d/; - "x"; - }ge; - - print $x eq "x b x" ? "ok 855\n" : "not ok 855\n"; -} - -{ print "# UTF-8 hash keys and /\$/\n"; # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-01/msg01327.html @@ -2698,7 +2682,7 @@ print "# some Unicode properties\n"; my $v = substr($u,0,1); my $w = substr($u,1,1); my %u = ( $u => $u, $v => $v, $w => $w ); - my $i = 856; + my $i = 855; for (keys %u) { my $m1 = /^\w*$/ ? 1 : 0; my $m2 = $u{$_}=~/^\w*$/ ? 1 : 0; @@ -2706,3 +2690,19 @@ print "# some Unicode properties\n"; $i++; } } + +{ + print "# [ID 20020124.005]\n"; + # Fixed by #14795. + my $i = 858; + for my $char ("a", "\x{df}", "\x{100}"){ + $x = "$char b $char"; + $x =~ s{($char)}{ + "c" =~ /c/; + "x"; + }ge; + print substr($x,0,1) eq substr($x,-1,1) ? + "ok $i\n" : "not ok $i # debug: $x\n"; + $i++; + } +} diff --git a/t/op/write.t b/t/op/write.t index 24759965a4..e08a64bebf 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..44\n"; +print "1..47\n"; my $CAT = ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') ? 'type' : ($^O eq 'MacOS') ? 'catenate' @@ -271,20 +271,46 @@ if (`$CAT Op_write.tmp` eq $right) else { print "not ok 11\n"; } -# 12..44: scary format testing from Merijn H. Brand +# 12..47: scary format testing from Merijn H. Brand if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'dos' || ($^O eq 'os2' and not eval '$OS2::can_fork')) { - foreach (12..44) { print "ok $_ # skipped: '|-' and '-|' not supported\n"; } + foreach (12..47) { print "ok $_ # skipped: '|-' and '-|' not supported\n"; } exit(0); } use strict; # Amazed that this hackery can be made strict ... +my $test = 12; + # Just a complete test for format, including top-, left- and bottom marging # and format detection through glob entries +format EMPTY = +. + +format Comment = +ok @<<<<< +$test +. + +$= = 10; + +# [ID 20020227.005] format bug with undefined _TOP +{ local $~ = "Comment"; + write; + $test++; + print $- == 9 + ? "ok $test\n" : "not ok $test # TODO \$- = $- instead of 9\n"; + $test++; + print $^ ne "Comment_TOP" + ? "ok $test\n" : "not ok $test # TODO \$^ = $^ instead of 'STDOUT_TOP'\n"; + $test++; + } + + $^ = "STDOUT_TOP"; $= = 7; # Page length + $- = 0; # Lines left my $ps = $^L; $^L = ""; # Catch the page separator my $tm = 1; # Top margin (empty lines before first output) my $bm = 2; # Bottom marging (empty lines between last text and footer) @@ -293,14 +319,13 @@ my $lm = 4; # Left margin (indent in spaces) select ((select (STDOUT), $| = 1)[0]); if ($lm > 0 and !open STDOUT, "|-") { # Left margin (in this test ALWAYS set) select ((select (STDOUT), $| = 1)[0]); - my $i = 12; my $s = " " x $lm; while (<STDIN>) { s/^/$s/; - print + ($_ eq <DATA> ? "" : "not "), "ok ", $i++, "\n"; + print + ($_ eq <DATA> ? "" : "not "), "ok ", $test++, "\n"; } close STDIN; - print + (<DATA>?"not ":""), "ok ", $i++, "\n"; + print + (<DATA>?"not ":""), "ok ", $test++, "\n"; close STDOUT; exit; } @@ -334,9 +359,6 @@ format TOP = $tm . -format EmptyTOP = -. - format ENTRY = @ @<<<<~~ @{(shift @E)||["",""]} @@ -359,7 +381,7 @@ sub has_format ($) $@?0:1; } # has_format -$^ = has_format ("TOP") ? "TOP" : "EmptyTOP"; +$^ = has_format ("TOP") ? "TOP" : "EMPTY"; has_format ("ENTRY") or die "No format defined for ENTRY"; foreach my $e ( [ map { [ $_, "Test$_" ] } 1 .. 7 ], [ map { [ $_, "${_}tseT" ] } 1 .. 5 ]) { @@ -377,7 +399,7 @@ if (has_format ("EOF")) { close STDOUT; -# That was test 44. +# That was test 47. __END__ @@ -1690,7 +1690,7 @@ S_scan_const(pTHX_ char *start) SvPOK_on(sv); if (PL_encoding && !has_utf8) { - Perl_sv_recode_to_utf8(aTHX_ sv, PL_encoding); + sv_recode_to_utf8(sv, PL_encoding); has_utf8 = TRUE; } if (has_utf8) { @@ -3509,30 +3509,32 @@ Perl_ebcdic_control(pTHX_ int ch) } #endif -/* XXX struct tm on some systems (SunOS4/BSD) contains extra (non POSIX) - * fields for which we don't have Configure support yet: - * char *tm_zone; -- abbreviation of timezone name - * long tm_gmtoff; -- offset from GMT in seconds - * To workaround core dumps from the uninitialised tm_zone we get the +/* To workaround core dumps from the uninitialised tm_zone we get the * system to give us a reasonable struct to copy. This fix means that * strftime uses the tm_zone and tm_gmtoff values returned by * localtime(time()). That should give the desired result most of the * time. But probably not always! * - * This is a temporary workaround to be removed once Configure - * support is added and NETaa14816 is considered in full. - * It does not address tzname aspects of NETaa14816. + * This does not address tzname aspects of NETaa14816. + * */ + #ifdef HAS_GNULIBC # ifndef STRUCT_TM_HASZONE # define STRUCT_TM_HASZONE # endif #endif +#ifdef STRUCT_TM_HASZONE /* Backward compat */ +# ifndef HAS_TM_TM_ZONE +# define HAS_TM_TM_ZONE +# endif +#endif + void Perl_init_tm(pTHX_ struct tm *ptm) /* see mktime, strftime and asctime */ { -#ifdef STRUCT_TM_HASZONE +#ifdef HAS_TM_TM_ZONE Time_t now; (void)time(&now); Copy(localtime(&now), ptm, 1, struct tm); @@ -4346,42 +4348,14 @@ Perl_sv_nounlocking(pTHX_ SV *sv) { } -/* -=for apidoc memcmp_byte_utf8 +void +Perl_reentrant_init(pTHX) +{ +#ifdef USE_REENTRANT_API + New(31337, PL_reentrant_buffer, 1, REENTBUF); + New(31337, PL_reentrant_buffer->tmbuf, 1, struct tm); +#endif +} -Similar to memcmp(), but the first string is with bytes, the second -with utf8. Takes into account that the lengths may be different. -=cut -*/ -int -Perl_memcmp_byte_utf8(pTHX_ char *sb, STRLEN lbyte, char *su, STRLEN lutf) -{ - U8 *sbyte = (U8*)sb; - U8 *sutf = (U8*)su; - U8 *ebyte = sbyte + lbyte; - U8 *eutf = sutf + lutf; - - while (sbyte < ebyte) { - if (sutf >= eutf) - return 1; /* utf one shorter */ - if (NATIVE_IS_INVARIANT(*sbyte)) { - if (*sbyte != *sutf) - return *sbyte - *sutf; - sbyte++; sutf++; /* CONTINUE */ - } else if ((*sutf & UTF_CONTINUATION_MASK) == - (*sbyte >> UTF_ACCUMULATION_SHIFT)) { - if ((sutf[1] & UTF_CONTINUATION_MASK) != - (*sbyte & UTF_CONTINUATION_MASK)) - return (*sbyte & UTF_CONTINUATION_MASK) - - (*sutf & UTF_CONTINUATION_MASK); - sbyte++, sutf += 2; /* CONTINUE */ - } else - return (*sbyte >> UTF_ACCUMULATION_SHIFT) - - (*sutf & UTF_CONTINUATION_MASK); - } - if (sutf >= eutf) - return 0; - return -1; /* byte one shorter */ -} diff --git a/win32/Makefile b/win32/Makefile index b1c7beee03..7b7bf345fb 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1,1116 +1,1116 @@ -# -# Makefile to build perl on Windows NT using Microsoft NMAKE. -# Supported compilers: -# Visual C++ 5.x (possibly other versions) -# -# This is set up to build a perl.exe that runs off a shared library -# (perl57.dll). Also makes individual DLLs for the XS extensions. -# - -## -## Make sure you read README.win32 *before* you mess with anything here! -## - -## -## Build configuration. Edit the values below to suit your needs. -## - -# -# Set these to wherever you want "nmake install" to put your -# newly built perl. -# -INST_DRV = c: -INST_TOP = $(INST_DRV)\perl - -# -# Comment this out if you DON'T want your perl installation to be versioned. -# This means that the new installation will overwrite any files from the -# old installation at the same INST_TOP location. Leaving it enabled is -# the safest route, as perl adds the extra version directory to all the -# locations it installs files to. If you disable it, an alternative -# versioned installation can be obtained by setting INST_TOP above to a -# path that includes an arbitrary version string. -# -#INST_VER = \5.7.2 - -# -# Comment this out if you DON'T want your perl installation to have -# architecture specific components. This means that architecture- -# specific files will be installed along with the architecture-neutral -# files. Leaving it enabled is safer and more flexible, in case you -# want to build multiple flavors of perl and install them together in -# the same location. Commenting it out gives you a simpler -# installation that is easier to understand for beginners. -# -#INST_ARCH = \$(ARCHNAME) - -# -# uncomment to enable multiple interpreters. This is need for fork() -# emulation. -# -USE_MULTI = define - -# -# Beginnings of interpreter cloning/threads; still very incomplete. -# This should be enabled to get the fork() emulation. This needs -# USE_MULTI as well. -# -USE_ITHREADS = define - -# -# uncomment to enable the implicit "host" layer for all system calls -# made by perl. This needs USE_MULTI above. This is also needed to -# get fork(). -# -USE_IMP_SYS = define - -# -# uncomment to enable the experimental PerlIO I/O subsystem. -USE_PERLIO = define - -# -# WARNING! This option is deprecated and will eventually go away (enable -# USE_ITHREADS instead). -# -# uncomment to enable threads-capabilities. This is incompatible with -# USE_ITHREADS, and is only here for people who may have come to rely -# on the experimental Thread support that was in 5.005. -# -#USE_5005THREADS = define - -# -# uncomment one of the following lines if you are using either -# Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98) -# -#CCTYPE = MSVC20 -#CCTYPE = MSVC60 - -# -# uncomment next line if you want debug version of perl (big,slow) -# -#CFG = Debug - -# -# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. -# It has patches that fix known bugs in older versions of MSVCRT.DLL. -# This currently requires VC 5.0 with Service Pack 3 or later. -# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ -# and follow the directions in the package to install. -# -# Not recommended if you have VC 6.x and you're not running Windows 9x. -# -#USE_PERLCRT = define - -# -# uncomment to enable linking with setargv.obj under the Visual C -# compiler. Setting this options enables perl to expand wildcards in -# arguments, but it may be harder to use alternate methods like -# File::DosGlob that are more powerful. This option is supported only with -# Visual C. -# -#USE_SETARGV = define - -# -# if you have the source for des_fcrypt(), uncomment this and make sure the -# file exists (see README.win32). File should be located in the same -# directory as this file. -# -#CRYPT_SRC = fcrypt.c - -# -# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a -# library, uncomment this, and make sure the library exists (see README.win32) -# Specify the full pathname of the library. -# -#CRYPT_LIB = fcrypt.lib - -# -# set this if you wish to use perl's malloc -# WARNING: Turning this on/off WILL break binary compatibility with extensions -# you may have compiled with/without it. Be prepared to recompile all -# extensions if you change the default. Currently, this cannot be enabled -# if you ask for USE_IMP_SYS above. -# -#PERL_MALLOC = define - -# -# set the install locations of the compiler include/libraries -# Running VCVARS32.BAT is *required* when using Visual C. -# Some versions of Visual C don't define MSVCDIR in the environment, -# so you may have to set CCHOME explicitly (spaces in the path name should -# not be quoted) -# -#CCHOME = f:\msvc20 -CCHOME = $(MSVCDIR) -CCINCDIR = $(CCHOME)\include -CCLIBDIR = $(CCHOME)\lib - -# -# Additional compiler flags can be specified here. -# - -# -# This should normally be disabled. Adding -DPERL_POLLUTE enables support -# for old symbols by default, at the expense of extreme pollution. You most -# probably just want to build modules that won't compile with -# perl Makefile.PL POLLUTE=1 -# instead of enabling this. Please report such modules to the respective -# authors. -# -#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE - -# -# This should normally be disabled. Enabling it will disable the File::Glob -# implementation of CORE::glob. -# -#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB - -# -# This should normally be disabled. Enabling it causes perl to read scripts -# in text mode (which is the 5.005 behavior) and will break ByteLoader. -#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS - -# -# specify semicolon-separated list of extra directories that modules will -# look for libraries (spaces in path names need not be quoted) -# -EXTRALIBDIRS = - -# -# set this to your email address (perl will guess a value from -# from your loginname and your hostname, which may not be right) -# -#EMAIL = - -## -## Build configuration ends. -## - -##################### CHANGE THESE ONLY IF YOU MUST ##################### - -!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == "" -D_CRYPT = undef -!ELSE -D_CRYPT = define -CRYPT_FLAG = -DHAVE_DES_FCRYPT -!ENDIF - -!IF "$(PERL_MALLOC)" == "" -PERL_MALLOC = undef -!ENDIF - -!IF "$(USE_5005THREADS)" == "" -USE_5005THREADS = undef -!ENDIF - -!IF "$(USE_5005THREADS)" == "define" -USE_ITHREADS = undef -!ENDIF - -!IF "$(USE_IMP_SYS)" == "define" -PERL_MALLOC = undef -!ENDIF - -!IF "$(USE_MULTI)" == "" -USE_MULTI = undef -!ENDIF - -!IF "$(USE_ITHREADS)" == "" -USE_ITHREADS = undef -!ENDIF - -!IF "$(USE_IMP_SYS)" == "" -USE_IMP_SYS = undef -!ENDIF - -!IF "$(USE_PERLIO)" == "" -USE_PERLIO = undef -!ENDIF - -!IF "$(USE_PERLCRT)" == "" -USE_PERLCRT = undef -!ENDIF - -!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" -USE_MULTI = define -!ENDIF - -!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" -USE_MULTI = define -USE_5005THREADS = undef -!ENDIF - -!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" -BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT -!ENDIF - -!IF "$(USE_IMP_SYS)" != "undef" -BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS -!ENDIF - -!IF "$(PROCESSOR_ARCHITECTURE)" == "" -PROCESSOR_ARCHITECTURE = x86 -!ENDIF - -!IF "$(USE_5005THREADS)" == "define" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread -!ELSE -!IF "$(USE_MULTI)" == "define" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi -!ELSE -!IF "$(USE_PERLIO)" == "define" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio -!ELSE -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) -!ENDIF -!ENDIF -!ENDIF - -!IF "$(USE_PERLIO)" == "define" -BUILDOPT = $(BUILDOPT) -DUSE_PERLIO -!ENDIF - -!IF "$(USE_ITHREADS)" == "define" -ARCHNAME = $(ARCHNAME)-thread -!ENDIF - -# Visual Studio 98 specific -!IF "$(CCTYPE)" == "MSVC60" - -# VC 6.0 can load the socket dll on demand. Makes the test suite -# run in about 10% less time. -DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib -!ENDIF - -ARCHDIR = ..\lib\$(ARCHNAME) -COREDIR = ..\lib\CORE -AUTODIR = ..\lib\auto -LIBDIR = ..\lib -EXTDIR = ..\ext -PODDIR = ..\pod -EXTUTILSDIR = $(LIBDIR)\ExtUtils - -# -INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin -INST_BIN = $(INST_SCRIPT)$(INST_ARCH) -INST_LIB = $(INST_TOP)$(INST_VER)\lib -INST_ARCHLIB = $(INST_LIB)$(INST_ARCH) -INST_COREDIR = $(INST_ARCHLIB)\CORE -INST_POD = $(INST_LIB)\pod -INST_HTML = $(INST_TOP)$(INST_VER)\html - -# -# Programs to compile, build .lib files and link -# - -CC = cl -LINK32 = link -LIB32 = $(LINK32) -lib -RSC = rc - -# -# Options -# - -INCLUDES = -I$(COREDIR) -I.\include -I. -I.. -#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX -DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG) -LOCDEFS = -DPERLDLL -DPERL_CORE -SUBSYS = console -CXX_FLAG = -TP -GX - -!IF "$(USE_PERLCRT)" != "define" -LIBC = msvcrt.lib -!ELSE -LIBC = PerlCRT.lib -!ENDIF - -PERLEXE_RES = -PERLDLL_RES = - -!IF "$(CFG)" == "Debug" -! IF "$(CCTYPE)" == "MSVC20" -OPTIMIZE = -Od -MD -Z7 -DDEBUGGING -! ELSE -OPTIMIZE = -Od -MD -Zi -DDEBUGGING -! ENDIF -LINK_DBG = -debug -pdb:none -!ELSE -# -O1 yields smaller code, which turns out to be faster than -O2 -#OPTIMIZE = -O2 -MD -DNDEBUG -OPTIMIZE = -O1 -MD -DNDEBUG -LINK_DBG = -release -!ENDIF - -!IF "$(USE_PERLCRT)" != "define" -BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX -!ENDIF - -LIBBASEFILES = $(CRYPT_LIB) \ - oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ - netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ - version.lib odbc32.lib odbccp32.lib - -# we add LIBC here, since we may be using PerlCRT.dll -LIBFILES = $(LIBBASEFILES) $(LIBC) - -CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ - $(PCHFLAGS) $(OPTIMIZE) -LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \ - -libpath:"$(INST_COREDIR)" \ - -machine:$(PROCESSOR_ARCHITECTURE) -OBJOUT_FLAG = -Fo -EXEOUT_FLAG = -Fe - -CFLAGS_O = $(CFLAGS) $(BUILDOPT) - -#################### do not edit below this line ####################### -############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ############## - -o = .obj - -# -# Rules -# - -.SUFFIXES : .c $(o) .dll .lib .exe .rc .res - -.c$(o): - $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $< - -.y.c: - $(NOOP) - -$(o).dll: - $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \ - -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL) - -.rc.res: - $(RSC) -i.. $< - -# -# various targets - -# makedef.pl must be updated if this changes, and this should normally -# only change when there is an incompatible revision of the public API. -# XXX so why did we change it from perl56 to perl57? -PERLIMPLIB = ..\perl57.lib -PERLDLL = ..\perl57.dll - -MINIPERL = ..\miniperl.exe -MINIDIR = .\mini -PERLEXE = ..\perl.exe -WPERLEXE = ..\wperl.exe -GLOBEXE = ..\perlglob.exe -CONFIGPM = ..\lib\Config.pm -MINIMOD = ..\lib\ExtUtils\Miniperl.pm -X2P = ..\x2p\a2p.exe - -# Nominate a target which causes extensions to be re-built -# This used to be $(PERLEXE), but at worst it is the .dll that they depend -# on and really only the interface - i.e. the .def file used to export symbols -# from the .dll -PERLDEP = perldll.def - -PL2BAT = bin\pl2bat.pl -GLOBBAT = bin\perlglob.bat - -UTILS = \ - ..\utils\h2ph \ - ..\utils\splain \ - ..\utils\dprofpp \ - ..\utils\perlbug \ - ..\utils\pl2pm \ - ..\utils\c2ph \ - ..\utils\h2xs \ - ..\utils\perldoc \ - ..\utils\perlcc \ - ..\utils\perlivp \ - ..\utils\libnetcfg \ - ..\pod\checkpods \ - ..\pod\pod2html \ - ..\pod\pod2latex \ - ..\pod\pod2man \ - ..\pod\pod2text \ - ..\pod\pod2usage \ - ..\pod\podchecker \ - ..\pod\podselect \ - ..\x2p\find2perl \ - ..\x2p\s2p \ - ..\lib\ExtUtils\xsubpp \ - bin\exetype.pl \ - bin\runperl.pl \ - bin\pl2bat.pl \ - bin\perlglob.pl \ - bin\search.pl - -MAKE = nmake -nologo -MAKE_BARE = nmake - -CFGSH_TMPL = config.vc -CFGH_TMPL = config_H.vc - -XCOPY = xcopy /f /r /i /d -RCOPY = xcopy /f /r /i /e /d -NOOP = @echo -NULL = - -DEL = del - -# -# filenames given to xsubpp must have forward slashes (since it puts -# full pathnames in #line strings) -XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ - -C++ -prototypes - -MICROCORE_SRC = \ - ..\av.c \ - ..\deb.c \ - ..\doio.c \ - ..\doop.c \ - ..\dump.c \ - ..\globals.c \ - ..\gv.c \ - ..\hv.c \ - ..\locale.c \ - ..\mg.c \ - ..\numeric.c \ - ..\op.c \ - ..\perl.c \ - ..\perlapi.c \ - ..\perly.c \ - ..\pp.c \ - ..\pp_ctl.c \ - ..\pp_hot.c \ - ..\pp_pack.c \ - ..\pp_sort.c \ - ..\pp_sys.c \ - ..\regcomp.c \ - ..\regexec.c \ - ..\run.c \ - ..\scope.c \ - ..\sv.c \ - ..\taint.c \ - ..\toke.c \ - ..\universal.c \ - ..\utf8.c \ - ..\util.c \ - ..\xsutils.c - -EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c - -!IF "$(PERL_MALLOC)" == "define" -EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c -!ENDIF - -EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c - -WIN32_SRC = \ - .\win32.c \ - .\win32sck.c \ - .\win32thread.c - -!IF "$(USE_PERLIO)" == "define" -WIN32_SRC = $(WIN32_SRC) .\win32io.c -!ENDIF - -!IF "$(CRYPT_SRC)" != "" -WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC) -!ENDIF - -DLL_SRC = $(DYNALOADER).c - -X2P_SRC = \ - ..\x2p\a2p.c \ - ..\x2p\hash.c \ - ..\x2p\str.c \ - ..\x2p\util.c \ - ..\x2p\walk.c - -CORE_NOCFG_H = \ - ..\av.h \ - ..\cop.h \ - ..\cv.h \ - ..\dosish.h \ - ..\embed.h \ - ..\form.h \ - ..\gv.h \ - ..\handy.h \ - ..\hv.h \ - ..\iperlsys.h \ - ..\mg.h \ - ..\nostdio.h \ - ..\op.h \ - ..\opcode.h \ - ..\perl.h \ - ..\perlapi.h \ - ..\perlsdio.h \ - ..\perlsfio.h \ - ..\perly.h \ - ..\pp.h \ - ..\proto.h \ - ..\regexp.h \ - ..\scope.h \ - ..\sv.h \ - ..\thread.h \ - ..\unixish.h \ - ..\utf8.h \ - ..\util.h \ - ..\warnings.h \ - ..\XSUB.h \ - ..\EXTERN.h \ - ..\perlvars.h \ - ..\intrpvar.h \ - ..\thrdvar.h \ - .\include\dirent.h \ - .\include\netdb.h \ - .\include\sys\socket.h \ - .\win32.h - -CORE_H = $(CORE_NOCFG_H) .\config.h - -MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj) -CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj) -WIN32_OBJ = $(WIN32_SRC:.c=.obj) -MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \ - $(MINIDIR)\miniperlmain$(o) \ - $(MINIDIR)\perlio$(o) -MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\) -MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ) -DLL_OBJ = $(DLL_SRC:.c=.obj) -X2P_OBJ = $(X2P_SRC:.c=.obj) - -PERLDLL_OBJ = $(CORE_OBJ) -PERLEXE_OBJ = perlmain$(o) - -PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ) -#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ) - -!IF "$(USE_SETARGV)" != "" -SETARGV_OBJ = setargv$(o) -!ENDIF - -DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader -SOCKET = $(EXTDIR)\Socket\Socket -FCNTL = $(EXTDIR)\Fcntl\Fcntl -OPCODE = $(EXTDIR)\Opcode\Opcode -SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File -IO = $(EXTDIR)\IO\IO -POSIX = $(EXTDIR)\POSIX\POSIX -ATTRS = $(EXTDIR)\attrs\attrs -THREAD = $(EXTDIR)\Thread\Thread -B = $(EXTDIR)\B\B -RE = $(EXTDIR)\re\re -DUMPER = $(EXTDIR)\Data\Dumper\Dumper -ERRNO = $(EXTDIR)\Errno\Errno -PEEK = $(EXTDIR)\Devel\Peek\Peek -BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader -DPROF = $(EXTDIR)\Devel\DProf\DProf -GLOB = $(EXTDIR)\File\Glob\Glob -HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname -STORABLE = $(EXTDIR)\Storable\Storable -FILTER = $(EXTDIR)\Filter\Util\Call\Call -ENCODE = $(EXTDIR)\Encode\Encode -MD5 = $(EXTDIR)\Digest\MD5\MD5 -PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar -MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64 -TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes -CWD = $(EXTDIR)\Cwd\Cwd -LISTUTIL = $(EXTDIR)\List\Util\Util -PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via -XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap -UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize - -SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll -FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll -OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll -SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll -IO_DLL = $(AUTODIR)\IO\IO.dll -POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll -ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll -THREAD_DLL = $(AUTODIR)\Thread\Thread.dll -B_DLL = $(AUTODIR)\B\B.dll -DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll -PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll -RE_DLL = $(AUTODIR)\re\re.dll -BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll -DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll -GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll -HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll -STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll -FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll -ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll -MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll -PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll -MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll -TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll -CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll -LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll -PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll -XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll -UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll - -EXTENSION_C = \ - $(SOCKET).c \ - $(FCNTL).c \ - $(OPCODE).c \ - $(SDBM_FILE).c \ - $(IO).c \ - $(POSIX).c \ - $(ATTRS).c \ - $(THREAD).c \ - $(RE).c \ - $(DUMPER).c \ - $(PEEK).c \ - $(B).c \ - $(BYTELOADER).c \ - $(DPROF).c \ - $(GLOB).c \ - $(HOSTNAME).c \ - $(STORABLE).c \ - $(FILTER).c \ - $(ENCODE).c \ - $(MD5).c \ - $(PERLIOSCALAR).c \ - $(MIMEBASE64).c \ - $(TIMEHIRES).c \ - $(CWD).c \ - $(LISTUTIL).c \ - $(PERLIOVIA).c \ - $(XSTYPEMAP).c \ - $(UNICODENORMALIZE).c - -EXTENSION_DLL = \ - $(SOCKET_DLL) \ - $(FCNTL_DLL) \ - $(OPCODE_DLL) \ - $(SDBM_FILE_DLL)\ - $(IO_DLL) \ - $(POSIX_DLL) \ - $(ATTRS_DLL) \ - $(DUMPER_DLL) \ - $(PEEK_DLL) \ - $(B_DLL) \ - $(RE_DLL) \ - $(THREAD_DLL) \ - $(BYTELOADER_DLL) \ - $(DPROF_DLL) \ - $(GLOB_DLL) \ - $(HOSTNAME_DLL) \ - $(STORABLE_DLL) \ - $(FILTER_DLL) \ - $(ENCODE_DLL) \ - $(MD5_DLL) \ - $(PERLIOSCALAR_DLL) \ - $(MIMEBASE64_DLL) \ - $(TIMEHIRES_DLL) \ - $(CWD_DLL) \ - $(LISTUTIL_DLL) \ - $(PERLIOVIA_DLL) \ - $(XSTYPEMAP_DLL) \ - $(UNICODENORMALIZE_DLL) - -POD2HTML = $(PODDIR)\pod2html -POD2MAN = $(PODDIR)\pod2man -POD2LATEX = $(PODDIR)\pod2latex -POD2TEXT = $(PODDIR)\pod2text - -CFG_VARS = \ - "INST_DRV=$(INST_DRV)" \ - "INST_TOP=$(INST_TOP)" \ - "INST_VER=$(INST_VER)" \ - "INST_ARCH=$(INST_ARCH)" \ - "archname=$(ARCHNAME)" \ - "cc=$(CC)" \ - "ld=$(LINK32)" \ - "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \ - "cf_email=$(EMAIL)" \ - "d_crypt=$(D_CRYPT)" \ - "d_mymalloc=$(PERL_MALLOC)" \ - "libs=$(LIBFILES)" \ - "incpath=$(CCINCDIR:"=\")" \ - "libperl=$(PERLIMPLIB:..\=)" \ - "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \ - "libc=$(LIBC)" \ - "make=$(MAKE_BARE)" \ - "use5005threads=$(USE_5005THREADS)" \ - "useithreads=$(USE_ITHREADS)" \ - "usethreads=$(USE_5005THREADS)" \ - "usemultiplicity=$(USE_MULTI)" \ - "useperlio=$(USE_PERLIO)" \ - "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ - "optimize=$(OPTIMIZE:"=\")" - -# -# Top targets -# - -all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \ - $(X2P) Extensions - @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite. - -$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c - -#------------------------------------------------------------ - -$(GLOBEXE) : perlglob$(o) - $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \ - perlglob$(o) setargv$(o) - -perlglob$(o) : perlglob.c - -config.w32 : $(CFGSH_TMPL) - copy $(CFGSH_TMPL) config.w32 - -.\config.h : $(CFGH_TMPL) - -del /f config.h - copy $(CFGH_TMPL) config.h - -..\config.sh : config.w32 $(MINIPERL) config_sh.PL - $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh - -# this target is for when changes to the main config.sh happen -# edit config.{b,v,g}c and make this target once for each supported -# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`) -regen_config_h: - perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh - cd .. - -del /f perl.exe - perl configpm - cd win32 - -del /f $(CFGH_TMPL) - -mkdir $(COREDIR) - -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)" - rename config.h $(CFGH_TMPL) - -$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl - cd .. - miniperl configpm - cd win32 - if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL) - $(XCOPY) ..\*.h $(COREDIR)\*.* - $(XCOPY) *.h $(COREDIR)\*.* - $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.* - $(RCOPY) include $(COREDIR)\*.* - -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" - if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) - -$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) - $(LINK32) -subsystem:console -out:$@ @<< - $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ) -<< - -$(MINIDIR) : - if not exist "$(MINIDIR)" mkdir "$(MINIDIR)" - -$(MINICORE_OBJ) : $(CORE_NOCFG_H) - $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c - -$(MINIWIN32_OBJ) : $(CORE_NOCFG_H) - $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c - -# -DPERL_IMPLICIT_SYS needs C++ for perllib.c -# This is the only file that depends on perlhost.h, vmem.h, and vdir.h -!IF "$(USE_IMP_SYS)" == "define" -perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h - $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c -!ENDIF - -# 1. we don't want to rebuild miniperl.exe when config.h changes -# 2. we don't want to rebuild miniperl.exe with non-default config.h -$(MINI_OBJ) : $(CORE_NOCFG_H) - -$(WIN32_OBJ) : $(CORE_H) -$(CORE_OBJ) : $(CORE_H) -$(DLL_OBJ) : $(CORE_H) -$(X2P_OBJ) : $(CORE_H) - -perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl - $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \ - CCTYPE=$(CCTYPE) > perldll.def - -$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) - $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<< - $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) -<< - $(XCOPY) $(PERLIMPLIB) $(COREDIR) - -$(MINIMOD) : $(MINIPERL) ..\minimod.pl - cd .. - miniperl minimod.pl > lib\ExtUtils\Miniperl.pm - cd win32 - -..\x2p\a2p$(o) : ..\x2p\a2p.c - $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c - -..\x2p\hash$(o) : ..\x2p\hash.c - $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c - -..\x2p\str$(o) : ..\x2p\str.c - $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c - -..\x2p\util$(o) : ..\x2p\util.c - $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c - -..\x2p\walk$(o) : ..\x2p\walk.c - $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c - -$(X2P) : $(MINIPERL) $(X2P_OBJ) - $(MINIPERL) ..\x2p\find2perl.PL - $(MINIPERL) ..\x2p\s2p.PL - $(LINK32) -subsystem:console -out:$@ @<< - $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ) -<< - -perlmain.c : runperl.c - copy runperl.c perlmain.c - -perlmain$(o) : perlmain.c - $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c - -$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES) - $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \ - $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES) - copy $(PERLEXE) $(WPERLEXE) - $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS - copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) - -$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) - if not exist $(AUTODIR) mkdir $(AUTODIR) - cd $(EXTDIR)\$(*B) - ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL - ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL - cd ..\..\win32 - $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) - $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) - cd $(EXTDIR)\$(*B) - $(XSUBPP) dl_win32.xs > $(*B).c - cd ..\..\win32 - -$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs - copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs - -#---------------------------------------------------------------------------------- -Extensions: buildext.pl $(PERLDEP) $(CONFIGPM) - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) - -Extensions_clean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean - -#---------------------------------------------------------------------------------- - -doc: $(PERLEXE) - $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \ - --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \ - --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse - -utils: $(PERLEXE) $(X2P) - cd ..\utils - $(MAKE) PERL=$(MINIPERL) - cd ..\pod - copy ..\README.aix .\perlaix.pod - copy ..\README.amiga .\perlamiga.pod - copy ..\README.apollo .\perlapollo.pod - copy ..\README.beos .\perlbeos.pod - copy ..\README.bs2000 .\perlbs2000.pod - copy ..\README.ce .\perlce.pod - copy ..\README.cygwin .\perlcygwin.pod - copy ..\README.dgux .\perldgux.pod - copy ..\README.dos .\perldos.pod - copy ..\README.epoc .\perlepoc.pod - copy ..\README.hurd .\perlhurd.pod - copy ..\README.hpux .\perlhpux.pod - copy ..\README.machten .\perlmachten.pod - copy ..\README.macos .\perlmacos.pod - copy ..\README.mint .\perlmint.pod - copy ..\README.mpeix .\perlmpeix.pod - copy ..\README.netware .\perlnetware.pod - copy ..\README.os2 .\perlos2.pod - copy ..\README.os390 .\perlos390.pod - copy ..\README.plan9 .\perlplan9.pod - copy ..\README.qnx .\perlqnx.pod - copy ..\README.solaris .\perlsolaris.pod - copy ..\README.tru64 .\perltru64.pod - copy ..\README.uts .\perluts.pod - copy ..\README.vmesa .\perlvmesa.pod - copy ..\vms\perlvms.pod .\perlvms.pod - copy ..\README.vos .\perlvos.pod - copy ..\README.win32 .\perlwin32.pod - $(MAKE) -f ..\win32\pod.mak converters - cd ..\lib - $(PERLEXE) lib_pm.PL - cd ..\win32 - $(PERLEXE) $(PL2BAT) $(UTILS) - -distclean: clean - -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \ - $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) - -del /f *.def *.map - -del /f $(EXTENSION_DLL) - -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm - -del /f $(EXTDIR)\DynaLoader\dl_win32.xs - -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm - -del /f $(LIBDIR)\XSLoader.pm - -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm - -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm - -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm - -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm - -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm - -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm - -del /f $(LIBDIR)\File\Glob.pm - -del /f $(LIBDIR)\Storable.pm - -del /f $(LIBDIR)\Filter\Util\Call.pm - -del /f $(LIBDIR)\Digest\MD5.pm - -del /f $(LIBDIR)\PerlIO\Scalar.pm - -del /f $(LIBDIR)\PerlIO\Via.pm - -del /f $(LIBDIR)\MIME\Base64.pm - -del /f $(LIBDIR)\MIME\QuotedPrint.pm - -del /f $(LIBDIR)\List\Util.pm - -del /f $(LIBDIR)\Scalar\Util.pm - -del /f $(LIBDIR)\Time\HiRes.pm - -del /f $(LIBDIR)\XS\Typemap.pm - -del /f $(LIBDIR)\Unicode\Normalize.pm - -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO - -rmdir /s $(LIBDIR)\IO - -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread - -rmdir /s $(LIBDIR)\Thread - -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B - -rmdir /s $(LIBDIR)\B - -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data - -rmdir /s $(LIBDIR)\Data - -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util - -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest - -rmdir /s $(LIBDIR)\Digest - -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME - -rmdir /s $(LIBDIR)\MIME - -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List - -rmdir /s $(LIBDIR)\List - -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar - -rmdir /s $(LIBDIR)\Scalar - -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS - -rmdir /s $(LIBDIR)\XS - cd $(PODDIR) - -del /f *.html *.bat checkpods \ - perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \ - perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \ - perldos.pod perlepoc.pod perlhurd.pod \ - perlhpux.pod perlmachten.pod \ - perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \ - perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \ - perlsolaris.pod perltru64.pod perluts.pod \ - perlvmesa.pod perlvms.pod perlvos.pod \ - perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \ - podchecker podselect - cd ..\utils - -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp - -del /f *.bat - cd ..\win32 - cd ..\x2p - -del /f find2perl s2p - -del /f *.bat - cd ..\win32 - -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new - -del /f $(CONFIGPM) - -del /f bin\*.bat - cd $(EXTDIR) - -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib - cd ..\win32 - -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) - -rmdir /s $(AUTODIR) - -if exist $(COREDIR) rmdir /s /q $(COREDIR) - -rmdir /s $(COREDIR) - -install : all installbare installhtml - -installbare : utils - $(PERLEXE) ..\installperl - if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.* - $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.* - $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.* - -installhtml : doc - $(RCOPY) html\*.* $(INST_HTML)\*.* - -inst_lib : $(CONFIGPM) - copy splittree.pl .. - $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) - $(RCOPY) ..\lib $(INST_LIB)\*.* - -minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils - $(XCOPY) $(MINIPERL) ..\t\perl.exe - $(XCOPY) $(GLOBEXE) ..\t\$(NULL) - attrib -r ..\t\*.* - copy test ..\t - cd ..\t - $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t - cd ..\win32 - -test-prep : all utils - $(XCOPY) $(PERLEXE) ..\t\$(NULL) - $(XCOPY) $(PERLDLL) ..\t\$(NULL) - $(XCOPY) $(GLOBEXE) ..\t\$(NULL) - -test : test-prep - cd ..\t - $(PERLEXE) -I..\lib harness - cd ..\win32 - -test-notty : test-prep - set PERL_SKIP_TTY_TEST=1 - cd ..\t - $(PERLEXE) -I..\lib harness - cd ..\win32 - -test-wide : test-prep - set HARNESS_PERL_SWITCHES=-C - cd ..\t - $(PERLEXE) -I..\lib harness - cd ..\win32 - -test-wide-notty : test-prep - set PERL_SKIP_TTY_TEST=1 - set HARNESS_PERL_SWITCHES=-C - cd ..\t - $(PERLEXE) -I..\lib harness - cd ..\win32 - -clean : Extensions_clean - -@$(DEL) miniperlmain$(o) - -@$(DEL) $(MINIPERL) - -@$(DEL) perlglob$(o) - -@$(DEL) perlmain$(o) - -@$(DEL) config.w32 - -@$(DEL) config.h - -@$(DEL) $(GLOBEXE) - -@$(DEL) $(PERLEXE) - -@$(DEL) $(WPERLEXE) - -@$(DEL) $(PERLDLL) - -@$(DEL) $(CORE_OBJ) - -if exist $(MINIDIR) rmdir /s /q $(MINIDIR) - -rmdir /s $(MINIDIR) - -@$(DEL) $(WIN32_OBJ) - -@$(DEL) $(DLL_OBJ) - -@$(DEL) $(X2P_OBJ) - -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res - -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat - -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat - -@$(DEL) *.ilk - -@$(DEL) *.pdb - -# Handy way to run perlbug -ok without having to install and run the -# installed perlbug. We don't re-run the tests here - we trust the user. -# Please *don't* use this unless all tests pass. -# If you want to report test failures, use "nmake nok" instead. -ok: utils - $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" - -okfile: utils - $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok - -nok: utils - $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" - -nokfile: utils - $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok +#
+# Makefile to build perl on Windows NT using Microsoft NMAKE.
+# Supported compilers:
+# Visual C++ 5.x (possibly other versions)
+#
+# This is set up to build a perl.exe that runs off a shared library
+# (perl57.dll). Also makes individual DLLs for the XS extensions.
+#
+
+##
+## Make sure you read README.win32 *before* you mess with anything here!
+##
+
+##
+## Build configuration. Edit the values below to suit your needs.
+##
+
+#
+# Set these to wherever you want "nmake install" to put your
+# newly built perl.
+#
+INST_DRV = c:
+INST_TOP = $(INST_DRV)\perl
+
+#
+# Comment this out if you DON'T want your perl installation to be versioned.
+# This means that the new installation will overwrite any files from the
+# old installation at the same INST_TOP location. Leaving it enabled is
+# the safest route, as perl adds the extra version directory to all the
+# locations it installs files to. If you disable it, an alternative
+# versioned installation can be obtained by setting INST_TOP above to a
+# path that includes an arbitrary version string.
+#
+#INST_VER = \5.7.2
+
+#
+# Comment this out if you DON'T want your perl installation to have
+# architecture specific components. This means that architecture-
+# specific files will be installed along with the architecture-neutral
+# files. Leaving it enabled is safer and more flexible, in case you
+# want to build multiple flavors of perl and install them together in
+# the same location. Commenting it out gives you a simpler
+# installation that is easier to understand for beginners.
+#
+#INST_ARCH = \$(ARCHNAME)
+
+#
+# uncomment to enable multiple interpreters. This is need for fork()
+# emulation.
+#
+USE_MULTI = define
+
+#
+# Beginnings of interpreter cloning/threads; still very incomplete.
+# This should be enabled to get the fork() emulation. This needs
+# USE_MULTI as well.
+#
+USE_ITHREADS = define
+
+#
+# uncomment to enable the implicit "host" layer for all system calls
+# made by perl. This needs USE_MULTI above. This is also needed to
+# get fork().
+#
+USE_IMP_SYS = define
+
+#
+# uncomment to enable the experimental PerlIO I/O subsystem.
+USE_PERLIO = define
+
+#
+# WARNING! This option is deprecated and will eventually go away (enable
+# USE_ITHREADS instead).
+#
+# uncomment to enable threads-capabilities. This is incompatible with
+# USE_ITHREADS, and is only here for people who may have come to rely
+# on the experimental Thread support that was in 5.005.
+#
+#USE_5005THREADS = define
+
+#
+# uncomment one of the following lines if you are using either
+# Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98)
+#
+#CCTYPE = MSVC20
+#CCTYPE = MSVC60
+
+#
+# uncomment next line if you want debug version of perl (big,slow)
+#
+#CFG = Debug
+
+#
+# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
+# It has patches that fix known bugs in older versions of MSVCRT.DLL.
+# This currently requires VC 5.0 with Service Pack 3 or later.
+# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/
+# and follow the directions in the package to install.
+#
+# Not recommended if you have VC 6.x and you're not running Windows 9x.
+#
+#USE_PERLCRT = define
+
+#
+# uncomment to enable linking with setargv.obj under the Visual C
+# compiler. Setting this options enables perl to expand wildcards in
+# arguments, but it may be harder to use alternate methods like
+# File::DosGlob that are more powerful. This option is supported only with
+# Visual C.
+#
+#USE_SETARGV = define
+
+#
+# if you have the source for des_fcrypt(), uncomment this and make sure the
+# file exists (see README.win32). File should be located in the same
+# directory as this file.
+#
+#CRYPT_SRC = fcrypt.c
+
+#
+# if you didn't set CRYPT_SRC and if you have des_fcrypt() available in a
+# library, uncomment this, and make sure the library exists (see README.win32)
+# Specify the full pathname of the library.
+#
+#CRYPT_LIB = fcrypt.lib
+
+#
+# set this if you wish to use perl's malloc
+# WARNING: Turning this on/off WILL break binary compatibility with extensions
+# you may have compiled with/without it. Be prepared to recompile all
+# extensions if you change the default. Currently, this cannot be enabled
+# if you ask for USE_IMP_SYS above.
+#
+#PERL_MALLOC = define
+
+#
+# set the install locations of the compiler include/libraries
+# Running VCVARS32.BAT is *required* when using Visual C.
+# Some versions of Visual C don't define MSVCDIR in the environment,
+# so you may have to set CCHOME explicitly (spaces in the path name should
+# not be quoted)
+#
+#CCHOME = f:\msvc20
+CCHOME = $(MSVCDIR)
+CCINCDIR = $(CCHOME)\include
+CCLIBDIR = $(CCHOME)\lib
+
+#
+# Additional compiler flags can be specified here.
+#
+
+#
+# This should normally be disabled. Adding -DPERL_POLLUTE enables support
+# for old symbols by default, at the expense of extreme pollution. You most
+# probably just want to build modules that won't compile with
+# perl Makefile.PL POLLUTE=1
+# instead of enabling this. Please report such modules to the respective
+# authors.
+#
+#BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE
+
+#
+# This should normally be disabled. Enabling it will disable the File::Glob
+# implementation of CORE::glob.
+#
+#BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB
+
+#
+# This should normally be disabled. Enabling it causes perl to read scripts
+# in text mode (which is the 5.005 behavior) and will break ByteLoader.
+#BUILDOPT = $(BUILDOPT) -DPERL_TEXTMODE_SCRIPTS
+
+#
+# specify semicolon-separated list of extra directories that modules will
+# look for libraries (spaces in path names need not be quoted)
+#
+EXTRALIBDIRS =
+
+#
+# set this to your email address (perl will guess a value from
+# from your loginname and your hostname, which may not be right)
+#
+#EMAIL =
+
+##
+## Build configuration ends.
+##
+
+##################### CHANGE THESE ONLY IF YOU MUST #####################
+
+!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
+D_CRYPT = undef
+!ELSE
+D_CRYPT = define
+CRYPT_FLAG = -DHAVE_DES_FCRYPT
+!ENDIF
+
+!IF "$(PERL_MALLOC)" == ""
+PERL_MALLOC = undef
+!ENDIF
+
+!IF "$(USE_5005THREADS)" == ""
+USE_5005THREADS = undef
+!ENDIF
+
+!IF "$(USE_5005THREADS)" == "define"
+USE_ITHREADS = undef
+!ENDIF
+
+!IF "$(USE_IMP_SYS)" == "define"
+PERL_MALLOC = undef
+!ENDIF
+
+!IF "$(USE_MULTI)" == ""
+USE_MULTI = undef
+!ENDIF
+
+!IF "$(USE_ITHREADS)" == ""
+USE_ITHREADS = undef
+!ENDIF
+
+!IF "$(USE_IMP_SYS)" == ""
+USE_IMP_SYS = undef
+!ENDIF
+
+!IF "$(USE_PERLIO)" == ""
+USE_PERLIO = undef
+!ENDIF
+
+!IF "$(USE_PERLCRT)" == ""
+USE_PERLCRT = undef
+!ENDIF
+
+!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
+USE_MULTI = define
+!ENDIF
+
+!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
+USE_MULTI = define
+USE_5005THREADS = undef
+!ENDIF
+
+!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
+BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+!ENDIF
+
+!IF "$(USE_IMP_SYS)" != "undef"
+BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
+!ENDIF
+
+!IF "$(PROCESSOR_ARCHITECTURE)" == ""
+PROCESSOR_ARCHITECTURE = x86
+!ENDIF
+
+!IF "$(USE_5005THREADS)" == "define"
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
+!ELSE
+!IF "$(USE_MULTI)" == "define"
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+!ELSE
+!IF "$(USE_PERLIO)" == "define"
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+!ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+!ENDIF
+!ENDIF
+!ENDIF
+
+!IF "$(USE_PERLIO)" == "define"
+BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
+!ENDIF
+
+!IF "$(USE_ITHREADS)" == "define"
+ARCHNAME = $(ARCHNAME)-thread
+!ENDIF
+
+# Visual Studio 98 specific
+!IF "$(CCTYPE)" == "MSVC60"
+
+# VC 6.0 can load the socket dll on demand. Makes the test suite
+# run in about 10% less time.
+DELAYLOAD = -DELAYLOAD:wsock32.dll -DELAYLOAD:shell32.dll delayimp.lib
+!ENDIF
+
+ARCHDIR = ..\lib\$(ARCHNAME)
+COREDIR = ..\lib\CORE
+AUTODIR = ..\lib\auto
+LIBDIR = ..\lib
+EXTDIR = ..\ext
+PODDIR = ..\pod
+EXTUTILSDIR = $(LIBDIR)\ExtUtils
+
+#
+INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
+INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
+INST_LIB = $(INST_TOP)$(INST_VER)\lib
+INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
+INST_COREDIR = $(INST_ARCHLIB)\CORE
+INST_POD = $(INST_LIB)\pod
+INST_HTML = $(INST_TOP)$(INST_VER)\html
+
+#
+# Programs to compile, build .lib files and link
+#
+
+CC = cl
+LINK32 = link
+LIB32 = $(LINK32) -lib
+RSC = rc
+
+#
+# Options
+#
+
+INCLUDES = -I$(COREDIR) -I.\include -I. -I..
+#PCHFLAGS = -Fpc:\temp\vcmoduls.pch -YX
+DEFINES = -DWIN32 -D_CONSOLE -DNO_STRICT $(CRYPT_FLAG)
+LOCDEFS = -DPERLDLL -DPERL_CORE
+SUBSYS = console
+CXX_FLAG = -TP -GX
+
+!IF "$(USE_PERLCRT)" != "define"
+LIBC = msvcrt.lib
+!ELSE
+LIBC = PerlCRT.lib
+!ENDIF
+
+PERLEXE_RES =
+PERLDLL_RES =
+
+!IF "$(CFG)" == "Debug"
+! IF "$(CCTYPE)" == "MSVC20"
+OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
+! ELSE
+OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+! ENDIF
+LINK_DBG = -debug -pdb:none
+!ELSE
+# -O1 yields smaller code, which turns out to be faster than -O2
+#OPTIMIZE = -O2 -MD -DNDEBUG
+OPTIMIZE = -O1 -MD -DNDEBUG
+LINK_DBG = -release
+!ENDIF
+
+!IF "$(USE_PERLCRT)" != "define"
+BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
+!ENDIF
+
+LIBBASEFILES = $(CRYPT_LIB) \
+ oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
+ comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
+ netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
+ version.lib odbc32.lib odbccp32.lib
+
+# we add LIBC here, since we may be using PerlCRT.dll
+LIBFILES = $(LIBBASEFILES) $(LIBC)
+
+CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \
+ $(PCHFLAGS) $(OPTIMIZE)
+LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
+ -libpath:"$(INST_COREDIR)" \
+ -machine:$(PROCESSOR_ARCHITECTURE)
+OBJOUT_FLAG = -Fo
+EXEOUT_FLAG = -Fe
+
+CFLAGS_O = $(CFLAGS) $(BUILDOPT)
+
+#################### do not edit below this line #######################
+############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
+
+o = .obj
+
+#
+# Rules
+#
+
+.SUFFIXES : .c $(o) .dll .lib .exe .rc .res
+
+.c$(o):
+ $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
+
+.y.c:
+ $(NOOP)
+
+$(o).dll:
+ $(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
+ -out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
+
+.rc.res:
+ $(RSC) -i.. $<
+
+#
+# various targets
+
+# makedef.pl must be updated if this changes, and this should normally
+# only change when there is an incompatible revision of the public API.
+# XXX so why did we change it from perl56 to perl57?
+PERLIMPLIB = ..\perl57.lib
+PERLDLL = ..\perl57.dll
+
+MINIPERL = ..\miniperl.exe
+MINIDIR = .\mini
+PERLEXE = ..\perl.exe
+WPERLEXE = ..\wperl.exe
+GLOBEXE = ..\perlglob.exe
+CONFIGPM = ..\lib\Config.pm
+MINIMOD = ..\lib\ExtUtils\Miniperl.pm
+X2P = ..\x2p\a2p.exe
+
+# Nominate a target which causes extensions to be re-built
+# This used to be $(PERLEXE), but at worst it is the .dll that they depend
+# on and really only the interface - i.e. the .def file used to export symbols
+# from the .dll
+PERLDEP = perldll.def
+
+PL2BAT = bin\pl2bat.pl
+GLOBBAT = bin\perlglob.bat
+
+UTILS = \
+ ..\utils\h2ph \
+ ..\utils\splain \
+ ..\utils\dprofpp \
+ ..\utils\perlbug \
+ ..\utils\pl2pm \
+ ..\utils\c2ph \
+ ..\utils\h2xs \
+ ..\utils\perldoc \
+ ..\utils\perlcc \
+ ..\utils\perlivp \
+ ..\utils\libnetcfg \
+ ..\pod\checkpods \
+ ..\pod\pod2html \
+ ..\pod\pod2latex \
+ ..\pod\pod2man \
+ ..\pod\pod2text \
+ ..\pod\pod2usage \
+ ..\pod\podchecker \
+ ..\pod\podselect \
+ ..\x2p\find2perl \
+ ..\x2p\s2p \
+ ..\lib\ExtUtils\xsubpp \
+ bin\exetype.pl \
+ bin\runperl.pl \
+ bin\pl2bat.pl \
+ bin\perlglob.pl \
+ bin\search.pl
+
+MAKE = nmake -nologo
+MAKE_BARE = nmake
+
+CFGSH_TMPL = config.vc
+CFGH_TMPL = config_H.vc
+
+XCOPY = xcopy /f /r /i /d
+RCOPY = xcopy /f /r /i /e /d
+NOOP = @echo
+NULL =
+
+DEL = del
+
+#
+# filenames given to xsubpp must have forward slashes (since it puts
+# full pathnames in #line strings)
+XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
+ -C++ -prototypes
+
+MICROCORE_SRC = \
+ ..\av.c \
+ ..\deb.c \
+ ..\doio.c \
+ ..\doop.c \
+ ..\dump.c \
+ ..\globals.c \
+ ..\gv.c \
+ ..\hv.c \
+ ..\locale.c \
+ ..\mg.c \
+ ..\numeric.c \
+ ..\op.c \
+ ..\perl.c \
+ ..\perlapi.c \
+ ..\perly.c \
+ ..\pp.c \
+ ..\pp_ctl.c \
+ ..\pp_hot.c \
+ ..\pp_pack.c \
+ ..\pp_sort.c \
+ ..\pp_sys.c \
+ ..\regcomp.c \
+ ..\regexec.c \
+ ..\run.c \
+ ..\scope.c \
+ ..\sv.c \
+ ..\taint.c \
+ ..\toke.c \
+ ..\universal.c \
+ ..\utf8.c \
+ ..\util.c \
+ ..\xsutils.c
+
+EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
+
+!IF "$(PERL_MALLOC)" == "define"
+EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
+!ENDIF
+
+EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
+
+WIN32_SRC = \
+ .\win32.c \
+ .\win32sck.c \
+ .\win32thread.c
+
+!IF "$(USE_PERLIO)" == "define"
+WIN32_SRC = $(WIN32_SRC) .\win32io.c
+!ENDIF
+
+!IF "$(CRYPT_SRC)" != ""
+WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
+!ENDIF
+
+DLL_SRC = $(DYNALOADER).c
+
+X2P_SRC = \
+ ..\x2p\a2p.c \
+ ..\x2p\hash.c \
+ ..\x2p\str.c \
+ ..\x2p\util.c \
+ ..\x2p\walk.c
+
+CORE_NOCFG_H = \
+ ..\av.h \
+ ..\cop.h \
+ ..\cv.h \
+ ..\dosish.h \
+ ..\embed.h \
+ ..\form.h \
+ ..\gv.h \
+ ..\handy.h \
+ ..\hv.h \
+ ..\iperlsys.h \
+ ..\mg.h \
+ ..\nostdio.h \
+ ..\op.h \
+ ..\opcode.h \
+ ..\perl.h \
+ ..\perlapi.h \
+ ..\perlsdio.h \
+ ..\perlsfio.h \
+ ..\perly.h \
+ ..\pp.h \
+ ..\proto.h \
+ ..\regexp.h \
+ ..\scope.h \
+ ..\sv.h \
+ ..\thread.h \
+ ..\unixish.h \
+ ..\utf8.h \
+ ..\util.h \
+ ..\warnings.h \
+ ..\XSUB.h \
+ ..\EXTERN.h \
+ ..\perlvars.h \
+ ..\intrpvar.h \
+ ..\thrdvar.h \
+ .\include\dirent.h \
+ .\include\netdb.h \
+ .\include\sys\socket.h \
+ .\win32.h
+
+CORE_H = $(CORE_NOCFG_H) .\config.h
+
+MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
+CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
+WIN32_OBJ = $(WIN32_SRC:.c=.obj)
+MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
+ $(MINIDIR)\miniperlmain$(o) \
+ $(MINIDIR)\perlio$(o)
+MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
+MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
+DLL_OBJ = $(DLL_SRC:.c=.obj)
+X2P_OBJ = $(X2P_SRC:.c=.obj)
+
+PERLDLL_OBJ = $(CORE_OBJ)
+PERLEXE_OBJ = perlmain$(o)
+
+PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
+#PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
+
+!IF "$(USE_SETARGV)" != ""
+SETARGV_OBJ = setargv$(o)
+!ENDIF
+
+DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
+SOCKET = $(EXTDIR)\Socket\Socket
+FCNTL = $(EXTDIR)\Fcntl\Fcntl
+OPCODE = $(EXTDIR)\Opcode\Opcode
+SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
+IO = $(EXTDIR)\IO\IO
+POSIX = $(EXTDIR)\POSIX\POSIX
+ATTRS = $(EXTDIR)\attrs\attrs
+THREAD = $(EXTDIR)\Thread\Thread
+B = $(EXTDIR)\B\B
+RE = $(EXTDIR)\re\re
+DUMPER = $(EXTDIR)\Data\Dumper\Dumper
+ERRNO = $(EXTDIR)\Errno\Errno
+PEEK = $(EXTDIR)\Devel\Peek\Peek
+BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
+DPROF = $(EXTDIR)\Devel\DProf\DProf
+GLOB = $(EXTDIR)\File\Glob\Glob
+HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
+STORABLE = $(EXTDIR)\Storable\Storable
+FILTER = $(EXTDIR)\Filter\Util\Call\Call
+ENCODE = $(EXTDIR)\Encode\Encode
+MD5 = $(EXTDIR)\Digest\MD5\MD5
+PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
+MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
+TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
+CWD = $(EXTDIR)\Cwd\Cwd
+LISTUTIL = $(EXTDIR)\List\Util\Util
+PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via
+XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
+UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
+
+SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
+FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
+OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
+SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
+IO_DLL = $(AUTODIR)\IO\IO.dll
+POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
+ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
+THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
+B_DLL = $(AUTODIR)\B\B.dll
+DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
+PEEK_DLL = $(AUTODIR)\Devel\Peek\Peek.dll
+RE_DLL = $(AUTODIR)\re\re.dll
+BYTELOADER_DLL = $(AUTODIR)\ByteLoader\ByteLoader.dll
+DPROF_DLL = $(AUTODIR)\Devel\DProf\DProf.dll
+GLOB_DLL = $(AUTODIR)\File\Glob\Glob.dll
+HOSTNAME_DLL = $(AUTODIR)\Sys\Hostname\Hostname.dll
+STORABLE_DLL = $(AUTODIR)\Storable\Storable.dll
+FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
+ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
+MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
+PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
+MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
+TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
+CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
+LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
+PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll
+XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
+UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
+
+EXTENSION_C = \
+ $(SOCKET).c \
+ $(FCNTL).c \
+ $(OPCODE).c \
+ $(SDBM_FILE).c \
+ $(IO).c \
+ $(POSIX).c \
+ $(ATTRS).c \
+ $(THREAD).c \
+ $(RE).c \
+ $(DUMPER).c \
+ $(PEEK).c \
+ $(B).c \
+ $(BYTELOADER).c \
+ $(DPROF).c \
+ $(GLOB).c \
+ $(HOSTNAME).c \
+ $(STORABLE).c \
+ $(FILTER).c \
+ $(ENCODE).c \
+ $(MD5).c \
+ $(PERLIOSCALAR).c \
+ $(MIMEBASE64).c \
+ $(TIMEHIRES).c \
+ $(CWD).c \
+ $(LISTUTIL).c \
+ $(PERLIOVIA).c \
+ $(XSTYPEMAP).c \
+ $(UNICODENORMALIZE).c
+
+EXTENSION_DLL = \
+ $(SOCKET_DLL) \
+ $(FCNTL_DLL) \
+ $(OPCODE_DLL) \
+ $(SDBM_FILE_DLL)\
+ $(IO_DLL) \
+ $(POSIX_DLL) \
+ $(ATTRS_DLL) \
+ $(DUMPER_DLL) \
+ $(PEEK_DLL) \
+ $(B_DLL) \
+ $(RE_DLL) \
+ $(THREAD_DLL) \
+ $(BYTELOADER_DLL) \
+ $(DPROF_DLL) \
+ $(GLOB_DLL) \
+ $(HOSTNAME_DLL) \
+ $(STORABLE_DLL) \
+ $(FILTER_DLL) \
+ $(ENCODE_DLL) \
+ $(MD5_DLL) \
+ $(PERLIOSCALAR_DLL) \
+ $(MIMEBASE64_DLL) \
+ $(TIMEHIRES_DLL) \
+ $(CWD_DLL) \
+ $(LISTUTIL_DLL) \
+ $(PERLIOVIA_DLL) \
+ $(XSTYPEMAP_DLL) \
+ $(UNICODENORMALIZE_DLL)
+
+POD2HTML = $(PODDIR)\pod2html
+POD2MAN = $(PODDIR)\pod2man
+POD2LATEX = $(PODDIR)\pod2latex
+POD2TEXT = $(PODDIR)\pod2text
+
+CFG_VARS = \
+ "INST_DRV=$(INST_DRV)" \
+ "INST_TOP=$(INST_TOP)" \
+ "INST_VER=$(INST_VER)" \
+ "INST_ARCH=$(INST_ARCH)" \
+ "archname=$(ARCHNAME)" \
+ "cc=$(CC)" \
+ "ld=$(LINK32)" \
+ "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
+ "cf_email=$(EMAIL)" \
+ "d_crypt=$(D_CRYPT)" \
+ "d_mymalloc=$(PERL_MALLOC)" \
+ "libs=$(LIBFILES)" \
+ "incpath=$(CCINCDIR:"=\")" \
+ "libperl=$(PERLIMPLIB:..\=)" \
+ "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \
+ "libc=$(LIBC)" \
+ "make=$(MAKE_BARE)" \
+ "use5005threads=$(USE_5005THREADS)" \
+ "useithreads=$(USE_ITHREADS)" \
+ "usethreads=$(USE_5005THREADS)" \
+ "usemultiplicity=$(USE_MULTI)" \
+ "useperlio=$(USE_PERLIO)" \
+ "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
+ "optimize=$(OPTIMIZE:"=\")"
+
+#
+# Top targets
+#
+
+all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) \
+ $(X2P) Extensions
+ @echo Everything is up to date. '$(MAKE_BARE) test' to run test suite.
+
+$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
+
+#------------------------------------------------------------
+
+$(GLOBEXE) : perlglob$(o)
+ $(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
+ perlglob$(o) setargv$(o)
+
+perlglob$(o) : perlglob.c
+
+config.w32 : $(CFGSH_TMPL)
+ copy $(CFGSH_TMPL) config.w32
+
+.\config.h : $(CFGH_TMPL)
+ -del /f config.h
+ copy $(CFGH_TMPL) config.h
+
+..\config.sh : config.w32 $(MINIPERL) config_sh.PL
+ $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
+
+# this target is for when changes to the main config.sh happen
+# edit config.{b,v,g}c and make this target once for each supported
+# compiler (e.g. `nmake CCTYPE=BORLAND regen_config_h`)
+regen_config_h:
+ perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+ cd ..
+ -del /f perl.exe
+ perl configpm
+ cd win32
+ -del /f $(CFGH_TMPL)
+ -mkdir $(COREDIR)
+ -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
+ rename config.h $(CFGH_TMPL)
+
+$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
+ cd ..
+ miniperl configpm
+ cd win32
+ if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
+ $(XCOPY) ..\*.h $(COREDIR)\*.*
+ $(XCOPY) *.h $(COREDIR)\*.*
+ $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
+ $(RCOPY) include $(COREDIR)\*.*
+ -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
+ if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
+
+$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
+ $(LINK32) -subsystem:console -out:$@ @<<
+ $(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
+<<
+
+$(MINIDIR) :
+ if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
+
+$(MINICORE_OBJ) : $(CORE_NOCFG_H)
+ $(CC) -c $(CFLAGS) -DPERL_EXTERNAL_GLOB $(OBJOUT_FLAG)$@ ..\$(*F).c
+
+$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
+ $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
+
+# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
+# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
+!IF "$(USE_IMP_SYS)" == "define"
+perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
+ $(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
+!ENDIF
+
+# 1. we don't want to rebuild miniperl.exe when config.h changes
+# 2. we don't want to rebuild miniperl.exe with non-default config.h
+$(MINI_OBJ) : $(CORE_NOCFG_H)
+
+$(WIN32_OBJ) : $(CORE_H)
+$(CORE_OBJ) : $(CORE_H)
+$(DLL_OBJ) : $(CORE_H)
+$(X2P_OBJ) : $(CORE_H)
+
+perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
+ $(MINIPERL) -w ..\makedef.pl PLATFORM=win32 $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
+ CCTYPE=$(CCTYPE) > perldll.def
+
+$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
+ $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @<<
+ $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
+<<
+ $(XCOPY) $(PERLIMPLIB) $(COREDIR)
+
+$(MINIMOD) : $(MINIPERL) ..\minimod.pl
+ cd ..
+ miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
+ cd win32
+
+..\x2p\a2p$(o) : ..\x2p\a2p.c
+ $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
+
+..\x2p\hash$(o) : ..\x2p\hash.c
+ $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
+
+..\x2p\str$(o) : ..\x2p\str.c
+ $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
+
+..\x2p\util$(o) : ..\x2p\util.c
+ $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
+
+..\x2p\walk$(o) : ..\x2p\walk.c
+ $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
+
+$(X2P) : $(MINIPERL) $(X2P_OBJ)
+ $(MINIPERL) ..\x2p\find2perl.PL
+ $(MINIPERL) ..\x2p\s2p.PL
+ $(LINK32) -subsystem:console -out:$@ @<<
+ $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
+<<
+
+perlmain.c : runperl.c
+ copy runperl.c perlmain.c
+
+perlmain$(o) : perlmain.c
+ $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
+
+$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
+ $(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
+ $(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
+ copy $(PERLEXE) $(WPERLEXE)
+ $(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
+ copy splittree.pl ..
+ $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
+
+$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
+ if not exist $(AUTODIR) mkdir $(AUTODIR)
+ cd $(EXTDIR)\$(*B)
+ ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
+ ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
+ cd ..\..\win32
+ $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
+ $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
+ cd $(EXTDIR)\$(*B)
+ $(XSUBPP) dl_win32.xs > $(*B).c
+ cd ..\..\win32
+
+$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
+ copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+
+#----------------------------------------------------------------------------------
+Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
+ $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
+
+Extensions_clean:
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
+
+#----------------------------------------------------------------------------------
+
+doc: $(PERLEXE)
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
+ --podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
+ --libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
+
+utils: $(PERLEXE) $(X2P)
+ cd ..\utils
+ $(MAKE) PERL=$(MINIPERL)
+ cd ..\pod
+ copy ..\README.aix .\perlaix.pod
+ copy ..\README.amiga .\perlamiga.pod
+ copy ..\README.apollo .\perlapollo.pod
+ copy ..\README.beos .\perlbeos.pod
+ copy ..\README.bs2000 .\perlbs2000.pod
+ copy ..\README.ce .\perlce.pod
+ copy ..\README.cygwin .\perlcygwin.pod
+ copy ..\README.dgux .\perldgux.pod
+ copy ..\README.dos .\perldos.pod
+ copy ..\README.epoc .\perlepoc.pod
+ copy ..\README.hurd .\perlhurd.pod
+ copy ..\README.hpux .\perlhpux.pod
+ copy ..\README.machten .\perlmachten.pod
+ copy ..\README.macos .\perlmacos.pod
+ copy ..\README.mint .\perlmint.pod
+ copy ..\README.mpeix .\perlmpeix.pod
+ copy ..\README.netware .\perlnetware.pod
+ copy ..\README.os2 .\perlos2.pod
+ copy ..\README.os390 .\perlos390.pod
+ copy ..\README.plan9 .\perlplan9.pod
+ copy ..\README.qnx .\perlqnx.pod
+ copy ..\README.solaris .\perlsolaris.pod
+ copy ..\README.tru64 .\perltru64.pod
+ copy ..\README.uts .\perluts.pod
+ copy ..\README.vmesa .\perlvmesa.pod
+ copy ..\vms\perlvms.pod .\perlvms.pod
+ copy ..\README.vos .\perlvos.pod
+ copy ..\README.win32 .\perlwin32.pod
+ $(MAKE) -f ..\win32\pod.mak converters
+ cd ..\lib
+ $(PERLEXE) lib_pm.PL
+ cd ..\win32
+ $(PERLEXE) $(PL2BAT) $(UTILS)
+
+distclean: clean
+ -del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
+ $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
+ -del /f *.def *.map
+ -del /f $(EXTENSION_DLL)
+ -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
+ -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
+ -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
+ -del /f $(LIBDIR)\XSLoader.pm
+ -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
+ -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
+ -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
+ -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
+ -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
+ -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
+ -del /f $(LIBDIR)\File\Glob.pm
+ -del /f $(LIBDIR)\Storable.pm
+ -del /f $(LIBDIR)\Filter\Util\Call.pm
+ -del /f $(LIBDIR)\Digest\MD5.pm
+ -del /f $(LIBDIR)\PerlIO\Scalar.pm
+ -del /f $(LIBDIR)\PerlIO\Via.pm
+ -del /f $(LIBDIR)\MIME\Base64.pm
+ -del /f $(LIBDIR)\MIME\QuotedPrint.pm
+ -del /f $(LIBDIR)\List\Util.pm
+ -del /f $(LIBDIR)\Scalar\Util.pm
+ -del /f $(LIBDIR)\Time\HiRes.pm
+ -del /f $(LIBDIR)\XS\Typemap.pm
+ -del /f $(LIBDIR)\Unicode\Normalize.pm
+ -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
+ -rmdir /s $(LIBDIR)\IO
+ -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
+ -rmdir /s $(LIBDIR)\Thread
+ -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
+ -rmdir /s $(LIBDIR)\B
+ -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
+ -rmdir /s $(LIBDIR)\Data
+ -if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
+ -if exist $(LIBDIR)\Digest rmdir /s /q $(LIBDIR)\Digest
+ -rmdir /s $(LIBDIR)\Digest
+ -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
+ -rmdir /s $(LIBDIR)\MIME
+ -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
+ -rmdir /s $(LIBDIR)\List
+ -if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
+ -rmdir /s $(LIBDIR)\Scalar
+ -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
+ -rmdir /s $(LIBDIR)\XS
+ cd $(PODDIR)
+ -del /f *.html *.bat checkpods \
+ perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
+ perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
+ perldos.pod perlepoc.pod perlhurd.pod \
+ perlhpux.pod perlmachten.pod \
+ perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
+ perlos2.pod perlos390.pod perlplan9.pod perlqnx.pod \
+ perlsolaris.pod perltru64.pod perluts.pod \
+ perlvmesa.pod perlvms.pod perlvos.pod \
+ perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
+ podchecker podselect
+ cd ..\utils
+ -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc perlivp dprofpp
+ -del /f *.bat
+ cd ..\win32
+ cd ..\x2p
+ -del /f find2perl s2p
+ -del /f *.bat
+ cd ..\win32
+ -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
+ -del /f $(CONFIGPM)
+ -del /f bin\*.bat
+ cd $(EXTDIR)
+ -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
+ cd ..\win32
+ -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
+ -rmdir /s $(AUTODIR)
+ -if exist $(COREDIR) rmdir /s /q $(COREDIR)
+ -rmdir /s $(COREDIR)
+
+install : all installbare installhtml
+
+installbare : utils
+ $(PERLEXE) ..\installperl
+ if exist $(WPERLEXE) $(XCOPY) $(WPERLEXE) $(INST_BIN)\*.*
+ $(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
+ $(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
+
+installhtml : doc
+ $(RCOPY) html\*.* $(INST_HTML)\*.*
+
+inst_lib : $(CONFIGPM)
+ copy splittree.pl ..
+ $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
+ $(RCOPY) ..\lib $(INST_LIB)\*.*
+
+minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils
+ $(XCOPY) $(MINIPERL) ..\t\perl.exe
+ $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
+ attrib -r ..\t\*.*
+ copy test ..\t
+ cd ..\t
+ $(MINIPERL) -I..\lib test base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t
+ cd ..\win32
+
+test-prep : all utils
+ $(XCOPY) $(PERLEXE) ..\t\$(NULL)
+ $(XCOPY) $(PERLDLL) ..\t\$(NULL)
+ $(XCOPY) $(GLOBEXE) ..\t\$(NULL)
+
+test : test-prep
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+test-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+test-wide : test-prep
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+test-wide-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+clean : Extensions_clean
+ -@$(DEL) miniperlmain$(o)
+ -@$(DEL) $(MINIPERL)
+ -@$(DEL) perlglob$(o)
+ -@$(DEL) perlmain$(o)
+ -@$(DEL) config.w32
+ -@$(DEL) config.h
+ -@$(DEL) $(GLOBEXE)
+ -@$(DEL) $(PERLEXE)
+ -@$(DEL) $(WPERLEXE)
+ -@$(DEL) $(PERLDLL)
+ -@$(DEL) $(CORE_OBJ)
+ -if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
+ -rmdir /s $(MINIDIR)
+ -@$(DEL) $(WIN32_OBJ)
+ -@$(DEL) $(DLL_OBJ)
+ -@$(DEL) $(X2P_OBJ)
+ -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
+ -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
+ -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
+ -@$(DEL) *.ilk
+ -@$(DEL) *.pdb
+
+# Handy way to run perlbug -ok without having to install and run the
+# installed perlbug. We don't re-run the tests here - we trust the user.
+# Please *don't* use this unless all tests pass.
+# If you want to report test failures, use "nmake nok" instead.
+ok: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)"
+
+okfile: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -ok -s "(UNINSTALLED)" -F perl.ok
+
+nok: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)"
+
+nokfile: utils
+ $(PERLEXE) -I..\lib ..\utils\perlbug -nok -s "(UNINSTALLED)" -F perl.nok
diff --git a/win32/config_H.bc b/win32/config_H.bc index a8b039b971..631e06d4b6 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -980,7 +980,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1011,8 +1011,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ /* PERL_BINCOMPAT_5005: * This symbol, if defined, indicates that this version of Perl should be @@ -2959,8 +2959,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.7.2\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.7.2")) /**/ +#define PRIVLIB "c:\\perl\\5.7.3\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.7.3")) /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -3063,7 +3063,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3086,8 +3086,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\5.7.2\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.7.2")) /**/ +#define SITELIB "c:\\perl\\site\\5.7.3\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.7.3")) /**/ #define SITELIB_STEM "" /**/ /* Size_t_size: @@ -3324,7 +3324,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread for older + * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3343,7 +3343,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.7.2\\lib for older directories across major versions + * search in c:\\perl\\site\\5.7.3\\lib for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's diff --git a/win32/config_H.gc b/win32/config_H.gc index c15dba1c9c..2c39f80728 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -980,7 +980,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1011,8 +1011,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ /* PERL_BINCOMPAT_5005: * This symbol, if defined, indicates that this version of Perl should be @@ -2959,8 +2959,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.7.2\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.7.2")) /**/ +#define PRIVLIB "c:\\perl\\5.7.3\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.7.3")) /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -3063,7 +3063,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3086,8 +3086,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\5.7.2\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.7.2")) /**/ +#define SITELIB "c:\\perl\\site\\5.7.3\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.7.3")) /**/ #define SITELIB_STEM "" /**/ /* Size_t_size: @@ -3324,7 +3324,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread for older + * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3343,7 +3343,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.7.2\\lib for older directories across major versions + * search in c:\\perl\\site\\5.7.3\\lib for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's diff --git a/win32/config_H.vc b/win32/config_H.vc index 58b22db890..e378f5a7ae 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -980,7 +980,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define ARCHLIB "c:\\perl\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1011,8 +1011,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ -#define BIN_EXP "c:\\perl\\5.7.2\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ +#define BIN_EXP "c:\\perl\\5.7.3\\bin\\MSWin32-x86-multi-thread" /**/ /* PERL_BINCOMPAT_5005: * This symbol, if defined, indicates that this version of Perl should be @@ -2959,8 +2959,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.7.2\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.7.2")) /**/ +#define PRIVLIB "c:\\perl\\5.7.3\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.7.3")) /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -3063,7 +3063,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread" /**/ +#define SITEARCH "c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3086,8 +3086,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\5.7.2\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.7.2")) /**/ +#define SITELIB "c:\\perl\\site\\5.7.3\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.7.3")) /**/ #define SITELIB_STEM "" /**/ /* Size_t_size: @@ -3324,7 +3324,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.2\\lib\\MSWin32-x86-multi-thread for older + * lib/lib.pm will automatically search in c:\\perl\\site\\5.7.3\\lib\\MSWin32-x86-multi-thread for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3343,7 +3343,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.7.2\\lib for older directories across major versions + * search in c:\\perl\\site\\5.7.3\\lib for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's diff --git a/wince/Makefile.ce b/wince/Makefile.ce index e5fefa9804..f95c49c87d 100644 --- a/wince/Makefile.ce +++ b/wince/Makefile.ce @@ -4,7 +4,7 @@ SRCDIR = .. PV = 57 -INST_VER = 5.7.2 +INST_VER = 5.7.3 PERLCEDIR = H:\src\wince\perl\wince WCEROOT = N:\Windows CE Tools WCEROOT = D:\Windows CE Tools diff --git a/wince/config.h b/wince/config.h index 9f0710a049..4962af77b0 100644 --- a/wince/config.h +++ b/wince/config.h @@ -1021,7 +1021,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "5.7.2\\lib" /**/ +#define ARCHLIB "5.7.3\\lib" /**/ /*#define ARCHLIB_EXP "" /**/ /* ARCHNAME: @@ -1052,8 +1052,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "5.7.2\\bin" /**/ -#define BIN_EXP "5.7.2\\bin" /**/ +#define BIN "5.7.3\\bin" /**/ +#define BIN_EXP "5.7.3\\bin" /**/ /* PERL_BINCOMPAT_5005: * This symbol, if defined, indicates that this version of Perl should be @@ -2894,8 +2894,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "5.7.2\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.7.2")) /**/ +#define PRIVLIB "5.7.3\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.7.3")) /**/ /* PTRSIZE: * This symbol contains the size of a pointer, so that the C preprocessor @@ -2998,7 +2998,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "\\site5.7.2\\lib" /**/ +#define SITEARCH "\\site5.7.3\\lib" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -3021,8 +3021,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "\\site5.7.2\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.7.2")) /**/ +#define SITELIB "\\site5.7.3\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.7.3")) /**/ #define SITELIB_STEM "" /**/ /* Size_t_size: @@ -3259,7 +3259,7 @@ /* PERL_XS_APIVERSION: * This variable contains the version of the oldest perl binary * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in \\site5.7.2\\lib for older + * lib/lib.pm will automatically search in \\site5.7.3\\lib for older * directories across major versions back to xs_apiversion. * This is only useful if you have a perl library directory tree * structured like the default one. @@ -3278,7 +3278,7 @@ * compatible with the present perl. (That is, pure perl modules * written for pm_apiversion will still work for the current * version). perl.c:incpush() and lib/lib.pm will automatically - * search in \\site5.7.2\\lib for older directories across major versions + * search in \\site5.7.3\\lib for older directories across major versions * back to pm_apiversion. This is only useful if you have a perl * library directory tree structured like the default one. The * versioned site_perl library was introduced in 5.005, so that's |