Integrate mainline
Nick Ing-Simmons [Mon, 30 Jul 2001 06:52:42 +0000 (06:52 +0000)]
p4raw-id: //depot/perlio@11499

75 files changed:
Changes
Configure
INSTALL
MANIFEST
Makefile.SH
Porting/makerel
Porting/pumpkin.pod
Porting/repository.pod
README.macos
README.win32
cflags.SH
configpm
embed.h
embed.pl
ext/B/Deparse.t
ext/B/O.pm
ext/DB_File/t/db-btree.t
ext/DB_File/t/db-hash.t
ext/DB_File/t/db-recno.t
ext/Filter/t/call.t
ext/NDBM_File/ndbm.t
ext/POSIX/POSIX.pod
ext/POSIX/POSIX.t
ext/Time/HiRes/HiRes.xs
global.sym
hints/darwin.sh
installperl
iperlsys.h
lib/ExtUtils/MM_Unix.pm
lib/ExtUtils/MakeMaker.pm
lib/Pod/Man.pm
lib/Search/Dict.pm
lib/Test.pm
lib/Test/t/mix.t
lib/Test/t/success.t
lib/Test/t/todo.t
lib/UnicodeCD.pm
lib/UnicodeCD.t
lib/constant.pm
lib/perl5db.pl
macos/MacPerlTests.cmd [new file with mode: 0644]
macos/xsubpp.patch [new file with mode: 0644]
makedef.pl
mg.c
miniperlmain.c
numeric.c
objXSUB.h
op.c
os2/Makefile.SHs
os2/OS2/REXX/t/rx_vrexx.t
os2/os2.c
os2/os2ish.h
os2/perlrexx.c [new file with mode: 0644]
patchlevel.h
perl.c
perl.h
perlapi.c
pod/perlfaq9.pod
pod/perlfunc.pod
pod/perlguts.pod
pod/perlhack.pod
pod/perlport.pod
pod/perlvar.pod
pp.c
pp_sys.c
proto.h
regcomp.h
regexec.c
t/io/fs.t
t/op/split.t
t/op/write.t
thread.h
util.c
vms/test.com
win32/sync_ext.pl [moved from win32/sncfnmcs.pl with 92% similarity]

diff --git a/Changes b/Changes
index bc65dea..c30f0e1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -31,6 +31,905 @@ or any other branch.
 Version v5.7.2         Development release working toward v5.8
 --------------
 ____________________________________________________________________________
+[ 11497] By: jhi                                   on 2001/07/30  03:45:32
+        Log: Now Configure -Dextras=Foo::Bar and "make install" will
+             fetch and install Foo::Bar.
+     Branch: perl
+          ! Makefile.SH
+____________________________________________________________________________
+[ 11496] By: jhi                                   on 2001/07/30  03:18:28
+        Log: Metaconfig unit change for #11495.
+     Branch: metaconfig/U/perl
+          ! Extras.U
+____________________________________________________________________________
+[ 11495] By: jhi                                   on 2001/07/30  03:18:01
+        Log: extras.make, extras.test, and extras.install make targets.
+     Branch: perl
+          ! Configure Makefile.SH
+____________________________________________________________________________
+[ 11494] By: jhi                                   on 2001/07/30  01:37:35
+        Log: Metaconfig unit change for #11493.
+     Branch: metaconfig/U/perl
+          ! Extras.U
+____________________________________________________________________________
+[ 11493] By: jhi                                   on 2001/07/30  01:37:14
+        Log: Better to have the list of extras in $extras than 'define'.
+     Branch: perl
+          ! Configure
+____________________________________________________________________________
+[ 11492] By: jhi                                   on 2001/07/30  01:33:16
+        Log: The metaconfig unit change for #11490.
+     Branch: metaconfig/U/perl
+          + Extras.U
+____________________________________________________________________________
+[ 11491] By: jhi                                   on 2001/07/30  01:32:54
+        Log: Missed from #11490 (the required dependency).
+     Branch: perl
+          ! Makefile.SH
+____________________________________________________________________________
+[ 11490] By: jhi                                   on 2001/07/30  01:32:02
+        Log: Add the support of asking for extra modules or bundles of modules
+             to be fetched from the CPAN and installed as a part of the Perl
+             build process.  None of this installation is yet really done;
+             only the list is asked, and saved away in extras.lst for
+             the build and installation process to worry about later.
+     Branch: perl
+          ! Configure
+____________________________________________________________________________
+[ 11489] By: jhi                                   on 2001/07/29  22:15:25
+        Log: Beginnings of better Inf and NaN support.
+             At least toke.c and sv.c still need quite a bit of work.
+     Branch: perl
+          ! numeric.c perl.h
+____________________________________________________________________________
+[ 11488] By: jhi                                   on 2001/07/29  21:18:57
+        Log: Top-level Makefile didn't honour OPTIMIZE.
+     Branch: perl
+          ! Makefile.SH
+____________________________________________________________________________
+[ 11487] By: jhi                                   on 2001/07/29  20:56:04
+        Log: Update Changes.
+     Branch: perl
+          ! Changes patchlevel.h
+____________________________________________________________________________
+[ 11486] By: jhi                                   on 2001/07/29  20:38:09
+        Log: Use Search::Dict 1.02 interface for charinfo().
+     Branch: perl
+          ! lib/UnicodeCD.pm
+____________________________________________________________________________
+[ 11485] By: jhi                                   on 2001/07/29  20:37:11
+        Log: Now also allow transforming the read lines before comparing them.
+             (This will help UnicodeCD.) 
+     Branch: perl
+          ! lib/Search/Dict.pm
+____________________________________________________________________________
+[ 11484] By: jhi                                   on 2001/07/29  20:03:13
+        Log: Remove tiehandle code.
+     Branch: perl
+          ! lib/UnicodeCD.pm
+____________________________________________________________________________
+[ 11483] By: jhi                                   on 2001/07/29  19:59:02
+        Log: Allow specifying a comparison function for Search::Dict::look().
+     Branch: perl
+          ! lib/Search/Dict.pm
+____________________________________________________________________________
+[ 11482] By: jhi                                   on 2001/07/29  18:55:04
+        Log: Small UnicodeCD tweaks.
+     Branch: perl
+          ! lib/UnicodeCD.pm lib/UnicodeCD.t
+____________________________________________________________________________
+[ 11481] By: jhi                                   on 2001/07/29  17:14:19
+        Log: Subject: [PATCH @11446] UnicodeCD::charinfo
+             From: SADAHIRO Tomoyuki <BQW10602@nifty.com>
+             Date: Tue, 24 Jul 2001 01:51:32 +0900
+             Message-Id: <20010724015114.CF4D.BQW10602@nifty.com>
+     Branch: perl
+          ! lib/UnicodeCD.pm lib/UnicodeCD.t
+____________________________________________________________________________
+[ 11480] By: jhi                                   on 2001/07/29  16:55:58
+        Log: Subject: [PATCH] installperl
+             From: Wilfredo Sánchez <wsanchez@MIT.EDU>
+             Date: Fri, 27 Jul 2001 19:05:04 -0700
+             Message-Id: <F7912758-82FC-11D5-BFC6-003065D59FBA@thor.sbay.org>
+     Branch: perl
+          ! installperl
+____________________________________________________________________________
+[ 11479] By: jhi                                   on 2001/07/29  16:52:52
+        Log: Subject: [PATCH] Set proper compatibility versions in core
+             From: Wilfredo Sánchez <wsanchez@MIT.EDU>
+             Date: Fri, 27 Jul 2001 20:01:49 -0700
+             Message-Id: <E3A6C66A-8304-11D5-BFC6-003065D59FBA@thor.sbay.org>
+     Branch: perl
+          ! Makefile.SH
+____________________________________________________________________________
+[ 11478] By: jhi                                   on 2001/07/29  16:50:55
+        Log: Metaconfig unit change for #11477.
+     Branch: metaconfig/U/perl
+          ! dlsrc.U
+____________________________________________________________________________
+[ 11477] By: jhi                                   on 2001/07/29  16:50:35
+        Log: Subject: [PATCH] Darwin: -fpic not so good
+             From: =?iso-8859-1?Q?Wilfredo_S=E1nchez?= <wsanchez@MIT.EDU>
+             Date: Fri, 27 Jul 2001 18:57:38 -0700
+             Message-Id: <EC1496A6-82FB-11D5-BFC6-003065D59FBA@thor.sbay.org>
+     Branch: perl
+          ! Configure
+____________________________________________________________________________
+[ 11476] By: jhi                                   on 2001/07/29  16:44:03
+        Log: Subject: [PATCH] Clean up Darwin hints
+             From: =?iso-8859-1?Q?Wilfredo_S=E1nchez?= <wsanchez@MIT.EDU>
+             Date: Fri, 27 Jul 2001 19:13:15 -0700
+             Message-Id: <1A70CA3F-82FE-11D5-BFC6-003065D59FBA@thor.sbay.org>
+     Branch: perl
+          ! hints/darwin.sh
+____________________________________________________________________________
+[ 11475] By: jhi                                   on 2001/07/29  16:28:45
+        Log: Subject: [PATCH split()] split()'s unused captures should be undef, not ''
+             From: "Jeff 'japhy/Marillion' Pinyan" <jeffp@crusoe.net>
+             Date: Fri, 27 Jul 2001 14:00:37 -0400 (EDT)
+             Message-ID: <Pine.GSO.4.21.0107271358310.28213-100000@crusoe.crusoe.net>
+     Branch: perl
+          ! pod/perlfunc.pod pp.c t/op/split.t
+____________________________________________________________________________
+[ 11474] By: jhi                                   on 2001/07/29  16:27:54
+        Log: Subject: [PATCH perlvar.pod] $^N foolery as well
+             From: "Jeff 'japhy/Marillion' Pinyan" <jeffp@crusoe.net>
+             Date: Thu, 26 Jul 2001 20:03:12 -0400 (EDT)
+             Message-ID: <Pine.GSO.4.21.0107261958380.28213-100000@crusoe.crusoe.net>
+     Branch: perl
+          ! pod/perlvar.pod
+____________________________________________________________________________
+[ 11473] By: jhi                                   on 2001/07/29  16:27:00
+        Log: Subject: [PATCH] fixes to constant.pm documentation
+             From: Ilmari Karonen <iltzu@sci.fi>
+             Date: Tue, 24 Jul 2001 16:44:24 +0300 (EET DST)
+             Message-ID: <Pine.SOL.3.96.1010724163055.6822A-100000@simpukka>
+     Branch: perl
+          ! lib/constant.pm
+____________________________________________________________________________
+[ 11472] By: jhi                                   on 2001/07/28  18:39:03
+        Log: Subject: [DOC PATCH bleadperl] perlport.pod and C<..">>"...>
+             From: "Philip Newton" <Philip.Newton@gmx.net>
+             Date: Fri, 27 Jul 2001 07:51:10 +0200
+             Message-Id: <200107270548.f6R5mJL09063@chaos.wustl.edu>
+     Branch: perl
+          ! pod/perlport.pod
+____________________________________________________________________________
+[ 11471] By: nick                                  on 2001/07/26  06:23:32
+        Log: Subject:  [PATCH] Doc fix for perlguts / threading
+             From:  Arthur Bergman <arthur@contiller.se>
+             Date:  Wed, 25 Jul 2001 11:28:23 +0200
+             Message-Id:  <B7845DD6.2812%arthur@contiller.se>
+     Branch: perl
+          ! pod/perlguts.pod
+____________________________________________________________________________
+[ 11470] By: nick                                  on 2001/07/26  06:21:06
+        Log: Subject:  [DOC PATCH bleadperl] INSTALL: README for Unix systems exist
+             From:  Philip Newton <Philip.Newton@gmx.net>
+             Date:  Wed, 25 Jul 2001 08:19:47 +0200
+             Message-Id:  <E15PHy4-0000cR-00@mserv1f.vianw.co.uk>
+     Branch: perl
+          ! INSTALL
+____________________________________________________________________________
+[ 11469] By: nick                                  on 2001/07/26  06:20:25
+        Log: Subject:  [DOC PATCH bleadperl] typo in INSTALL?
+             From:  Philip Newton <Philip.Newton@gmx.net>
+             Date:  Wed, 25 Jul 2001 08:12:48 +0200
+             Message-Id:  <E15PHrJ-00003f-00@mserv1f.vianw.co.uk>
+     Branch: perl
+          ! INSTALL
+____________________________________________________________________________
+[ 11468] By: jhi                                   on 2001/07/25  01:39:11
+        Log: More +x.
+     Branch: perl
+          ! Porting/makerel
+____________________________________________________________________________
+[ 11467] By: jhi                                   on 2001/07/24  16:05:34
+        Log: Update Changes.
+     Branch: perl
+          ! Changes patchlevel.h
+____________________________________________________________________________
+[ 11466] By: jhi                                   on 2001/07/24  15:40:28
+        Log: Subject: [PATCH bleadperl os2/perlrexx.c] my C compiler has no HTML parser
+             From: "Philip Newton" <Philip.Newton@gmx.net>
+             Date: Tue, 24 Jul 2001 06:45:55 +0200
+             Message-ID: <20010724.064500@ID-11583.news.dfncis.de>
+     Branch: perl
+          ! os2/perlrexx.c
+____________________________________________________________________________
+[ 11465] By: jhi                                   on 2001/07/24  15:37:48
+        Log: Subject: [PATCH: perl@11446] add io/fs.t to vmsperl test suite
+             From: Peter Prymmer <pvhp@forte.com>
+             Date: Mon, 23 Jul 2001 16:58:30 -0700 (PDT)
+             Message-ID: <Pine.OSF.4.10.10107231643480.401242-100000@aspara.forte.com>
+     Branch: perl
+          ! pod/perlport.pod t/io/fs.t vms/test.com
+____________________________________________________________________________
+[ 11464] By: jhi                                   on 2001/07/24  02:58:20
+        Log: Workaround on Cwd bootstrap problem.
+     Branch: perl
+          ! lib/ExtUtils/MakeMaker.pm
+____________________________________________________________________________
+[ 11463] By: jhi                                   on 2001/07/23  23:11:41
+        Log: When in Rome, quote like the Romans do.
+     Branch: perl
+          ! cflags.SH
+____________________________________________________________________________
+[ 11462] By: jhi                                   on 2001/07/23  23:04:02
+        Log: Subject: [PATCH 5.7.2] OS/2 multi-architecture
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 19:29:49 -0400
+             Message-ID: <20010723192949.A14802@math.ohio-state.edu>
+     Branch: perl
+          + os2/perlrexx.c
+          ! MANIFEST configpm makedef.pl mg.c os2/Makefile.SHs
+          ! os2/OS2/REXX/t/rx_vrexx.t os2/os2.c os2/os2ish.h perl.c
+          ! t/op/write.t
+____________________________________________________________________________
+[ 11461] By: jhi                                   on 2001/07/23  22:58:15
+        Log: Subject: [PATCH 5.7.2] MakeMaker FIRST_MAKEFILE and subdir
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 18:43:42 -0400
+             Message-ID: <20010723184342.A14494@math.ohio-state.edu>
+     Branch: perl
+          ! lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MakeMaker.pm
+____________________________________________________________________________
+[ 11460] By: jhi                                   on 2001/07/23  22:54:52
+        Log: Subject: [PATCH 5.7.2] MakeMaker subdir
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 18:33:16 -0400
+             Message-ID: <20010723183316.A14298@math.ohio-state.edu>
+     Branch: perl
+          ! lib/ExtUtils/MakeMaker.pm
+____________________________________________________________________________
+[ 11459] By: jhi                                   on 2001/07/23  22:52:02
+        Log: Subject: [PATCH 5.7.2] OPTIMIZE= during perl make
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 18:20:35 -0400
+             Message-ID: <20010723182035.A14192@math.ohio-state.edu>
+     Branch: perl
+          ! Makefile.SH cflags.SH
+____________________________________________________________________________
+[ 11458] By: jhi                                   on 2001/07/23  22:41:19
+        Log: Subject: [PATCH] Print CONFIGURE params in ExtUtils::MakeMaker output
+             From: "David D. Kilzer" <ddkilzer@lubricants-oil.com>
+             Date: Mon, 23 Jul 2001 11:32:17 -0500
+             Message-ID: <20010723113217.A28614@elbonia.lubricants-oil.com>
+     Branch: perl
+          ! lib/ExtUtils/MakeMaker.pm
+____________________________________________________________________________
+[ 11457] By: jhi                                   on 2001/07/23  21:22:36
+        Log: Subject: [PATCH 5.7.2] debug reloading selfloaded stuff
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 18:13:20 -0400
+             Message-ID: <20010723181320.A14005@math.ohio-state.edu>
+     Branch: perl
+          ! lib/perl5db.pl
+____________________________________________________________________________
+[ 11456] By: jhi                                   on 2001/07/23  21:19:28
+        Log: Subject: [PATCH 5.7.2] debugging selfloaded stuff
+             From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+             Date: Mon, 23 Jul 2001 18:07:40 -0400
+             Message-ID: <20010723180740.A13960@math.ohio-state.edu>
+     Branch: perl
+          ! op.c
+____________________________________________________________________________
+[ 11455] By: jhi                                   on 2001/07/23  21:13:12
+        Log: Subject: [PATCH perl@11446] util.c: return required in Perl_my_fork
+             From: "Craig A. Berry" <craigberry@mac.com>
+             Date: Mon, 23 Jul 2001 15:35:06 -0500
+             Message-Id: <5.1.0.14.0.20010723152732.02ad4470@exchi01>
+     Branch: perl
+          ! util.c
+____________________________________________________________________________
+[ 11454] By: jhi                                   on 2001/07/23  21:09:13
+        Log: Subject: [PATCH perlfaq9.pod typo]
+             From: "Larry Shatzer, Jr." <lshatzer@islanddata.com>
+             Date: Mon, 23 Jul 2001 07:49:05 -0700
+             Message-ID: <002f01c11386$a8539580$bb01a8c0@LSHATZER>
+     Branch: perl
+          ! pod/perlfaq9.pod
+____________________________________________________________________________
+[ 11453] By: jhi                                   on 2001/07/23  21:06:42
+        Log: Subject: win32\sncfnmcs.pl corrections
+             From: "Konovalov, Vadim Vladimirovich (Vadim)" <vkonovalov@lucent.com>
+             Date: Mon, 23 Jul 2001 12:56:54 +0200
+             Message-ID: <E3FB32585BF1D411B9E900805FF51A080C1C5D@RU0022EXCH001U>
+             
+             Rename the script a little bit more sensibly.
+     Branch: perl
+          + win32/sync_ext.pl
+          - win32/sncfnmcs.pl
+          ! MANIFEST README.win32
+____________________________________________________________________________
+[ 11452] By: jhi                                   on 2001/07/23  17:22:37
+        Log: Test tweak.
+     Branch: perl
+          ! ext/B/Deparse.t
+____________________________________________________________________________
+[ 11451] By: jhi                                   on 2001/07/23  17:10:52
+        Log: Metaconfig unit tweak for #11450.
+     Branch: metaconfig/U/perl
+          ! Mksymlinks.U
+____________________________________________________________________________
+[ 11450] By: jhi                                   on 2001/07/23  17:09:46
+        Log: Too volatile failsafe check.
+     Branch: perl
+          ! Configure
+____________________________________________________________________________
+[ 11449] By: jhi                                   on 2001/07/23  16:53:59
+        Log: Further doc tweaks.
+     Branch: perl
+          ! lib/UnicodeCD.pm
+____________________________________________________________________________
+[ 11448] By: jhi                                   on 2001/07/23  05:26:50
+        Log: Doc tweaks.
+     Branch: perl
+          ! lib/UnicodeCD.pm
+____________________________________________________________________________
+[ 11447] By: jhi                                   on 2001/07/23  04:57:49
+        Log: Doc tweakery from Abhijit.
+     Branch: perl
+          ! Porting/repository.pod
+____________________________________________________________________________
+[ 11446] By: jhi                                   on 2001/07/22  15:41:02
+        Log: An accidental empty line.
+     Branch: perl
+          ! MANIFEST
+____________________________________________________________________________
+[ 11445] By: jhi                                   on 2001/07/22  15:38:30
+        Log: Missing MANIFESTations.
+     Branch: perl
+          ! MANIFEST
+____________________________________________________________________________
+[ 11444] By: jhi                                   on 2001/07/22  15:30:10
+        Log: Update Changes.
+     Branch: perl
+          ! Changes patchlevel.h
+____________________________________________________________________________
+[ 11443] By: jhi                                   on 2001/07/22  15:02:11
+        Log: Subject: Re: Typo in Porting/pumpkin/pod ?
+             From: Mike Guy <mjtg@cam.ac.uk>
+             Date: Fri, 20 Jul 2001 16:12:49 +0100
+             Message-Id: <E15NbxR-0006HD-00@draco.cus.cam.ac.uk>
+     Branch: perl
+          ! Porting/pumpkin.pod
+____________________________________________________________________________
+[ 11442] By: jhi                                   on 2001/07/22  14:58:33
+        Log: Subject: Re: [PATCH: perl@11373] pod fixups for pod/perlhack.pod
+             From: Peter Prymmer <pvhp@forte.com>
+             Date: Fri, 20 Jul 2001 17:04:55 -0700 (PDT)
+             Message-ID: <Pine.OSF.4.10.10107201650510.144528-100000@aspara.forte.com>
+     Branch: perl
+          ! pod/perlhack.pod
+____________________________________________________________________________
+[ 11441] By: jhi                                   on 2001/07/22  14:54:29
+        Log: Subject: [PATCH Test.pm] Getting rid of the expected "UNEXPECTEDLY SUCCEEDED"
+             From: Michael G Schwern <schwern@pobox.com>
+             Date: Fri, 20 Jul 2001 20:22:35 -0400
+             Message-ID: <20010720202235.O4498@blackrider>
+     Branch: perl
+          ! lib/Test.pm lib/Test/t/mix.t lib/Test/t/success.t
+          ! lib/Test/t/todo.t
+____________________________________________________________________________
+[ 11440] By: jhi                                   on 2001/07/22  14:51:14
+        Log: Subject: Re: [ID 20010720.010] WHere's [:isprint:]?
+             From: Jeffrey Friedl <jfriedl@yahoo-inc.com>
+             Message-Id: <200107210559.WAA09160@ventrue.corp.yahoo.com>
+             Date: Fri, 20 Jul 2001 22:59:25 -0700 (PDT)
+     Branch: perl
+          ! ext/POSIX/POSIX.pod
+____________________________________________________________________________
+[ 11439] By: jhi                                   on 2001/07/22  14:49:25
+        Log: Subject: Re: [ID 20010720.010] WHere's [:isprint:]? 
+             From: Mark-Jason Dominus <mjd@plover.com>
+             Date: Fri, 20 Jul 2001 23:16:54 -0400
+             Message-ID: <20010721031654.21877.qmail@plover.com>
+     Branch: perl
+          ! ext/POSIX/POSIX.pod
+____________________________________________________________________________
+[ 11438] By: jhi                                   on 2001/07/22  14:41:58
+        Log: Subject: Re: [PATCH O.pm] avoid to clutter output with -l
+             From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
+             Date: Sun, 22 Jul 2001 14:56:09 +0200
+             Message-ID: <20010722145609.A766@rafael>
+     Branch: perl
+          ! ext/B/O.pm
+____________________________________________________________________________
+[ 11437] By: jhi                                   on 2001/07/22  14:39:07
+        Log: Subject: regexec.c #define cleanup
+             From: Mark-Jason Dominus <mjd@plover.com>
+             Date: Sat, 21 Jul 2001 18:33:25 -0400
+             Message-ID: <20010721223325.3069.qmail@plover.com>
+     Branch: perl
+          ! regexec.c
+____________________________________________________________________________
+[ 11436] By: jhi                                   on 2001/07/22  14:36:43
+        Log: Subject: [PATCH: perl@11373] Win32 update for t/io/fs.t (may effect NetWare)
+             From: Prymmer/Kahn <pvhp@best.com>
+             Date: Sat, 21 Jul 2001 12:08:29 -0700 (PDT)
+             Message-ID: <Pine.BSF.4.21.0107211156160.17271-100000@shell8.ba.best.com>
+     Branch: perl
+          ! t/io/fs.t
+____________________________________________________________________________
+[ 11435] By: jhi                                   on 2001/07/22  00:22:51
+        Log: Typo in #11432.
+     Branch: perl
+          ! ext/POSIX/POSIX.t
+____________________________________________________________________________
+[ 11434] By: jhi                                   on 2001/07/21  23:12:26
+        Log: Integrate (manually) change #11424 from macperl.
+     Branch: perl
+          ! ext/Filter/t/call.t
+____________________________________________________________________________
+[ 11433] By: jhi                                   on 2001/07/21  23:07:43
+        Log: Integrate change #11408 from macperl.
+     Branch: perl
+         !> README.macos pod/perlport.pod
+____________________________________________________________________________
+[ 11432] By: jhi                                   on 2001/07/21  23:02:30
+        Log: Integrate change #11388 from macperl (the *.t parts needed hand massage).
+     Branch: perl
+         +> macos/MacPerlTests.cmd macos/xsubpp.patch
+          ! ext/DB_File/t/db-btree.t ext/DB_File/t/db-hash.t
+          ! ext/DB_File/t/db-recno.t ext/NDBM_File/ndbm.t
+          ! ext/POSIX/POSIX.t
+____________________________________________________________________________
+[ 11431] By: gsar                                  on 2001/07/21  05:03:44
+        Log: pod/*.t tests not picked up by t/TEST either
+     Branch: maint-5.6/perl
+          ! t/TEST
+____________________________________________________________________________
+[ 11430] By: gsar                                  on 2001/07/21  04:58:12
+        Log: better tweak for change#11429 (windows has both / and \ separated
+             paths in @INC at that point)
+     Branch: maint-5.6/perl
+          ! t/pod/testp2pt.pl
+____________________________________________________________________________
+[ 11429] By: gsar                                  on 2001/07/21  04:41:15
+        Log: MacOS pod test tweak needs \Escape
+     Branch: maint-5.6/perl
+          ! t/pod/testp2pt.pl
+____________________________________________________________________________
+[ 11428] By: gsar                                  on 2001/07/21  04:39:34
+        Log: run/runenv.t needs fflushNULL sanity (t/TEST is too dumb to detect
+             resulting duplicate output, but t/harness isn't)
+     Branch: maint-5.6/perl
+          ! t/run/runenv.t
+____________________________________________________________________________
+[ 11427] By: gsar                                  on 2001/07/21  04:37:26
+        Log: t/harness wasn't picking up all the tests
+     Branch: maint-5.6/perl
+          ! t/harness
+____________________________________________________________________________
+[ 11426] By: gsar                                  on 2001/07/21  04:09:26
+        Log: update MANIFEST for new file
+     Branch: maint-5.6/perl
+          ! MANIFEST
+____________________________________________________________________________
+[ 11425] By: gsar                                  on 2001/07/21  04:07:46
+        Log: integrate maint-5.6/macperl changes into maint-5.6/perl, with
+             the exception of the macperl/macos/... tree
+     Branch: maint-5.6/perl
+         +> t/lib/filefind-taint.t
+         !> (integrate 72 files)
+____________________________________________________________________________
+[ 11424] By: pudge                                 on 2001/07/20  18:55:25
+        Log: Fix test.
+     Branch: maint-5.6/macperl
+          ! macos/bundled_ext/Filter/t/call.t
+____________________________________________________________________________
+[ 11423] By: gsar                                  on 2001/07/20  18:38:48
+        Log: Make perl fork()-safe (in a slightly limited way) even on
+             platforms that don't have pthread_atfork() (extension of
+             the fix in change#11151).
+             
+             Note that this will not help extensions that call fork()
+             directly in C, or that link to libraries that call fork()
+             directly.  Such cases must be fixed to either call
+             PerlProc_fork(), or call atfork_lock() in parent before the
+             calling the function that forks and call atfork_unlock()
+             in both parent and child immediately after the fork().
+             (There are no worries if C code calls exec() in the child
+             immediately after a fork().  Only cases where the child
+             calls perl's API functions (including New()) after the
+             fork() are problematic.)
+             
+             This change also eliminates the use of vfork() from perl,
+             since all such uses were violating the severe restrictions
+             on modifying the state of the process between the vfork()
+             and the exec().
+             
+             This is a modified version of patches suggested by Abhijit
+             Menon-Sen and Richard Soderberg.
+     Branch: perl
+          ! embed.h embed.pl global.sym iperlsys.h miniperlmain.c
+          ! objXSUB.h perl.c perlapi.c pp_sys.c proto.h thread.h util.c
+____________________________________________________________________________
+[ 11422] By: pudge                                 on 2001/07/20  18:16:37
+        Log: Add Filter::Util::Call, Class::ISA, Digest, Filter::Simple,
+             Switch, and Text::Balanced.
+     Branch: maint-5.6/macperl
+          + macos/bundled_ext/Filter/Util/Call/Call.pm
+          + macos/bundled_ext/Filter/Util/Call/Call.xs
+          + macos/bundled_ext/Filter/Util/Call/Makefile.PL
+          + macos/bundled_ext/Filter/t/MyFilter.pm
+          + macos/bundled_ext/Filter/t/call.t
+          + macos/bundled_ext/Filter/t/filter-util.pl
+          + macos/bundled_lib/blib/lib/Class/ISA.pm
+          + macos/bundled_lib/blib/lib/Digest.pm
+          + macos/bundled_lib/blib/lib/Filter/Simple.pm
+          + macos/bundled_lib/blib/lib/Switch.pm
+          + macos/bundled_lib/blib/lib/Text/Balanced.pm
+          + macos/bundled_lib/blib/lib/Text/Balanced.pod
+          + macos/bundled_lib/t/Class/ISA/test.pl
+          + macos/bundled_lib/t/Digest/Digest.t
+          + macos/bundled_lib/t/Filter/Simple/test.pl
+          + macos/bundled_lib/t/Switch/test.pl
+          + macos/bundled_lib/t/Text/Balanced/t/genxt.t
+          + macos/bundled_lib/t/Text/Balanced/t/xbrak.t
+          + macos/bundled_lib/t/Text/Balanced/t/xcode.t
+          + macos/bundled_lib/t/Text/Balanced/t/xdeli.t
+          + macos/bundled_lib/t/Text/Balanced/t/xmult.t
+          + macos/bundled_lib/t/Text/Balanced/t/xquot.t
+          + macos/bundled_lib/t/Text/Balanced/t/xtagg.t
+          + macos/bundled_lib/t/Text/Balanced/t/xvari.t
+____________________________________________________________________________
+[ 11421] By: pudge                                 on 2001/07/20  18:03:28
+        Log: Add Filter::Util::Call to config/make files; edit utils
+             to recognize the module (it was descended too far down).
+             Bump version to 5.6.1a4.
+     Branch: maint-5.6/macperl
+          ! macos/InstallBLIB macos/MPVersion.r macos/Makefile.mk
+          ! macos/config.sh macos/lib/ExtUtils/MM_MacOS.pm
+          ! macos/macperl/Makefile.mk macos/xsubpp.patch
+____________________________________________________________________________
+[ 11420] By: pudge                                 on 2001/07/20  18:02:05
+        Log: Make DB_File the default for MLDBM on MacOS.
+     Branch: maint-5.6/macperl
+          ! macos/bundled_lib/blib/lib/MLDBM.pm
+____________________________________________________________________________
+[ 11419] By: nick                                  on 2001/07/20  14:51:03
+        Log: Subject:  [PATCH UnicodeCD.pm] Fix erronous documentation
+             From:  Simon Cozens <simon@netthink.co.uk>
+             Date:  Fri, 20 Jul 2001 11:42:35 -0400
+             Message-Id:  <20010720114235.A5235@netthink.co.uk>
+     Branch: perl
+          ! lib/UnicodeCD.pm
+____________________________________________________________________________
+[ 11418] By: nick                                  on 2001/07/20  14:48:12
+        Log: Subject:  [PATCH regcomp.h] adds a comment
+             From:  Abhijit Menon-Sen <ams@wiw.org>
+             Date:  Fri, 20 Jul 2001 21:05:37 +0530
+             Message-Id:  <20010720210537.A7678@lustre.dyn.wiw.org>
+     Branch: perl
+          ! regcomp.h
+____________________________________________________________________________
+[ 11417] By: nick                                  on 2001/07/20  14:16:38
+        Log: Subject:  [PATCH 5.7.2] INSTALL updates
+             From:  Andy Dougherty <doughera@lafayette.edu>
+             Date:  Fri, 20 Jul 2001 11:01:40 -0400 (EDT)
+             Message-Id:  <Pine.SOL.4.10.10107201059510.16494-100000@maxwell.phys.lafayette.edu>
+     Branch: perl
+          ! INSTALL
+____________________________________________________________________________
+[ 11416] By: nick                                  on 2001/07/20  06:44:44
+        Log: Subject:  Re: [PATCH: perl@11373] pod fixups for pod/perlhack.pod
+             From:  Russ Allbery <rra@stanford.edu>
+             Date:  19 Jul 2001 15:52:37 -0700
+             Message-Id:  <ylvgko4jm2.fsf@windlord.stanford.edu>
+     Branch: perl
+          ! lib/Pod/Man.pm
+____________________________________________________________________________
+[ 11415] By: nick                                  on 2001/07/20  06:35:11
+        Log: Subject:  [PATCH] defer op_seq allocation
+             From:  Abhijit Menon-Sen <ams@wiw.org>
+             Date:  Thu, 19 Jul 2001 22:12:24 +0530
+             Message-Id:  <20010719221224.A13786@lustre.dyn.wiw.org>
+     Branch: perl
+          ! op.c
+____________________________________________________________________________
+[ 11414] By: nick                                  on 2001/07/20  06:23:36
+        Log: Subject:  [PATCH] prototype for Time::HiRes::sleep()
+             From:  Abhijit Menon-Sen <ams@wiw.org>
+             Date:  Fri, 20 Jul 2001 01:18:50 +0530
+             Message-Id:  <20010720011850.A19650@lustre.dyn.wiw.org>
+             (Private e-mail)
+     Branch: perl
+          ! ext/Time/HiRes/HiRes.xs
+____________________________________________________________________________
+[ 11413] By: nick                                  on 2001/07/20  06:18:53
+        Log: Integrate mainline
+     Branch: perlio
+         +> ext/Encode/Encode/euc-jp-0212.enc t/lib/commonsense.t
+          - t/base/commonsense.t
+         !> MANIFEST doio.c ext/B/B/Deparse.pm ext/Encode/Encode/Tcl.pm
+         !> ext/POSIX/POSIX.t ext/Time/HiRes/HiRes.xs gv.c hints/darwin.sh
+         !> hints/rhapsody.sh numeric.c pod/perlfunc.pod pod/perlhack.pod
+         !> pod/perlre.pod pp_sys.c sv.c t/README t/op/arith.t
+         !> t/op/sprintf.t thread.h utils/h2xs.PL win32/perlhost.h
+         !> win32/win32.c
+____________________________________________________________________________
+[ 11412] By: nick                                  on 2001/07/19  06:44:27
+        Log: Integrate win32/perlhost.h from maintenance branch.
+             (Rest of $ENV{PATH} / system() fix.)
+     Branch: perl
+         !> win32/perlhost.h
+____________________________________________________________________________
+[ 11411] By: nick                                  on 2001/07/19  06:41:34
+        Log: Subject:  [DOC PATCH bleadperl] its vs it's in perlhack.pod
+             From:  Philip Newton <Philip.Newton@gmx.net>
+             Date:  Wed, 18 Jul 2001 21:43:57 +0200
+             Message-Id:  <E15Mx9y-0007Oz-00@mserv1b.vianw.co.uk>
+     Branch: perl
+          ! pod/perlhack.pod
+____________________________________________________________________________
+[ 11410] By: nick                                  on 2001/07/19  06:39:35
+        Log: Subject:  Security hole in taint checking in open()
+             From:  deekoo@tentacle.net
+             Date:  Thu, 19 Jul 2001 00:03:46 -0700 (PDT)
+             Message-Id:  <Pine.LNX.4.33.0107182248330.11996-100000@chaos.tentacle.net>
+     Branch: perl
+          ! doio.c
+____________________________________________________________________________
+[ 11409] By: nick                                  on 2001/07/19  06:28:08
+        Log: Subject:  [PATCH] Re: Time::HiRes qw(sleep) fails
+             From:  Abhijit Menon-Sen <ams@wiw.org>
+             Date:  Thu, 19 Jul 2001 04:30:43 +0530
+             Message-Id:  <20010719043043.A10327@lustre.dyn.wiw.org>
+     Branch: perl
+          ! ext/Time/HiRes/HiRes.xs
+____________________________________________________________________________
+[ 11408] By: pudge                                 on 2001/07/19  03:27:36
+        Log: Update docs with latest implementation information and new URLs.
+     Branch: maint-5.6/macperl
+          ! README.macos pod/perlport.pod
+____________________________________________________________________________
+[ 11407] By: pudge                                 on 2001/07/19  02:35:46
+        Log: Add Time::HiRes, and add default Makefile.mk for Digest::MD5.
+             Fix BuildRules to accept optimization variables.
+     Branch: maint-5.6/macperl
+          + macos/bundled_ext/Digest/MD5/Makefile.mk
+          ! macos/BuildRules.mk macos/Makefile.mk
+          ! macos/bundled_ext/Time/HiRes/HiRes.xs macos/config.sh
+          ! macos/macish.c macos/macish.h macos/macperl/Makefile.mk
+____________________________________________________________________________
+[ 11406] By: pudge                                 on 2001/07/19  01:11:39
+        Log: Integrate changes 11399,11401
+     Branch: maint-5.6/macperl
+         !> win32/perlhost.h win32/win32.c
+____________________________________________________________________________
+[ 11405] By: nick                                  on 2001/07/18  06:50:33
+        Log: Integrate Sarathy's Win32 $ENV{'PATH'}/system fixes (11399, 11400)
+             from perl5.6*
+     Branch: perl
+         !> win32/perlhost.h win32/win32.c
+____________________________________________________________________________
+[ 11404] By: nick                                  on 2001/07/18  06:43:59
+        Log: Subject:  Re: Perl 5.7.2 Has Been Released 
+             From:  hv@crypt0.demon.co.uk
+             Date:  Wed, 18 Jul 2001 05:58:46 +0100
+             Message-Id:  <200107180458.f6I4wlJ19966@crypt0.demon.co.uk>
+     Branch: perl
+          ! ext/POSIX/POSIX.t
+____________________________________________________________________________
+[ 11403] By: nick                                  on 2001/07/18  06:38:57
+        Log: Subject:  Re: [ID 20010716.005] numeric conversions in 5.7.[12] changed from perl5.6.1 (leading whitespace) 
+             From:  hv@crypt0.demon.co.uk
+             Date:  Wed, 18 Jul 2001 05:21:54 +0100
+             Message-Id:  <200107180421.f6I4Ltc00987@crypt0.demon.co.uk>
+     Branch: perl
+          ! numeric.c t/op/arith.t
+____________________________________________________________________________
+[ 11402] By: nick                                  on 2001/07/18  06:19:17
+        Log: Subject:  Doc patch: perlre should mention perlrequick and perlretut
+             From:  mjd@plover.com
+             Date:  17 Jul 2001 17:59:20 -0000
+             Message-Id:  <20010717175920.8177.qmail@plover.com>
+     Branch: perl
+          ! pod/perlre.pod
+____________________________________________________________________________
+[ 11401] By: gsar                                  on 2001/07/17  21:31:31
+        Log: thinko in change#11400 (duh)
+     Branch: maint-5.6/perl
+          ! win32/perlhost.h
+____________________________________________________________________________
+[ 11400] By: gsar                                  on 2001/07/17  19:46:34
+        Log: change#11399 revealed another unrelated bug; this is just a temporary
+             bandaid
+     Branch: maint-5.6/perl
+          ! win32/perlhost.h
+____________________________________________________________________________
+[ 11399] By: gsar                                  on 2001/07/17  19:11:57
+        Log: fix bugs in handling of the virtualized environment under windows;
+             there were bugs in propagating any changes to %ENV down to the real
+             environment when such changes happened in the toplevel process
+             (thanks to Johan Holmberg <holmberg@iar.se> for the excellent
+             problem identification, and for a part of the fix)
+     Branch: maint-5.6/perl
+          ! win32/perlhost.h win32/win32.c
+____________________________________________________________________________
+[ 11398] By: nick                                  on 2001/07/17  08:26:35
+        Log: Subject: Re: [PATCH: perl@11359] possible fix for sprintf.t on VAX that loads %Config
+             From: Peter Prymmer <pvhp@forte.com>
+             Date: Mon, 16 Jul 2001 16:43:14 -0700 (PDT)
+             Message-Id: <Pine.OSF.4.10.10107161631300.464972-100000@aspara.forte.com>
+             
+             Move t/base/commonsense.t to t/lib/commonsense.t - base tests
+             should not depend on existance of Config.pm
+     Branch: perl
+         +> t/lib/commonsense.t
+          - t/base/commonsense.t
+          ! MANIFEST t/README
+____________________________________________________________________________
+[ 11397] By: nick                                  on 2001/07/17  08:09:58
+        Log: Subject:  [PATCH pod/perlhack.pod] Sections on writing tests & patching core mods
+             From:  Michael G Schwern <schwern@pobox.com>
+             Date:  Mon, 16 Jul 2001 18:20:31 -0400
+             Message-Id:  <20010716182031.A1128@blackrider>
+     Branch: perl
+          ! pod/perlhack.pod
+____________________________________________________________________________
+[ 11396] By: nick                                  on 2001/07/17  08:04:11
+        Log: Subject:  [PATCH perlfunc.pod] make printf refer to sprintf
+             From:  Gwyn Judd <b.judd@xtra.co.nz>
+             Date:  Tue, 17 Jul 2001 20:55:58 +1200
+             Message-Id:  <20010717205558.A3107@thislove>
+     Branch: perl
+          ! pod/perlfunc.pod
+____________________________________________________________________________
+[ 11395] By: nick                                  on 2001/07/17  08:02:22
+        Log: Subject:  [PATCH: perl@11373] fix t/op/sprintf.t to not load %Config
+             From:  Peter Prymmer <pvhp@forte.com>
+             Date:  Mon, 16 Jul 2001 15:48:33 -0700 (PDT)
+             Message-Id:  <Pine.OSF.4.10.10107161543400.464972-100000@aspara.forte.com>
+     Branch: perl
+          ! t/op/sprintf.t
+____________________________________________________________________________
+[ 11394] By: nick                                  on 2001/07/17  07:57:06
+        Log: Subject:  Re: [PATCH gv.c] allow ${"1f"} to be non-regex var 
+             From:  Jeff 'Japhy' Pinyan <jeffp@crusoe.net>
+             Date:  Mon, 16 Jul 2001 18:46:53 -0400 (EDT)
+             Message-Id:  <Pine.GSO.4.21.0107161829390.1405-100000@crusoe.crusoe.net>
+     Branch: perl
+          ! gv.c
+____________________________________________________________________________
+[ 11392] By: nick                                  on 2001/07/17  07:50:12
+        Log: Subject:  [PATCH] fix PTHREAD_ATFORK croaking too early, too often
+             From:  Coral <coral@moonlight.crystalflame.net>
+             Date:  Mon, 16 Jul 2001 14:25:19 -0700 (PDT)
+             Message-Id:  <200107162125.f6GLPJ345261@moonlight.crystalflame.net>
+     Branch: perl
+          ! pp_sys.c thread.h
+____________________________________________________________________________
+[ 11391] By: nick                                  on 2001/07/17  07:34:28
+        Log: Subject:  Re: [PATCH h2xs.PL ] use Test::More where appropriate (was Re:   
+             From:  Jonathan Stowe <gellyfish@gellyfish.com>
+             Date:  Mon, 16 Jul 2001 18:31:21 +0100 (BST)
+             Message-Id:  <Pine.LNX.4.33.0107161827570.15520-100000@orpheus.gellyfish.com>
+     Branch: perl
+          ! utils/h2xs.PL
+____________________________________________________________________________
+[ 11390] By: pudge                                 on 2001/07/16  23:54:44
+        Log: Add in List::Util, Memoize, NEXT, and a bunch of tests for other
+             modules.  Also added Mac::BuildTools, Mac::AppleEvents::Simple,
+             and Mac::Apps::Launch, which don't work, and Time::HiRes and
+             Time::Piece, which don't yet work.
+     Branch: maint-5.6/macperl
+          + (add 154 files)
+____________________________________________________________________________
+[ 11389] By: pudge                                 on 2001/07/16  23:13:10
+        Log: Fix %ENV to be tainted [SF bug #231848, Thomas Wegner].
+             Also add hack to get around missing setenv for PERL5DB.
+     Branch: maint-5.6/macperl
+          ! macos/macish.c macos/macish.h
+____________________________________________________________________________
+[ 11388] By: pudge                                 on 2001/07/16  23:11:26
+        Log: Fix DB_File, and patch tests for it, and NDBM_File, and POSIX.
+     Branch: maint-5.6/macperl
+          ! macos/MacPerlTests.cmd macos/xsubpp.patch t/lib/db-btree.t
+          ! t/lib/db-hash.t t/lib/db-recno.t t/lib/ndbm.t t/lib/posix.t
+____________________________________________________________________________
+[ 11387] By: pudge                                 on 2001/07/16  23:05:12
+        Log: Fix up some configuration and make options, add extra
+             extensions.
+     Branch: maint-5.6/macperl
+          ! macos/ExtBuildRules.mk macos/Makefile.mk macos/config.sh
+          ! macos/macperl/Makefile.mk
+____________________________________________________________________________
+[ 11386] By: pudge                                 on 2001/07/16  21:22:32
+        Log: From Change 11374 in maintperl.
+     Branch: maint-5.6/macperl
+         !> utils/h2ph.PL
+____________________________________________________________________________
+[ 11385] By: nick                                  on 2001/07/16  14:12:58
+        Log: Back out change to h2xs till it passes its test.
+     Branch: perl
+          ! utils/h2xs.PL
+____________________________________________________________________________
+[ 11384] By: nick                                  on 2001/07/16  14:00:10
+        Log: Subject:  [PATCH h2xs.PL ] use Test::More where appropriate (was Re: [PATCH]
+             From:  Jonathan Stowe <gellyfish@gellyfish.com>
+             Date:  Mon, 16 Jul 2001 08:37:05 +0100 (BST)
+             Message-Id:  <Pine.LNX.4.33.0107160830480.9915-100000@orpheus.gellyfish.com>
+     Branch: perl
+          ! utils/h2xs.PL
+____________________________________________________________________________
+[ 11383] By: nick                                  on 2001/07/16  13:53:12
+        Log: Subject:  [PATCH hints/darwin.sh] Don't override user-specified optimize flag
+             From:  Robin Houston <robin@kitsite.com>
+             Date:  Sun, 15 Jul 2001 18:22:31 +0100
+             Message-Id:  <20010715182230.A11174@robin>
+     Branch: perl
+          ! hints/darwin.sh
+____________________________________________________________________________
+[ 11382] By: nick                                  on 2001/07/16  13:52:49
+        Log: Subject:  [PATCH perl@11372] re_dup
+             From:  Radu Greab <radu@netsoft.ro>
+             Date:  Sun, 15 Jul 2001 04:50:06 +0300
+             Message-Id:  <15184.63182.656988.340591@ix.netsoft.ro>
+     Branch: perl
+          ! sv.c
+____________________________________________________________________________
+[ 11379] By: nick                                  on 2001/07/16  13:35:39
+        Log: Subject:  [PATCH B::Deparse] formats can't contain formats
+             From:  Robin Houston <robin@kitsite.com>
+             Date:  Sat, 14 Jul 2001 14:28:50 +0100
+             Message-Id:  <20010714142850.A10205@robin>
+     Branch: perl
+          ! ext/B/B/Deparse.pm
+____________________________________________________________________________
+[ 11378] By: nick                                  on 2001/07/16  13:30:36
+        Log: Subject:  [PATCH @11359] Encode::Tcl.pm, EUC-JP with jis-x0212
+             From:  Sadahiro Tomoyuki <BQW10602@nifty.com>
+             Date:  Sat, 14 Jul 2001 22:17:42 +0900
+             Message-Id:  <20010714221736.6CA3.BQW10602@nifty.com>
+     Branch: perl
+          + ext/Encode/Encode/euc-jp-0212.enc
+          ! ext/Encode/Encode/Tcl.pm
+____________________________________________________________________________
+[ 11377] By: nick                                  on 2001/07/16  13:17:28
+        Log: Subject:  [PATCH 5.7.2] Remove useless ccflags hints
+             From:  Andy Dougherty <doughera@lafayette.edu>
+             Date:  Sun, 15 Jul 2001 22:52:54 -0400 (EDT)
+             Message-Id:  <Pine.SOL.4.10.10107152250230.10344-100000@maxwell.phys.lafayette.edu>
+     Branch: perl
+          ! hints/darwin.sh hints/rhapsody.sh
+____________________________________________________________________________
+[ 11376] By: nick                                  on 2001/07/16  09:05:00
+        Log: Integrate mainline
+     Branch: perlio
+         +> ext/Encode/Encode/7bit-greek.enc
+         +> ext/Encode/Encode/7bit-latin1.enc
+         +> ext/Encode/Encode/cns11643-1.enc
+         +> ext/Encode/Encode/cns11643-2.enc
+         +> ext/Encode/Encode/iso2022-cn.enc
+         +> ext/Encode/Encode/iso2022-jp1.enc
+         +> ext/Encode/Encode/iso2022-jp2.enc
+         !> Changes Configure MANIFEST Makefile.SH
+         !> ext/Encode/Encode/Tcl.pm ext/Encode/Encode/Tcl.t
+         !> ext/Encode/Encode/iso2022-kr.enc ext/POSIX/POSIX.pm
+         !> ext/PerlIO/Via/Via.pm handy.h myconfig.SH patchlevel.h
+         !> pod/perlhack.pod pod/perlre.pod pod/perltoc.pod regcomp.c sv.c
+         !> t/op/pat.t t/op/sprintf.t utils/h2ph.PL utils/h2xs.PL
+____________________________________________________________________________
+[ 11375] By: gsar                                  on 2001/07/16  02:46:11
+        Log: integrate change#11374 from maint-5.6
+             
+             make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc.
+     Branch: perl
+         !> utils/h2ph.PL
+____________________________________________________________________________
+[ 11374] By: gsar                                  on 2001/07/16  02:10:51
+        Log: make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc.
+     Branch: maint-5.6/perl
+          ! utils/h2ph.PL
+____________________________________________________________________________
+[ 11373] By: jhi                                   on 2001/07/14  09:27:10
+        Log: Update Changes.
+     Branch: perl
+          ! Changes patchlevel.h
+____________________________________________________________________________
 [ 11372] By: jhi                                   on 2001/07/14  09:19:18
         Log: Subject: [PATCH h2xs.PL] use Getopt::Long (was Re: [PATCH] h2xs)
              From: Jonathan Stowe <gellyfish@gellyfish.com>
index 944363d..437d66b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Sat Jul 14 05:31:33 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Mon Jul 30 06:47:25 EET DST 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -178,6 +178,7 @@ nonxs_ext=''
 static_ext=''
 useopcode=''
 useposix=''
+extras=''
 d_bsd=''
 d_eunice=''
 d_xenix=''
@@ -2313,8 +2314,8 @@ $define|true|[yY]*)
                                fi
                        done
                        # Sanity check 2.
-                       if test ! -f t/base/commonsense.t; then
-                               echo "Failed to create the symlinks.  Aborting." >&4
+                       if test ! -f t/base/lex.t; then
+                               echo "Failed to create the symlinks (t/base/lex.t missing).  Aborting." >&4
                                exit 1
                        fi
                        cd UU
@@ -6764,6 +6765,57 @@ else
        installbin="$binexp"
 fi
 
+echo " "
+case "$extras" in
+'') dflt='n';;
+*) dflt='y';;
+esac
+cat <<EOM
+Perl can be built with extra modules or bundles of modules which
+will be fetched from the CPAN and installed alongside Perl.
+
+Notice that you will need access to the CPAN; either via the Internet,
+or a local copy, for example a CD-ROM or a local CPAN mirror.  (You will
+be asked later to configure the CPAN.pm module which will in turn do
+the installation of the rest of the extra modules or bundles.)
+
+Notice also that if the modules require any external software such as
+libraries (the libz library for the Compress::Zlib module, for example)
+you *NEED* to have any such external software already installed, this
+configuration process will not install such things for you.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Install any extra modules (y or n) ?'
+. ./myread
+case "$ans" in
+y|Y)
+       cat <<EOM
+
+Please list any extra modules or bundles to be installed from CPAN,
+with spaces between the names.  The names can be in any format the
+'install' command of CPAN.pm will understand.  (Answer 'none' the
+quotes, to install no extra modules or bundles.)
+EOM
+       rp='Extras?'
+       dflt="$extras"
+       . ./myread
+       extras="$ans"
+esac
+case "$extras" in
+''|'none')
+       val=''
+       $rm -f ../extras.lst
+       ;;
+*)     echo "(Saving the list of extras for later...)"
+       echo $extras > ../extras.lst
+       val="$extras"
+       ;;
+esac
+set extras
+eval $setvar
+echo " "
+
 : Find perl5.005 or later.
 echo "Looking for a previously installed perl5.005 or later... "
 case "$perl5" in
@@ -6996,6 +7048,7 @@ EOM
                    esac
                        ;;
                *)  case "$osname" in
+                       darwin) dflt='none' ;;
                        svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
                        *)      dflt='-fpic' ;;
                    esac ;;
@@ -16975,6 +17028,7 @@ eunicefix='$eunicefix'
 exe_ext='$exe_ext'
 expr='$expr'
 extensions='$extensions'
+extras='$extras'
 fflushNULL='$fflushNULL'
 fflushall='$fflushall'
 find='$find'
diff --git a/INSTALL b/INSTALL
index 312b101..fae1823 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -74,7 +74,10 @@ proceeding.
 
 If you're building Perl on a non-Unix system, you should also read
 the README file specific to your operating system, since this may
-provide additional or different instructions for building Perl.
+provide additional or different instructions for building Perl. There
+are also README files for several flavors of Unix systems, such as
+Solaris, HP-UX, and AIX; if you have one of those systems, you should
+also read the README file specific to that system.
 
 If there is a hint file for your system (in the hints/ directory) you
 should also read that hint file for specific information for your
@@ -1048,16 +1051,16 @@ versions of perl under L<Building a shared libperl.so Perl library>.
 
 =head2 Extensions
 
+Perl ships with a number of standard extensions.  These are contained
+in the ext/ subdirectory.
+
 By default, Configure will offer to build every extension which appears
 to be supported.  For example, Configure will offer to build GDBM_File
 only if it is able to find the gdbm library.  (See examples below.)
-B, DynaLoader, Fcntl, IO, and attrs are always built by default.
 Configure does not contain code to test for POSIX compliance, so POSIX
 is always built by default as well.  If you wish to skip POSIX, you can
 set the Configure variable useposix=false either in a hint file or from
-the Configure command line.  Similarly, the Opcode extension is always
-built by default, but you can skip it by setting the Configure variable
-useopcode=false either in a hint file for from the command line.
+the Configure command line.
 
 If you unpack any additional extensions in the ext/ directory before
 running Configure, then Configure will offer to build those additional
@@ -1078,22 +1081,17 @@ DynaLoader extension; you should just build the stub dl_none.xs
 version.  (Configure will suggest this as the default.)
 
 In summary, here are the Configure command-line variables you can set
-to turn off each extension:
+to turn off various extensions.  All others are included by default.
 
-    B                  (Always included by default)
     DB_File            i_db
     DynaLoader         (Must always be included as a static extension)
-    Fcntl              (Always included by default)
     GDBM_File          i_gdbm
-    IO                 (Always included by default)
     NDBM_File          i_ndbm
     ODBM_File          i_dbm
     POSIX              useposix
-    SDBM_File          (Always included by default)
     Opcode             useopcode
     Socket             d_socket
     Threads            use5005threads
-    attrs              (Always included by default)
 
 Thus to skip the NDBM_File extension, you can use
 
@@ -1115,7 +1113,7 @@ adding libgdbm) Configure will still offer your old choices of extensions
 for the default answer, but it will also point out the discrepancy to
 you.
 
-Finally, if you have dynamic loading (most modern Unix systems do)
+Finally, if you have dynamic loading (most modern systems do)
 remember that these extensions do not increase the size of your perl
 executable, nor do they impact start-up time, so you probably might as
 well build all the ones that will work on your system.
@@ -1742,7 +1740,7 @@ break utime() so that over NFS the timestamps do not get changed
 Starting from Perl 5.8 Perl has the beginnings of cross-compilation
 support.  What is known to work is running Configure in a
 cross-compilation environment and building the miniperl executable.
-What is known not work work is building the perl executable because
+What is known not to work is building the perl executable because
 that would require building extensions: Dynaloader statically and
 File::Glob dynamically, for extensions one needs MakeMaker and
 MakeMaker is not yet cross-compilation aware, and neither is
@@ -2309,4 +2307,3 @@ the same terms as perl itself, with the following additional request:
 If you are distributing a modified version of perl (perhaps as part of
 a larger package) please B<do> modify these installation instructions
 and the contact information to match your distribution.
-
index ac5b4f2..3d7b42f 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -225,6 +225,7 @@ ext/Encode/Encode/dingbats.enc      Encoding tables
 ext/Encode/Encode/dingbats.ucm Encoding tables
 ext/Encode/Encode/EncodeFormat.pod     Encoding table format
 ext/Encode/Encode/euc-cn.enc   Encoding tables
+ext/Encode/Encode/euc-jp-0212.enc      Encoding tables
 ext/Encode/Encode/euc-jp.enc   Encoding tables
 ext/Encode/Encode/euc-kr.enc   Encoding tables
 ext/Encode/Encode/gb12345.enc  Encoding tables
@@ -1514,6 +1515,8 @@ lib/warnings.t                    See if warning controls work
 lib/warnings/register.pm       For "use warnings::register"
 lib/Win32.pod                  Documentation for Win32 extras
 locale.c                       locale-specific utility functions
+macos/MacPerlTests.cmd MacOS ports
+macos/xsubpp.patch     MacOS ports
 makeaperl.SH                   perl script that produces a new perl binary
 makedef.pl                     Create symbol export lists for linking
 makedepend.SH                  Precursor to makedepend
@@ -1647,6 +1650,7 @@ os2/os2ish.h                      Header for OS/2
 os2/os2thread.h                        pthread-like typedefs
 os2/os2_base.t                 Additional tests for builtin methods
 os2/perl2cmd.pl                        Corrects installed binaries under OS/2
+os2/perlrexx.c                 Support perl interpreter embedded in REXX
 patchlevel.h                   The current patch level of perl
 perl.c                         main()
 perl.h                         Global declarations
@@ -2232,8 +2236,8 @@ win32/perlhost.h          Perl "host" implementation
 win32/perllib.c                        Win32 port
 win32/pod.mak                  Win32 port
 win32/runperl.c                        Win32 port
-win32/sncfnmcs.pl              Win32 port
 win32/splittree.pl             Win32 port
+win32/sync_ext.pl              Win32 port
 win32/vdir.h                   Perl "host" virtual directory manager
 win32/vmem.h                   Perl "host" memory manager
 win32/win32.c                  Win32 port
index 2df7ac8..9262cf8 100644 (file)
@@ -45,9 +45,10 @@ true)
                ;;
        rhapsody*|darwin*)
                shrpldflags="${ldflags} -dynamiclib \
-                            -compatibility_version 1 \
+                            -compatibility_version \
+                               ${api_revision}.${api_version}.${api_subversion} \
                             -current_version \
-                               ${api_version}.${api_subversion} \
+                               ${revision}.${patchlevel}.${subversion} \
                             -install_name \$(shrpdir)/\$@"
                ;;
        cygwin*)
@@ -217,6 +218,12 @@ SHELL = $sh
 # how to tr(anslate) newlines
 TRNL = '$trnl'
 
+OPTIMIZE = $optimize
+
+EXTRAS = $extras
+
+INSTALLPREFIXEXP = $prefix
+
 !GROK!THIS!
 # not used by Makefile but by installperl;
 # mentioned here so that metaconfig picks these up
@@ -227,9 +234,9 @@ TRNL = '$trnl'
 ## In the following dollars and backticks do not need the extra backslash.
 $spitshell >>Makefile <<'!NO!SUBS!'
 
-CCCMD    = `sh $(shellflags) cflags $(LIBPERL) $@`
+CCCMD    = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $(LIBPERL) $@`
 
-CCCMDSRC = `sh $(shellflags) cflags $(LIBPERL) $<`
+CCCMDSRC = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $(LIBPERL) $<`
 
 private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm
 
@@ -298,7 +305,7 @@ lintflags = -hbvxac
 
 .PHONY: all compile translators utilities
 
-all: $(FIRSTMAKEFILE) miniperl extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext)
+all: $(FIRSTMAKEFILE) miniperl extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
        @echo " ";
        @echo " Everything is up to date. 'make test' to run test suite."
 
@@ -657,8 +664,24 @@ extra.pods: miniperl
            cd pod ; $(LNS) ../$$x "perl"$$nx".pod" ; cd .. ; \
            echo "pod/perl"$$nx".pod" >> extra.pods ; \
        done
+       -@rm -f pod/perlvms.pod
        -@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods
 
+extras.prep: perl
+       @echo "CPAN needs to be configured..."
+       @echo
+       -@test -f extras.lst || touch extras.lst
+
+extras.make: extras.prep
+       $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./perl -Ilib -MCPAN -e 'make(@ARGV)' `cat extras.lst`
+
+extras.test: extras.prep
+       $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./perl -Ilib -MCPAN -e 'test(@ARGV)' `cat extras.lst`
+
+extras.install: extras.prep
+       -@test -f extras.lst || touch extras.lst
+       $(LDLIBPTH) PATH=`pwd`:${PATH} PERL5LIB=`pwd`/lib ./perl -Ilib -MCPAN -e 'install(@ARGV)' `cat extras.lst`
+
 .PHONY: install install-strip install-all install-verbose install-silent \
        no-install install.perl install.man installman install.html installhtml
 
@@ -686,6 +709,7 @@ install.perl:       all installperl
        else :; \
        fi
        $(LDLIBPTH) ./perl installperl $(INSTALLFLAGS) $(STRIPFLAGS)
+       $(MAKE) extras.install
 
 install.man:   all installman
        $(LDLIBPTH) ./perl installman $(INSTALLFLAGS)
@@ -851,7 +875,7 @@ realclean:  _realcleaner _mopup
 
 _clobber:
        -@rm -f Cross/run-* Cross/to-* Cross/from-*
-       rm -f config.sh cppstdin Policy.sh
+       rm -f config.sh cppstdin Policy.sh extras.lst
 
 clobber:       _realcleaner _mopup _clobber
 
@@ -946,7 +970,7 @@ depend: makedepend
 makedepend: makedepend.SH config.sh
        sh ./makedepend.SH
 
-.PHONY: test check test_prep _test_prep \
+.PHONY: test check test_prep test_prep_nodll test_prep_pre _test_prep \
        test_tty test-tty _test_tty test_notty test-notty _test_notty \
        utest ucheck test.utf8 check.utf8 \
        test.third check.third utest.third ucheck.third test_notty.third \
@@ -956,25 +980,31 @@ makedepend: makedepend.SH config.sh
 # Cannot delegate rebuilding of t/perl to make
 # to allow interlaced test and minitest
 
-_test_prep: $(PERL)$(EXE_EXT)
+TESTFILE=TEST
+
+_test_prep:
        cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
 
-test_prep: miniperl ./perl$(EXE_EXT) preplibrary utilities $(dynamic_ext) $(nonxs_ext) $(TEST_PERL_DLL)
+# Architecture-neutral stuff:
+
+test_prep_pre: preplibrary utilities $(nonxs_ext)
+
+test_prep: test_prep_pre miniperl ./perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
        PERL=./perl $(MAKE) _test_prep
 
 _test_tty:
-       cd t && $(LDLIBPTH) $(PERL_DEBUG) $(PERL) TEST $(TEST_ARGS) </dev/tty
+       cd t && $(LDLIBPTH) $(PERL_DEBUG) $(PERL) $(TESTFILE) $(TEST_ARGS) </dev/tty
 
 _test_notty:
-       cd t && $(LDLIBPTH) $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(PERL) TEST $(TEST_ARGS)
+       cd t && $(LDLIBPTH) $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(PERL) $(TESTFILE) $(TEST_ARGS)
 
 # The second branch is for testing without a tty or controlling terminal,
 # see t/op/stat.t
 _test:
        if (true </dev/tty) >/dev/null 2>&1; then \
-         $(MAKE) TEST_ARGS=$(TEST_ARGS) _test_tty   ; \
+         $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_tty   ; \
        else \
-         $(MAKE) TEST_ARGS=$(TEST_ARGS) _test_notty ; \
+         $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_notty ; \
        fi
        @echo "Ran tests" > t/rantests
 
@@ -998,7 +1028,7 @@ test-notty:        test_notty
 
 # Targets for Third Degree testing.
 
-test_prep.third: test_prep perl.third
+test_prep.third: test_prep perl.third perl.third$(EXE_EXT)
        PERL=./perl.third $(MAKE) _test_prep
 
 test.third check.third:        test_prep.third perl.third
@@ -1026,6 +1056,11 @@ minitest: miniperl lib/re.pm
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
                && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t </dev/tty
 
+# Test via harness
+
+test_harness: test_prep
+       PERL=./perl $(MAKE) TESTFILE=harness _test
+
 # 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.
index 4c50085..23c6290 100644 (file)
@@ -80,7 +80,8 @@ chdir "$relroot/$reldir" or die $!;
 print "Setting file permissions...\n";
 system("find . -type f -print     | xargs chmod 0444");
 system("find . -type d -print     | xargs chmod 0755");
-system("find t -name '*.t' -print | xargs chmod +x");
+system("find t ext lib -name '*.t'     -print | xargs chmod +x");
+system("find t ext lib -name 'test.pl' -print | xargs chmod +x");
 my @exe = qw(
     Configure
     configpm
@@ -91,13 +92,14 @@ my @exe = qw(
     opcode.pl
     perly.fixer
     t/TEST
-    t/*/*.t
     *.SH
     vms/ext/Stdio/test.pl
     vms/ext/filespec.t
     x2p/*.SH
     Porting/patchls
     Porting/makerel
+    mpeix/nm
+    mpeix/relink
 );
 system("chmod +x @exe");
 
index 3bc9d09..0ef144a 100644 (file)
@@ -757,7 +757,7 @@ Use the following commands to test perl with Purify:
        make all pureperl
        cd t
        ln -s ../pureperl perl
-       setenv PERL_DESTRUCT_LEVEL 5
+       setenv PERL_DESTRUCT_LEVEL 2
        ./perl TEST
 
 Disabling Perl's malloc allows Purify to monitor allocations and leaks
index 54960bf..5887e21 100644 (file)
@@ -83,8 +83,7 @@ TCP "tunnel" rather than by using ssh to login to or invoke any
 ordinary commands on the repository. When you want to start a
 session using the repository, use the command
 
-    ssh -l perlrep -f -q -x -L 1666:127.0.0.1:1666 sickle.activestate.com 
-foo
+    ssh -l perlrep -f -q -x -L 1666:127.0.0.1:1666 sickle.activestate.com foo
 
 If you are not using the default filename of F<~/.ssh/identity>
 to hold your perl repository private key then you'll need to add
@@ -100,10 +99,10 @@ describe what all those ssh arguments are for.
 
 =over 4
 
-=item B<-l perl>
+=item B<-l perlrep>
 
-Use a remote username of perl. The account on the repository which
-provides the end-point of the ssh tunnel is named "perl".
+Use a remote username of perlrep. (The account on the repository which
+provides the end-point of the ssh tunnel is named "perlrep".)
 
 =item B<-f>
 
@@ -145,8 +144,8 @@ be used for the value of the P4PORT environment variable (q.v.).
 
 =item sickle.activestate.com
 
-This is the canonical IP name of the host on which the perl
-repository runs. Its IP number is 199.60.48.20.
+This is the canonical name of the host on which the perl repository
+resides. Its IP address is 199.60.48.20.
 
 =item foo
 
@@ -406,5 +405,3 @@ More updates by Jarkko Hietaniemi, jhi@iki.fi, 28 June 2001.
 Perforce clarifications by Randall Gellens, rcg@users.sourceforge.net, 12 July 2001.
 
 =cut
-
-
index a15cb61..240d203 100644 (file)
@@ -22,7 +22,7 @@ pieces. Support for Mac OS is now in the perl core, and MacPerl will be
 able to, in the future, keep in closer sync with regular perl releases.
 
 At this time, though, it is very buggy, and is under development.  An
-alpha release is coming very soon.
+alpha release is available, with work progressing toward a beta.
 
 To build perl for Mac OS (as an MPW tool), you will need the addition
 of the "macos" subdirectory, distributed separately.  It includes extra
@@ -33,10 +33,13 @@ To build the MacPerl application, you will also need the "macperl"
 directory, which includes the source files for creating the
 application itself.
 
-All of this is also available from the SourceForge site, via
-HTTP, FTP, and anonymous CVS.
+All of this is available from the development site, via
+HTTP and anonymous CVS.
 
-       http://macperl.sourceforge.net/
+       http://dev.macperl.org/
+
+The source is also in the main perl repository in the maint-5.6/macperl
+branch.
 
 You will also need compilers and libraries, all of them freely
 available.  These are linked to from the SourceForge site. Go that site
@@ -53,4 +56,4 @@ Nandor E<lt>pudge@pobox.comE<gt>.
 
 =head1 DATE
 
-Last modified 2001.04.05.
+Last modified 2001.07.19.
index e21281e..135924e 100644 (file)
@@ -85,7 +85,7 @@ with all lowercase letters, and every time dmake is invoked
 to bring files up to date, it will try to recompile such files again.\r
 For example, Tk distribution has a lot of such files, resulting in\r
 needless recompiles everytime dmake is invoked.  To avoid this, you\r
-may use the script "sncfnmcs.pl" after a successful build.  It is\r
+may use the script "sync_ext.pl" after a successful build.  It is\r
 available in the win32 subdirectory of the Perl source distribution.\r
 \r
 =item Command Shell\r
index d2564af..c397d40 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -42,6 +42,13 @@ case $PERL_CONFIG_SH in
        ;;
 esac
 
+case "X$1" in
+Xoptimize=*|X"optimize=*")
+       eval "$1"
+       shift
+       ;;
+esac
+
 perltype=''
 optdebug=''    # ensure -g used if building a -DDEBUGGING libperl
 case $# in
index b98bf82..86abd6d 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -274,6 +274,7 @@ if ($OS2::is_aout) {
         $preconfig{$_} = $v eq 'undef' ? undef : $v;
     }
 }
+$preconfig{d_fork} = undef unless $OS2::can_fork; # Some funny cases can't
 sub TIEHASH { bless {%preconfig} }
 ENDOFSET
 } else {
diff --git a/embed.h b/embed.h
index f6176db..9093f9b 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define my_exit                        Perl_my_exit
 #define my_failure_exit                Perl_my_failure_exit
 #define my_fflush_all          Perl_my_fflush_all
+#define my_fork                        Perl_my_fork
+#define atfork_lock            Perl_atfork_lock
+#define atfork_unlock          Perl_atfork_unlock
 #define my_lstat               Perl_my_lstat
 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
 #define my_memcmp              Perl_my_memcmp
 #define my_exit(a)             Perl_my_exit(aTHX_ a)
 #define my_failure_exit()      Perl_my_failure_exit(aTHX)
 #define my_fflush_all()                Perl_my_fflush_all(aTHX)
+#define my_fork                        Perl_my_fork
+#define atfork_lock            Perl_atfork_lock
+#define atfork_unlock          Perl_atfork_unlock
 #define my_lstat()             Perl_my_lstat(aTHX)
 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
 #define my_memcmp              Perl_my_memcmp
 #define my_failure_exit                Perl_my_failure_exit
 #define Perl_my_fflush_all     CPerlObj::Perl_my_fflush_all
 #define my_fflush_all          Perl_my_fflush_all
+#define Perl_my_fork           CPerlObj::Perl_my_fork
+#define my_fork                        Perl_my_fork
+#define Perl_atfork_lock       CPerlObj::Perl_atfork_lock
+#define atfork_lock            Perl_atfork_lock
+#define Perl_atfork_unlock     CPerlObj::Perl_atfork_unlock
+#define atfork_unlock          Perl_atfork_unlock
 #define Perl_my_lstat          CPerlObj::Perl_my_lstat
 #define my_lstat               Perl_my_lstat
 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
index f125ef0..2e473b6 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -1769,6 +1769,9 @@ Anp       |char*  |my_bzero       |char* loc|I32 len
 Apr    |void   |my_exit        |U32 status
 Apr    |void   |my_failure_exit
 Ap     |I32    |my_fflush_all
+Anp    |Pid_t  |my_fork
+Anp    |void   |atfork_lock
+Anp    |void   |atfork_unlock
 Ap     |I32    |my_lstat
 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
 Anp    |I32    |my_memcmp      |const char* s1|const char* s2|I32 len
index 20cef75..0aff882 100644 (file)
@@ -102,13 +102,11 @@ $a =~ s/-e syntax OK\n//g;
 $a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037
 $a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc'
 $b = <<'EOF';
-
 LINE: while (defined($_ = <ARGV>)) {
     chomp $_;
     our(@F) = split(" ", $_, 0);
     '???';
 }
-
 EOF
 print "# [$a]\n\# vs expected\n# [$b]\nnot " if $a ne $b;
 print "ok " . $i++ . "\n";
index 455a061..d72d31f 100644 (file)
@@ -39,6 +39,7 @@ sub import {
                die $compilesub;
            }
 
+           local ($\,$",$,) = (undef,' ','');
            &$compilesub();
 
            close STDERR if $veryquiet;
index 4b4a796..2374810 100755 (executable)
@@ -142,7 +142,8 @@ ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;
 
 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
    $blksize,$blocks) = stat($Dfile);
-ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
+ok(20, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640)
+   || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
 
 my ($key, $value, $i);
 while (($key,$value) = each(%h)) {
index 6f2ef37..1dbb21d 100755 (executable)
@@ -108,7 +108,8 @@ ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
 
 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
    $blksize,$blocks) = stat($Dfile);
-ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
+ok(16, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640) ||
+   $^O eq 'amigaos' || $^O eq 'MSWin32' || $^O eq 'NetWare');
 
 my ($key, $value, $i);
 while (($key,$value) = each(%h)) {
index 6dd913c..13c6355 100755 (executable)
@@ -152,7 +152,7 @@ my $X  ;
 my @h ;
 ok(17, $X = tie @h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_RECNO ) ;
 
-ok(18, ((stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)
+ok(18, ((stat($Dfile))[2] & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640)
        ||  $^O eq 'MSWin32' ||  $^O eq 'NetWare' || $^O eq 'amigaos') ;
 
 #my $l = @h ;
index 0c086ab..a145ab2 100644 (file)
@@ -32,6 +32,7 @@ my $module4  = "MyTest4" ;
 my $module5  = "MyTest5" ;
 my $nested   = "nested" ;
 my $block   = "block" ;
+my $redir   = $^O eq 'MacOS' ? "" : "2>&1";
 
 # Test error cases
 ##################
@@ -49,8 +50,8 @@ sub import { filter_add(bless []) }
 1 ;
 EOM
  
-my $a = `$Perl "-I." $Inc -e "use ${module} ;"  2>&1` ;
-ok(1, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ;
+my $a = `$Perl "-I." $Inc -e "use ${module} ;"  $redir` ;
+ok(1, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'MacOS' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ;
 ok(2, $a =~ /^Can't locate object method "filter" via package "MyTest"/) ;
  
 # no reference parameter in filter_add
@@ -66,8 +67,8 @@ sub import { filter_add() }
 1 ;
 EOM
  
-$a = `$Perl "-I." $Inc -e "use ${module} ;"  2>&1` ;
-ok(3, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ;
+$a = `$Perl "-I." $Inc -e "use ${module} ;"  $redir` ;
+ok(3, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'MacOS' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ;
 #ok(4, $a =~ /^usage: filter_add\(ref\) at ${module}.pm/) ;
 ok(4, $a =~ /^Not enough arguments for Filter::Util::Call::filter_add/) ;
  
@@ -118,7 +119,7 @@ EOF
 
 EOM
 
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(5, ($? >>8) == 0) ;
 ok(6, $a eq <<EOM) ;
 I am $here
@@ -167,7 +168,7 @@ EOF
  
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(7, ($? >>8) == 0) ;
 ok(8, $a eq <<EOM) ;
 I am $here
@@ -282,7 +283,7 @@ EOF
  
 EOM
 
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(9, ($? >>8) == 0) ;
 ok(10, $a eq <<EOM) ;
 I'm feeling used!
@@ -344,7 +345,7 @@ EOF
  
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(11, ($? >>8) == 0) ;
 ok(12, $a eq <<EOM) ;
 some letters PQRPQR PQR PQR
@@ -403,7 +404,7 @@ EOF
  
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(13, ($? >>8) == 0) ;
 ok(14, $a eq <<EOM) ;
 some letters PQRPQR PQR PQR
@@ -463,7 +464,7 @@ F
  
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(15, ($? >>8) == 0) ;
 ok(16, $a eq <<EOM) ;
 don't cut me in half
@@ -510,7 +511,7 @@ writeFile($filename, <<EOM, $string ) ;
 use $block ;
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(17, ($? >>8) == 0) ;
 ok(18, $a eq <<EOM) ;
 hello mum
@@ -558,7 +559,7 @@ EOM
 print "We are in DIR\n" ;
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(19, ($? >>8) == 0) ;
 ok(20, $a eq <<EOM) ;
 We are in $here
@@ -609,7 +610,7 @@ I am HERE
 HERE today gone tomorrow\n" ;
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(21, ($? >>8) == 0) ;
 ok(22, $a eq <<EOM) ;
 
@@ -659,7 +660,7 @@ I'm HERE
 HERE today gone tomorrow\n" ;
 EOM
  
-$a = `$Perl "-I." $Inc $filenamebin  2>&1` ;
+$a = `$Perl "-I." $Inc $filenamebin  $redir` ;
 ok(23, ($? >>8) == 0) ;
 ok(24, $a eq <<EOM) ;
 
@@ -713,7 +714,7 @@ I'm HERE
 HERE today gone tomorrow
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(25, ($? >>8) == 0) ;
 ok(26, $a eq <<EOM) ;
 THERE THERE
@@ -769,7 +770,7 @@ I'm HERE
 HERE today gone tomorrow
 EOM
  
-$a = `$Perl "-I." $Inc $filename  2>&1` ;
+$a = `$Perl "-I." $Inc $filename  $redir` ;
 ok(27, ($? >>8) == 0) ;
 ok(28, $a eq <<EOM) ;
 THERE THERE
index cb975e0..f560343 100755 (executable)
@@ -40,7 +40,7 @@ my $Dfile = "Op.dbmx.pag";
 if (! -e $Dfile) {
        ($Dfile) = <Op.dbmx*>;
 }
-if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare') {
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'MacOS') {
     print "ok 2 # Skipped: different file permission semantics\n";
 }
 else {
@@ -137,7 +137,7 @@ print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
 print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
 
 untie %h;
-unlink 'Op.dbmx.dir', $Dfile;
+unlink <Op.dbmx*>, $Dfile;
 
 {
    # sub-class test
index 9eb9116..350f897 100644 (file)
@@ -582,13 +582,13 @@ see L<perlfunc/gmtime>.
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isalnum:]]/> construct instead, or possibly the C</\w/> construct.
+C</[[:alnum:]]/> construct instead, or possibly the C</\w/> construct.
 
 =item isalpha
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isalpha:]]/> construct instead.
+C</[[:alpha:]]/> construct instead.
 
 =item isatty
 
@@ -599,55 +599,58 @@ to a tty.  Similar to the C<-t> operator, see L<perlfunc/-X>.
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:iscntrl:]]/> construct instead.
+C</[[:cntrl:]]/> construct instead.
 
 =item isdigit
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isdigit:]]/> construct instead, or the C</\d/> construct.
+C</[[:digit:]]/> construct instead, or the C</\d/> construct.
 
 =item isgraph
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isgraph:]]/> construct instead.
+C</[[:graph:]]/> construct instead.
 
 =item islower
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:islower:]]/> construct instead.  Do B<not> use C</a-z/>.
+C</[[:lower:]]/> construct instead.  Do B<not> use C</[a-z]/>.
 
 =item isprint
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isprint:]]/> construct instead.
+C</[[:print:]]/> construct instead.
 
 =item ispunct
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:ispunct:]]/> construct instead.
+C</[[:punct:]]/> construct instead.
 
 =item isspace
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isspace:]]/> construct instead, or the C</\s/> construct.
+C</[[:space:]]/> construct instead, or the C</\s/> construct.
+(Note that C</\s/> and C</[[:space:]]/> are slightly different in that
+C</[[:space:]]/> can normally match a vertical tab, while C</\s/> does
+not.)
 
 =item isupper
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isupper:]]/> construct instead.  Do B<not> use C</A-Z/>.
+C</[[:upper:]]/> construct instead.  Do B<not> use C</[A-Z]/>.
 
 =item isxdigit
 
 This is identical to the C function, except that it can apply to a single
 character or to a whole string.  Consider using regular expressions and the
-C</[[:isxdigit:]]/> construct instead, or simply C</[0-9a-f]/i>.
+C</[[:xdigit:]]/> construct instead, or simply C</[0-9a-f]/i>.
 
 =item kill
 
index 2c52f26..b388961 100755 (executable)
@@ -21,6 +21,7 @@ $Is_W32 = $^O eq 'MSWin32';
 $Is_NetWare = $^O eq 'NetWare';
 $Is_Dos = $^O eq 'dos';
 $Is_MPE = $^O eq 'mpeix';
+$Is_MacOS = $^O eq 'MacOS';
 
 $testfd = open("TEST", O_RDONLY, 0) and print "ok 1\n";
 read($testfd, $buffer, 9) if $testfd > 2;
@@ -33,14 +34,14 @@ if ($Is_Dos) {
         print "ok $_ # skipped, no pipe() support on dos\n";
     }
 } else {
-@fds = POSIX::pipe();
-print $fds[0] > $testfd ? "ok 4\n" : "not ok 4\n";
-CORE::open($reader = \*READER, "<&=".$fds[0]);
-CORE::open($writer = \*WRITER, ">&=".$fds[1]);
-print $writer "ok 5\n";
-close $writer;
-print <$reader>;
-close $reader;
+    @fds = POSIX::pipe();
+    print $fds[0] > $testfd ? "ok 4\n" : "not ok 4\n";
+    CORE::open($reader = \*READER, "<&=".$fds[0]);
+    CORE::open($writer = \*WRITER, ">&=".$fds[1]);
+    print $writer "ok 5\n";
+    close $writer;
+    print <$reader>;
+    close $reader;
 }
 
 if ($Is_W32 || $Is_Dos) {
@@ -49,37 +50,55 @@ if ($Is_W32 || $Is_Dos) {
     }
 }
 else {
-$sigset = new POSIX::SigSet 1,3;
-delset $sigset 1;
-if (!ismember $sigset 1) { print "ok 6\n" }
-if (ismember $sigset 3) { print "ok 7\n" }
-$mask = new POSIX::SigSet &SIGINT;
-$action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
-sigaction(&SIGHUP, $action);
-$SIG{'INT'} = 'SigINT';
-kill 'HUP', $$;
-sleep 1;
-print "ok 11\n";
-
-sub SigHUP {
-    print "ok 8\n";
-    kill 'INT', $$;
-    sleep 2;
-    print "ok 9\n";
-}
-
-sub SigINT {
-    print "ok 10\n";
-}
+    $sigset = new POSIX::SigSet 1, 3;
+    delset $sigset 1;
+    if (!ismember $sigset 1) { print "ok 6\n" }
+    if ( ismember $sigset 3) { print "ok 7\n" }
+    
+    if ($Is_MacOS) {
+       for (8..11) {
+           print "ok $_ # skipped, no kill() support on Mac OS\n";
+       }
+    }
+    else {
+       $mask = new POSIX::SigSet &SIGINT;
+       $action = new POSIX::SigAction 'main::SigHUP', $mask, 0;
+       sigaction(&SIGHUP, $action);
+       $SIG{'INT'} = 'SigINT';
+       kill 'HUP', $$;
+       sleep 1;
+       print "ok 11\n";
+       
+       sub SigHUP {
+           print "ok 8\n";
+           kill 'INT', $$;
+           sleep 2;
+           print "ok 9\n";
+       }
+
+        sub SigINT {
+           print "ok 10\n";
+       }
+    }
 }
 
 if ($Is_MPE) {
     print "ok 12 # skipped, _POSIX_OPEN_MAX is inaccurate on MPE\n"
 } else {
-    print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n"
+    if (&_POSIX_OPEN_MAX) {
+       print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n";
+    } else {
+       print "ok 12 # _POSIX_OPEN_MAX undefined ($fds[1])\n";
+    }
 }
 
-print getcwd() =~ m#[/\\]t$# ? "ok 13\n" : "not ok 13\n";
+my $pat;
+if ($Is_MacOS) {
+    $pat = qr/:t:$/;
+} else {
+    $pat = qr#/t$#;
+}
+print getcwd() =~ $pat ? "ok 13\n" : "not ok 13\n";
 
 # Check string conversion functions.
 
@@ -152,8 +171,9 @@ try_strftime(27, "Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100);
 }
 
 $| = 0;
-# The following line assumes buffered output, which may be not true with EMX:
-print '@#!*$@(!@#$' unless ($^O eq 'os2' || $^O eq 'uwin' || $^O eq 'os390' ||
+# The following line assumes buffered output, which may be not true:
+print '@#!*$@(!@#$' unless ($Is_MacOS || $^O eq 'os2' ||
+                            $^O eq 'uwin' || $^O eq 'os390' ||
                            (defined $ENV{PERLIO} &&
                             $ENV{PERLIO} eq 'unix' &&
                             $Config::Config{useperlio}));
index 77ce9e2..4087455 100644 (file)
@@ -277,6 +277,7 @@ usleep(useconds)
 
 void
 sleep(...)
+       PROTOTYPE: ;$
        CODE:
        if (items > 0)
            usleep((int)(SvNV(ST(0)) * 1000000));
index 5301739..73493c3 100644 (file)
@@ -233,6 +233,9 @@ Perl_my_bzero
 Perl_my_exit
 Perl_my_failure_exit
 Perl_my_fflush_all
+Perl_my_fork
+Perl_atfork_lock
+Perl_atfork_unlock
 Perl_my_lstat
 Perl_my_memcmp
 Perl_my_memset
index da34d65..947a4a7 100644 (file)
@@ -9,24 +9,34 @@
 
 # BSD paths
 case "$prefix" in
-'')    
+'')
+       # Default install; use non-system directories
        prefix='/usr/local'; # Built-in perl uses /usr
        siteprefix='/usr/local';
        vendorprefix='/usr/local'; usevendorprefix='define';
 
-       # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
-       # Don't put man pages in ${prefix}/lib; that's goofy.
-       man1dir="${prefix}/share/man/man1";
-       man3dir="${prefix}/share/man/man3";
+       # Where to put modules.
+       privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl
+       sitelib='/Library/Perl';
+       vendorlib='/Network/Library/Perl';
+       ;;
+'/usr')
+       # We are building/replacing the built-in perl
+       siteprefix='/usr/local';
+       vendorprefix='/usr/local'; usevendorprefix='define';
 
        # Where to put modules.
-       # Built-in perl uses /System/Library/Perl
-       privlib='/Library/Perl';
+       privlib='/System/Library/Perl';
        sitelib='/Library/Perl';
        vendorlib='/Network/Library/Perl';
        ;;
 esac
 
+# 4BSD uses ${prefix}/share/man, not ${prefix}/man.
+# Don't put man pages in ${prefix}/lib; that's goofy.
+man1dir="${prefix}/share/man/man1";
+man3dir="${prefix}/share/man/man3";
+
 ##
 # Tool chain settings
 ##
@@ -37,15 +47,13 @@ archname='darwin';
 # nm works.
 usenm='true';
 
-# Libc is in libsystem.
-#libc='/usr/lib/libSystem.dylib';
-
 # Optimize.
 if [ "x$optimize" = 'x' ]; then
     optimize='-O3'
 fi
 
-# XXX Unclear why we require -pipe and -fno-common here.
+# XXX Unclear why we require -pipe and -fno-common here. --Andy Dougherty
+# We don't like commons. --Fred Sánchez
 ccflags="${ccflags} -pipe -fno-common"
 
 # At least on Darwin 1.3.x:
index b7df66f..c3c4e4a 100755 (executable)
@@ -8,8 +8,9 @@ BEGIN {
 }
 
 use strict;
-my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $nonono, $dostrip,
-    $versiononly, $silent, $verbose, $otherperls, $archname,$Is_NetWare, $nwinstall);
+my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $Is_Darwin,
+    $nonono, $dostrip, $versiononly, $silent, $verbose,
+    $otherperls, $archname,$Is_NetWare, $nwinstall);
 use vars qw /$depth/;
 
 BEGIN {
@@ -17,6 +18,7 @@ BEGIN {
     $Is_W32 = $^O eq 'MSWin32';
     $Is_OS2 = $^O eq 'os2';
     $Is_Cygwin = $^O eq 'cygwin';
+    $Is_Darwin = $^O eq 'darwin';
     if ($Is_VMS) { eval 'use VMS::Filespec;' }
 }
 
@@ -341,8 +343,8 @@ foreach my $file (@corefiles) {
     # on dynamically-loadable libraries. So we do it for all.
     if (copy_if_diff($file,"$installarchlib/CORE/$file")) {
        if ($file =~ /\.(\Q$so\E|\Q$dlext\E)$/) {
-           chmod(0555, "$installarchlib/CORE/$file");
            strip("-S", "$installarchlib/CORE/$file") if $^O =~ /^(rhapsody|darwin)$/;
+           chmod(0555, "$installarchlib/CORE/$file");
        } else {
            chmod(0444, "$installarchlib/CORE/$file");
        }
@@ -425,6 +427,7 @@ if (!$Is_NetWare) {
        if (!$versiononly && ! samepath($installbin, 'x2p')) {
                safe_unlink("$installbin/a2p$exe_ext");
                copy("x2p/a2p$exe_ext", "$installbin/a2p$exe_ext");
+               strip("$installbin/a2p$exe_ext");
                chmod(0755, "$installbin/a2p$exe_ext");
        }
 }
@@ -486,7 +489,7 @@ if ($versiononly) {
 # Install pod pages.  Where? I guess in $installprivlib/pod
 # ($installprivlib/pods for cygwin).
 
-my $pod = $Is_Cygwin ? 'pods' : 'pod';
+my $pod = ($Is_Cygwin || $Is_Darwin) ? 'pods' : 'pod';
 if ( !$versiononly || ($installprivlib =~ m/\Q$ver/)) {
     mkpath("${installprivlib}/$pod", $verbose, 0777);
 
@@ -729,21 +732,28 @@ sub installlib {
            mkpath("$installlib/$dir", $verbose, 0777);
            # HP-UX (at least) needs to maintain execute permissions
            # on dynamically-loaded libraries.
-               if ($Is_NetWare && !$nwinstall) {
-                       # Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
-                       # if copied will give problems when building new extensions.
-                       # Has to be copied if we are installing on a NetWare server and hence
-                       # the check !$nwinstall
-                       if (!(/\.(?:nlp|nlm|bs)$/)) {
-                               copy_if_diff($_, "$installlib/$name")
-                               and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444,
-                          "$installlib/$name");
-                       }
-               } else {
-                       copy_if_diff($_, "$installlib/$name")
+           if ($Is_NetWare && !$nwinstall) {
+               # Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
+               # if copied will give problems when building new extensions.
+               # Has to be copied if we are installing on a NetWare server and hence
+               # the check !$nwinstall
+               if (!(/\.(?:nlp|nlm|bs)$/)) {
+                   copy_if_diff($_, "$installlib/$name")
                        and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444,
-                          "$installlib/$name");
-               } #if ($Is_NetWare)         
+                                 "$installlib/$name");
+               }
+           } else {
+               if (copy_if_diff($_, "$installlib/$name")) {
+                   if ($name =~ /\.(so|$dlext)$/o) {
+                       strip("-S", "$installlib/$name") if $^O =~ /^(rhapsody|darwin)$/;
+                       chmod(0555, "$installlib/$name");
+                   } else {
+                       strip("-S", "$installlib/$name")
+                           if ($name =~ /\.a$/o and $^O =~ /^(rhapsody|darwin)$/);
+                       chmod(0444, "$installlib/$name");
+                   }
+               }
+           } #if ($Is_NetWare)
        }
     }
 }
@@ -791,11 +801,14 @@ sub strip
 
     foreach my $file (@args) {
         if (-f $file) {
-            print "  strip $file\n" if $verbose;
+           if ($verbose) {
+               print "  strip " . join(' ', @opts);
+               print " " if (@opts);
+               print "$file\n";
+           }
             system("strip", @opts, $file);
         } else {
             print "# file '$file' skipped\n" if $verbose;
         }
     }
 }
-
index 081d8b2..89b551b 100644 (file)
@@ -1074,7 +1074,7 @@ struct IPerlProcInfo
 #define PerlProc_setjmp(b, n)  Sigsetjmp((b), (n))
 #define PerlProc_longjmp(b, n) Siglongjmp((b), (n))
 #define PerlProc_signal(n, h)  signal((n), (h))
-#define PerlProc_fork()                fork()
+#define PerlProc_fork()                my_fork()
 #define PerlProc_getpid()      getpid()
 
 #ifdef WIN32
index da6a032..c951e52 100644 (file)
@@ -3367,7 +3367,7 @@ sub subdir_x {
 subdirs ::
 @[
        cd $subdir
-       \$(MAKE) all \$(PASTHRU)
+       \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
        cd ..
 ]
 EOT
@@ -3376,7 +3376,7 @@ EOT
            return <<EOT;
 subdirs ::
        cd $subdir
-       \$(MAKE) all \$(PASTHRU)
+       \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
        cd ..
 EOT
        }
@@ -3384,8 +3384,7 @@ EOT
        return <<EOT;
 
 subdirs ::
-       $self->{NOECHO}cd $subdir && \$(MAKE) all \$(PASTHRU)
-
+       $self->{NOECHO}cd $subdir && \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
 EOT
     }
 }
index cef46bc..7f6bf1a 100644 (file)
@@ -150,8 +150,9 @@ sub prompt ($;$) {
 sub eval_in_subdirs {
     my($self) = @_;
     my($dir);
-    use Cwd 'cwd';
+    use Cwd qw(cwd abs_path);
     my $pwd = cwd();
+    local @INC = map eval {abs_path($_)} || $_, @INC;
 
     foreach $dir (@{$self->{DIR}}){
        my($abs) = $self->catdir($pwd,$dir);
@@ -335,6 +336,7 @@ sub ExtUtils::MakeMaker::new {
 
     check_hints($self);
 
+    my %configure_att;         # record &{$self->{CONFIGURE}} attributes
     my(%initial_att) = %$self; # record initial attributes
 
     my($prereq);
@@ -374,7 +376,8 @@ sub ExtUtils::MakeMaker::new {
 
     if (defined $self->{CONFIGURE}) {
        if (ref $self->{CONFIGURE} eq 'CODE') {
-           $self = { %$self, %{&{$self->{CONFIGURE}}}};
+           %configure_att = %{&{$self->{CONFIGURE}}};
+           $self = { %$self, %configure_att };
        } else {
            Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
        }
@@ -420,6 +423,8 @@ sub ExtUtils::MakeMaker::new {
                    }
            }
        }
+       my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
+       parse_args($self,@fm) if @fm;
     } else {
        parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV);
     }
@@ -480,6 +485,27 @@ END
        $v =~ tr/\n/ /s;
        push @{$self->{RESULT}}, "#     $key => $v";
     }
+    undef %initial_att;        # free memory
+
+    if (defined $self->{CONFIGURE}) {
+       push @{$self->{RESULT}}, <<END;
+
+#   MakeMaker 'CONFIGURE' Parameters:
+END
+        if (scalar(keys %configure_att) > 0) {
+            foreach $key (sort keys %configure_att){
+               my($v) = neatvalue($configure_att{$key});
+               $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
+               $v =~ tr/\n/ /s;
+               push @{$self->{RESULT}}, "#     $key => $v";
+            }
+        }
+        else
+        {
+           push @{$self->{RESULT}}, "# no values returned";
+        }
+        undef %configure_att;  # free memory
+    }
 
     # turn the SKIP array into a SKIPHASH hash
     my (%skip,$skip);
@@ -520,14 +546,20 @@ END
 }
 
 sub WriteEmptyMakefile {
-  if (-f 'Makefile.old') {
-    chmod 0666, 'Makefile.old';
-    unlink 'Makefile.old' or warn "unlink Makefile.old: $!";
-  }
-  rename 'Makefile', 'Makefile.old' or warn "rename Makefile Makefile.old: $!"
-    if -f 'Makefile';
-  open MF, '> Makefile' or die "open Makefile for write: $!";
-  print MF <<'EOP';
+    Carp::croak "WriteEmptyMakefile: Need even number of args" if @_ % 2;
+    local $SIG{__WARN__} = \&warnhandler;
+
+    my %att = @_;
+    my $self = MM->new(\%att);
+    if (-f "$self->{MAKEFILE}.old") {
+      chmod 0666, "$self->{MAKEFILE}.old";
+      unlink "$self->{MAKEFILE}.old" or warn "unlink $self->{MAKEFILE}.old: $!";
+    }
+    rename $self->{MAKEFILE}, "$self->{MAKEFILE}.old"
+      or warn "rename $self->{MAKEFILE} $self->{MAKEFILE}.old: $!"
+        if -f $self->{MAKEFILE};
+    open MF, '>', $self->{MAKEFILE} or die "open $self->{MAKEFILE} for write: $!";
+    print MF <<'EOP';
 all:
 
 clean:
@@ -539,7 +571,7 @@ makemakerdflt:
 test:
 
 EOP
-  close MF or die "close Makefile for write: $!";
+    close MF or die "close $self->{MAKEFILE} for write: $!";
 }
 
 sub check_manifest {
index 669e04b..9c6eba0 100644 (file)
@@ -1,5 +1,5 @@
 # Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.19 2001/07/10 11:08:09 eagle Exp $
+# $Id: Man.pm,v 1.20 2001/07/19 22:51:11 eagle Exp $
 #
 # Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
 #
@@ -37,7 +37,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
 # Don't use the CVS revision as the version, since this module is also in Perl
 # core and too many things could munge CVS magic revision strings.  This
 # number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.19;
+$VERSION = 1.20;
 
 
 ##############################################################################
@@ -569,7 +569,8 @@ sub sequence {
         } elsif (exists $ESCAPES{$_}) {
             return bless \ "$ESCAPES{$_}", 'Pod::Man::String';
         } else {
-            carp "Unknown escape E<$1>";
+            my ($file, $line) = $seq->file_line;
+            warn "$file:$line: Unknown escape E<$_>\n";
             return bless \ "E<$_>", 'Pod::Man::String';
         }
     }
@@ -607,7 +608,8 @@ sub sequence {
     if ($command eq 'X') { push (@{ $$self{INDEX} }, $_); return '' }
 
     # Anything else is unknown.
-    carp "Unknown sequence $command<$_>";
+    my ($file, $line) = $seq->file_line;
+    warn "$file:$line: Unknown sequence $command<$_>\n";
 }
 
 
@@ -702,7 +704,9 @@ sub cmd_back {
     my $self = shift;
     $$self{INDENT} = pop @{ $$self{INDENTS} };
     unless (defined $$self{INDENT}) {
-        carp "Unmatched =back";
+        my ($file, $line, $paragraph) = @_;
+        ($file, $line) = $paragraph->file_line;
+        warn "$file:$line: Unmatched =back\n";
         $$self{INDENT} = 0;
     }
     if ($$self{WEIRDINDENT}) {
@@ -1344,17 +1348,17 @@ invalid.  A quote specification must be one, two, or four characters long.
 (W) The POD source contained a non-standard command paragraph (something of
 the form C<=command args>) that Pod::Man didn't know about.  It was ignored.
 
-=item Unknown escape EE<lt>%sE<gt>
+=item %s:%d: Unknown escape EE<lt>%sE<gt>
 
 (W) The POD source contained an C<EE<lt>E<gt>> escape that Pod::Man didn't
 know about.  C<EE<lt>%sE<gt>> was printed verbatim in the output.
 
-=item Unknown sequence %s
+=item %s:%d: Unknown sequence %s
 
 (W) The POD source contained a non-standard interior sequence (something of
 the form C<XE<lt>E<gt>>) that Pod::Man didn't know about.  It was ignored.
 
-=item Unmatched =back
+=item %s:%d: Unmatched =back
 
 (W) Pod::Man encountered a C<=back> command that didn't correspond to an
 C<=over> command.
index 58c7543..199fa5f 100644 (file)
@@ -4,7 +4,7 @@ require Exporter;
 
 use strict;
 
-our $VERSION = '1.00';
+our $VERSION = '1.02';
 our @ISA = qw(Exporter);
 our @EXPORT = qw(look);
 
@@ -17,6 +17,9 @@ Search::Dict, look - search for key in dictionary file
     use Search::Dict;
     look *FILEHANDLE, $key, $dict, $fold;
 
+    use Search::Dict;
+    look *FILEHANDLE, $params;
+
 =head1 DESCRIPTION
 
 Sets file position in FILEHANDLE to be first line greater than or equal
@@ -26,38 +29,64 @@ occurs.
 The flags specify dictionary order and case folding:
 
 If I<$dict> is true, search by dictionary order (ignore anything but word
-characters and whitespace).
+characters and whitespace).  The default is honour all characters.
+
+If I<$fold> is true, ignore case.  The default is to honour case.
 
-If I<$fold> is true, ignore case.
+If there are only three arguments and the third argument is a hash
+reference, the keys of that hash can have values C<dict>, C<fold>, and
+C<comp> or C<xfrm> (see below), and their correponding values will be
+used as the parameters.
+
+If a comparison subroutine (comp) is defined, it must return less than zero,
+zero, or greater than zero, if the first comparand is less than,
+equal, or greater than the second comparand.
+
+If a transformation subroutine (xfrm) is defined, its value is used to
+transform the lines read from the filehandle before their comparison.
 
 =cut
 
 sub look {
     my($fh,$key,$dict,$fold) = @_;
+    my ($comp, $xfrm);
+    if (@_ == 3 && ref $dict eq 'HASH') {
+       my $params = $dict;
+       $dict = 0;
+       $dict = $params->{dict} if exists $params->{dict};
+       $fold = $params->{fold} if exists $params->{fold};
+       $comp = $params->{comp} if exists $params->{comp};
+       $xfrm = $params->{xfrm} if exists $params->{xfrm};
+    }
+    $comp = sub { $_[0] cmp $_[1] } unless defined $comp;
     local($_);
     my(@stat) = stat($fh)
        or return -1;
     my($size, $blksize) = @stat[7,11];
     $blksize ||= 8192;
     $key =~ s/[^\w\s]//g if $dict;
-    $key = lc $key if $fold;
-    my($min, $max, $mid) = (0, int($size / $blksize));
+    $key = lc $key       if $fold;
+    # find the right block
+    my($min, $max) = (0, int($size / $blksize));
+    my $mid;
     while ($max - $min > 1) {
        $mid = int(($max + $min) / 2);
        seek($fh, $mid * $blksize, 0)
            or return -1;
        <$fh> if $mid;                  # probably a partial line
        $_ = <$fh>;
-       chop;
+       $_ = $xfrm->($_) if defined $xfrm;
+       chomp;
        s/[^\w\s]//g if $dict;
-       $_ = lc $_ if $fold;
-       if (defined($_) && $_ lt $key) {
+       $_ = lc $_   if $fold;
+       if (defined($_) && $comp->($_, $key) < 0) {
            $min = $mid;
        }
        else {
            $max = $mid;
        }
     }
+    # find the right line
     $min *= $blksize;
     seek($fh,$min,0)
        or return -1;
@@ -66,10 +95,11 @@ sub look {
        $min = tell($fh);
        defined($_ = <$fh>)
            or last;
-       chop;
+       $_ = $xfrm->($_) if defined $xfrm;
+       chomp;
        s/[^\w\s]//g if $dict;
-       $_ = lc $_ if $fold;
-       last if $_ ge $key;
+       $_ = lc $_   if $fold;
+       last if $comp->($_, $key) >= 0;
     }
     seek($fh,$min,0);
     $min;
index 77728bc..dcc5f68 100644 (file)
@@ -9,7 +9,7 @@ use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish
          qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)#private-ish
          );
 
-$VERSION = '1.17_00';
+$VERSION = '1.18';
 require Exporter;
 @ISA=('Exporter');
 
@@ -64,6 +64,9 @@ Test - provides a simple framework for writing test scripts
 
 =head1 DESCRIPTION
 
+B<STOP!> If you are writing a new test, we I<highly suggest> you use
+the new Test::Simple and Test::More modules instead.
+
 L<Test::Harness|Test::Harness> expects to see particular output when it
 executes tests.  This module aims to make writing proper test scripts just
 a little bit easier (and less error prone :-).
@@ -436,6 +439,8 @@ L<Test::Simple>, L<Test::More>, L<Test::Harness>, L<Devel::Cover>
 
 L<Test::Unit> is an interesting alternative testing library.
 
+L<Pod::Tests> and L<SelfTest> let you embed tests in code.
+
 
 =head1 AUTHOR
 
index d911689..d2dd491 100644 (file)
@@ -1,8 +1,17 @@
 # -*-perl-*-
 use strict;
-use Test;
-BEGIN { plan tests => 4, todo => [2,3] }
+use Test qw(:DEFAULT $TESTOUT $ntest);
 
+### This test is crafted in such a way as to prevent Test::Harness from
+### seeing the todo tests, otherwise you get people sending in bug reports
+### about Test.pm having "UNEXPECTEDLY SUCCEEDED" tests.
+
+open F, ">mix";
+$TESTOUT = *F{IO};
+
+plan tests => 4, todo => [2,3];
+
+# line 15
 ok(sub { 
        my $r = 0;
        for (my $x=0; $x < 10; $x++) {
@@ -15,3 +24,25 @@ ok(0);
 ok(1);
 
 skip(1,0);
+
+close F;
+$TESTOUT = *STDOUT{IO};
+$ntest = 1;
+
+open F, "mix";
+my $out = join '', <F>;
+close F;
+unlink "mix";
+
+my $expect = <<"EXPECT";
+1..4 todo 2 3;
+ok 1
+not ok 2
+# Failed test 2 in $0 at line 23 *TODO*
+ok 3 # ($0 at line 24 TODO?!)
+ok 4 # skip
+EXPECT
+
+
+print "1..1\n";
+ok( $out, $expect );
index a580f0a..6a090bc 100644 (file)
@@ -5,7 +5,7 @@ BEGIN { plan tests => 11 }
 
 ok(ok(1));
 ok(ok('fixed', 'fixed'));
-ok(skip(1,0));
+ok(skip("just testing skip()",0));
 ok(undef, undef);
 ok(ok 'the brown fox jumped over the lazy dog', '/lazy/');
 ok(ok 'the brown fox jumped over the lazy dog', 'm,fox,');
index ae02a04..510e80d 100644 (file)
@@ -1,13 +1,46 @@
 # -*-perl-*-
 use strict;
-use Test;
-BEGIN { 
-    my $tests = 5; 
-    plan tests => $tests, todo => [1..$tests]; 
-}
+use Test qw(:DEFAULT $TESTOUT $ntest);
 
-ok(0);
+### This test is crafted in such a way as to prevent Test::Harness from
+### seeing the todo tests, otherwise you get people sending in bug reports
+### about Test.pm having "UNEXPECTEDLY SUCCEEDED" tests.
+
+open F, ">todo";
+$TESTOUT = *F{IO};
+
+my $tests = 5; 
+plan tests => $tests, todo => [2..$tests]; 
+
+# line 11
+ok(1);
 ok(1);
 ok(0,1);
 ok(0,1,"need more tuits");
 ok(1,1);
+
+close F;
+$TESTOUT = *STDOUT{IO};
+$ntest = 1;
+
+open F, "todo";
+my $out = join '', <F>;
+close F;
+unlink "todo";
+
+my $expect = <<"EXPECT";
+1..5 todo 2 3 4 5;
+ok 1
+ok 2 # ($0 at line 12 TODO?!)
+not ok 3
+# Test 3 got: '0' ($0 at line 13 *TODO*)
+#   Expected: '1'
+not ok 4
+# Test 4 got: '0' ($0 at line 14 *TODO*)
+#   Expected: '1' (need more tuits)
+ok 5 # ($0 at line 15 TODO?!)
+EXPECT
+
+
+print "1..1\n";
+ok( $out, $expect );
index f80d753..ca292ef 100644 (file)
@@ -3,11 +3,12 @@ package UnicodeCD;
 use strict;
 use warnings;
 
-our $VERSION = '0.1';
+our $VERSION = '0.2';
 
 require Exporter;
 
 our @ISA = qw(Exporter);
+
 our @EXPORT_OK = qw(charinfo
                    charblock charscript
                    charblocks charscripts
@@ -32,9 +33,24 @@ UnicodeCD - Unicode character database
     use UnicodeCD 'charscript';
     my $charscript = charblock($codepoint);
 
+    use UnicodeCD 'charblocks';
+    my $charblocks = charblocks();
+
+    use UnicodeCD 'charscripts';
+    my %charscripts = charscripts();
+
+    use UnicodeCD qw(charscript charinrange);
+    my $range = charscript($script);
+    print "looks like $script\n" if charinrange($range, $codepoint);
+
+    use UnicodeCD 'compexcl';
+    my $compexcl = compexcl($codepoint);
+
+    my $unicode_version = UnicodeCD::UnicodeVersion();
+
 =head1 DESCRIPTION
 
-The Unicode module offers a simple interface to the Unicode Character
+The UnicodeCD module offers a simple interface to the Unicode Character
 Database.
 
 =cut
@@ -119,17 +135,134 @@ sub _getcode {
     return;
 }
 
+sub han_charname {
+    my $arg  = shift;
+    my $code = _getcode($arg);
+    croak __PACKAGE__, "::han_charname: unknown code '$arg'"
+       unless defined $code;
+    croak __PACKAGE__, "::han_charname: outside CJK Unified Ideographs '$arg'"
+        unless 0x3400  <= $code && $code <= 0x4DB5  
+            || 0x4E00  <= $code && $code <= 0x9FA5  
+            || 0x20000 <= $code && $code <= 0x2A6D6;
+    sprintf "CJK UNIFIED IDEOGRAPH-%04X", $code;
+}
+
+my @JamoL = ( # Leading Consonant (HANGUL CHOSEONG)
+    "G", "GG", "N", "D", "DD", "R", "M", "B", "BB",
+    "S", "SS", "", "J", "JJ", "C", "K", "T", "P", "H",
+  );
+
+my @JamoV = ( # Medium Vowel (HANGUL JUNGSEONG)
+    "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O",
+    "WA", "WAE", "OE", "YO", "U", "WEO", "WE", "WI",
+    "YU", "EU", "YI", "I",
+  );
+
+my @JamoT = ( # Trailing Consonant (HANGUL JONGSEONG)
+    "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L", "LG", "LM",
+    "LB", "LS", "LT", "LP", "LH", "M", "B", "BS",
+    "S", "SS", "NG", "J", "C", "K", "T", "P", "H",
+  );
+
+my %HangulConst = (
+   SBase  => 0xAC00,
+   LBase  => 0x1100,
+   VBase  => 0x1161,
+   TBase  => 0x11A7,
+   LCount => 19,     # scalar @JamoL
+   VCount => 21,     # scalar @JamoV
+   TCount => 28,     # scalar @JamoT
+   NCount => 588,    # VCount * TCount
+   SCount => 11172,  # LCount * NCount
+   Final  => 0xD7A3, # SBase -1 + SCount
+  );
+
+sub hangul_charname {
+    my $arg  = shift;
+    my $code = _getcode($arg);
+    croak __PACKAGE__, "::hangul_charname: unknown code '$arg'"
+       unless defined $code;
+    croak __PACKAGE__, "::hangul_charname: outside Hangul Syllables '$arg'"
+        unless $HangulConst{SBase} <= $code && $code <= $HangulConst{Final};
+    my $SIndex = $code - $HangulConst{SBase};
+    my $LIndex = int( $SIndex / $HangulConst{NCount});
+    my $VIndex = int(($SIndex % $HangulConst{NCount}) / $HangulConst{TCount});
+    my $TIndex =      $SIndex % $HangulConst{TCount};
+    return join('',
+        "HANGUL SYLLABLE ",
+        $JamoL[$LIndex],
+        $JamoV[$VIndex],
+        $JamoT[$TIndex],
+      );
+}
+
+sub hangul_decomp {
+    my $arg  = shift;
+    my $code = _getcode($arg);
+    croak __PACKAGE__, "::hangul_decomp: unknown code '$arg'"
+       unless defined $code;
+    croak __PACKAGE__, "::hangul_decomp: outside Hangul Syllables '$arg'"
+        unless $HangulConst{SBase} <= $code && $code <= $HangulConst{Final};
+    my $SIndex = $code - $HangulConst{SBase};
+    my $LIndex = int( $SIndex / $HangulConst{NCount});
+    my $VIndex = int(($SIndex % $HangulConst{NCount}) / $HangulConst{TCount});
+    my $TIndex =      $SIndex % $HangulConst{TCount};
+
+    return join(" ",
+        sprintf("%04X", $HangulConst{LBase} + $LIndex),
+        sprintf("%04X", $HangulConst{VBase} + $VIndex),
+      $TIndex ?
+        sprintf("%04X", $HangulConst{TBase} + $TIndex) : (),
+    );
+}
+
+my @CharinfoRanges = (
+# block name
+# [ first, last, coderef to name, coderef to decompose ],
+# CJK Ideographs Extension A
+  [ 0x3400,   0x4DB5,   \&han_charname,   undef  ],
+# CJK Ideographs
+  [ 0x4E00,   0x9FA5,   \&han_charname,   undef  ],
+# Hangul Syllables
+  [ 0xAC00,   0xD7A3,   \&hangul_charname, \&hangul_decomp  ],
+# Non-Private Use High Surrogates
+  [ 0xD800,   0xDB7F,   undef,   undef  ],
+# Private Use High Surrogates
+  [ 0xDB80,   0xDBFF,   undef,   undef  ],
+# Low Surrogates
+  [ 0xDC00,   0xDFFF,   undef,   undef  ],
+# The Private Use Area
+  [ 0xE000,   0xF8FF,   undef,   undef  ],
+# CJK Ideographs Extension B
+  [ 0x20000,  0x2A6D6,  \&han_charname,   undef  ],
+# Plane 15 Private Use Area
+  [ 0xF0000,  0xFFFFD,  undef,   undef  ],
+# Plane 16 Private Use Area
+  [ 0x100000, 0x10FFFD, undef,   undef  ],
+);
+
 sub charinfo {
     my $arg  = shift;
     my $code = _getcode($arg);
     croak __PACKAGE__, "::charinfo: unknown code '$arg'"
        unless defined $code;
-    my $hexk = sprintf("%04X", $code);
-
+    my $hexk = sprintf("%06X", $code);
+    my($rcode,$rname,$rdec);
+    foreach my $range (@CharinfoRanges){
+      if ($range->[0] <= $code && $code <= $range->[1]) {
+        $rcode = $hexk;
+       $rcode =~ s/^0+//;
+       $rcode =  sprintf("%04X", hex($rcode));
+        $rname = $range->[2] ? $range->[2]->($code) : '';
+        $rdec  = $range->[3] ? $range->[3]->($code) : '';
+        $hexk  = sprintf("%06X", $range->[0]); # replace by the first
+        last;
+      }
+    }
     openunicode(\$UNICODEFH, "Unicode.txt");
     if (defined $UNICODEFH) {
-       use Search::Dict;
-       if (look($UNICODEFH, "$hexk;") >= 0) {
+       use Search::Dict 1.02;
+       if (look($UNICODEFH, "$hexk;", { xfrm => sub { $_[0] =~ /^([^;]+);(.+)/; sprintf "%06X;$2", hex($1) } } ) >= 0) {
            my $line = <$UNICODEFH>;
            chomp $line;
            my %prop;
@@ -140,9 +273,16 @@ sub charinfo {
                     mirrored unicode10 comment
                     upper lower title
                    )} = split(/;/, $line, -1);
+           $hexk =~ s/^0+//;
+           $hexk =  sprintf("%04X", hex($hexk));
            if ($prop{code} eq $hexk) {
                $prop{block}  = charblock($code);
                $prop{script} = charscript($code);
+               if(defined $rname){
+                    $prop{code} = $rcode;
+                    $prop{name} = $rname;
+                    $prop{decomposition} = $rdec;
+                }
                return \%prop;
            }
        }
@@ -377,12 +517,12 @@ or "U+" followed by hexadecimals.
 In addition to using the C<\p{In...}> and C<\P{In...}> constructs, you
 can also test whether a code point is in the I<range> as returned by
 L</charblock> and L</charscript> or as the values of the hash returned
-by L</charblocks> and </charscripts> by using charinrange():
+by L</charblocks> and L</charscripts> by using charinrange():
 
     use UnicodeCD qw(charscript charinrange);
 
     $range = charscript('Hiragana');
-    print "looks like hiragana\n" if charinrange($range, $code);
+    print "looks like hiragana\n" if charinrange($range, $codepoint);
 
 =cut
 
@@ -393,8 +533,8 @@ by L</charblocks> and </charscripts> by using charinrange():
     my $compexcl = compexcl("09dc");
 
 The compexcl() returns the composition exclusion (that is, if the
-character cannot be decomposed) of the character specified by a B<code
-point argument>.
+character should not be produced during a precomposition) of the 
+character specified by a B<code point argument>.
 
 If there is a composition exclusion for the character, true is
 returned.  Otherwise, false is returned.
@@ -420,6 +560,8 @@ sub _compexcl {
 sub compexcl {
     my $arg  = shift;
     my $code = _getcode($arg);
+    croak __PACKAGE__, "::compexcl: unknown code '$arg'"
+       unless defined $code;
 
     _compexcl() unless %COMPEXCL;
 
@@ -490,6 +632,8 @@ sub _casefold {
 sub casefold {
     my $arg  = shift;
     my $code = _getcode($arg);
+    croak __PACKAGE__, "::casefold: unknown code '$arg'"
+       unless defined $code;
 
     _casefold() unless %CASEFOLD;
 
@@ -526,16 +670,16 @@ true.  Case distinctions in the condition list are not significant.
 Conditions preceded by "NON_" represent the negation of the condition
 
 A I<locale> is defined as a 2-letter ISO 3166 country code, possibly
-followed by a "_" and a 2-letter ISO language code (, possibly followed
-by a "_" and a variant code).  You can find the list of those codes
-in L<Locale::Country> and L<Locale::Language>.
+followed by a "_" and a 2-letter ISO language code (possibly followed
+by a "_" and a variant code).  You can find the lists of those codes,
+see L<Locale::Country> and L<Locale::Language>.
 
 A I<context> is one of the following choices:
 
     FINAL            The letter is not followed by a letter of
                      general category L (e.g. Ll, Lt, Lu, Lm, or Lo)
     MODERN           The mapping is only used for modern text
-    AFTER_i          The last base character was "i" 0069
+    AFTER_i          The last base character was "i" (U+0069)
 
 For more information about case mappings see
 http://www.unicode.org/unicode/reports/tr21/
@@ -565,6 +709,8 @@ sub _casespec {
 sub casespec {
     my $arg  = shift;
     my $code = _getcode($arg);
+    croak __PACKAGE__, "::casespec: unknown code '$arg'"
+       unless defined $code;
 
     _casespec() unless %CASESPEC;
 
index 07c572c..746ebcb 100644 (file)
@@ -3,7 +3,7 @@ use UnicodeCD;
 use Test;
 use strict;
 
-BEGIN { plan tests => 111 };
+BEGIN { plan tests => 162 };
 
 use UnicodeCD 'charinfo';
 
@@ -93,6 +93,70 @@ ok($charinfo->{title},          '');
 ok($charinfo->{block},          'Hebrew');
 ok($charinfo->{script},         'Hebrew');
 
+# An open syllable in Hangul.
+
+$charinfo = charinfo(0xAC00);
+
+ok($charinfo->{code},           'AC00');
+ok($charinfo->{name},           'HANGUL SYLLABLE GA');
+ok($charinfo->{category},       'Lo');
+ok($charinfo->{combining},      '0');
+ok($charinfo->{bidi},           'L');
+ok($charinfo->{decomposition},  '1100 1161');
+ok($charinfo->{decimal},        '');
+ok($charinfo->{digit},          '');
+ok($charinfo->{numeric},        '');
+ok($charinfo->{mirrored},       'N');
+ok($charinfo->{unicode10},      '');
+ok($charinfo->{comment},        '');
+ok($charinfo->{upper},          '');
+ok($charinfo->{lower},          '');
+ok($charinfo->{title},          '');
+ok($charinfo->{block},          'Hangul Syllables');
+ok($charinfo->{script},         'Hangul');
+
+# A closed syllable in Hangul.
+
+$charinfo = charinfo(0xAE00);
+
+ok($charinfo->{code},           'AE00');
+ok($charinfo->{name},           'HANGUL SYLLABLE GEUL');
+ok($charinfo->{category},       'Lo');
+ok($charinfo->{combining},      '0');
+ok($charinfo->{bidi},           'L');
+ok($charinfo->{decomposition},  '1100 1173 11AF');
+ok($charinfo->{decimal},        '');
+ok($charinfo->{digit},          '');
+ok($charinfo->{numeric},        '');
+ok($charinfo->{mirrored},       'N');
+ok($charinfo->{unicode10},      '');
+ok($charinfo->{comment},        '');
+ok($charinfo->{upper},          '');
+ok($charinfo->{lower},          '');
+ok($charinfo->{title},          '');
+ok($charinfo->{block},          'Hangul Syllables');
+ok($charinfo->{script},         'Hangul');
+
+$charinfo = charinfo(0x1D400);
+
+ok($charinfo->{code},           '1D400');
+ok($charinfo->{name},           'MATHEMATICAL BOLD CAPITAL A');
+ok($charinfo->{category},       'Lu');
+ok($charinfo->{combining},      '0');
+ok($charinfo->{bidi},           'L');
+ok($charinfo->{decomposition},  '<font> 0041');
+ok($charinfo->{decimal},        '');
+ok($charinfo->{digit},          '');
+ok($charinfo->{numeric},        '');
+ok($charinfo->{mirrored},       'N');
+ok($charinfo->{unicode10},      '');
+ok($charinfo->{comment},        '');
+ok($charinfo->{upper},          '');
+ok($charinfo->{lower},          '');
+ok($charinfo->{title},          '');
+ok($charinfo->{block},          'Mathematical Alphanumeric Symbols');
+ok($charinfo->{script},         undef);
+
 use UnicodeCD qw(charblock charscript);
 
 # 0x0590 is in the Hebrew block but unused.
index 21f4697..ac37a66 100644 (file)
@@ -1,11 +1,11 @@
 package constant;
 
 use strict;
-use 5.005_64;
+use 5.006_00;
 use warnings::register;
 
 our($VERSION, %declared);
-$VERSION = '1.03';
+$VERSION = '1.04';
 
 #=======================================================================
 
@@ -158,8 +158,8 @@ constant - Perl pragma to declare constants
        PI              => 4 * atan2( 1, 1 ),
        DEBUGGING       => 0,
        ORACLE          => 'oracle@cs.indiana.edu',
-       USERNAME        => scalar getpwuid($<),
-       USERINFO        => getpwuid($<),
+       USERNAME        => scalar getpwuid($<),      # this works
+       USERINFO        => getpwuid($<),             # THIS IS A BUG!
     };
 
 =head1 DESCRIPTION
@@ -200,7 +200,9 @@ compile time.
 
 Constant symbols are package scoped (rather than block scoped, as
 C<use strict> is). That is, you can refer to a constant from package
-Other as C<Other::CONST>.
+Other as C<Other::CONST>.  You may also use constants as either class
+or object methods, ie. C<< Other->CONST() >> or C<< $obj->CONST() >>.
+Such constant methods will be inherited as usual.
 
 As with all C<use> directives, defining a constant happens at
 compile time. Thus, it's probably not correct to put a constant
@@ -218,39 +220,63 @@ finished.
     [...]
     use constant PERSON => { age => AGE }; # Right
 
-Omitting the value for a symbol gives it the value of C<undef> in
-a scalar context or the empty list, C<()>, in a list context. This
-isn't so nice as it may sound, though, because in this case you
-must either quote the symbol name, or use a big arrow, (C<=E<gt>>),
-with nothing to point to. It is also illegal to do when defining
-multiple constants at once, you must declare them explicitly.  It
-is probably best to declare these explicitly.
+Giving an empty list, C<()>, as the value for a symbol makes it return
+C<undef> in scalar context and the empty list in list context.
 
-    use constant UNICORNS      => ();
-    use constant LOGFILE       => undef;
+    use constant UNICORNS => ();
 
-The result from evaluating a list constant in a scalar context is
-not documented, and is B<not> guaranteed to be any particular value
-in the future. In particular, you should not rely upon it being
-the number of elements in the list, especially since it is not
-B<necessarily> that value in the current implementation.
+    print "Impossible!\n"  if defined UNICORNS;    
+    my @unicorns = UNICORNS;  # there are no unicorns
 
-Magical values, tied values, and references can be made into
-constants at compile time, allowing for way cool stuff like this.
-(These error numbers aren't totally portable, alas.)
+The same effect can be achieved by omitting the value and the big
+arrow entirely, but then the symbol name must be put in quotes.
+
+    use constant "UNICORNS";
+
+The result from evaluating a list constant with more than one element
+in a scalar context is not documented, and is B<not> guaranteed to be
+any particular value in the future. In particular, you should not rely
+upon it being the number of elements in the list, especially since it
+is not B<necessarily> that value in the current implementation.
+
+Magical values and references can be made into constants at compile
+time, allowing for way cool stuff like this.  (These error numbers
+aren't totally portable, alas.)
 
     use constant E2BIG => ($! = 7);
     print   E2BIG, "\n";       # something like "Arg list too long"
     print 0+E2BIG, "\n";       # "7"
 
+You can't produce a tied constant by giving a tied scalar as the
+value.  References to tied variables, however, can be used as
+constants without any problems.
+
 Dereferencing constant references incorrectly (such as using an array
 subscript on a constant hash reference, or vice versa) will be trapped at
 compile time.
 
-When declaring multiple constants, all constant values will be a scalar.
-This is because C<constant> can't guess the intent of the programmer
-correctly all the time since values must be expressed in scalar context
-within a hash ref.
+When declaring multiple constants, all constant values B<must be
+scalars>.  If you accidentally try to use a list with more (or less)
+than one value, every second value will be treated as a symbol name.
+
+    use constant {
+        EMPTY => (),                    # WRONG!
+        MANY => ("foo", "bar", "baz"),  # WRONG!
+    };
+
+This will get interpreted as below, which is probably not what you
+wanted.
+
+    use constant {
+        EMPTY => "MANY",  # oops.
+        foo => "bar",     # oops!
+        baz => undef,     # OOPS!
+    };
+
+This is a fundamental limitation of the way hashes are constructed in
+Perl.  The error messages produced when this happens will often be
+quite cryptic -- in the worst case there may be none at all, and
+you'll only later find that something is broken.
 
 In the rare case in which you need to discover at run time whether a
 particular constant has been declared via this module, you may use
@@ -317,6 +343,9 @@ many other folks.
 Multiple constant declarations at once added by Casey West,
 E<lt>F<casey@geeknest.com>E<gt>.
 
+Assorted documentation fixes by Ilmari Karonen,
+E<lt>F<perl@itz.pp.sci.fi>E<gt>.
+
 =head1 COPYRIGHT
 
 Copyright (C) 1997, 1999 Tom Phoenix
index 1c20f57..ab9c48d 100644 (file)
@@ -1226,7 +1226,7 @@ EOP
                          *dbline = $main::{'_<' . $file};
                          next unless %dbline or $postponed_file{$file};
                          (push @hard, $file), next 
-                           if $file =~ /^\(eval \d+\)$/;
+                           if $file =~ /^\(\w*eval/;
                          my @add;
                          @add = %{$postponed_file{$file}}
                            if $postponed_file{$file};
diff --git a/macos/MacPerlTests.cmd b/macos/MacPerlTests.cmd
new file mode 100644 (file)
index 0000000..3b8854d
--- /dev/null
@@ -0,0 +1,603 @@
+# ::macos:perl -I::lib -e 'for(<:*:*.t>){open my $fh,"<$_";$t=<$fh>=~/(T)/?"-T":"  ";$s="$^X -I::lib $t $_"; print qq[echo "$s"\n$s\n]}'
+set -e MACPERL ""
+set -e PERL5LIB ""
+perl -e '`set -e MACPERL_OLD "{{MACPERL}}"` if `echo {{MACPERL}}`'
+perl -e '`set -e PERL5LIB_OLD "{{PERL5LIB}}"` if `echo {{PERL5LIB}}`'
+perl -e '`set -e MACPERL ""`'
+perl -e '`set -e PERL5LIB ""`'
+echo "# When finished, execute these lines to restore your ToolServer environment:"
+echo "perl -e '¶`set -e MACPERL  Â¶"¶{¶{MACPERL_OLD¶}¶}¶"¶`  if Â¶`echo Â¶{¶{MACPERL_OLD¶}¶}¶`'"
+echo "perl -e '¶`set -e PERL5LIB Â¶"¶{¶{PERL5LIB_OLD¶}¶}¶"¶` if Â¶`echo Â¶{¶{PERL5LIB_OLD¶}¶}¶`'"
+echo ""
+
+perl -e 'open F, ">::macos:MacPerlTests.out"'
+open ::macos:MacPerlTests.out
+
+echo "::macos:perl -I::lib    :base:cond.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:cond.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :base:if.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:if.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :base:lex.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:lex.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :base:pat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:pat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :base:rs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:rs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :base:term.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :base:term.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:elsif.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:elsif.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:for.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:for.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:mod.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:mod.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:subval.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:subval.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:switch.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:switch.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :cmd:while.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :cmd:while.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:bproto.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:bproto.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:cmdopt.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:cmdopt.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:colon.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:colon.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:cpp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:cpp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:decl.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:decl.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:multiline.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:multiline.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:package.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:package.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:proto.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:proto.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:redef.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:redef.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:require.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:require.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:script.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:script.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:term.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:term.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :comp:use.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :comp:use.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:argv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:argv.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:dup.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:dup.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:fs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:fs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:inplace.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:inplace.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:iprefix.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:iprefix.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:nargv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:nargv.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:open.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:open.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:openpid.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:openpid.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:pipe.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:pipe.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:print.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:print.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:read.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:read.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :io:tell.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :io:tell.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:abbrev.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:abbrev.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:ansicolor.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:ansicolor.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:anydbm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:anydbm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:attrs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:attrs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:autoloader.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:autoloader.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:b.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:b.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :lib:basename.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :lib:basename.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:bigfloat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:bigfloat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:bigfltpm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:bigfltpm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:bigint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:bigint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:bigintpm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:bigintpm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-esc.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-esc.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-form.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-form.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-function.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-function.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-html.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-html.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-pretty.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-pretty.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:cgi-request.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:cgi-request.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:charnames.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:charnames.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:checktree.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:checktree.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:class-struct.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:class-struct.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:complex.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:complex.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:db-btree.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:db-btree.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:db-hash.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:db-hash.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:db-recno.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:db-recno.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:dirhand.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:dirhand.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:dosglob.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:dosglob.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:dprof.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:dprof.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:dumper-ovl.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:dumper-ovl.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:dumper.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:dumper.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:english.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:english.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:env-array.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:env-array.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:env.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:env.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:errno.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:errno.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:fatal.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:fatal.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:fields.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:fields.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filecache.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filecache.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filecopy.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filecopy.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :lib:filefind-taint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :lib:filefind-taint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filefind.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filefind.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filefunc.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filefunc.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filehand.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filehand.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filepath.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filepath.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:filespec.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:filespec.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:findbin.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:findbin.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:ftmp-mktemp.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:ftmp-mktemp.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:ftmp-posix.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:ftmp-posix.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:ftmp-security.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:ftmp-security.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :lib:ftmp-tempfile.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :lib:ftmp-tempfile.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:gdbm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:gdbm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:getopt.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:getopt.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:glob-basic.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:glob-basic.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:glob-case.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:glob-case.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:glob-global.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:glob-global.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :lib:glob-taint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :lib:glob-taint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:gol-basic.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:gol-basic.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:gol-compat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:gol-compat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:gol-linkage.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:gol-linkage.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:gol-oo.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:gol-oo.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:h2ph.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:h2ph.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:hostname.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:hostname.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_const.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_const.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_dir.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_dir.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_dup.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_dup.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_linenum.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_linenum.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_multihomed.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_multihomed.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_pipe.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_pipe.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_poll.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_poll.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_sel.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_sel.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_sock.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_sock.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :lib:io_taint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :lib:io_taint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_tell.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_tell.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_udp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_udp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_unix.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_unix.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:io_xs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:io_xs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:ipc_sysv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:ipc_sysv.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:ndbm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:ndbm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:odbm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:odbm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:opcode.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:opcode.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:open2.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:open2.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:open3.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:open3.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:ops.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:ops.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:parsewords.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:parsewords.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:peek.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:peek.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:ph.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:ph.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:posix.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:posix.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:safe1.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:safe1.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:safe2.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:safe2.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:sdbm.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:sdbm.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:searchdict.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:searchdict.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:selectsaver.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:selectsaver.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:selfloader.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:selfloader.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:socket.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:socket.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:soundex.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:soundex.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:symbol.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:symbol.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:syslfs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:syslfs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:syslog.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:syslog.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:textfill.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:textfill.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:texttabs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:texttabs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:textwrap.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:textwrap.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:thr5005.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:thr5005.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-push.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-push.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-refhash.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-refhash.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-splice.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-splice.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-stdarray.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-stdarray.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-stdhandle.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-stdhandle.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-stdpush.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-stdpush.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:tie-substrhash.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:tie-substrhash.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:timelocal.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:timelocal.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :lib:trig.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :lib:trig.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:64bitint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:64bitint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:anonsub.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:anonsub.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:append.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:append.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:args.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:args.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:arith.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:arith.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:array.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:array.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:assignwarn.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:assignwarn.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:attrs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:attrs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:auto.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:auto.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:avhv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:avhv.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:bop.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:bop.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:chars.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:chars.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:chop.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:chop.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:closure.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:closure.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:cmp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:cmp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:concat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:concat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:cond.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:cond.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:context.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:context.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:defins.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:defins.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:delete.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:delete.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:die.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:die.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :op:die_exit.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :op:die_exit.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:do.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:do.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:each.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:each.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:eval.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:eval.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:exec.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:exec.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:exists_sub.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:exists_sub.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:exp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:exp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:fh.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:fh.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:filetest.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:filetest.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:flip.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:flip.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:fork.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:fork.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:glob.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:glob.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:goto.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:goto.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:goto_xs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:goto_xs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:grent.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:grent.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:grep.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:grep.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:groups.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:groups.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:gv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:gv.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:hashwarn.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:hashwarn.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:inc.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:inc.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:index.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:index.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:int.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:int.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:join.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:join.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:length.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:length.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:lex_assign.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:lex_assign.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:lfs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:lfs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:list.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:list.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:local.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:local.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:lop.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:lop.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :op:magic.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :op:magic.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:method.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:method.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :op:misc.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :op:misc.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:mkdir.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:mkdir.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:my.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:my.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:my_stash.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:my_stash.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:nothr5005.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:nothr5005.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:numconvert.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:numconvert.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:oct.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:oct.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:ord.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:ord.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:pack.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:pack.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:pat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:pat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:pos.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:pos.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:push.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:push.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:pwent.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:pwent.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:quotemeta.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:quotemeta.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:rand.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:rand.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:range.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:range.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:read.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:read.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:readdir.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:readdir.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:recurse.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:recurse.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:ref.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:ref.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:regexp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:regexp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:regexp_noamp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:regexp_noamp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:regmesg.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:regmesg.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:repeat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:repeat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:reverse.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:reverse.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:runlevel.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:runlevel.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:sleep.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:sleep.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:sort.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:sort.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:splice.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:splice.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:split.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:split.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :op:sprintf.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :op:sprintf.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:stat.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:stat.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:study.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:study.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:subst.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:subst.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:subst_amp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:subst_amp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:subst_wamp.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:subst_wamp.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:substr.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:substr.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:sysio.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:sysio.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :op:taint.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :op:taint.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:tie.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:tie.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:tiearray.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:tiearray.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:tiehandle.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:tiehandle.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:time.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:time.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:tr.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:tr.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:undef.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:undef.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:universal.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:universal.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:unshift.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:unshift.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:utf8decode.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:utf8decode.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:vec.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:vec.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:ver.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:ver.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:wantarray.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:wantarray.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :op:write.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :op:write.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:emptycmd.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:emptycmd.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:find.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:find.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:for.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:for.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:headings.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:headings.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:include.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:include.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:included.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:included.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:lref.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:lref.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:multiline_items.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:multiline_items.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:nested_items.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:nested_items.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:nested_seqs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:nested_seqs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:oneline_cmds.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:oneline_cmds.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:pod2usage.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:pod2usage.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:poderrs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:poderrs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:podselect.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:podselect.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pod:special_seqs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pod:special_seqs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:constant.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:constant.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:diagnostics.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:diagnostics.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib -T :pragma:locale.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib -T :pragma:locale.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:overload.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:overload.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:strict.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:strict.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:sub_lval.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:sub_lval.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:subs.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:subs.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :pragma:utf8.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :pragma:utf8.t >> ::macos:MacPerlTests.out
+# echo "::macos:perl -I::lib    :pragma:warnings.t" >> ::macos:MacPerlTests.out
+# ::macos:perl -I::lib    :pragma:warnings.t >> ::macos:MacPerlTests.out
+echo "::macos:perl -I::lib    :run:runenv.t" >> ::macos:MacPerlTests.out
+::macos:perl -I::lib    :run:runenv.t >> ::macos:MacPerlTests.out
+
+::macos:perl -I::lib ::macos:MacPerlTests.plx ::macos:MacPerlTests.out >> ::macos:MacPerlTests.out
+
+echo "The following tests mostly work, but fail because of known"
+echo "IO problems.  Feel free to run them, and note the failures."
+echo "These tests are known to fail.  Run if you want to, but beware"
+echo "because crashes are possible."
+echo ""
+echo "# DB is broken in a few different ways"
+echo "::macos:perl -I::lib    :lib:db-hash.t >> ::macos:MacPerlTests.out"
+echo "::macos:perl -I::lib    :lib:db-recno.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# DOS::Glob doesn't work ... do we care?"
+echo "::macos:perl -I::lib    :lib:dosglob.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# Devel::DProf seems to work, but test needs major work :/"
+echo "::macos:perl -I::lib    :lib:dprof.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# I have no idea about these ..."
+echo "::macos:perl -I::lib    :lib:ftmp-mktemp.t >> ::macos:MacPerlTests.out"
+echo "::macos:perl -I::lib    :lib:ftmp-posix.t >> ::macos:MacPerlTests.out"
+echo "::macos:perl -I::lib    :lib:ftmp-security.t >> ::macos:MacPerlTests.out"
+echo "::macos:perl -I::lib    :lib:ftmp-tempfile.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# system() fails to return a good value"
+echo "::macos:perl -I::lib    :op:die_exit.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# I dunno here"
+echo "::macos:perl -I::lib    :op:magic.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# fails test  48 (known problem in IO redirection)"
+echo "::macos:perl -I::lib    :op:misc.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# fails tests 129, 130, 142, 161 (known problem in sfio)"
+echo "::macos:perl -I::lib    :op:sprintf.t >> ::macos:MacPerlTests.out"
+echo ""
+echo "# fails tests 319, 329 (known problem in IO redirection)"
+echo "::macos:perl -I::lib    :pragma:warnings.t >> ::macos:MacPerlTests.out"
diff --git a/macos/xsubpp.patch b/macos/xsubpp.patch
new file mode 100644 (file)
index 0000000..6cce4e2
--- /dev/null
@@ -0,0 +1,474 @@
+diff -ru :perl:lib:ExtUtils: :perl.new:lib:ExtUtils:xsubpp
+--- :perl:lib:ExtUtils:xsubpp  Mon Feb 19 17:07:32 2001
++++ :perl.new:lib:ExtUtils:xsubpp      Mon Feb 19 15:31:31 2001
+@@ -173,7 +173,13 @@
+ ($dir, $filename) = $ARGV[0] =~ m#(.*)/(.*)#
+       or ($dir, $filename) = $ARGV[0] =~ m#(.*)\\(.*)#
+       or ($dir, $filename) = $ARGV[0] =~ m#(.*[>\]])(.*)#
++      or ($dir, $filename) = $ARGV[0] =~ m#(.*):(.*)#
+       or ($dir, $filename) = ('.', $ARGV[0]);
++      
++$Is_MacOS = $^O eq 'MacOS';
++if ($Is_MacOS && $dir eq '.') {
++     $dir = ":";
++}
+ chdir($dir);
+ $pwd = cwd();
+@@ -209,9 +215,21 @@
+ foreach $typemap (@tm) {
+     die "Can't find $typemap in $pwd\n" unless -r $typemap;
+ }
+-unshift @tm, qw(../../../../lib/ExtUtils/typemap ../../../lib/ExtUtils/typemap
++if ($Is_MacOS) { my @tmp;
++    foreach (qw(:::: ::: :: :)) {
++      push @tmp, "$_:lib:ExtUtils:typemap";
++      push @tmp, "$_:macos:lib:ExtUtils:typemap";
++      push @tmp, "$_:Mac:typemap";
++      push @tmp, "$_:macos:ext:Mac:typemap";
++      push @tmp, "$_:typemap";
++    }
++    unshift @tm, @tmp, "typemap";
++} else {
++    unshift @tm, qw(../../../../lib/ExtUtils/typemap ../../../lib/ExtUtils/typemap
+                 ../../lib/ExtUtils/typemap ../../../typemap ../../typemap
+                 ../typemap typemap);
++}
++
+ foreach $typemap (@tm) {
+     next unless -e $typemap ;
+     # skip directories, binary files etc.
+@@ -364,7 +382,7 @@
+     print("#line ", $line_no[@line_no - @line -1], " \"$filename\"\n")
+       if $WantLineNumbers && !/^\s*#\s*line\b/ && !/^#if XSubPPtmp/;
+     for (;  defined($_) && !/^$BLOCK_re/o;  $_ = shift(@line)) {
+-      print "$_\n";
++      XS_process("$_\n");
+     }
+     print "$xsubpp::counter::SECTION_END_MARKER\n" if $WantLineNumbers;
+ }
+@@ -746,7 +764,85 @@
+     $lastline_no = $. ;
+  
+ }
+- 
++
++sub XS_PUSH_handler
++{
++    my($type, $value, $xpush) = @_;
++    if ($xpush) {
++      print "\tEXTEND(sp, 1);\n";
++    } 
++    print "\t++sp;\n";
++    &generate_output($type, 0, "($value)", "*sp", 1);
++    "";
++}
++
++sub XS_OUTPUT_handler
++{
++    my($type, $value, $arg) = @_;
++    
++    &generate_output($type, 0, "($value)", 0, 0, $arg);
++    "";
++}
++
++sub XS_INPUT_handler
++{
++    my($type, $var, $arg) = @_;
++    &generate_init($type, 0, $var, 0, 0, $arg, 1);
++    "";
++}
++
++
++sub XS_POP_handler
++{
++    my($type, $var, $pop) = @_;
++    &generate_init($type, 0, $var, "TOPs", 1);
++    print "\tPOPs;\n" if $pop;
++    "";
++}
++
++sub SplitArgs 
++{
++    my(@bits,@pieces,$item);
++    @bits = split /,/, $_[0];
++    while (@bits) {
++      $item .= "," if $item;
++      $item .= shift @bits;
++      if (tr/(// == tr/)// 
++       && tr/{// == tr/}// 
++       && tr/[// == tr/]// 
++       && !(tr/"// & 1) 
++       && !(tr/'// & 1)
++      ) {
++          push @pieces, $item;
++          $item = "";
++      }
++    }
++    @pieces;
++}
++
++sub XS_process 
++{
++    my($text) = @_;
++    
++    while (length($text)) {
++      if ($text =~ s/^.*\bXS_PUSH\(([^,]+),\s*(.*)\)\s*;?.*\n?//) {
++          XS_PUSH_handler($1, $2, 0);
++      } elsif ($text =~ s/^.*\bXS_XPUSH\(([^,]+),\s*(.*)\)\s*;?.*\n?//) {
++          XS_PUSH_handler($1, $2, 1);
++      } elsif ($text =~ s/^.*\bXS_OUTPUT\((.*)\)\s*;?.*\n?//) {
++          XS_OUTPUT_handler(SplitArgs($1));
++      } elsif ($text =~ s/^.*\bXS_INPUT\((.*)\)\s*;?.*\n?//) {
++          XS_INPUT_handler(SplitArgs($1));
++      } elsif ($text =~ s/^.*\bXS_POP\(([^,]+),\s*(.*)\)\s*;?.*\n?//) {
++          XS_POP_handler($1, $2, 1);
++      } elsif ($text =~ s/^.*\bXS_TOP\(([^,]+),\s*(.*)\)\s*;?.*\n?//) {
++          XS_POP_handler($1, $2, 0);
++      } elsif ($text =~ s/^(.*\n?)//) {
++          print $1;
++      }
++    }
++}
++
+ sub PopFile()
+ {
+     return 0 unless $XSStack[-1]{type} eq 'file' ;
+@@ -861,8 +957,8 @@
+         my $podstartline = $.;
+       do {
+           if (/^=cut\s*$/) {
+-              print("/* Skipped embedded POD. */\n");
+-              printf("#line %d \"$filename\"\n", $. + 1)
++              XS_process("/* Skipped embedded POD. */\n");
++              XS_process(sprintf("#line %d \"$filename\"\n", $. + 1))
+                 if $WantLineNumbers;
+               next firstmodule
+           }
+@@ -880,7 +976,7 @@
+     if ($OBJ) {
+         s/#if(?:def\s|\s+defined)\s*(\(__cplusplus\)|__cplusplus)/#if defined(__cplusplus) && !defined(PERL_OBJECT)/;
+     }
+-    print $_;
++    XS_process($_);
+ }
+ &Exit unless defined $_;
+@@ -949,6 +1045,185 @@
+     1;
+ }
++sub indent {
++     my($line) = @_;
++     my($indent) = 0;
++     
++     for (;;) {
++      if ($line =~ s/^( +)//) { $indent += length $1;         next; }
++      if ($line =~ s/^\t//)   { $indent += 8 - ($indent & 7); next; }
++      last;
++     }
++     $indent;
++}
++
++sub handle_struct 
++{   
++    # extract return type, function name and arguments
++    my($deref, $structpack) = /(\**)\s*(\S+)/;
++    my($handle) = ($^O eq "MacOS") && ($deref eq "**");
++    $deref =~ s/\*$/->/;
++    $deref =~ s/\*/\[0\]/g;
++    $deref ||= ".";
++    my($structtype) = $structpack;
++
++    # a struct definition needs at least 2 lines
++    blurt ("Error: Struct definition too short '$structpack'"), next PARAGRAPH
++      unless @line ;
++
++    ($clean_struct_name = $structpack) =~ s/^$Prefix//;
++    $Full_struct_name = "${Packid}_$clean_struct_name";
++    if ($Is_VMS) { $Full_struct_name = $SymSet->addsym($Full_struct_name); }
++
++    # Check for duplicate function definition
++    for $tmp (@XSStack) {
++      next unless defined $tmp->{functions}{$Full_struct_name};
++      Warn("Warning: duplicate struct definition '$clean_struct_name' detected");
++      last;
++    }
++
++    # print struct function header
++    print Q<<"EOF";
++#XS(XS_${Full_struct_name})
++#[[
++#    dXSARGS;
++#    dXSI32;
++#    if (items < 1 || items > 2)
++#       croak("Usage: %s(STRUCT [, VALUE])", GvNAME(CvGV(cv)));
++#    SP -= items;
++EOF
++
++    # Now do a block of some sort.
++
++    &check_cpp;
++    my($structinput, $structoutput, $structindir, $structoutdir);
++    my(@field, @fieldindir, @fieldoutdir, @input, @output);
++    $structindir = $structoutdir = line_directive();
++    $_ = "";
++    while (defined $_) {
++      $_ = shift @line while /^\s*$/;
++      my($fieldindir) = line_directive();
++      my($fieldoutdir)= $fieldindir;
++      my($indent,$fieldtype,$fieldname) = 
++              m|^(\s*)(\S.*\S)\s*\b(\w+)\s*;?\s*(?:/\*.*\*/)?$|;
++      $indent = indent $indent;
++      $fieldtype = TidyType $fieldtype;
++      my($input, $output);
++      my $var = "STRUCT$deref$fieldname";
++      $_ = shift @line;
++      while (/ALIAS|READ_ONLY|INPUT:|OUTPUT:/) {
++          if (/ALIAS\s*(.*)/) {
++              $var = $1;
++              $_ = shift @line;
++          } elsif (/READ_ONLY/) {
++              $fieldindir = line_directive();
++              $input = "$_";
++              $_ = shift @line;
++          } elsif (/INPUT/) {
++              last unless ($_ = shift @line);
++              $fieldindir = line_directive();
++              while (indent($_) > $indent && !/ALIAS|READ_ONLY|INPUT:|OUTPUT:/) {
++                  $input .= "$_\n";
++                  $_ = shift @line;
++              }
++          } else {
++              last unless ($_ = shift @line);
++              $fieldoutdir = line_directive();
++              while (indent($_) > $indent && !/ALIAS|READ_ONLY|INPUT:|OUTPUT:/) {
++                  $output .= "$_\n";
++                  $_ = shift @line;
++              }
++          }
++      }
++      if ($fieldname eq "STRUCT") {
++          $structindir = $fieldindir;
++          $structoutdir= $fieldoutdir;
++          $structtype  = $fieldtype;
++          $arg         = "ST(0)";
++          $structinput = eval "qq\a$input\a";
++          $structoutput= eval "qq\a$output\a";
++      } else {
++          if ($input =~ /READ_ONLY/) {
++              $input = "\tcroak(\"$var is read-only\");\n";
++          } elsif ($input) {
++              $arg = "ST(1)";
++              $input = eval "qq\a$input\a";
++          } else {
++              $input = "\tXS_INPUT($fieldtype, $var, ST(1));";
++          }
++          if ($output) {
++              $arg = "*sp";
++              $output = "\tPUSHs(sv_newmortal());\n" . eval "qq\a$output\a";
++          } else {
++              $output = "\tXS_PUSH($fieldtype, $var);";
++          }
++          push @field, $fieldname;
++          push @fieldindir, $fieldindir;
++          push @fieldoutdir, $fieldoutdir;
++          push @input, $input; 
++          push @output, $output;
++      }
++    }
++    print Q<<"EOF";
++#    [[
++#     $structtype STRUCT;
++EOF
++    print "\tchar STRUCT_state;\n" if $handle;
++    print "\n$structindir";
++    XS_process($structinput || "\tXS_INPUT($structtype, STRUCT, ST(0));");
++    print "\n\tSTRUCT_state = HGetState((Handle)STRUCT); HLock((Handle)STRUCT);\n" if ($handle);
++    print Q<<"EOF";
++#     if (items == 1) [[ /* Get field */
++#         switch (ix) [[
++EOF
++    for (0..$#field) {
++      print Q<<"EOF";
++#         case $_:      /* $field[$_] */
++EOF
++      print $fieldoutdir[$_];
++      XS_process($output[$_]);
++      print Q<<"EOF";
++#             break;
++EOF
++    }
++    print Q<<"EOF";
++#         ]]
++#     ]] else [[         /* Set field */
++#         switch (ix) [[
++EOF
++    for (0..$#field) {
++      print Q<<"EOF";
++#         case $_:      /* $field[$_] */
++EOF
++      print $fieldindir[$_];
++      XS_process($input[$_]);
++      print Q<<"EOF";
++#             break;
++EOF
++    }
++    print Q<<"EOF";
++#         ]]
++EOF
++    print $structoutdir;
++    XS_process($structoutput || "\tXS_OUTPUT($structtype, STRUCT, ST(0))\n");
++    print Q<<"EOF";
++#     ]]
++EOF
++    print "\tHSetState((Handle)STRUCT, STRUCT_state);\n" if $handle;
++    print Q<<"EOF";
++#    ]]
++#    XSRETURN(1);
++#]]
++#
++EOF
++    for (0..$#field) {
++      push(@InitFileCode, Q<<"EOF");
++#        cv = newXS(\"${structpack}::$field[$_]\", XS_$Full_struct_name, file);
++#        XSANY.any_i32 = $_ ; 
++EOF
++    }
++}
++
+ PARAGRAPH:
+ while (fetch_para()) {
+     # Print initial preprocessor statements and blank lines
+@@ -1040,7 +1315,11 @@
+         next PARAGRAPH ;
+     }
+-
++    if (s/^STRUCT\s*//) {
++      handle_struct();
++      next PARAGRAPH;
++    }
++    
+     # extract return type, function name and arguments
+     ($ret_type) = TidyType($_);
+     $RETVAL_no_return = 1 if $ret_type =~ s/^NO_OUTPUT\s+//;
+@@ -1285,7 +1564,7 @@
+                   $processing_arg_with_types = 1;
+                   INPUT_handler() ;
+               }
+-              print $deferred;
++              XS_process($deferred);
+         process_keyword("INIT|ALIAS|ATTRS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS") ;
+@@ -1338,7 +1617,7 @@
+       # all OUTPUT done, so now push the return value on the stack
+       if ($gotRETVAL && $RETVAL_code) {
+-          print "\t$RETVAL_code\n";
++          XS_process("\t$RETVAL_code\n");
+       } elsif ($gotRETVAL || $wantRETVAL) {
+           my $t = $WantOptimize && $targetable{$type_kind{$ret_type}};
+           my $var = 'RETVAL';
+@@ -1574,6 +1853,14 @@
+     }
+ }
++sub line_directive
++{
++    # work out the line number
++    my $line_no = $line_no[@line_no - @line -1] ;
++ 
++    return "#line $line_no \"$filename\"\n" ;
++}
++
+ sub Warn
+ {
+     # work out the line number
+@@ -1595,12 +1882,12 @@
+ }
+ sub generate_init {
+-    local($type, $num, $var) = @_;
+-    local($arg) = "ST(" . ($num - 1) . ")";
++    local($type, $num, $var, $arg, $immed) = @_;
+     local($argoff) = $num - 1;
+     local($ntype);
+     local($tk);
++    $arg ||= "ST(" . ($num - 1) . ")";
+     $type = TidyType($type) ;
+     blurt("Error: '$type' not in typemap"), return 
+       unless defined($type_kind{$type});
+@@ -1656,17 +1943,18 @@
+     } else {
+           die "panic: do not know how to handle this branch for function pointers"
+             if $name_printed;
+-          eval qq/print "$expr;\\n"/;
++          eval qq/XS_process "$expr;\\n"/;
+           warn $@   if  $@;
+     }
+ }
+ sub generate_output {
+-    local($type, $num, $var, $do_setmagic, $do_push) = @_;
+-    local($arg) = "ST(" . ($num - ($num != 0)) . ")";
++    local($type, $num, $var, $do_setmagic, $do_push, $arg, $mortalize) = @_;
+     local($argoff) = $num - 1;
+     local($ntype);
++    $mortalize ||= $var eq 'RETVAL';
++    $arg ||= "ST(" . ($num - ($num != 0)) . ")";
+     $type = TidyType($type) ;
+     if ($type =~ /^array\(([^,]*),(.*)\)/) {
+           print "\tsv_setpvn($arg, (char *)$var, $2 * sizeof($1));\n";
+@@ -1695,30 +1983,30 @@
+               warn $@   if  $@;
+               print "\t\tSvSETMAGIC(ST(ix_$var));\n" if $do_setmagic;
+           }
+-          elsif ($var eq 'RETVAL') {
++          elsif ($mortalize) {
+               if ($expr =~ /^\t\$arg = new/) {
+                   # We expect that $arg has refcnt 1, so we need to
+                   # mortalize it.
+                   eval "print qq\a$expr\a";
+                   warn $@   if  $@;
+-                  print "\tsv_2mortal(ST($num));\n";
+-                  print "\tSvSETMAGIC(ST($num));\n" if $do_setmagic;
++                  print "\tsv_2mortal($arg);\n";
++                  print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
+               }
+               elsif ($expr =~ /^\s*\$arg\s*=/) {
+                   # We expect that $arg has refcnt >=1, so we need
+                   # to mortalize it!
+                   eval "print qq\a$expr\a";
+                   warn $@   if  $@;
+-                  print "\tsv_2mortal(ST(0));\n";
+-                  print "\tSvSETMAGIC(ST(0));\n" if $do_setmagic;
++                  print "\tsv_2mortal($arg);\n";
++                  print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
+               }
+               else {
+                   # Just hope that the entry would safely write it
+                   # over an already mortalized value. By
+                   # coincidence, something like $arg = &sv_undef
+                   # works too.
+-                  print "\tST(0) = sv_newmortal();\n";
+-                  eval "print qq\a$expr\a";
++                  print "\t$arg = sv_newmortal();\n";
++                  eval "XS_process qq\a$expr\a";
+                   warn $@   if  $@;
+                   # new mortals don't have set magic
+               }
+@@ -1730,8 +2018,8 @@
+               warn $@   if  $@;
+               print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
+           }
+-          elsif ($arg =~ /^ST\(\d+\)$/) {
+-              eval "print qq\a$expr\a";
++          else {
++              eval "XS_process qq\a$expr\a";
+               warn $@   if  $@;
+               print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
+           }
index 6ac99f4..4c670e5 100644 (file)
@@ -296,6 +296,8 @@ elsif ($PLATFORM eq 'os2') {
                    ctermid
                    get_sysinfo
                    Perl_OS2_init
+                   Perl_OS2_init3
+                   Perl_OS2_term
                    OS2_Perl_data
                    dlopen
                    dlsym
diff --git a/mg.c b/mg.c
index b9a5501..f3fc035 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2120,11 +2120,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
                    break;
            }
            /* can grab env area too? */
-           if (PL_origenviron && (PL_origenviron[0] == s + 1
-#ifdef OS2
-                               || (PL_origenviron[0] == s + 9 && (s += 8))
-#endif
-              )) {
+           if (PL_origenviron && (PL_origenviron[0] == s + 1)) {
                my_setenv("NoNe  SuCh", Nullch);
                                            /* force copy of environment */
                for (i = 0; PL_origenviron[i]; i++)
index 620fed7..2c924eb 100644 (file)
@@ -48,7 +48,16 @@ main(int argc, char **argv, char **env)
 
     PERL_SYS_INIT3(&argc,&argv,&env);
 
-#ifdef USE_ITHREADS
+#if defined(USE_THREADS) || defined(USE_ITHREADS)
+    /* XXX Ideally, this should really be happening in perl_alloc() or
+     * perl_construct() to keep libperl.a transparently fork()-safe.
+     * It is currently done here only because Apache/mod_perl have
+     * problems due to lack of a call to cancel pthread_atfork()
+     * handlers when shared objects that contain the handlers may
+     * be dlclose()d.  This forces applications that embed perl to
+     * call PTHREAD_ATFORK() explicitly, but if and only if it hasn't
+     * been called at least once before in the current process.
+     * --GSAR 2001-07-20 */
     PTHREAD_ATFORK(Perl_atfork_lock,
                    Perl_atfork_unlock,
                    Perl_atfork_unlock);
index 4363669..e7a5e8d 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -350,7 +350,7 @@ Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send)
 Recognise (or not) a number.  The type of the number is returned
 (0 if unrecognised), otherwise it is a bit-ORed combination of
 IS_NUMBER_IN_UV, IS_NUMBER_GREATER_THAN_UV_MAX, IS_NUMBER_NOT_INT,
-IS_NUMBER_NEG, IS_NUMBER_INFINITY (defined in perl.h).
+IS_NUMBER_NEG, IS_NUMBER_INFINITY, IS_NUMBER_NAN (defined in perl.h).
 
 If the value of the number can fit an in UV, it is returned in the *valuep
 IS_NUMBER_IN_UV will be set to indicate that *valuep is valid, IS_NUMBER_IN_UV
@@ -376,6 +376,7 @@ Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep)
   const char max_mod_10 = UV_MAX % 10;
   int numtype = 0;
   int sawinf = 0;
+  int sawnan = 0;
 
   while (s < send && isSPACE(*s))
     s++;
@@ -512,12 +513,21 @@ Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep)
       s++;
     }
     sawinf = 1;
-  } else /* Add test for NaN here.  */
+  } else if (*s == 'N' || *s == 'n') {
+    /* XXX TODO: There are signaling NaNs and quiet NaNs. */
+    s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
+    s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
+    s++;
+    sawnan = 1;
+  } else
     return 0;
 
   if (sawinf) {
     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
     numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
+  } else if (sawnan) {
+    numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
+    numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
   } else if (s < send) {
     /* we can have an optional exponent part */
     if (*s == 'e' || *s == 'E') {
@@ -539,7 +549,7 @@ Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep)
   while (s < send && isSPACE(*s))
     s++;
   if (s >= send)
-  return numtype;
+    return numtype;
   if (len == 10 && memEQ(pv, "0 but true", 10)) {
     if (valuep)
       *valuep = 0;
index 43a10fa..564bd9c 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #define Perl_my_fflush_all     pPerl->Perl_my_fflush_all
 #undef  my_fflush_all
 #define my_fflush_all          Perl_my_fflush_all
+#undef  Perl_my_fork
+#define Perl_my_fork           pPerl->Perl_my_fork
+#undef  my_fork
+#define my_fork                        Perl_my_fork
+#undef  Perl_atfork_lock
+#define Perl_atfork_lock       pPerl->Perl_atfork_lock
+#undef  atfork_lock
+#define atfork_lock            Perl_atfork_lock
+#undef  Perl_atfork_unlock
+#define Perl_atfork_unlock     pPerl->Perl_atfork_unlock
+#undef  atfork_unlock
+#define atfork_unlock          Perl_atfork_unlock
 #undef  Perl_my_lstat
 #define Perl_my_lstat          pPerl->Perl_my_lstat
 #undef  my_lstat
diff --git a/op.c b/op.c
index 98239d9..62309a1 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4750,6 +4750,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
        }
        /* ... before we throw it away */
        SvREFCNT_dec(PL_compcv);
+       if (PERLDB_INTER)/* Advice debugger on the new sub. */
+         ++PL_sub_generation;
     }
     else {
        cv = PL_compcv;
@@ -6779,7 +6781,15 @@ Perl_peep(pTHX_ register OP *o)
            {
                PL_curcop = ((COP*)o);
            }
-           goto nothin;
+           /* XXX: We avoid setting op_seq here to prevent later calls
+              to peep() from mistakenly concluding that optimisation
+              has already occurred. This doesn't fix the real problem,
+              though (See 20010220.007). AMS 20010719 */
+           if (oldop && o->op_next) {
+               oldop->op_next = o->op_next;
+               continue;
+           }
+           break;
        case OP_SCALAR:
        case OP_LINESEQ:
        case OP_SCOPE:
index 8140aa5..be5aad1 100644 (file)
@@ -40,6 +40,9 @@ AOUT_LIBPERL_DLL      = libperl_dll$aout_lib_ext
 AOUT_CCCMD_DLL = \$(CC) -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK
 AOUT_CLDFLAGS_DLL      = -Zexe -Zmt -Zcrtdll -Zstack 32000
 
+# No -DPERL_CORE
+SO_CCCMD       = \$(CC) $ccflags \$(OPTIMIZE)
+
 LD_OPT         = \$(OPTIMIZE)
 
 PERL_DLL_BASE  = perl$dll_post
@@ -73,6 +76,12 @@ perl.imp: perl5.def
        echo    'emx_malloc             emxlibcm        402     ?' >> $@
        echo    'emx_realloc            emxlibcm        403     ?' >> $@
 
+.PHONY: perl_dll installcmd aout_clean aout_install aout_install.perl \
+       perlrexx test_prep_perl_ test_prep_perl_sys test_prep_perl_stat \
+       test_prep_perl_stat_aout test_prep_various \
+       stat_aout_harness aout_harness stat_harness sys_harness all_harness \
+       stat_aout_test aout_test stat_test sys_test all_test
+
 perl_dll: $(PERL_DLL)
 
 perl_dll_t: t/$(PERL_DLL)
@@ -139,18 +148,28 @@ os2thread.h: os2/os2thread.h
 dlfcn.h: os2/dlfcn.h
        cp -f $< $@
 
-# This one is compiled OMF, so cannot fork():
+# Non-Forking dynamically loaded perl
 
-perl___: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs)
+perl___$(EXE_EXT) perl___: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
 
 # This one is compiled -Zsys, so cannot do many things:
 
+# Remove -Zcrtdll
+STAT_CLDFLAGS = -Zexe -Zomf -Zmt -Zstack 32000
+
+# Non-forking dynamically loaded perl with a wrong CRT library:
+
+perl_stat: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
+       $(SHRPENV) $(CC) $(STAT_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
+
 # Remove -Zcrtdll, add -Zsys
-SYS_CLDFLAGS = -Zexe -Zomf -Zmt -Zsys -Zstack 32000
+SYS_CLDFLAGS = $(STAT_CLDFLAGS) -Zsys
+
+# Non-Forking dynamically loaded perl without EMX - so with wrong CRT library
 
 perl_sys: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o perl_sys perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
 
 installcmd : 
        @perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
@@ -192,20 +211,34 @@ aout_perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit)
        sh writemain $(DYNALOADER) $(aout_static_lib) > tmp
        sh mv-if-diff tmp aout_perlmain.c
 
-miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) opmini$(AOUT_OBJ_EXT)
+_preplibrary = miniperl lib/Config.pm lib/lib.pm lib/re.pm
+
+miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) opmini$(AOUT_OBJ_EXT) $(_preplibrary)
        $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) opmini$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(libs)
 
-perl_: $& aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs
+# Forking statically loaded perl
+
+perl_$(EXE_EXT) perl_: $& aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_LIBPERL) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs
        $(CC) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o perl_ aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER) $(aout_static_ext) $(AOUT_LIBPERL) `cat ext.libs` $(libs)
 
+# Remove -Zcrtdll
+STAT_AOUT_CLDFLAGS = -Zexe -Zmt -Zstack 32000
+
+# Forking dynamically loaded perl with a wrong CRT library:
+
+perl_stat_aout$(EXE_EXT) perl_stat_aout: $& perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) ext.libs
+       $(SHRPENV) $(CC) $(STAT_AOUT_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) `cat ext.libs` $(libs)
+
 perl : perl__ perl___
 
-perl__: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
+# Dynamically loaded PM-application perl:
+
+perl__$(EXE_EXT) perl__: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
        $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl__ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /PM:PM
 
 # Forking dynamically loaded perl:
 
-perl: $& perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) ext.libs
+perl$(EXE_EXT) perl: $& perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) ext.libs
        $(CC) $(AOUT_CLDFLAGS_DLL) $(CCDLFLAGS) -o perl perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER_OBJ) $(aout_static_ext_dll) $(AOUT_LIBPERL_DLL) `cat ext.libs` $(libs)
 
 clean: aout_clean
@@ -218,16 +251,90 @@ aout_install: perl_ aout_install.perl
 aout_install.perl: perl_ installperl
        ./perl_ installperl
 
-aout_test: perl_
-       - cd t && (rm -f perl_$(EXE_EXT); $(LNS) ../perl_$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST </dev/tty
+perlrexx: perlrexx.dll
+       @sh -c true
+
+perlrexx.c: os2/perlrexx.c
+       @cp -f os2/$@ $@
+
+# Remove -Zexe, add -Zdll -Zso.  No stack needed
+SO_CLDFLAGS = -Zdll -Zso -Zomf -Zmt -Zsys
+
+# A callable-from-REXX DLL
+
+perlrexx.dll: perlrexx$(OBJ_EXT) perlrexx.def
+       $(SHRPENV) $(CC) $(SO_CLDFLAGS) $(CCDLFLAGS) -o $@ perlrexx$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) perlrexx.def
+
+perlrexx.def: miniperl \$(_preplibrary)
+       echo    "LIBRARY 'perlrexx' INITINSTANCE TERMINSTANCE"  > tmp.def
+       echo    "DESCRIPTION '@#perl5-porters@perl.org:`miniperl -Ilib -MConfig -e 'print \$$]'`#@ REXX to Perl `miniperl -Ilib -MConfig -e 'print \$$Config{version}'` interface'" >> tmp.def
+       echo    "EXPORTS"                                       >> tmp.def
+       echo    '  "PERL"'                                      >> tmp.def
+       echo    '  "PERLTERM"'                                  >> tmp.def
+       echo    '  "PERLINIT"'                                  >> tmp.def
+       echo    '  "PERLEXIT"'                                  >> tmp.def
+       echo    '  "PERLEVAL"'                                  >> tmp.def
+       sh mv-if-diff tmp.def $@
+
+
+perlrexx$(OBJ_EXT): perlrexx.c
+       $(SO_CCCMD) $(PLDLFLAGS) -c perlrexx.c
+
+# To test with harness, one needed to HARNESS_IGNORE_EXITCODE=2
 
-# To test with harness, set HARNESS_BAD_EXITCODE=2
+# Define to be empty to get a TTY test
+REDIR_TEST = 2>&1 | tee 00_$@
 
-sys_test: perl_sys
-       - cd t && (rm -f perl_$(EXE_EXT); $(LNS) ../perl_sys$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST </dev/tty
+test_prep_perl_: test_prep_pre miniperl_ ./perl_$(EXE_EXT)
+       PERL=./perl_ $(MAKE) _test_prep
 
-sys_harness: perl_sys
-       - cd t && (rm -f perl_$(EXE_EXT); $(LNS) ../perl_sys$(EXE_EXT) perl$(EXE_EXT)) && env HARNESS_BAD_EXITCODE=2 ./perl harness </dev/tty
+test_prep_various: test_prep_pre miniperl $(dynamic_ext) $(TEST_PERL_DLL)
+
+test_prep_perl_sys: test_prep_various ./perl_sys$(EXE_EXT)
+       PERL=./perl_sys $(MAKE) _test_prep
+
+test_prep_perl___: test_prep_various ./perl___$(EXE_EXT)
+       PERL=./perl___ $(MAKE) _test_prep
+
+test_prep_perl_stat: test_prep_various ./perl_stat$(EXE_EXT)
+       PERL=./perl_stat $(MAKE) _test_prep
+
+test_prep_perl_stat_aout: test_prep_various ./perl_stat_aout$(EXE_EXT)
+       PERL=./perl_stat_aout $(MAKE) _test_prep
+
+aout_test: test_prep_perl_
+       PERL=./perl_ $(MAKE) _test
+
+aout_harness: test_prep_perl_
+       -PERL=./perl_ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
+
+sys_test: test_prep_perl_sys
+       PERL=./perl_sys $(MAKE) _test
+
+sys_harness: test_prep_perl_sys
+       -PERL=./perl_sys $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
+
+stat_test: test_prep_perl_stat
+       PERL=./perl_stat $(MAKE) _test
+
+stat_harness: test_prep_perl_stat
+       -PERL=./perl_stat $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
+
+stat_aout_test: test_prep_perl_stat_aout
+       PERL=./perl_stat_aout $(MAKE) _test
+
+stat_aout_harness: test_prep_perl_stat_aout
+       -PERL=./perl_stat_aout $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
+
+perl___test: test_prep_perl___
+       PERL=./perl___ $(MAKE) _test
+
+perl___harness: test_prep_perl___
+       -PERL=./perl___ $(MAKE) TESTFILE=harness _test $(REDIR_TEST)
+
+all_test: test aout_test perl___test sys_test stat_test stat_aout_test
+
+all_harness: test_harness aout_harness perl___harness sys_harness stat_harness stat_aout_harness
 
 !NO!SUBS!
 
@@ -283,6 +390,10 @@ done
 $spitshell >>Makefile <<!GROK!THIS!
 .PRECIOUS : $preci
 
+# Set this to FORCE to force a rebuilt of aout extensions
+
+AOUT_EXTENSIONS_FORCE = 
+
 !GROK!THIS!
 
 for d in $ddirs
@@ -296,8 +407,8 @@ lib/auto/$p/*/%.a : $d/%/Makefile.aout
        @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
        cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
 
-$d/%/Makefile.aout : miniperl_
-       cd \$(dir \$@) ; ../../../../miniperl_ -I ../../../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl 
+$d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
+       cd \$(dir \$@) ; ../../../../miniperl_ -I ../../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl 
 
 !GROK!THIS!
 
@@ -311,19 +422,25 @@ lib/auto/$p/*/%.a : $d/%/Makefile.aout
        @cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
        cd $d/\$(basename \$(notdir \$@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
 
-$d/%/Makefile.aout : miniperl_
-       cd \$(dir \$@) ; ../../../miniperl_ -I ../../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl 
+$d/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
+       cd \$(dir \$@) ; ../../../miniperl_ -I ../../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl 
 
 !GROK!THIS!
 
 done
 
+# We need to special-case OS2/DLL/DLL.a, since the recipe above will
+# try to find it in ext/OS2/DLL
+
 $spitshell >>Makefile <<'!NO!SUBS!'
+lib/auto/OS2/DLL/DLL.a : lib/auto/OS2/REXX/REXX.a
+       @sh -c true
+
 lib/auto/*/%.a : ext/%/Makefile.aout
        @cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout config || echo "\$(MAKE) config failed, continuing anyway..."
        cd ext/$(basename $(notdir $@)) ; make -f Makefile.aout LINKTYPE=static CCCDLFLAGS=
 
-ext/%/Makefile.aout : miniperl_
-       cd $(dir $@) ; ../../miniperl_ -I ../../lib Makefile.PL MAKEFILE=Makefile.aout INSTALLDIRS=perl 
+ext/%/Makefile.aout : miniperl_ \$(_preplibrary) \$(AOUT_EXTENSIONS_FORCE)
+       cd $(dir $@) ; ../../miniperl_ -I ../../lib Makefile.PL FIRST_MAKEFILE=Makefile.aout INSTALLDIRS=perl 
 
 !NO!SUBS!
index b0621f4..3611894 100644 (file)
@@ -3,7 +3,11 @@ BEGIN {
     @INC = '../lib' if -d 'lib';
     require Config; import Config;
     if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
-       print "1..0\n";
+       print "1..0 # skipped: OS2::REXX not built\n";
+       exit 0;
+    }
+    if (defined $ENV{PERL_TEST_NOVREXX}) {
+       print "1..0 # skipped: request via PERL_TEST_NOVREXX\n";
        exit 0;
     }
 }
index bfe6e9f..d22553a 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -184,6 +184,8 @@ os2_cond_wait(perl_cond *c, perl_mutex *m)
 } 
 #endif 
 
+static int exe_is_aout(void);
+
 /*****************************************************************************/
 /* 2.1 would not resolve symbols on demand, and has no ExtLIBPATH. */
 #define C_ARR_LEN(sym) (sizeof(sym)/sizeof(*sym))
@@ -467,6 +469,9 @@ getpriority(int which /* ignored */, int pid)
 /*****************************************************************************/
 /* spawn */
 
+int emx_runtime_init;                  /* If 1, we need to manually init it */
+int emx_exception_init;                        /* If 1, we need to manually set it */
+
 /* There is no big sense to make it thread-specific, since signals 
    are delivered to thread 1 only.  XXXX Maybe make it into an array? */
 static int spawn_pid;
@@ -529,11 +534,14 @@ result(pTHX_ int flag, int pid)
 #endif
 }
 
-#define EXECF_SPAWN 0
-#define EXECF_EXEC 1
-#define EXECF_TRUEEXEC 2
-#define EXECF_SPAWN_NOWAIT 3
-#define EXECF_SPAWN_BYFLAG 4
+enum execf_t {
+  EXECF_SPAWN,
+  EXECF_EXEC,
+  EXECF_TRUEEXEC,
+  EXECF_SPAWN_NOWAIT,
+  EXECF_SPAWN_BYFLAG,
+  EXECF_SYNC
+};
 
 /* const char* const ptypes[] = { "FS", "DOS", "VIO", "PM", "DETACH" }; */
 
@@ -580,6 +588,11 @@ static ULONG os2_mytype;
 /* Spawn/exec a program, revert to shell if needed. */
 /* global PL_Argv[] contains arguments. */
 
+extern ULONG _emx_exception (  EXCEPTIONREPORTRECORD *,
+                               EXCEPTIONREGISTRATIONRECORD *,
+                                CONTEXTRECORD *,
+                                void *);
+
 int
 do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
 {
@@ -707,6 +720,8 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
            rc = spawnvp(trueflag | P_OVERLAY,tmps,PL_Argv);
        else if (execf == EXECF_SPAWN_NOWAIT)
            rc = spawnvp(flag,tmps,PL_Argv);
+        else if (execf == EXECF_SYNC)
+           rc = spawnvp(trueflag,tmps,PL_Argv);
         else                           /* EXECF_SPAWN, EXECF_SPAWN_BYFLAG */
            rc = result(aTHX_ trueflag, 
                        spawnvp(flag,tmps,PL_Argv));
@@ -1001,7 +1016,7 @@ do_spawn3(pTHX_ char *cmd, int execf, int flag)
               should be smart enough to start itself gloriously. */
          doshell:
            if (execf == EXECF_TRUEEXEC)
-                rc = execl(shell,shell,copt,cmd,(char*)0);             
+                rc = execl(shell,shell,copt,cmd,(char*)0);
            else if (execf == EXECF_EXEC)
                 rc = spawnl(P_OVERLAY,shell,shell,copt,cmd,(char*)0);
            else if (execf == EXECF_SPAWN_NOWAIT)
@@ -1010,8 +1025,11 @@ do_spawn3(pTHX_ char *cmd, int execf, int flag)
                 rc = spawnl(flag,shell,shell,copt,cmd,(char*)0);
            else {
                /* In the ak code internal P_NOWAIT is P_WAIT ??? */
-               rc = result(aTHX_ P_WAIT,
-                           spawnl(P_NOWAIT,shell,shell,copt,cmd,(char*)0));
+               if (execf == EXECF_SYNC)
+                  rc = spawnl(P_WAIT,shell,shell,copt,cmd,(char*)0);
+               else
+                  rc = result(aTHX_ P_WAIT,
+                              spawnl(P_NOWAIT,shell,shell,copt,cmd,(char*)0));
                if (rc < 0 && ckWARN(WARN_EXEC))
                    Perl_warner(aTHX_ WARN_EXEC, "Can't %s \"%s\": %s", 
                         (execf == EXECF_SPAWN ? "spawn" : "exec"),
@@ -2274,7 +2292,10 @@ Xs_OS2_init(pTHX)
        GvMULTI_on(gv);
 #ifdef PERL_IS_AOUT
        sv_setiv(GvSV(gv), 1);
-#endif 
+#endif
+       gv = gv_fetchpv("OS2::can_fork", TRUE, SVt_PV);
+       GvMULTI_on(gv);
+       sv_setiv(GvSV(gv), exe_is_aout());
        gv = gv_fetchpv("OS2::emx_rev", TRUE, SVt_PV);
        GvMULTI_on(gv);
        sv_setiv(GvSV(gv), _emx_rev);
@@ -2295,18 +2316,330 @@ Xs_OS2_init(pTHX)
 
 OS2_Perl_data_t OS2_Perl_data;
 
+extern void _emx_init(void*);
+
+static void jmp_out_of_atexit(void);
+
+#define FORCE_EMX_INIT_CONTRACT_ARGV   1
+#define FORCE_EMX_INIT_INSTALL_ATEXIT  2
+
+static void
+my_emx_init(void *layout) {
+    static volatile void *p = 0;       /* Cannot be on stack! */
+
+    /* Can't just call emx_init(), since it moves the stack pointer */
+    /* It also busts a lot of registers, so be extra careful */
+    __asm__(   "pushf\n"
+               "pusha\n"
+               "movl %%esp, %1\n"
+               "push %0\n"
+               "call __emx_init\n"
+               "movl %1, %%esp\n"
+               "popa\n"
+               "popf\n" : : "r" (layout), "m" (p)      );
+}
+
+struct layout_table_t {
+    ULONG text_base;
+    ULONG text_end;
+    ULONG data_base;
+    ULONG data_end;
+    ULONG bss_base;
+    ULONG bss_end;
+    ULONG heap_base;
+    ULONG heap_end;
+    ULONG heap_brk;
+    ULONG heap_off;
+    ULONG os2_dll;
+    ULONG stack_base;
+    ULONG stack_end;
+    ULONG flags;
+    ULONG reserved[2];
+    char options[64];
+};
+
+static ULONG
+my_os_version() {
+    static ULONG res;                  /* Cannot be on stack! */
+
+    /* Can't just call emx_init(), since it moves the stack pointer */
+    /* It also busts a lot of registers, so be extra careful */
+    __asm__(   "pushf\n"
+               "pusha\n"
+               "call ___os_version\n"
+               "movl %%eax, %0\n"
+               "popa\n"
+               "popf\n" : "=m" (res)   );
+
+    return res;
+}
+
+static void
+force_init_emx_runtime(EXCEPTIONREGISTRATIONRECORD *preg, ULONG flags)
+{
+    /* Calling emx_init() will bust the top of stack: it installs an
+       exception handler and puts argv data there. */
+    char *oldarg, *oldenv;
+    void *oldstackend, *oldstack;
+    PPIB pib;
+    PTIB tib;
+    static ULONG os2_dll;
+    ULONG rc, error = 0, out;
+    char buf[512];
+    static struct layout_table_t layout_table;
+    struct {
+       char buf[48*1024]; /* _emx_init() requires 32K, cmd.exe has 64K only */
+       double alignment1;
+       EXCEPTIONREGISTRATIONRECORD xreg;
+    } *newstack;
+    char *s;
+
+    layout_table.os2_dll = (ULONG)&os2_dll;
+    layout_table.flags   = 0x02000002; /* flags: application, OMF */
+
+    DosGetInfoBlocks(&tib, &pib);
+    oldarg = pib->pib_pchcmd;
+    oldenv = pib->pib_pchenv;
+    oldstack = tib->tib_pstack;
+    oldstackend = tib->tib_pstacklimit;
+
+    /* Minimize the damage to the stack via reducing the size of argv. */
+    if (flags & FORCE_EMX_INIT_CONTRACT_ARGV) {
+       pib->pib_pchcmd = "\0\0";       /* Need 3 concatenated strings */
+       pib->pib_pchcmd = "\0";         /* Ended by an extra \0. */
+    }
+
+    newstack = alloca(sizeof(*newstack));
+    /* Emulate the stack probe */
+    s = ((char*)newstack) + sizeof(*newstack);
+    while (s > (char*)newstack) {
+       s[-1] = 0;
+       s -= 4096;
+    }
+
+    /* Reassigning stack is documented to work */
+    tib->tib_pstack = (void*)newstack;
+    tib->tib_pstacklimit = (void*)((char*)newstack + sizeof(*newstack));
+
+    /* Can't just call emx_init(), since it moves the stack pointer */
+    my_emx_init((void*)&layout_table);
+
+    /* Remove the exception handler, cannot use it - too low on the stack.
+       Check whether it is inside the new stack.  */
+    buf[0] = 0;
+    if (tib->tib_pexchain >= tib->tib_pstacklimit
+       || tib->tib_pexchain < tib->tib_pstack) {
+       error = 1;
+       sprintf(buf,
+               "panic: ExceptionHandler misplaced: not %#lx <= %#lx < %#lx\n",
+               (unsigned long)tib->tib_pstack,
+               (unsigned long)tib->tib_pexchain,
+               (unsigned long)tib->tib_pstacklimit);   
+       goto finish;
+    }
+    if (tib->tib_pexchain != &(newstack->xreg)) {
+       sprintf(buf, "ExceptionHandler misplaced: %#lx != %#lx\n",
+               (unsigned long)tib->tib_pexchain,
+               (unsigned long)&(newstack->xreg));      
+    }
+    rc = DosUnsetExceptionHandler((EXCEPTIONREGISTRATIONRECORD *)tib->tib_pexchain);
+    if (rc)
+       sprintf(buf + strlen(buf), 
+               "warning: DosUnsetExceptionHandler rc=%#lx=%lu\n", rc, rc);
+
+    if (preg) {
+       /* ExceptionRecords should be on stack, in a correct order.  Sigh... */
+       preg->prev_structure = 0;
+       preg->ExceptionHandler = _emx_exception;
+       rc = DosSetExceptionHandler(preg);
+       if (rc) {
+           sprintf(buf + strlen(buf),
+                   "warning: DosSetExceptionHandler rc=%#lx=%lu\n", rc, rc);
+           DosWrite(2, buf, strlen(buf), &out);
+           emx_exception_init = 1;     /* Do it around spawn*() calls */
+       }
+    } else
+       emx_exception_init = 1;         /* Do it around spawn*() calls */
+
+  finish:
+    /* Restore the damage */
+    pib->pib_pchcmd = oldarg;
+    pib->pib_pchcmd = oldenv;
+    tib->tib_pstacklimit = oldstackend;
+    tib->tib_pstack = oldstack;
+    emx_runtime_init = 1;
+    if (buf[0])
+       DosWrite(2, buf, strlen(buf), &out);
+    if (error)
+       exit(56);
+}
+
+jmp_buf at_exit_buf;
+int longjmp_at_exit;
+
+static void
+jmp_out_of_atexit(void)
+{
+    if (longjmp_at_exit)
+       longjmp(at_exit_buf, 1);
+}
+
+extern void _CRT_term(void);
+
+int emx_runtime_secondary;
+
+void
+Perl_OS2_term(void **p, int exitstatus, int flags)
+{
+    if (!emx_runtime_secondary)
+       return;
+
+    /* The principal executable is not running the same CRTL, so there
+       is nobody to shutdown *this* CRTL except us... */
+    if (flags & FORCE_EMX_DEINIT_EXIT) {
+       if (p && !emx_exception_init)
+           DosUnsetExceptionHandler((EXCEPTIONREGISTRATIONRECORD *)p);
+       /* Do not run the executable's CRTL's termination routines */
+       exit(exitstatus);               /* Run at-exit, flush buffers, etc */
+    }
+    /* Run at-exit list, and jump out at the end */
+    if ((flags & FORCE_EMX_DEINIT_RUN_ATEXIT) && !setjmp(at_exit_buf)) {
+       longjmp_at_exit = 1;
+       exit(exitstatus);               /* The first pass through "if" */
+    }
+
+    /* Get here if we managed to jump out of exit(), or did not run atexit. */
+    longjmp_at_exit = 0;               /* Maybe exit() is called again? */
+#if 0 /* _atexit_n is not exported */
+    if (flags & FORCE_EMX_DEINIT_RUN_ATEXIT)
+       _atexit_n = 0;                  /* Remove the atexit() handlers */
+#endif
+    /* Will segfault on program termination if we leave this dangling... */
+    if (p && !emx_exception_init)
+       DosUnsetExceptionHandler((EXCEPTIONREGISTRATIONRECORD *)p);
+    /* Typically there is no need to do this, done from _DLL_InitTerm() */
+    if (flags & FORCE_EMX_DEINIT_CRT_TERM)
+       _CRT_term();                    /* Flush buffers, etc. */
+    /* Now it is a good time to call exit() in the caller's CRTL... */
+}
+
+#include <emx/startup.h>
+
+extern ULONG __os_version();           /* See system.doc */
+
+static int emx_wasnt_initialized;
+
+void
+check_emx_runtime(char **env, EXCEPTIONREGISTRATIONRECORD *preg)
+{
+    ULONG v_crt, v_emx;
+
+    /*  If _environ is not set, this code sits in a DLL which
+       uses a CRT DLL which not compatible with the executable's
+       CRT library.  Some parts of the DLL are not initialized.
+     */
+    if (_environ != NULL)
+       return;                         /* Properly initialized */
+
+    /*  If the executable does not use EMX.DLL, EMX.DLL is not completely
+       initialized either.  Uninitialized EMX.DLL returns 0 in the low
+       nibble of __os_version().  */
+    v_emx = my_os_version();
+
+    /* _osmajor and _osminor are normally set in _DLL_InitTerm of CRT DLL
+       (=>_CRT_init=>_entry2) via a call to __os_version(), then
+       reset when the EXE initialization code calls _text=>_init=>_entry2.
+       The first time they are wrongly set to 0; the second time the
+       EXE initialization code had already called emx_init=>initialize1
+       which correctly set version_major, version_minor used by
+       __os_version().  */
+    v_crt = (_osmajor | _osminor);
+
+    if ((_emx_env & 0x200) && !(v_emx & 0xFFFF)) {     /* OS/2, EMX uninit. */ 
+       force_init_emx_runtime( preg,
+                               FORCE_EMX_INIT_CONTRACT_ARGV 
+                               | FORCE_EMX_INIT_INSTALL_ATEXIT );
+       emx_wasnt_initialized = 1;
+       /* Update CRTL data basing on now-valid EMX runtime data */
+       if (!v_crt) {           /* The only wrong data are the versions. */
+           v_emx = my_os_version();                    /* *Now* it works */
+           *(unsigned char *)&_osmajor = v_emx & 0xFF; /* Cast out const */
+           *(unsigned char *)&_osminor = (v_emx>>8) & 0xFF;
+       }
+    }
+    emx_runtime_secondary = 1;
+    /* if (flags & FORCE_EMX_INIT_INSTALL_ATEXIT) */
+    atexit(jmp_out_of_atexit);         /* Allow run of atexit() w/o exit()  */
+
+    if (!env) {                                /* Fetch from the process info block */
+       int c = 0;
+       PPIB pib;
+       PTIB tib;
+       char *e, **ep;
+
+       DosGetInfoBlocks(&tib, &pib);
+       e = pib->pib_pchenv;
+       while (*e) {                    /* Get count */
+           c++;
+           e = e + strlen(e) + 1;
+       }
+       e = pib->pib_pchenv;
+       while (*e) {                    /* Get count */
+           c++;
+           e = e + strlen(e) + 1;
+       }
+       New(1307, env, c + 1, char*);
+       ep = env;
+       e = pib->pib_pchenv;
+       while (c--) {
+           *ep++ = e;
+           e = e + strlen(e) + 1;
+       }
+       *ep = NULL;
+    }
+    _environ = _org_environ = env;
+}
+
+#define ENTRY_POINT 0x10000
+
+static int
+exe_is_aout(void)
+{
+    struct layout_table_t *layout;
+    if (emx_wasnt_initialized)
+       return 0;
+    /* Now we know that the principal executable is an EMX application 
+       - unless somebody did already play with delayed initialization... */
+    /* With EMX applications to determine whether it is AOUT one needs
+       to examine the start of the executable to find "layout" */
+    if ( *(unsigned char*)ENTRY_POINT != 0x68          /* PUSH n */
+        || *(unsigned char*)(ENTRY_POINT+5) != 0xe8    /* CALL */
+        || *(unsigned char*)(ENTRY_POINT+10) != 0xeb   /* JMP */
+        || *(unsigned char*)(ENTRY_POINT+12) != 0xe8)  /* CALL */
+       return 0;                                       /* ! EMX executable */
+    /* Fix alignment */
+    Copy((char*)(ENTRY_POINT+1), &layout, 1, struct layout_table_t*);
+    return !(layout->flags & 2);                       
+}
+
 void
 Perl_OS2_init(char **env)
 {
+    Perl_OS2_init3(env, 0, 0);
+}
+
+void
+Perl_OS2_init3(char **env, void **preg, int flags)
+{
     char *shell;
 
+    _uflags (_UF_SBRK_MODEL, _UF_SBRK_ARBITRARY);
     MALLOC_INIT;
+
+    check_emx_runtime(env, (EXCEPTIONREGISTRATIONRECORD *)preg);
+
     settmppath();
     OS2_Perl_data.xs_init = &Xs_OS2_init;
-    _uflags (_UF_SBRK_MODEL, _UF_SBRK_ARBITRARY);
-    if (environ == NULL && env) {
-       environ = env;
-    }
     if ( (shell = getenv("PERL_SH_DRIVE")) ) {
        New(1304, PL_sh_path, strlen(SH_PATH) + 1, char);
        strcpy(PL_sh_path, SH_PATH);
index 7f3393b..ede75fb 100644 (file)
@@ -210,31 +210,56 @@ int pthread_create(pthread_t *tid, const pthread_attr_t *attr,
 #endif /* USE_THREADS */
  
 void Perl_OS2_init(char **);
+void Perl_OS2_init3(char **envp, void **excH, int flags);
+void Perl_OS2_term(void **excH, int exitstatus, int flags);
 
-/* XXX This code hideously puts env inside: */
+/* The code without INIT3 hideously puts env inside: */
 
+/* These ones should be in the same block as PERL_SYS_TERM() */
 #ifdef PERL_CORE
-#  define PERL_SYS_INIT3(argcp, argvp, envp) STMT_START {      \
+
+#  define PERL_SYS_INIT3(argcp, argvp, envp)   \
+  { void *xreg[2];                             \
     _response(argcp, argvp);                   \
     _wildcard(argcp, argvp);                   \
-    Perl_OS2_init(*envp);      } STMT_END
-#  define PERL_SYS_INIT(argcp, argvp) STMT_START {     \
+    Perl_OS2_init3(*envp, xreg, 0)
+
+#  define PERL_SYS_INIT(argcp, argvp)  {       \
+  { void *xreg[2];                             \
     _response(argcp, argvp);                   \
     _wildcard(argcp, argvp);                   \
-    Perl_OS2_init(NULL);       } STMT_END
+    Perl_OS2_init3(NULL, xreg, 0)
+
 #else  /* Compiling embedded Perl or Perl extension */
-#  define PERL_SYS_INIT3(argcp, argvp, envp) STMT_START {      \
-    Perl_OS2_init(*envp);      } STMT_END
-#  define PERL_SYS_INIT(argcp, argvp) STMT_START {     \
-    Perl_OS2_init(NULL);       } STMT_END
+
+#  define PERL_SYS_INIT3(argcp, argvp, envp)   \
+  { void *xreg[2];                             \
+    Perl_OS2_init3(*envp, xreg, 0)
+#  define PERL_SYS_INIT(argcp, argvp)  {       \
+  { void *xreg[2];                             \
+    Perl_OS2_init3(NULL, xreg, 0)
 #endif
 
+#define FORCE_EMX_DEINIT_EXIT          1
+#define FORCE_EMX_DEINIT_CRT_TERM      2
+#define FORCE_EMX_DEINIT_RUN_ATEXIT    4
+
+#define PERL_SYS_TERM2(xreg,flags)                                     \
+  Perl_OS2_term(xreg, 0, flags);                                       \
+  MALLOC_TERM
+
+#define PERL_SYS_TERM1(xreg)                                           \
+     Perl_OS2_term(xreg, 0, FORCE_EMX_DEINIT_RUN_ATEXIT)
+
+/* This one should come in pair with PERL_SYS_INIT() and in the same block */
+#define PERL_SYS_TERM()                                                        \
+     PERL_SYS_TERM1(xreg);                                             \
+  }
+
 #ifndef __EMX__
 #  define PERL_CALLCONV _System
 #endif
 
-#define PERL_SYS_TERM()                MALLOC_TERM
-
 /* #define PERL_SYS_TERM() STMT_START {        \
     if (Perl_HAB_set) WinTerminate(Perl_hab);  } STMT_END */
 
diff --git a/os2/perlrexx.c b/os2/perlrexx.c
new file mode 100644 (file)
index 0000000..7711783
--- /dev/null
@@ -0,0 +1,462 @@
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMODULEMGR
+#define INCL_DOSMISC
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSERRORS
+#define INCL_REXXSAA
+#include <os2.h>
+
+/*
+ * "The Road goes ever on and on, down from the door where it began."
+ */
+
+#ifdef OEMVS
+#ifdef MYMALLOC
+/* sbrk is limited to first heap segement so make it big */
+#pragma runopts(HEAP(8M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
+#else
+#pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
+#endif
+#endif
+
+
+#include "EXTERN.h"
+#include "perl.h"
+
+static void xs_init (pTHX);
+static PerlInterpreter *my_perl;
+
+#if defined (__MINT__) || defined (atarist)
+/* The Atari operating system doesn't have a dynamic stack.  The
+   stack size is determined from this value.  */
+long _stksize = 64 * 1024;
+#endif
+
+/* Register any extra external extensions */
+
+/* Do not delete this line--writemain depends on it */
+EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
+
+static void
+xs_init(pTHX)
+{
+    char *file = __FILE__;
+    dXSUB_SYS;
+        newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
+}
+
+int perlos2_is_inited;
+
+static void
+init_perlos2(void)
+{
+/*    static char *env[1] = {NULL};    */
+
+    Perl_OS2_init3(0, 0, 0);
+}
+
+static int
+init_perl(int doparse)
+{
+    int exitstatus;
+    char *argv[3] = {"perl_in_REXX", "-e", ""};
+
+    if (!perlos2_is_inited) {
+       perlos2_is_inited = 1;
+       init_perlos2();
+    }
+    if (my_perl)
+       return 1;
+    if (!PL_do_undump) {
+       my_perl = perl_alloc();
+       if (!my_perl)
+           return 0;
+       perl_construct(my_perl);
+       PL_perl_destruct_level = 1;
+    }
+    if (!doparse)
+        return 1;
+    exitstatus = perl_parse(my_perl, xs_init, 3, argv, (char **)NULL);
+    return !exitstatus;
+}
+
+/* The REXX-callable entrypoints ... */
+
+ULONG PERL (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    int exitstatus;
+    char buf[256];
+    char *argv[3] = {"perl_from_REXX", "-e", buf};
+    ULONG ret;
+
+    if (rargc != 1) {
+       sprintf(retstr->strptr, "one argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (rargv[0].strlength >= sizeof(buf)) {
+       sprintf(retstr->strptr,
+               "length of the argument %ld exceeds the maximum %ld",
+               rargv[0].strlength, (long)sizeof(buf) - 1);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+
+    if (!init_perl(0))
+       return 1;
+
+    memcpy(buf, rargv[0].strptr, rargv[0].strlength);
+    buf[rargv[0].strlength] = 0;
+    
+    exitstatus = perl_parse(my_perl, xs_init, 3, argv, (char **)NULL);
+    if (!exitstatus) {
+       exitstatus = perl_run(my_perl);
+    }
+
+    perl_destruct(my_perl);
+    perl_free(my_perl);
+    my_perl = 0;
+
+    if (exitstatus)
+       ret = 1;
+    else {
+       ret = 0;
+       sprintf(retstr->strptr, "%s", "ok");
+       retstr->strlength = strlen (retstr->strptr);
+    }
+    PERL_SYS_TERM1(0);
+    return ret;
+}
+
+ULONG PERLEXIT (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no arguments expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    PERL_SYS_TERM1(0);
+    return 0;
+}
+
+ULONG PERLTERM (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no arguments expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (!my_perl) {
+       sprintf(retstr->strptr, "no perl interpreter present");
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    perl_destruct(my_perl);
+    perl_free(my_perl);
+    my_perl = 0;
+
+    sprintf(retstr->strptr, "%s", "ok");
+    retstr->strlength = strlen (retstr->strptr);
+    return 0;
+}
+
+
+ULONG PERLINIT (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (!init_perl(1))
+       return 1;
+
+    sprintf(retstr->strptr, "%s", "ok");
+    retstr->strlength = strlen (retstr->strptr);
+    return 0;
+}
+
+ULONG PERLEVAL (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    SV *res, *in;
+    STRLEN len;
+    char *str;
+
+    if (rargc != 1) {
+       sprintf(retstr->strptr, "one argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+
+    if (!init_perl(1))
+       return 1;
+
+  {
+    dSP;
+    int ret;
+
+    ENTER;
+    SAVETMPS;
+
+    PUSHMARK(SP);
+    in = sv_2mortal(newSVpvn(rargv[0].strptr, rargv[0].strlength));
+    eval_sv(in, G_SCALAR);
+    SPAGAIN;
+    res = POPs;
+    PUTBACK;
+
+    ret = 0;
+    if (SvTRUE(ERRSV) || !SvOK(res))
+       ret = 1;
+    str = SvPV(res, len);
+    if (len <= 256                     /* Default buffer is 256-char long */
+       || !DosAllocMem((PPVOID)&retstr->strptr, len,
+                       PAG_READ|PAG_WRITE|PAG_COMMIT)) {
+           memcpy(retstr->strptr, str, len);
+           retstr->strlength = len;
+    } else
+       ret = 1;
+
+    FREETMPS;
+    LEAVE;
+
+    return ret;
+  }
+}
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMODULEMGR
+#define INCL_DOSMISC
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSERRORS
+#define INCL_REXXSAA
+#include <os2.h>
+
+/*
+ * "The Road goes ever on and on, down from the door where it began."
+ */
+
+#ifdef OEMVS
+#ifdef MYMALLOC
+/* sbrk is limited to first heap segement so make it big */
+#pragma runopts(HEAP(8M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
+#else
+#pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
+#endif
+#endif
+
+
+#include "EXTERN.h"
+#include "perl.h"
+
+static void xs_init (pTHX);
+static PerlInterpreter *my_perl;
+
+#if defined (__MINT__) || defined (atarist)
+/* The Atari operating system doesn't have a dynamic stack.  The
+   stack size is determined from this value.  */
+long _stksize = 64 * 1024;
+#endif
+
+/* Register any extra external extensions */
+
+/* Do not delete this line--writemain depends on it */
+EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
+
+static void
+xs_init(pTHX)
+{
+    char *file = __FILE__;
+    dXSUB_SYS;
+        newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
+}
+
+int perlos2_is_inited;
+
+static void
+init_perlos2(void)
+{
+/*    static char *env[1] = {NULL};    */
+
+    Perl_OS2_init3(0, 0, 0);
+}
+
+static int
+init_perl(int doparse)
+{
+    int exitstatus;
+    char *argv[3] = {"perl_in_REXX", "-e", ""};
+
+    if (!perlos2_is_inited) {
+       perlos2_is_inited = 1;
+       init_perlos2();
+    }
+    if (my_perl)
+       return 1;
+    if (!PL_do_undump) {
+       my_perl = perl_alloc();
+       if (!my_perl)
+           return 0;
+       perl_construct(my_perl);
+       PL_perl_destruct_level = 1;
+    }
+    if (!doparse)
+        return 1;
+    exitstatus = perl_parse(my_perl, xs_init, 3, argv, (char **)NULL);
+    return !exitstatus;
+}
+
+/* The REXX-callable entrypoints ... */
+
+ULONG PERL (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    int exitstatus;
+    char buf[256];
+    char *argv[3] = {"perl_from_REXX", "-e", buf};
+    ULONG ret;
+
+    if (rargc != 1) {
+       sprintf(retstr->strptr, "one argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (rargv[0].strlength >= sizeof(buf)) {
+       sprintf(retstr->strptr,
+               "length of the argument %ld exceeds the maximum %ld",
+               rargv[0].strlength, (long)sizeof(buf) - 1);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+
+    if (!init_perl(0))
+       return 1;
+
+    memcpy(buf, rargv[0].strptr, rargv[0].strlength);
+    buf[rargv[0].strlength] = 0;
+    
+    exitstatus = perl_parse(my_perl, xs_init, 3, argv, (char **)NULL);
+    if (!exitstatus) {
+       exitstatus = perl_run(my_perl);
+    }
+
+    perl_destruct(my_perl);
+    perl_free(my_perl);
+    my_perl = 0;
+
+    if (exitstatus)
+       ret = 1;
+    else {
+       ret = 0;
+       sprintf(retstr->strptr, "%s", "ok");
+       retstr->strlength = strlen (retstr->strptr);
+    }
+    PERL_SYS_TERM1(0);
+    return ret;
+}
+
+ULONG PERLEXIT (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no arguments expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    PERL_SYS_TERM1(0);
+    return 0;
+}
+
+ULONG PERLTERM (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no arguments expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (!my_perl) {
+       sprintf(retstr->strptr, "no perl interpreter present");
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    perl_destruct(my_perl);
+    perl_free(my_perl);
+    my_perl = 0;
+
+    sprintf(retstr->strptr, "%s", "ok");
+    retstr->strlength = strlen (retstr->strptr);
+    return 0;
+}
+
+
+ULONG PERLINIT (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    if (rargc != 0) {
+       sprintf(retstr->strptr, "no argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+    if (!init_perl(1))
+       return 1;
+
+    sprintf(retstr->strptr, "%s", "ok");
+    retstr->strlength = strlen (retstr->strptr);
+    return 0;
+}
+
+ULONG PERLEVAL (PCSZ name, LONG rargc, const RXSTRING *rargv,
+                    PCSZ queuename, PRXSTRING retstr)
+{
+    SV *res, *in;
+    STRLEN len;
+    char *str;
+
+    if (rargc != 1) {
+       sprintf(retstr->strptr, "one argument expected, got %ld", rargc);
+       retstr->strlength = strlen (retstr->strptr);
+       return 1;
+    }
+
+    if (!init_perl(1))
+       return 1;
+
+  {
+    dSP;
+    int ret;
+
+    ENTER;
+    SAVETMPS;
+
+    PUSHMARK(SP);
+    in = sv_2mortal(newSVpvn(rargv[0].strptr, rargv[0].strlength));
+    eval_sv(in, G_SCALAR);
+    SPAGAIN;
+    res = POPs;
+    PUTBACK;
+
+    ret = 0;
+    if (SvTRUE(ERRSV) || !SvOK(res))
+       ret = 1;
+    str = SvPV(res, len);
+    if (len <= 256                     /* Default buffer is 256-char long */
+       || !DosAllocMem((PPVOID)&retstr->strptr, len,
+                       PAG_READ|PAG_WRITE|PAG_COMMIT)) {
+           memcpy(retstr->strptr, str, len);
+           retstr->strlength = len;
+    } else
+       ret = 1;
+
+    FREETMPS;
+    LEAVE;
+
+    return ret;
+  }
+}
index 87fd9a4..7a7de8c 100644 (file)
@@ -70,7 +70,7 @@
 #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
 static char    *local_patches[] = {
         NULL
-       ,"DEVEL11372"
+       ,"DEVEL11497"
        ,NULL
 };
 
diff --git a/perl.c b/perl.c
index 25cdcd6..91efa0f 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -58,29 +58,6 @@ static I32 read_e_script(pTHXo_ int idx, SV *buf_sv, int maxlen);
     } STMT_END
 #else
 #  if defined(USE_ITHREADS)
-
-/* this is called in parent before the fork() */
-void
-Perl_atfork_lock(void)
-{
-    /* locks must be held in locking order (if any) */
-#ifdef MYMALLOC
-    MUTEX_LOCK(&PL_malloc_mutex);
-#endif
-    OP_REFCNT_LOCK;
-}
-
-/* this is called in both parent and child after the fork() */
-void
-Perl_atfork_unlock(void)
-{
-    /* locks must be released in same order as in S_atfork_lock() */
-#ifdef MYMALLOC
-    MUTEX_UNLOCK(&PL_malloc_mutex);
-#endif
-    OP_REFCNT_UNLOCK;
-}
-
 #  define INIT_TLS_AND_INTERP \
     STMT_START {                               \
        if (!PL_curinterp) {                    \
@@ -3463,7 +3440,8 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register
            } /* else what? */
        }
 #endif /* NEED_ENVIRON_DUP_FOR_MODIFY */
-       for (; *env; env++) {
+       if (env)
+         for (; *env; env++) {
            if (!(s = strchr(*env,'=')))
                continue;
            *s++ = '\0';
@@ -3473,7 +3451,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register
            sv = newSVpv(s--,0);
            (void)hv_store(hv, *env, s - *env, sv, 0);
            *s = '=';
-       }
+         }
 #ifdef NEED_ENVIRON_DUP_FOR_MODIFY
        if (dup_env_base) {
            char **dup_env;
diff --git a/perl.h b/perl.h
index 9041aa0..8e975f1 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2493,6 +2493,55 @@ START_EXTERN_C
 END_EXTERN_C
 #endif
 
+#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(LDBL_INFINITY)
+#  define NV_INF LDBL_INFINITY
+#endif
+#if !defined(NV_INF) && defined(DBL_INFINITY)
+#  define NV_INF (NV)DBL_INFINITY
+#endif
+#if !defined(NV_INF) && defined(INFINITY)
+#  define NV_INF (NV)INFINITY
+#endif
+#if !defined(NV_INF) && defined(INF)
+#  define NV_INF (NV)INF
+#endif
+#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
+#  define NV_INF (NV)HUGE_VALL
+#endif
+#if !defined(NV_INF) && defined(HUGE_VAL)
+#  define NV_INF (NV)HUGE_VAL
+#endif
+
+#if !defined(NV_NAN) && defined(USE_LONG_DOUBLE)
+#   if !defined(NV_NAN) && defined(LDBL_NAN)
+#       define NV_NAN LDBL_NAN
+#   endif
+#   if !defined(NV_NAN) && defined(LDBL_QNAN)
+#       define NV_NAN LDBL_QNAN
+#   endif
+#   if !defined(NV_NAN) && defined(LDBL_SNAN)
+#       define NV_NAN LDBL_SNAN
+#   endif
+#endif
+#if !defined(NV_NAN) && defined(DBL_NAN)
+#  define NV_NAN (NV)DBL_NAN
+#endif
+#if !defined(NV_NAN) && defined(DBL_QNAN)
+#  define NV_NAN (NV)DBL_QNAN
+#endif
+#if !defined(NV_NAN) && defined(DBL_SNAN)
+#  define NV_NAN (NV)DBL_SNAN
+#endif
+#if !defined(NV_NAN) && defined(QNAN)
+#  define NV_NAN (NV)QNAN
+#endif
+#if !defined(NV_NAN) && defined(SNAN)
+#  define NV_NAN (NV)SNAN
+#endif
+#if !defined(NV_NAN) && defined(NAN)
+#  define NV_NAN (NV)NAN
+#endif
+
 #ifndef __cplusplus
 #  if defined(NeXT) || defined(__NeXT__) /* or whatever catches all NeXTs */
 char *crypt ();       /* Maybe more hosts will need the unprototyped version */
@@ -3773,6 +3822,7 @@ int flock(int fd, int op);
 #define IS_NUMBER_NOT_INT            0x04 /* saw . or E notation */
 #define IS_NUMBER_NEG                0x08 /* leading minus sign */
 #define IS_NUMBER_INFINITY           0x10 /* this is big */
+#define IS_NUMBER_NAN                 0x20 /* this is not */
 
 #define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
 
index fb5c407..9b90154 100644 (file)
--- a/perlapi.c
+++ b/perlapi.c
@@ -1678,6 +1678,30 @@ Perl_my_fflush_all(pTHXo)
     return ((CPerlObj*)pPerl)->Perl_my_fflush_all();
 }
 
+#undef  Perl_my_fork
+Pid_t
+Perl_my_fork()
+{
+    dTHXo;
+    return ((CPerlObj*)pPerl)->Perl_my_fork();
+}
+
+#undef  Perl_atfork_lock
+void
+Perl_atfork_lock()
+{
+    dTHXo;
+    ((CPerlObj*)pPerl)->Perl_atfork_lock();
+}
+
+#undef  Perl_atfork_unlock
+void
+Perl_atfork_unlock()
+{
+    dTHXo;
+    ((CPerlObj*)pPerl)->Perl_atfork_unlock();
+}
+
 #undef  Perl_my_lstat
 I32
 Perl_my_lstat(pTHXo)
index 9676380..a7b1b94 100644 (file)
@@ -271,8 +271,8 @@ server, or perhaps check some of the other FAQs referenced above.
 
 The HTTPD::UserAdmin and HTTPD::GroupAdmin modules provide a
 consistent OO interface to these files, regardless of how they're
-stored.  Databases may be text, dbm, Berkley DB or any database with a
-DBI compatible driver.  HTTPD::UserAdmin supports files used by the
+stored.  Databases may be text, dbm, Berkeley DB or any database with
+a DBI compatible driver.  HTTPD::UserAdmin supports files used by the
 `Basic' and `Digest' authentication schemes.  Here's an example:
 
     use HTTPD::UserAdmin ();
index 3f86c6a..4a76999 100644 (file)
@@ -4481,6 +4481,10 @@ characters at each point it matches that way.  For example:
 
 produces the output 'h:i:t:h:e:r:e'.
 
+Using the empty pattern C<//> specifically matches the null string, and is
+not be confused with the use of C<//> to mean "the last successful pattern
+match".
+
 Empty leading (or trailing) fields are produced when there positive width
 matches at the beginning (or end) of the string; a zero-width match at the
 beginning (or end) of the string does not produce an empty field.  For
@@ -4540,6 +4544,11 @@ Example:
        #...
     }
 
+As with regular pattern matching, any capturing parentheses that are not
+matched in a C<split()> will be set to C<undef> when returned:
+
+    @fields = split /(A)|B/, "1A2B3";
+    # @fields is (1, 'A', 2, undef, 3)
 
 =item sprintf FORMAT, LIST
 
index 323d456..6478efd 100644 (file)
@@ -966,8 +966,8 @@ C function any time a scalar's value is used or changed.  The C<MAGIC>'s
 C<mg_ptr> field points to a C<ufuncs> structure:
 
     struct ufuncs {
-        I32 (*uf_val)(IV, SV*);
-        I32 (*uf_set)(IV, SV*);
+        I32 (*uf_val)(pTHX_ IV, SV*);
+        I32 (*uf_set)(pTHX_ IV, SV*);
         IV uf_index;
     };
 
index 3c0208e..8b9d465 100644 (file)
@@ -354,7 +354,7 @@ from Andreas K
 
 =over 4
 
-=item It's easier
+=item It's easier to rsync the source tree
 
 Since you don't have to apply the patches yourself, you are sure all
 files in the source tree are in the right state.
@@ -382,7 +382,7 @@ more ... (see Sarathy's remark).
 
 =over 4
 
-=item It's easier
+=item It's easier to rsync the patches
 
 If you have more than one machine that you want to keep in track with
 bleadperl, it's easier to rsync the patches only once and then apply
@@ -1381,7 +1381,7 @@ similar output to L<B::Debug|B::Debug>.
             }
         }
 
-< finish this later >
+# finish this later #
 
 =head2 Patching
 
@@ -1839,7 +1839,7 @@ need to do too, if you don't want to see the "global leaks":
 Depending on your platform there are various of profiling Perl.
 
 There are two commonly used techniques of profiling executables:
-E<statistical time-sampling> and E<basic-block counting>.
+I<statistical time-sampling> and I<basic-block counting>.
 
 The first method takes periodically samples of the CPU program
 counter, and since the program counter can be correlated with the code
@@ -1853,11 +1853,11 @@ can be alleviated by running the code for longer (in general this is a
 good idea for profiling), the second problem is usually kept in guard
 by the profiling tools themselves.
 
-The second method divides up the generated code into E<basic blocks>.
+The second method divides up the generated code into I<basic blocks>.
 Basic blocks are sections of code that are entered only in the
 beginning and exited only at the end.  For example, a conditional jump
 starts a basic block.  Basic block profiling usually works by
-E<instrumenting> the code by adding E<enter basic block #nnnn>
+I<instrumenting> the code by adding I<enter basic block #nnnn>
 book-keeping code to the generated code.  During the execution of the
 code the basic block counters are then updated appropriately.  The
 caveat is that the added extra code can skew the results: again, the
@@ -1913,7 +1913,7 @@ formats, see your own local documentation of gprof.
 
 =head2 GCC gcov Profiling
 
-Starting from GCC 3.0 E<basic block profiling> is officially available
+Starting from GCC 3.0 I<basic block profiling> is officially available
 for the GNU CC.
 
 You can build a profiled version of perl called F<perl.gcov> by
@@ -1951,7 +1951,7 @@ and its section titled "8. gcov: a Test Coverage Program"
 
 Pixie is a profiling tool available on IRIX and Tru64 (aka Digital
 UNIX aka DEC OSF/1) platforms.  Pixie does its profiling using
-E<basic-block counting>.
+I<basic-block counting>.
 
 You can build a profiled version of perl called F<perl.pixie> by
 invoking the make target "perl.pixie" (what is required is that Perl
index 6496230..b67898f 100644 (file)
@@ -795,15 +795,15 @@ Also see:
 
 =item *
 
-The MacPerl Pages, http://www.macperl.com/ .
+MacPerl Development, http://dev.macperl.org/ .
 
 =item *
 
-The MacPerl mailing lists, http://www.macperl.org/ .
+The MacPerl Pages, http://www.macperl.com/ .
 
 =item *
 
-MacPerl Module Porters, http://pudge.net/mmp/ .
+The MacPerl mailing lists, http://lists.perl.org/ .
 
 =back
 
@@ -1535,9 +1535,6 @@ Not implemented. (S<Mac OS>, Plan9)
 
 =item glob
 
-Globbing built-in, but only C<*> and C<?> metacharacters are supported.
-(S<Mac OS>)
-
 This operator is implemented via the File::Glob extension on most
 platforms.  See L<File::Glob> for portability information.
 
@@ -1552,8 +1549,10 @@ Available only for socket handles. (S<RISC OS>)
 
 =item kill SIGNAL, LIST
 
-Not implemented, hence not useful for taint checking. (S<Mac OS>,
-S<RISC OS>)
+C<kill(0, LIST)> is implemented for the sake of taint checking;
+use with other signals is unimplemented. (S<Mac OS>)
+
+Not implemented, hence not useful for taint checking. (S<RISC OS>)
 
 C<kill()> doesn't have the semantics of C<raise()>, i.e. it doesn't send
 a signal to the identified process like it does on Unix platforms.
@@ -1606,8 +1605,6 @@ platforms.  (SunOS, Solaris, HP-UX)
 
 =item pipe READHANDLE,WRITEHANDLE
 
-Not implemented. (S<Mac OS>)
-
 Very limited functionality. (MiNT)
 
 =item readlink EXPR
@@ -1669,7 +1666,7 @@ be implemented even in UNIX platforms.
 
 =item socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL
 
-Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, VOS, VM/ESA)
+Not implemented. (Win32, VMS, S<RISC OS>, VOS, VM/ESA)
 
 =item stat FILEHANDLE
 
@@ -1755,12 +1752,12 @@ Not useful. (S<RISC OS>)
 
 =item truncate EXPR,LENGTH
 
-Not implemented. (VMS)
+Not implemented. (Older versions of VMS)
 
 Truncation to zero-length only. (VOS)
 
 If a FILEHANDLE is supplied, it must be writable and opened in append
-mode (i.e., use C<open(FH, '>>filename')>
+mode (i.e., use C<<< open(FH, '>>filename') >>>
 or C<sysopen(FH,...,O_APPEND|O_RDWR)>.  If a filename is supplied, it
 should not be held open elsewhere. (Win32)
 
@@ -1921,8 +1918,8 @@ distribution available at http://www.perl.com/CPAN/src/index.html
         1) in DOS mode either the DOS or OS/2 ports can be used
         2) Mac OS Classic (pre-X) is almost 5.6.1-ready; building from
           the source does work with 5.6.1, but additional MacOS specific
-           source code is needed for a complete build.  Contact the mailing
-           list macperl-porters@macperl.org for more information.
+           source code is needed for a complete build.  See the web
+           site http://dev.macperl.org/ for more information.
         3) compilers: Borland, Cygwin, Mingw32 EGCS/GCC, VC++
 
 The following platforms worked for the previous releases (5.6.0 and 5.7.0),
@@ -2070,6 +2067,7 @@ 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>,
+Philip Newton <pne@cpan.org>,
 Gary Ng <71564.1743@CompuServe.COM>,
 Tom Phoenix <rootbeer@teleport.com>,
 AndrE<eacute> Pirard <A.Pirard@ulg.ac.be>,
index 817f1e5..d9b4c41 100644 (file)
@@ -472,10 +472,8 @@ This array holds the offsets of the beginnings of the last
 successful submatches in the currently active dynamic scope.
 C<$-[0]> is the offset into the string of the beginning of the
 entire match.  The I<n>th element of this array holds the offset
-of the I<n>th submatch, so C<$+[1]> is the offset where $1
-begins, C<$+[2]> the offset where $2 begins, and so on.
-You can use C<$#-> to determine how many subgroups were in the
-last successful match.  Compare with the C<@+> variable.
+of the I<n>th submatch, so C<$-[1]> is the offset where $1
+begins, C<$-[2]> the offset where $2 begins, and so on.
 
 After a match against some variable $var:
 
diff --git a/pp.c b/pp.c
index 51e10de..658a890 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4228,12 +4228,16 @@ PP(pp_split)
                for (i = 1; i <= rx->nparens; i++) {
                    s = rx->startp[i] + orig;
                    m = rx->endp[i] + orig;
-                   if (m && s) {
+
+                   /* japhy (07/27/01) -- the (m && s) test doesn't catch
+                      parens that didn't match -- they should be set to
+                      undef, not the empty string */
+                   if (m >= orig && s >= orig) {
                        dstr = NEWSV(33, m-s);
                        sv_setpvn(dstr, s, m-s);
                    }
                    else
-                       dstr = NEWSV(33, 0);
+                       dstr = &PL_sv_undef;  /* undef, not "" */
                    if (make_mortal)
                        sv_2mortal(dstr);
                    if (do_utf8)
index 6a74b11..ac7ca20 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -104,11 +104,6 @@ extern int h_errno;
 #  endif
 #endif
 
-/* Put this after #includes because fork and vfork prototypes may conflict. */
-#ifndef HAS_VFORK
-#   define vfork fork
-#endif
-
 #ifdef HAS_CHSIZE
 # ifdef my_chsize  /* Probably #defined to Perl_my_chsize in embed.h */
 #   undef my_chsize
@@ -3874,13 +3869,9 @@ PP(pp_fork)
     Pid_t childpid;
     GV *tmpgv;
 
-#   if defined(USE_ITHREADS) && !defined(HAS_PTHREAD_ATFORK)
-       Perl_croak(aTHX_ "No pthread_atfork() -- fork() too unsafe");
-#   endif
-
     EXTEND(SP, 1);
     PERL_FLUSHALL_FOR_CHILD;
-    childpid = fork();
+    childpid = PerlProc_fork();
     if (childpid < 0)
        RETSETUNDEF;
     if (!childpid) {
@@ -3991,7 +3982,7 @@ PP(pp_system)
         
         if (PerlProc_pipe(pp) >= 0)
              did_pipes = 1;
-        while ((childpid = vfork()) == -1) {
+        while ((childpid = PerlProc_fork()) == -1) {
              if (errno != EAGAIN) {
                   value = -1;
                   SP = ORIGMARK;
@@ -4019,7 +4010,7 @@ PP(pp_system)
              (void)rsignal_restore(SIGQUIT, &qhand);
 #endif
              STATUS_NATIVE_SET(result == -1 ? -1 : status);
-             do_execfree();    /* free any memory child malloced on vfork */
+             do_execfree();    /* free any memory child malloced on fork */
              SP = ORIGMARK;
              if (did_pipes) {
                   int errkid;
diff --git a/proto.h b/proto.h
index d03b3da..def3db1 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -496,6 +496,9 @@ PERL_CALLCONV char* Perl_my_bzero(char* loc, I32 len);
 PERL_CALLCONV void     Perl_my_exit(pTHX_ U32 status) __attribute__((noreturn));
 PERL_CALLCONV void     Perl_my_failure_exit(pTHX) __attribute__((noreturn));
 PERL_CALLCONV I32      Perl_my_fflush_all(pTHX);
+PERL_CALLCONV Pid_t    Perl_my_fork(void);
+PERL_CALLCONV void     Perl_atfork_lock(void);
+PERL_CALLCONV void     Perl_atfork_unlock(void);
 PERL_CALLCONV I32      Perl_my_lstat(pTHX);
 #if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
 PERL_CALLCONV I32      Perl_my_memcmp(const char* s1, const char* s2, I32 len);
index b336bec..8b6e4a9 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -358,6 +358,7 @@ typedef struct re_scream_pos_data_s
  *   p - Pad for (?{EVAL} item
  *   s - swash for unicode-style character class
  * 20010712 mjd@plover.com
+ * (Remember to update re_dup() and pregfree() if you add any items.)
  */
 struct reg_data {
     U32 count;
index 0e780d0..31a1c6a 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1957,6 +1957,16 @@ typedef union re_unwind_t {
     re_unwind_branch_t branch;
 } re_unwind_t;
 
+#define sayYES goto yes
+#define sayNO goto no
+#define sayYES_FINAL goto yes_final
+#define sayYES_LOUD  goto yes_loud
+#define sayNO_FINAL  goto no_final
+#define sayNO_SILENT goto do_no
+#define saySAME(x) if (x) goto yes; else goto no
+
+#define REPORT_CODE_OFF 24
+
 /*
  - regmatch - main matching routine
  *
@@ -1999,25 +2009,7 @@ S_regmatch(pTHX_ regnode *prog)
     nextchr = UCHARAT(locinput);
     scan = prog;
     while (scan != NULL) {
-#define sayNO_L (logical ? (logical = 0, sw = 0, goto cont) : sayNO)
-#if 1
-#  define sayYES goto yes
-#  define sayNO goto no
-#  define sayYES_FINAL goto yes_final
-#  define sayYES_LOUD  goto yes_loud
-#  define sayNO_FINAL  goto no_final
-#  define sayNO_SILENT goto do_no
-#  define saySAME(x) if (x) goto yes; else goto no
-#  define REPORT_CODE_OFF 24
-#else
-#  define sayYES return 1
-#  define sayNO return 0
-#  define sayYES_FINAL return 1
-#  define sayYES_LOUD  return 1
-#  define sayNO_FINAL  return 0
-#  define sayNO_SILENT return 0
-#  define saySAME(x) return x
-#endif
+
        DEBUG_r( {
            SV *prop = sv_newmortal();
            int docolor = *PL_colors[0];
index 3ecfe7f..fb8b8f1 100755 (executable)
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -9,6 +9,7 @@ BEGIN {
 
 use Config;
 
+my $Is_VMSish = ($^O eq 'VMS');
 $Is_Dosish = ($^O eq 'MSWin32' or $^O eq 'NetWare' or $^O eq 'dos' or
              $^O eq 'os2' or $^O eq 'mint' or $^O eq 'cygwin' or
              $^O eq 'mpeix');
@@ -19,11 +20,21 @@ if (defined &Win32::IsWinNT && Win32::IsWinNT()) {
 
 print "1..29\n";
 
-$wd = ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) ? `cd` : `pwd`);
+$wd = ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) ? `cd` : ($Is_VMSish) ? `show default` : `pwd`);
 chop($wd);
 
-if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { `rmdir /s /q tmp 2>nul`; `mkdir tmp`; }
-else {  `rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`; }
+if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
+    `rmdir /s /q tmp 2>nul`;
+    `mkdir tmp`;
+}
+elsif ($Is_VMSish) {
+    `if f\$search("[.tmp]*.*") .nes. "" then delete/nolog/noconfirm [.tmp]*.*.*`;
+    `if f\$search("tmp.dir") .nes. "" then delete/nolog/noconfirm tmp.dir;`;
+    `create/directory [.tmp]`;
+}
+else {
+    `rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`;
+}
 chdir './tmp';
 `/bin/rm -rf a b c x` if -x '/bin/rm';
 
@@ -36,24 +47,24 @@ close(fh);
 open(fh,'>a') || die "Can't create a";
 close(fh);
 
-if ($Is_Dosish) {print "ok 2 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 2 # skipped: no link\n";} 
 elsif (eval {link('a','b')}) {print "ok 2\n";} 
 else {print "not ok 2\n";}
 
-if ($Is_Dosish) {print "ok 3 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 3 # skipped: no link\n";} 
 elsif (eval {link('b','c')}) {print "ok 3\n";} 
 else {print "not ok 3\n";}
 
 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
     $blksize,$blocks) = stat('c');
 
-if ($Config{dont_use_nlink} || $Is_Dosish)
+if ($Config{dont_use_nlink} || $Is_Dosish || $Is_VMSish)
     {print "ok 4 # skipped: no link\n";} 
 elsif ($nlink == 3)
     {print "ok 4\n";} 
 else {print "not ok 4\n";}
 
-if ($^O eq 'amigaos' || $Is_Dosish)
+if ($^O eq 'amigaos' || $Is_Dosish || $Is_VMSish)
     {print "ok 5 # skipped: no link\n";} 
 elsif (($mode & 0777) == 0666)
     {print "ok 5\n";} 
@@ -64,7 +75,7 @@ if ((chmod $newmode,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";}
 
 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
     $blksize,$blocks) = stat('c');
-if ($Is_Dosish) {print "ok 7 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 7 # skipped: no link\n";} 
 elsif (($mode & 0777) == $newmode) {print "ok 7\n";} 
 else {print "not ok 7\n";}
 
@@ -74,23 +85,23 @@ if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
     $newmode = 0666;
 }
 
-if ($Is_Dosish) {print "ok 8 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 8 # skipped: no link\n";} 
 elsif ((chmod $newmode,'c','x') == 2) {print "ok 8\n";} 
 else {print "not ok 8\n";}
 
 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
     $blksize,$blocks) = stat('c');
-if ($Is_Dosish) {print "ok 9 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 9 # skipped: no link\n";} 
 elsif (($mode & 0777) == $newmode) {print "ok 9\n";} 
 else {print "not ok 9\n";}
 
 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
     $blksize,$blocks) = stat('x');
-if ($Is_Dosish) {print "ok 10 # skipped: no link\n";} 
+if ($Is_Dosish || $Is_VMSish) {print "ok 10 # skipped: no link\n";} 
 elsif (($mode & 0777) == $newmode) {print "ok 10\n";} 
 else {print "not ok 10\n";}
 
-if ($Is_Dosish) {print "ok 11 # skipped: no link\n"; unlink 'b','x'; } 
+if ($Is_Dosish || $Is_VMSish) {print "ok 11 # skipped: no link\n"; unlink 'b','x'; } 
 elsif ((unlink 'b','x') == 2) {print "ok 11\n";} 
 else {print "not ok 11\n";}
 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
@@ -124,6 +135,12 @@ elsif ($^O =~ /\blinux\b/i) {
        {print "ok 18 # accounted for possible NFS/glibc2.2 bug on linux\n";}
     else
        {print "not ok 18 $atime/$new_atime $mtime/$new_mtime\n";}
+}
+elsif ($Is_VMSish) {
+    if ($atime == 500000001 && $mtime == 500000000 + $delta)
+        {print "ok 18\n";}
+    else
+       {print "not ok 18 $atime $mtime\n";}
 } else
     {print "not ok 18 $atime $mtime\n";}
 
@@ -136,7 +153,9 @@ unlink 'c';
 chdir $wd || die "Can't cd back to $wd";
 
 unlink 'c';
-if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>/dev/null` =~ /^l.*->/) {
+# Yet another way to look for links (perhaps those that cannot be created by perl?).
+# Hopefully there is an ls utility in your %PATH%. N.B. that $^O is 'cygwin' on Cygwin.
+if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>nul` =~ /^l.*->/) {
     # we have symbolic links
     system("cp TEST TEST$$");
     # we have to copy because e.g. GNU grep gets huffy if we have
@@ -149,12 +168,28 @@ if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>/dev/null` =~ /
     unlink("TEST$$");
 }
 else {
-    print "ok 21\nok 22\n";
+    if ( ($^O eq 'MSWin32') || ($^O eq 'NetWare') ) {
+        print "ok 21 # skipped: no link\nok 22 # skipped: no link\n";
+    }
+    else {
+        print "ok 21 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\nok 22 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\n";
+    }
 }
 
 # truncate (may not be implemented everywhere)
 unlink "Iofs.tmp";
-`echo helloworld > Iofs.tmp`;
+if ($Is_VMSish) {
+    open IOFSCOM, ">Iofs.tmp" or die "Could not write IOfs.tmp: $!";
+    print IOFSCOM 'helloworld';
+    close(IOFSCOM);
+}
+else {
+    `echo helloworld > Iofs.tmp`;
+}
+#
+# Perhaps the eval would be better written with a construct such as?:
+#if (defined($Config{d_truncate}) && $Config{d_truncate} eq 'define') {
+#
 eval { truncate "Iofs.tmp", 5; };
 if ($@) {
   if ($@ =~ /not implemented/) {
@@ -190,7 +225,14 @@ else {
   {
       close (FH); open (FH, ">>Iofs.tmp") or die "Can't reopen Iofs.tmp";
   }
-  if (-s "Iofs.tmp" == 200) {print "ok 25\n"} else {print "not ok 25\n"}
+  if (-s "Iofs.tmp" == 200) {
+      print "ok 25\n"
+  }
+  else {
+    my $s = -s "Iofs.tmp";
+    printf "# -s Iofs.tmp: %s\n", defined($s) ? $s : "UNDEFINED";
+    print "not ok 25\n";
+  }
   truncate FH, 0;
   if ($^O eq 'dos'
        # Not needed on HPFS, but needed on HPFS386 ?!
@@ -213,9 +255,14 @@ unlink 'X';
 chdir $wd || die "Can't cd back to $wd";
 
 # check if rename() works on directories
-rename 'tmp', 'tmp1' or print "not ";
+if ($Is_VMSish) {
+    rename 'tmp.dir', 'tmp1.dir' or print "not ";
+}
+else {
+    rename 'tmp', 'tmp1' or print "not ";
+}
 print "ok 28\n";
 -d 'tmp1' or print "not ";
 print "ok 29\n";
 
-END { rmdir 'tmp1'; unlink "Iofs.tmp"; }
+END { rmdir 'tmp1'; 1 while unlink "Iofs.tmp"; }
index 170dfe8..f9c3bb9 100755 (executable)
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-print "1..45\n";
+print "1..46\n";
 
 $FS = ':';
 
@@ -254,3 +254,14 @@ print "ok 32\n";
     print "not " unless $r eq "he:o cruel world";
     print "ok 45\n";
 }
+
+
+{
+    # split /(A)|B/, "1B2" should return (1, undef, 2)
+    my @x = split /(A)|B/, "1B2";
+    print "not " unless
+      $x[0] eq '1' and
+      (not defined $x[1]) and
+      $x[2] eq '2';
+    print "ok 46\n";
+}
index c37de85..a86b4eb 100755 (executable)
@@ -273,7 +273,8 @@ else
 
 # 12..44: scary format testing from Merijn H. Brand
 
-if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'dos') {
+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"; }
   exit(0);
 }
index 3b26b17..fae53f1 100644 (file)
--- a/thread.h
+++ b/thread.h
     } STMT_END
 #endif
 
-void Perl_atfork_lock(void);
-void Perl_atfork_unlock(void);
-
 #ifndef PTHREAD_ATFORK
 #  ifdef HAS_PTHREAD_ATFORK
 #    define PTHREAD_ATFORK(prepare,parent,child)               \
diff --git a/util.c b/util.c
index e01e836..a88c25d 100644 (file)
--- a/util.c
+++ b/util.c
 #endif
 #endif
 
-#ifdef I_VFORK
-#  include <vfork.h>
-#endif
-
-/* Put this after #includes because fork and vfork prototypes may
-   conflict.
-*/
-#ifndef HAS_VFORK
-#   define vfork fork
-#endif
-
 #ifdef I_SYS_WAIT
 #  include <sys/wait.h>
 #endif
@@ -1858,7 +1847,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
     /* Try for another pipe pair for error return */
     if (PerlProc_pipe(pp) >= 0)
        did_pipes = 1;
-    while ((pid = vfork()) < 0) {
+    while ((pid = PerlProc_fork()) < 0) {
        if (errno != EAGAIN) {
            PerlLIO_close(p[This]);
            if (did_pipes) {
@@ -1910,7 +1899,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
 #undef THAT
     }
     /* Parent */
-    do_execfree();     /* free any memory malloced by child on vfork */
+    do_execfree();     /* free any memory malloced by child on fork */
     /* Close child's end of pipe */
     PerlLIO_close(p[that]);
     if (did_pipes)
@@ -1991,7 +1980,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
        return Nullfp;
     if (doexec && PerlProc_pipe(pp) >= 0)
        did_pipes = 1;
-    while ((pid = (doexec?vfork():fork())) < 0) {
+    while ((pid = PerlProc_fork()) < 0) {
        if (errno != EAGAIN) {
            PerlLIO_close(p[This]);
            if (did_pipes) {
@@ -2052,7 +2041,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
 #undef THIS
 #undef THAT
     }
-    do_execfree();     /* free any memory malloced by child on vfork */
+    do_execfree();     /* free any memory malloced by child on fork */
     PerlLIO_close(p[that]);
     if (did_pipes)
        PerlLIO_close(pp[1]);
@@ -2127,6 +2116,54 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
 
 #endif /* !DOSISH */
 
+/* this is called in parent before the fork() */
+void
+Perl_atfork_lock(void)
+{
+#if defined(USE_THREADS) || defined(USE_ITHREADS)
+    /* locks must be held in locking order (if any) */
+#  ifdef MYMALLOC
+    MUTEX_LOCK(&PL_malloc_mutex);
+#  endif
+    OP_REFCNT_LOCK;
+#endif
+}
+
+/* this is called in both parent and child after the fork() */
+void
+Perl_atfork_unlock(void)
+{
+#if defined(USE_THREADS) || defined(USE_ITHREADS)
+    /* locks must be released in same order as in atfork_lock() */
+#  ifdef MYMALLOC
+    MUTEX_UNLOCK(&PL_malloc_mutex);
+#  endif
+    OP_REFCNT_UNLOCK;
+#endif
+}
+
+Pid_t
+Perl_my_fork(void)
+{
+#if defined(HAS_FORK)
+    Pid_t pid;
+#if (defined(USE_THREADS) || defined(USE_ITHREADS)) && !defined(HAS_PTHREAD_ATFORK)
+    atfork_lock();
+    pid = fork();
+    atfork_unlock();
+#else
+    /* atfork_lock() and atfork_unlock() are installed as pthread_atfork()
+     * handlers elsewhere in the code */
+    pid = fork();
+#endif
+    return pid;
+#else
+    /* this "canna happen" since nothing should be calling here if !HAS_FORK */
+    Perl_croak_nocontext("fork() not available");
+    return 0;
+#endif /* HAS_FORK */
+}
+
 #ifdef DUMP_FDS
 void
 Perl_dump_fds(pTHX_ char *s)
index 79dd8b4..7eb957d 100644 (file)
@@ -115,7 +115,7 @@ use Config;
 use File::Spec;
 
 @compexcl=('cpp.t');
-@ioexcl=('argv.t','dup.t','fs.t','pipe.t');
+@ioexcl=('argv.t','dup.t','pipe.t');
 @libexcl=('db-btree.t','db-hash.t','db-recno.t',
           'gdbm.t','io_dup.t', 'io_pipe.t', 'io_poll.t', 'io_sel.t',
           'io_sock.t', 'io_unix.t',
similarity index 92%
rename from win32/sncfnmcs.pl
rename to win32/sync_ext.pl
index bb62460..e482b69 100644 (file)
@@ -1,8 +1,9 @@
 =comment
 
-Synchronize filename cases.
-This script takes two arguments - first and second extensions to synchronize
-filename cases with.
+Synchronize filename cases for extensions.
+
+This script takes two arguments - first and second extensions to
+synchronize filename cases with.
 
 There may be specified following options:
   --verbose    <== say everything what is going on
@@ -12,7 +13,7 @@ There may be specified following options:
 Every such option can be specified with an optional "no" prefix to negate it.
 
 Typically, it is invoked as:
-  perl sync-fnamescase.pl c obj --verbose
+  perl sync_ext.pl c obj --verbose
 
 =cut