Change 16929: Integrate perl
[email protected] (Chris Nandor) Fri, 31 May 2002 18:05:32 -0400
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05100304b91da41b25e5@[10.0.1.177]> |
Change 16929 by pudge@pudge-mobile on 2002/05/31 16:27:30 Integrate perl Affected files ... .... //depot/macperl/AUTHORS#4 integrate .... //depot/macperl/Changes#8 integrate .... //depot/macperl/Configure#7 integrate .... //depot/macperl/MANIFEST#9 integrate .... //depot/macperl/NetWare/Makefile#4 integrate .... //depot/macperl/NetWare/Nwmain.c#2 integrate .... //depot/macperl/NetWare/bat/BldNWExt-Exist.bat#2 delete .... //depot/macperl/NetWare/bat/BldNWExt.bat#2 delete .... //depot/macperl/NetWare/bat/CWbuild.bat#2 delete .... //depot/macperl/NetWare/bat/MPKBuild.bat#2 delete .... //depot/macperl/NetWare/bat/SetCodeWar.bat#1 branch .... //depot/macperl/NetWare/bat/SetNWDef.bat#2 delete .... //depot/macperl/NetWare/bat/Setcw.bat#2 delete .... //depot/macperl/NetWare/bat/Setmpksdk.bat#2 delete .... //depot/macperl/NetWare/bat/Setwatcom.bat#3 delete .... //depot/macperl/NetWare/bat/ToggleXDC.bat#2 delete .... //depot/macperl/NetWare/nw5.c#2 integrate .... //depot/macperl/Porting/Glossary#4 integrate .... //depot/macperl/Porting/config.sh#5 integrate .... //depot/macperl/Porting/config_H#5 integrate .... //depot/macperl/README.beos#3 integrate .... //depot/macperl/README.hpux#2 integrate .... //depot/macperl/README.netware#3 integrate .... //depot/macperl/README.vms#2 integrate .... //depot/macperl/configure.com#7 integrate .... //depot/macperl/ext/Devel/PPPort/PPPort.pm#4 integrate .... //depot/macperl/ext/DynaLoader/DynaLoader_pm.PL#4 integrate .... //depot/macperl/ext/DynaLoader/XSLoader_pm.PL#2 integrate .... //depot/macperl/ext/Storable/ChangeLog#5 integrate .... //depot/macperl/ext/Storable/MANIFEST#5 integrate .... //depot/macperl/ext/Storable/Makefile.PL#5 integrate .... //depot/macperl/ext/Storable/Storable.pm#8 integrate .... //depot/macperl/ext/Storable/Storable.xs#7 integrate .... //depot/macperl/ext/Storable/t/interwork56.t#1 branch .... //depot/macperl/ext/Storable/t/make_56_interwork.pl#1 branch .... //depot/macperl/ext/Storable/t/malice.t#5 integrate .... //depot/macperl/hints/linux.sh#2 integrate .... //depot/macperl/lib/English.t#3 integrate .... //depot/macperl/lib/ExtUtils/Changes#6 integrate .... //depot/macperl/lib/ExtUtils/Command.pm#4 integrate .... //depot/macperl/lib/ExtUtils/Liblist/Kid.pm#3 integrate .... //depot/macperl/lib/ExtUtils/MM_BeOS.pm#4 integrate .... //depot/macperl/lib/ExtUtils/MM_Cygwin.pm#3 integrate .... //depot/macperl/lib/ExtUtils/MM_MacOS.pm#4 integrate .... //depot/macperl/lib/ExtUtils/MM_NW5.pm#6 integrate .... //depot/macperl/lib/ExtUtils/MM_OS2.pm#3 integrate .... //depot/macperl/lib/ExtUtils/MM_Unix.pm#7 integrate .... //depot/macperl/lib/ExtUtils/MM_VMS.pm#5 integrate .... //depot/macperl/lib/ExtUtils/MM_Win32.pm#3 integrate .... //depot/macperl/lib/ExtUtils/MakeMaker.pm#6 integrate .... //depot/macperl/lib/ExtUtils/Manifest.pm#4 integrate .... //depot/macperl/lib/ExtUtils/Mkbootstrap.pm#2 integrate .... //depot/macperl/lib/ExtUtils/Mksymlists.pm#3 integrate .... //depot/macperl/lib/ExtUtils/t/MM_NW5.t#1 branch .... //depot/macperl/lib/ExtUtils/t/writemakefile_args.t#1 branch .... //depot/macperl/lib/ExtUtils/testlib.pm#4 integrate .... //depot/macperl/lib/File/Spec/NW5.pm#1 branch .... //depot/macperl/lib/File/Spec/Unix.pm#3 integrate .... //depot/macperl/lib/File/stat.t#4 integrate .... //depot/macperl/lib/Math/BigFloat.pm#2 integrate .... //depot/macperl/lib/Math/BigInt.pm#2 integrate .... //depot/macperl/lib/Math/BigInt/Calc.pm#2 integrate .... //depot/macperl/lib/Math/BigInt/t/bare_mbf.t#2 integrate .... //depot/macperl/lib/Math/BigInt/t/bigfltpm.inc#2 integrate .... //depot/macperl/lib/Math/BigInt/t/bigintpm.inc#2 integrate .... //depot/macperl/lib/Math/BigInt/t/calling.t#2 integrate .... //depot/macperl/lib/Math/BigInt/t/mbi_rand.t#2 integrate .... //depot/macperl/lib/Math/BigInt/t/mbimbf.inc#2 integrate .... //depot/macperl/lib/Math/BigInt/t/upgrade.inc#2 integrate .... //depot/macperl/lib/Math/BigRat.pm#2 integrate .... //depot/macperl/lib/Math/BigRat/t/bigrat.t#2 integrate .... //depot/macperl/lib/Net/ChangeLog.libnet#2 integrate .... //depot/macperl/lib/Net/FTP.pm#2 integrate .... //depot/macperl/lib/Net/SMTP.pm#2 integrate .... //depot/macperl/lib/Test/Harness.pm#8 integrate .... //depot/macperl/lib/Test/Harness/Changes#6 integrate .... //depot/macperl/lib/Test/Harness/Straps.pm#8 integrate .... //depot/macperl/lib/Test/Harness/t/callback.t#3 integrate .... //depot/macperl/lib/Test/Harness/t/strap-analyze.t#8 integrate .... //depot/macperl/lib/Test/Harness/t/test-harness.t#8 integrate .... //depot/macperl/lib/blib.t#4 integrate .... //depot/macperl/lib/charnames.pm#4 integrate .... //depot/macperl/lib/charnames.t#4 integrate .... //depot/macperl/makedef.pl#8 integrate .... //depot/macperl/os2/os2ish.h#3 integrate .... //depot/macperl/patchlevel.h#8 integrate .... //depot/macperl/perlio.c#7 integrate .... //depot/macperl/pod/perldelta.pod#9 integrate .... //depot/macperl/pod/perlfunc.pod#6 integrate .... //depot/macperl/pod/perlipc.pod#4 integrate .... //depot/macperl/pod/perlport.pod#3 integrate .... //depot/macperl/pod/perltoc.pod#5 integrate .... //depot/macperl/pod/perlvar.pod#2 integrate .... //depot/macperl/pp_sys.c#7 integrate .... //depot/macperl/t/TEST#4 integrate .... //depot/macperl/t/harness#6 integrate .... //depot/macperl/t/lib/sample-tests/die#3 integrate .... //depot/macperl/t/lib/sample-tests/skip_nomsg#1 branch .... //depot/macperl/t/lib/sample-tests/skipall#1 branch .... //depot/macperl/t/lib/sample-tests/skipall_nomsg#1 branch .... //depot/macperl/t/op/tie.t#6 integrate .... //depot/macperl/t/test.pl#4 integrate .... //depot/macperl/toke.c#5 integrate .... //depot/macperl/utfebcdic.h#3 integrate Differences ... ==== //depot/macperl/AUTHORS#4 (text) ==== Index: macperl/AUTHORS --- macperl/AUTHORS#3~16825~ Mon May 27 15:55:07 2002 +++ macperl/AUTHORS Fri May 31 09:27:30 2002 @@ -17,7 +17,7 @@ Abhijit Menon-Sen <[email protected]> Abigail <[email protected]> Achim Bohnet <[email protected]> -Adam <[email protected]> +Adam Milner <[email protected]> Adam Krolnik <[email protected]> Akim Demaille <[email protected]> Alan Burlison <[email protected]> ==== //depot/macperl/Changes#8 (text) ==== Index: macperl/Changes --- macperl/Changes#7~16870~ Wed May 29 23:06:34 2002 +++ macperl/Changes Fri May 31 09:27:30 2002 @@ -28,6 +28,465 @@ Version v5.7.X Development release working toward v5.8 -------------- ____________________________________________________________________________ +[ 16924] By: jhi on 2002/05/31 14:34:23 + Log: Missing MANIFESTations. + Branch: perl + ! MANIFEST +____________________________________________________________________________ +[ 16923] By: jhi on 2002/05/31 13:21:13 + Log: DJGPP tweaks from Laszlo. + Branch: perl + ! lib/English.t +____________________________________________________________________________ +[ 16922] By: jhi on 2002/05/31 13:12:51 + Log: NetWare update from Ananth Kesari. + Branch: perl + + NetWare/bat/SetCodeWar.bat lib/ExtUtils/t/MM_NW5.t + + lib/File/Spec/NW5.pm + - NetWare/bat/BldNWExt-Exist.bat NetWare/bat/BldNWExt.bat + - NetWare/bat/CWbuild.bat NetWare/bat/MPKBuild.bat + - NetWare/bat/SetNWDef.bat NetWare/bat/Setcw.bat + - NetWare/bat/Setmpksdk.bat NetWare/bat/ToggleXDC.bat + ! MANIFEST NetWare/Makefile NetWare/Nwmain.c NetWare/nw5.c + ! README.netware ext/DynaLoader/DynaLoader_pm.PL + ! lib/ExtUtils/MM_NW5.pm makedef.pl toke.c +____________________________________________________________________________ +[ 16921] By: jhi on 2002/05/31 12:39:48 + Log: Integrate perlio; + + Use File::Spec for blib expectance tests - skating round + existing MacOS and VMS hacks. + Branch: perl + !> lib/blib.t +____________________________________________________________________________ +[ 16920] By: nick on 2002/05/31 08:48:40 + Log: Use File::Spec for blib expectance tests - skating round + existing MacOS and VMS hacks. + Branch: perlio + ! lib/blib.t +____________________________________________________________________________ +[ 16919] By: nick on 2002/05/31 08:39:37 + Log: Integrate mainline + Branch: perlio + +> ext/Storable/t/interwork56.t + +> ext/Storable/t/make_56_interwork.pl + +> lib/ExtUtils/t/writemakefile_args.t + +> t/lib/sample-tests/skip_nomsg t/lib/sample-tests/skipall + +> t/lib/sample-tests/skipall_nomsg + - NetWare/bat/Setwatcom.bat + !> (integrate 62 files) +____________________________________________________________________________ +[ 16918] By: jhi on 2002/05/31 03:12:15 + Log: Regen toc. + Branch: perl + ! pod/perltoc.pod +____________________________________________________________________________ +[ 16917] By: jhi on 2002/05/31 02:13:06 + Log: Subject: [PATCH] t/test.pl, which_perl, VMS + From: "Craig A. Berry" <[email protected]> + Date: Thu, 30 May 2002 22:14:15 -0500 + Message-Id: <a0511170ab91c997b6866@[172.16.52.1]> + Branch: perl + ! t/test.pl +____________________________________________________________________________ +[ 16916] By: jhi on 2002/05/31 02:05:11 + Log: Missing from #16914. + Branch: perl + ! MANIFEST +____________________________________________________________________________ +[ 16915] By: jhi on 2002/05/31 02:01:07 + Log: BeOS status update. + Branch: perl + ! AUTHORS README.beos pod/perldelta.pod +____________________________________________________________________________ +[ 16914] By: jhi on 2002/05/31 01:54:38 + Log: Upgrade to Test::Harness 2.24. + Branch: perl + + t/lib/sample-tests/skip_nomsg t/lib/sample-tests/skipall + + t/lib/sample-tests/skipall_nomsg + ! lib/Test/Harness.pm lib/Test/Harness/Changes + ! lib/Test/Harness/Straps.pm lib/Test/Harness/t/callback.t + ! lib/Test/Harness/t/strap-analyze.t + ! lib/Test/Harness/t/test-harness.t t/lib/sample-tests/die +____________________________________________________________________________ +[ 16913] By: jhi on 2002/05/31 01:24:32 + Log: metaconfig unit change for #16912. + Branch: metaconfig/U/perl + ! perlpath.U +____________________________________________________________________________ +[ 16912] By: jhi on 2002/05/31 01:24:16 + Log: Subject: Improved $^X patch + From: [email protected] + Date: Thu, 30 May 02 17:32 edt + Message-Id: <[email protected]> + Branch: perl + ! Configure Porting/Glossary Porting/config.sh Porting/config_H + ! pod/perlport.pod pod/perlvar.pod +____________________________________________________________________________ +[ 16911] By: jhi on 2002/05/31 01:12:21 + Log: Subject: [PATCH configure.com] _ext -> _exe + From: "Craig A. Berry" <[email protected]> + Date: Thu, 30 May 2002 18:32:43 -0500 + Message-Id: <a05111705b91c5d0f3f25@[172.16.52.1]> + Branch: perl + ! configure.com +____________________________________________________________________________ +[ 16910] By: jhi on 2002/05/31 01:10:08 + Log: Because of #16909 MANIFEST changes. + Branch: perl + ! t/TEST t/harness +____________________________________________________________________________ +[ 16909] By: jhi on 2002/05/31 01:09:36 + Log: Subject: [PATCH] Storable compatibility with 64 bit 5.6.x + From: Nicholas Clark <[email protected]> + Date: Fri, 31 May 2002 00:02:22 +0100 + Message-ID: <[email protected]> + Branch: perl + + ext/Storable/t/interwork56.t + + ext/Storable/t/make_56_interwork.pl + ! MANIFEST ext/Storable/ChangeLog ext/Storable/MANIFEST + ! ext/Storable/Makefile.PL ext/Storable/Storable.pm + ! ext/Storable/Storable.xs ext/Storable/t/malice.t +____________________________________________________________________________ +[ 16908] By: jhi on 2002/05/30 20:49:34 + Log: Integrate perlio; + + "we have a belt, braces, trousers glued on and a kilt over the + top solution" NI-S + + (one more bench to the barricade against glibc 2.3) + Branch: perl + !> perlio.c +____________________________________________________________________________ +[ 16907] By: jhi on 2002/05/30 20:42:42 + Log: Upgrade to Math::BigRat 0.06. + Branch: perl + ! lib/Math/BigRat.pm lib/Math/BigRat/t/bigrat.t +____________________________________________________________________________ +[ 16906] By: jhi on 2002/05/30 20:39:30 + Log: Upgrade to Math::BigInt 1.57. + Branch: perl + ! lib/Math/BigFloat.pm lib/Math/BigInt.pm + ! lib/Math/BigInt/Calc.pm lib/Math/BigInt/t/bare_mbf.t + ! lib/Math/BigInt/t/bigfltpm.inc lib/Math/BigInt/t/bigintpm.inc + ! lib/Math/BigInt/t/calling.t lib/Math/BigInt/t/mbi_rand.t + ! lib/Math/BigInt/t/mbimbf.inc lib/Math/BigInt/t/upgrade.inc +____________________________________________________________________________ +[ 16905] By: jhi on 2002/05/30 20:26:32 + Log: Subject: [PATCH perl@16893] lib/blib.t tweak for VMS + From: "Craig A. Berry" <[email protected]> + Date: Thu, 30 May 2002 16:22:40 -0500 + Message-Id: <a05111703b91c44a6865f@[172.16.52.1]> + Branch: perl + ! lib/blib.t +____________________________________________________________________________ +[ 16904] By: jhi on 2002/05/30 20:24:10 + Log: Upgrade to ExtUtils::MakeMaker 6.01. + Branch: perl + + lib/ExtUtils/t/writemakefile_args.t + ! MANIFEST lib/ExtUtils/Changes lib/ExtUtils/Command.pm + ! lib/ExtUtils/Liblist/Kid.pm lib/ExtUtils/MM_BeOS.pm + ! lib/ExtUtils/MM_Cygwin.pm lib/ExtUtils/MM_MacOS.pm + ! lib/ExtUtils/MM_NW5.pm lib/ExtUtils/MM_OS2.pm + ! lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_VMS.pm + ! lib/ExtUtils/MM_Win32.pm lib/ExtUtils/MakeMaker.pm + ! lib/ExtUtils/Manifest.pm lib/ExtUtils/Mkbootstrap.pm + ! lib/ExtUtils/Mksymlists.pm lib/ExtUtils/testlib.pm +____________________________________________________________________________ +[ 16903] By: dougm on 2002/05/30 20:05:47 + Log: prevent attempts to load extension libraries more than once on darwin. + avoiding fatal errors in the form of: "multiple definitions of symbol _XS_foo" + Branch: perl + ! ext/DynaLoader/DynaLoader_pm.PL ext/DynaLoader/XSLoader_pm.PL +____________________________________________________________________________ +[ 16902] By: jhi on 2002/05/30 20:01:10 + Log: Obsolete file. + Branch: perl + - NetWare/bat/Setwatcom.bat + ! MANIFEST +____________________________________________________________________________ +[ 16901] By: jhi on 2002/05/30 19:49:57 + Log: Update Andy. + Branch: perl + ! hints/linux.sh +____________________________________________________________________________ +[ 16900] By: jhi on 2002/05/30 19:40:14 + Log: INT2PTR/PTR2IV defined twice. + Branch: perl + ! ext/Devel/PPPort/PPPort.pm +____________________________________________________________________________ +[ 16899] By: jhi on 2002/05/30 19:26:11 + Log: Subject: Re: [PATCH: perl@16826] small updates to DCL portions of perl kit + From: [email protected] + Date: Thu, 30 May 2002 13:57:31 -0400 + Message-ID: <[email protected]> + + Multinet matters with s/might the/mind the/ + Branch: perl + ! README.vms +____________________________________________________________________________ +[ 16898] By: nick on 2002/05/30 15:55:46 + Log: Integrate mainline + Branch: perlio + !> Changes lib/charnames.pm lib/charnames.t patchlevel.h + !> pod/perldelta.pod pod/perlfunc.pod pod/perlvar.pod +____________________________________________________________________________ +[ 16897] By: jhi on 2002/05/30 15:46:52 + Log: Document the glibc 2.2.5 long long bug. + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 16896] By: jhi on 2002/05/30 15:43:56 + Log: Subject: [PATCH pod/perlfunc.pod] Not having an unimport is no longer fatal. + From: Abigail <[email protected]> + Date: Thu, 30 May 2002 09:33:51 -0700 + Message-ID: <[email protected]> + Branch: perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 16895] By: nick on 2002/05/30 14:40:11 + Log: Play safe and avoid writes to stdio's buffer (for glibc2.3) + Branch: perlio + ! perlio.c +____________________________________________________________________________ +[ 16894] By: nick on 2002/05/30 14:39:19 + Log: Integrate mainline + Branch: perlio + !> (integrate 50 files) +____________________________________________________________________________ +[ 16893] By: jhi on 2002/05/30 14:24:29 + Log: Update Changes. + Branch: perl + ! Changes patchlevel.h +____________________________________________________________________________ +[ 16892] By: jhi on 2002/05/30 14:17:43 + Log: Subject: RE: [PATCH pod/perlvar.pod] $^X + From: "Green, Paul" <[email protected]> + Date: Thu, 30 May 2002 11:11:35 -0400 + Message-ID: <[email protected]> + Branch: perl + ! pod/perlvar.pod +____________________________________________________________________________ +[ 16891] By: jhi on 2002/05/30 14:07:30 + Log: charnames patch from Thomas Wegner. + Branch: perl + ! lib/charnames.pm lib/charnames.t +____________________________________________________________________________ +[ 16890] By: jhi on 2002/05/30 14:03:24 + Log: Subject: [Patch perl@16861] charnames::vianame tweak + From: SADAHIRO Tomoyuki <[email protected]> + Date: Thu, 30 May 2002 23:56:51 +0900 + Message-Id: <[email protected]> + Branch: perl + ! lib/charnames.pm +____________________________________________________________________________ +[ 16889] By: jhi on 2002/05/30 14:02:02 + Log: Chart the self-tying minefield. + Branch: perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 16888] By: jhi on 2002/05/30 13:58:53 + Log: Ignasi Roca convinced me, so #16855 is back in. + Branch: perl + ! utfebcdic.h +____________________________________________________________________________ +[ 16887] By: jhi on 2002/05/30 13:51:29 + Log: Subject: [PATCH] Re: Linux glibc 2.2.90 issue; likely from readonly stdio mmap + From: Andy Dougherty <[email protected]> + Date: Thu, 30 May 2002 10:50:18 -0400 (EDT) + Message-ID: <Pine.SOL.4.10.10205301008040.22885-100000@maxwell.phys.lafayette.edu> + Branch: perl + ! hints/linux.sh +____________________________________________________________________________ +[ 16886] By: gbarr on 2002/05/30 13:49:11 + Log: Sync with libnet-1.12 + Branch: perl + ! lib/Net/ChangeLog.libnet lib/Net/FTP.pm lib/Net/SMTP.pm +____________________________________________________________________________ +[ 16885] By: jhi on 2002/05/30 13:43:28 + Log: Subject: Re: perl@16861 + From: [email protected] (Yitzchak Scott-Thoennes) + Date: Wed, 29 May 2002 15:27:18 -0700 + Message-ID: <[email protected]> + + Yitzchak won't give up on self-ties. + Branch: perl + ! pp_sys.c t/op/tie.t +____________________________________________________________________________ +[ 16884] By: ams on 2002/05/30 13:32:52 + Log: Ronald Kimball pointed out that there was a run-on sentence in the + last patch by Stas Bekman, and I fixed it, and while I was at it, I + fixed the wording of the last phrase as well, and then I re-wrapped + the paragraph. + Branch: perl + ! pod/perlvar.pod +____________________________________________________________________________ +[ 16883] By: jhi on 2002/05/30 13:30:52 + Log: Integrate macperl change #16875. + Branch: perl + !> ext/Cwd/t/cwd.t ext/Digest/MD5/t/files.t lib/blib.t + !> t/lib/warnings/op +____________________________________________________________________________ +[ 16882] By: jhi on 2002/05/30 13:29:13 + Log: Integrate macperl patch #16868. + Branch: perl + !> (integrate 36 files) +____________________________________________________________________________ +[ 16881] By: jhi on 2002/05/30 12:50:14 + Log: Subject: Re: [ PATCH ] module test fest + From: "H.Merijn Brand" <[email protected]> + Date: Thu, 30 May 2002 13:52:18 +0200 + Message-Id: <[email protected]> + + HP-UX Oracle wisdom (with some tweaks) + Branch: perl + ! README.hpux +____________________________________________________________________________ +[ 16880] By: jhi on 2002/05/30 12:48:09 + Log: metaconfig unit change for #16879. + Branch: metaconfig + ! U/modified/Options.U +____________________________________________________________________________ +[ 16879] By: jhi on 2002/05/30 12:47:34 + Log: Configure -A should not mangle spaces, from H.Merijn B. + Branch: perl + ! Configure +____________________________________________________________________________ +[ 16878] By: jhi on 2002/05/30 12:40:42 + Log: OS/2: found the _fd_flags() prototype. + Branch: perl + ! os2/os2ish.h +____________________________________________________________________________ +[ 16877] By: jhi on 2002/05/30 12:33:05 + Log: Fix up the signal handler reinstallation lore. + Branch: perl + ! pod/perlipc.pod +____________________________________________________________________________ +[ 16876] By: jhi on 2002/05/30 12:29:09 + Log: Subject: [PATCH pod/perlipc.pod] Handling the SIGHUP Signal in Daemons + From: Stas Bekman <[email protected]> + Date: Thu, 30 May 2002 15:29:02 +0800 + Message-ID: <[email protected]> + Branch: perl + ! pod/perlipc.pod +____________________________________________________________________________ +[ 16875] By: pudge on 2002/05/30 11:48:05 + Log: Fixes for fixes + Branch: macperl + ! ext/Cwd/t/cwd.t ext/Digest/MD5/t/files.t lib/blib.t + ! t/lib/warnings/op +____________________________________________________________________________ +[ 16874] By: ams on 2002/05/30 07:41:30 + Log: Fix typo in #16866. + Branch: perl + ! lib/File/stat.t +____________________________________________________________________________ +[ 16873] By: ams on 2002/05/30 07:39:24 + Log: Subject: [PATCH lib/File/Spec/Unix.pm] catpath()'s pod part + From: Stas Bekman <[email protected]> + Date: Thu, 30 May 2002 16:14:55 +0800 + Message-Id: <[email protected]> + Branch: perl + ! lib/File/Spec/Unix.pm +____________________________________________________________________________ +[ 16872] By: ams on 2002/05/30 07:38:34 + Log: Subject: [PATCH pod/perlvar.pod] $^X + From: Stas Bekman <[email protected]> + Date: Thu, 30 May 2002 15:59:48 +0800 + Message-Id: <[email protected]> + Branch: perl + ! pod/perlvar.pod +____________________________________________________________________________ +[ 16871] By: nick on 2002/05/30 06:45:56 + Log: Integrate all but lib/File/stat.t which seems broken. + Branch: perlio + !> Changes Porting/patching.pod cygwin/perlld.in + !> epoc/createpkg.pl ext/Devel/PPPort/PPPort.pm + !> ext/Encode/bin/enc2xs ext/Encode/bin/piconv + !> lib/ExtUtils/MM_NW5.pm os2/os2ish.h patchlevel.h perl.h + !> pp_pack.c sv.c t/base/num.t t/harness t/op/tie.t + !> t/run/fresh_perl.t utfebcdic.h +____________________________________________________________________________ +[ 16870] By: pudge on 2002/05/30 06:06:34 + Log: Integrate perl + Branch: macperl + +> NetWare/bat/SetNWDef.bat NetWare/bat/Setcw.bat NetWare/sv_nw.c + +> ext/Encode/ucm/ctrl.ucm ext/Encode/ucm/null.ucm + !> (integrate 137 files) +____________________________________________________________________________ +[ 16869] By: pudge on 2002/05/30 05:41:50 + Log: Makefile / config / test updates for MacPerl + Branch: macperl + + macos/MacPerlMakeTests.plx + ! macos/MacPerlTests.cmd macos/MacPerlTests.plx + ! macos/Makefile.mk macos/bundled_ext/Digest/MD5/Makefile.mk + ! macos/config.h macos/config.sh macos/macperl/Makefile.mk +____________________________________________________________________________ +[ 16868] By: pudge on 2002/05/30 05:39:51 + Log: Big MacPerl Testing Patch No. 1 + If you like this, stay tuned, there's more to come! + Branch: macperl + ! ext/B/B/Concise.pm ext/B/t/deparse.t ext/B/t/terse.t + ! ext/Cwd/t/cwd.t ext/Digest/MD5/t/files.t + ! ext/DynaLoader/DynaLoader_pm.PL ext/IO/lib/IO/t/io_dup.t + ! ext/POSIX/t/sigaction.t ext/PerlIO/t/encoding.t + ! ext/PerlIO/t/fallback.t ext/Socket/Socket.t + ! ext/Storable/t/utf8hash.t lib/AutoSplit.t + ! lib/Net/Ping/t/110_icmp_inst.t lib/Net/hostent.t + ! lib/Pod/t/Usage.t lib/Pod/t/pod2html-lib.pl + ! lib/Test/Harness/Straps.pm lib/Test/Harness/t/callback.t + ! lib/Test/Harness/t/strap-analyze.t + ! lib/Test/Harness/t/test-harness.t lib/Test/Simple/t/exit.t + ! lib/Unicode/Collate.pm lib/Unicode/UCD.t lib/blib.pm + ! lib/blib.t lib/open.t lib/strict.t lib/subs.t lib/warnings.t + ! perl.c t/lib/filter-util.pl t/lib/warnings/doio + ! t/lib/warnings/mg t/lib/warnings/op t/x2p/s2p.t +____________________________________________________________________________ +[ 16867] By: jhi on 2002/05/29 23:25:09 + Log: Attachments are okay. + Branch: perl + ! Porting/patching.pod +____________________________________________________________________________ +[ 16866] By: jhi on 2002/05/29 19:46:49 + Log: OS/2: ENOINO. + Branch: perl + ! lib/File/stat.t +____________________________________________________________________________ +[ 16865] By: jhi on 2002/05/29 19:41:53 + Log: OS/2: provide prototype. + Branch: perl + ! os2/os2ish.h +____________________________________________________________________________ +[ 16864] By: jhi on 2002/05/29 19:29:17 + Log: OS/2: fp stringification fudge. + (After this the whole suite passes 98.30%) + Branch: perl + ! t/base/num.t +____________________________________________________________________________ +[ 16863] By: jhi on 2002/05/29 17:35:04 + Log: harness wasn't running x2p/s2p.t. + Branch: perl + ! t/harness +____________________________________________________________________________ +[ 16862] By: nick on 2002/05/29 14:12:41 + Log: Integrate mainline + Branch: perlio + +> ext/Encode/ucm/ctrl.ucm ext/Encode/ucm/null.ucm + !> (integrate 100 files) +____________________________________________________________________________ +[ 16861] By: jhi on 2002/05/29 13:41:01 + Log: Subject: [PATCH] pack 'w' should be using NV, not double + From: Nicholas Clark <[email protected]> + Date: Wed, 29 May 2002 15:38:41 +0100 + Message-ID: <[email protected]> + Branch: perl + ! pp_pack.c +____________________________________________________________________________ +[ 16860] By: jhi on 2002/05/29 13:31:35 + Log: Update Changes. + Branch: perl + ! Changes patchlevel.h +____________________________________________________________________________ [ 16859] By: jhi on 2002/05/29 13:25:31 Log: Spelling bee. Branch: perl ==== //depot/macperl/Configure#7 (xtext) ==== Index: macperl/Configure --- macperl/Configure#6~16870~ Wed May 29 23:06:34 2002 +++ macperl/Configure Fri May 31 09:27:30 2002 @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue May 28 23:03:39 EET DST 2002 [metaconfig 3.0 PL70] +# Generated on Fri May 31 05:20:00 EET DST 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by [email protected]) cat >c1$$ <<EOF @@ -1484,23 +1484,23 @@ zzz='' uuu=undef case "$yyy" in - *=*) zzz=`echo $yyy|sed 's!=.*!!'` + *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` case "$zzz" in *:*) zzz='' ;; *) xxx=append - zzz=" "`echo $yyy|sed 's!^[^=]*=!!'` - yyy=`echo $yyy|sed 's!=.*!!'` ;; + zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` + yyy=`echo "$yyy"|sed 's!=.*!!'` ;; esac ;; esac case "$xxx" in '') case "$yyy" in - *:*) xxx=`echo $yyy|sed 's!:.*!!'` - yyy=`echo $yyy|sed 's!^[^:]*:!!'` - zzz=`echo $yyy|sed 's!^[^=]*=!!'` - yyy=`echo $yyy|sed 's!=.*!!'` ;; - *) xxx=`echo $yyy|sed 's!:.*!!'` - yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;; + *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` + yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` + zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` + yyy=`echo "$yyy"|sed 's!=.*!!'` ;; + *) xxx=`echo "$yyy"|sed 's!:.*!!'` + yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; esac ;; esac ==== //depot/macperl/MANIFEST#9 (text) ==== Index: macperl/MANIFEST --- macperl/MANIFEST#8~16870~ Wed May 29 23:06:34 2002 +++ macperl/MANIFEST Fri May 31 09:27:30 2002 @@ -613,8 +613,10 @@ ext/Storable/t/forgive.t See if Storable works ext/Storable/t/freeze.t See if Storable works ext/Storable/t/integer.t See if Storable works +ext/Storable/t/interwork56.t Test combatibility kludge for 64bit data under 5.6.x ext/Storable/t/lock.t See if Storable works -ext/Storable/t/make_downgrade.pl See if Storable works +ext/Storable/t/make_56_interwork.pl Make test data for interwork56.t +ext/Storable/t/make_downgrade.pl Make test data for downgrade.t ext/Storable/t/malice.t See if Storable copes with corrupt files ext/Storable/t/overload.t See if Storable works ext/Storable/t/recurse.t See if Storable works @@ -1060,6 +1062,7 @@ lib/ExtUtils/t/Mkbootstrap.t See if ExtUtils::Mkbootstrap works lib/ExtUtils/t/MM_BeOS.t See if ExtUtils::MM_BeOS works lib/ExtUtils/t/MM_Cygwin.t See if ExtUtils::MM_Cygwin works +lib/ExtUtils/t/MM_NW5.t See if ExtUtils::MM_NW5 works lib/ExtUtils/t/MM_OS2.t See if ExtUtils::MM_OS2 works lib/ExtUtils/t/MM_Unix.t See if ExtUtils::MM_UNIX works lib/ExtUtils/t/MM_VMS.t See if ExtUtils::MM_VMS works @@ -1069,6 +1072,7 @@ lib/ExtUtils/t/problems.t How MakeMaker reacts to build problems lib/ExtUtils/t/testlib.t See if ExtUtils::testlib works lib/ExtUtils/t/VERSION_FROM.t See if MakeMaker's VERSION_FROM works +lib/ExtUtils/t/writemakefile_args.t See if WriteMakefile works lib/ExtUtils/t/zz_cleanup_dummy.t Cleanup MakeMaker test module lib/ExtUtils/testlib.pm Fixes up @INC to use just-built extension lib/ExtUtils/typemap Extension interface types @@ -1098,6 +1102,7 @@ lib/File/Spec/Epoc.pm portable operations on EPOC file names lib/File/Spec/Functions.pm Function interface to File::Spec object methods lib/File/Spec/Mac.pm portable operations on Mac file names +lib/File/Spec/NW5.pm portable operations on NetWare5 file names lib/File/Spec/OS2.pm portable operations on OS2 file names lib/File/Spec/t/Functions.t See if File::Spec::Functions works lib/File/Spec/t/rel2abs2rel.t See if File::Spec->rel2abs/abs2rel works @@ -1943,19 +1948,11 @@ mpeix/relink MPE/iX port mv-if-diff Script to mv a file if it changed myconfig.SH Prints summary of the current configuration -NetWare/bat/BldNWExt-Exist.bat NetWare port -NetWare/bat/BldNWExt.bat NetWare port NetWare/bat/Buildtype.bat NetWare port -NetWare/bat/CWbuild.bat NetWare port -NetWare/bat/MPKBuild.bat NetWare port -NetWare/bat/Setcw.bat NetWare port -NetWare/bat/Setmpksdk.bat NetWare port +NetWare/bat/SetCodeWar.bat NetWare port NetWare/bat/Setnlmsdk.bat NetWare port NetWare/bat/SetNWBld.bat NetWare port -NetWare/bat/SetNWDef.bat NetWare port -NetWare/bat/Setwatcom.bat NetWare port NetWare/bat/ToggleD2.bat NetWare port -NetWare/bat/ToggleXDC.bat NetWare port NetWare/CLIBsdio.h NetWare port NetWare/CLIBstr.h NetWare port NetWare/CLIBstuf.c NetWare port @@ -2380,7 +2377,10 @@ t/lib/sample-tests/simple Test data for Test::Harness t/lib/sample-tests/simple_fail Test data for Test::Harness t/lib/sample-tests/skip Test data for Test::Harness +t/lib/sample-tests/skipall Test data for Test::Harness +t/lib/sample-tests/skipall_nomsg Test data for Test::Harness t/lib/sample-tests/skip_all Test data for Test::Harness +t/lib/sample-tests/skip_nomsg Test data for Test::Harness t/lib/sample-tests/skip_no_msg Test data for Test::Harness t/lib/sample-tests/taint Test data for Test::Harness t/lib/sample-tests/todo Test data for Test::Harness ==== //depot/macperl/NetWare/Makefile#4 (text) ==== Index: macperl/NetWare/Makefile --- macperl/NetWare/Makefile#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/NetWare/Makefile Fri May 31 09:27:30 2002 @@ -14,8 +14,8 @@ ## This file is created by using the makefile that creates Windows Perl as the reference ## Author: -## Date Created: 25th March 2002 -## Date Modified: +## Date Created: 13th July 2000 +## Date Modified: 21st March 2002 # Name of the NLM @@ -34,47 +34,59 @@ !ifndef MAKE_TYPE -#MAKE_TYPE = Release +!ifndef NLMSDKBASE +!message "Run bat\SetNWBld.bat to set the NetWare SDK before continuing.\n" +!error +!endif # !ifndef NLMSDKBASE + +!ifndef CODEWAR # !ifdef CODEWAR +!message "CodeWarrior tools base directory is not defined. Run bat\setnwbld.bat before proceeding" +!error +!endif # !ifdef CODEWAR + +!ifndef MAKE_TYPE !message "Run bat\buildtype.bat to set the build type before continuing.\n" !error -!endif #!ifndef MAKE_TYPE +!endif # !ifndef MAKE_TYPE !ifdef USE_MPK MPKFLAGS = -DMPK_ON -DIAPX386 MPKMESSAGE = MPK Build... XDCTOOL = mpkxdc !ifndef MPKBASE -#MPKBASE = p:\mpk -!message "Run bat\setnwbld.bat to set the NetWare MPK SDK before continuing.\n" -!endif #ifndef MPKBASE +!message "Run bat\setmpksdk.bat to set the NetWare MPK SDK before continuing.\n" +!error +!endif # !ifndef MPKBASE NLM_INCLUDE_MP = -I$(MPKBASE)\include MPKTOOL = $(MPKBASE)\$(XDCTOOL) -!else +!else # !ifdef USE_MPK MPKMESSAGE = Non MPK Build... NLM_INCLUDE_MP = MPKTOOL = -!endif #ifdef USE_MPK +!endif # !ifdef USE_MPK + +#!ifndef SECURITYBASE +#!message "Run bat\SetSecSdk.bat to set the Security path before continuing.\n" +#!error +#!endif # !ifndef SECURITYBASE + +#!ifndef UCSINC +#!message "Run bat\BldNWExt.bat to set the UCS Include path before continuing.\n" +#!error +#!endif # !ifndef UCSINC + +NLMIMPORTS = $(NLMSDKBASE)\imports + +!ifdef SECURITYBASE +SECURITY_IMPORTS = $(SECURITYBASE)\imports +!endif # !ifdef SECURITYBASE !ifndef NLM_VERSION NLM_VERSION = 3,20,0 !endif -!ifndef NLMSDKBASE -#NLMSDKBASE = P:\ndk\nwsdk -!message "Run bat\setnwbld.bat to set the NetWare SDK before continuing.\n" -!error -!endif #ifndef NLMSDKBASE -UCSINC = p:\apps\script\sw\ucs-inc -NLMIMPORTS = $(NLMSDKBASE)\imports - -!ifndef SECURITYBASE -SECURITYBASE = P:\apps\script\sw\nwsec -!message "Run bat\SetSecSdk.bat to set the Security paths before continuing.\n" -#!error -!endif #!ifndef MAKE_TYPE -SECURITY_IMPORTS = $(SECURITYBASE)\imports - # Here comes the CW tools - TO BE FILLED TO BUILD WITH CW - +# Here comes the CW tools - TO BE FILLED TO BUILD WITH CW - MODULE_DESC = "Perl 5.8.0 for NetWare" CCTYPE = CodeWarrior C_COMPILER = mwccnlm -c @@ -86,15 +98,14 @@ TOOL_PATH = CWCPPFLAGS = -cpp_exceptions on -wchar_t off -bool on -w on -ansi off CCFLAGS = -maxerrors 25 -processor Pentium -align packed \ - -w nounusedarg -msext on -sym on -sym codeview4 -sym internal \ + -w nounusedarg -msext on \ -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS -msgstyle gcc COMPILER_FLAG = -d NETWARE ERROR_FLAG = -sym on -sym codeview4 -sym internal LDFLAGS = -type generic -stacksize 16384 -zerobss \ -nofail -msgstyle gcc -nostderr -w on \ -nlmversion $(NLM_VERSION) \ - -copy "Copyright (C) 2000-01\, 2002 Novell\, Inc. All Rights Reserved." \ - -sym on -sym codeview4 -sym internal -osym perl.sym + -copy "Copyright (C) 2000-01\, 2002 Novell\, Inc. All Rights Reserved." # Debug flags comes here - Not mandatory - required only for debug build !if "$(MAKE_TYPE)"=="Debug" @@ -103,22 +114,27 @@ !ifdef USE_D2 BS_CFLAGS = -opt off -inline off -sym on -sym codeview4 -sym internal -DDEBUGGING -DDKFBPON BLDMESG = $(BLDMESG) Using /d2 option -##LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(BLDDIR)\$*.sym -LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -## -osym $(BLDDIR)\$(NLM_NAME8).sym -!else +!ifdef NLM_NAME8 +LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(NLM_NAME8).sym +!else # !ifdef NLM_NAME8 +LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(NLM_NAME).sym +!endif # !ifdef NLM_NAME8 +!else # !ifdef USE_D2 BS_CFLAGS = -opt off -inline off -sym on -sym codeview4 -sym internal -DDEBUGGING -DDKFBPON BLDMESG = $(BLDMESG) Using /d1 option -##LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(BLDDIR)\$*.sym -LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -## -osym $(BLDDIR)\$(NLM_NAME8).sym -!endif #!ifdef USE_D2 -!else +!ifdef NLM_NAME8 +LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(NLM_NAME8).sym +!else # !ifdef NLM_NAME8 +LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(NLM_NAME).sym +!endif # !ifdef NLM_NAME8 +!endif # !ifdef USE_D2 +!else # !if "$(MAKE_TYPE)"=="Debug" BLDDIR = $(REL_DIR) BLDMESG = Release version ##BS_CFLAGS = -opt speed -inline smart -inline auto -sym off BS_CFLAGS = -!endif #if "$(MAKE_TYPE)"=="Debug" #!ifdef CODEWARRIOR +!endif # !if "$(MAKE_TYPE)"=="Debug" + ADD_LOCDEFS = -DPERL_CORE @@ -126,16 +142,35 @@ NLM_INCLUDE_NLM = -I$(NLMSDKBASE)\include\nlm NLM_INCLUDE_NLM_SYS = -I$(NLMSDKBASE)\include\nlm\sys NLM_INCLUDE_OBSLETE = -I$(NLMSDKBASE)\include\nlm\obsolete -# SECURITY_INCLUDE = -I$(SECURITYBASE)\include + +!ifdef SECURITYBASE +SECURITY_INCLUDE = -I$(SECURITYBASE)\include +!endif #!ifdef SECURITYBASE + +!ifdef UCSINC NLM_INCLUDE_UCS = -I$(UCSINC) +!endif #!ifndef UCSINC + !if "$(NW_EXTNS)"=="yes" INCLUDE_NW = -I.\include !endif + + INC_PREV = -I.. INC_THIS = -I. + NLM_INCLUDE_PATH = $(NLM_INCLUDE) $(NLM_INCLUDE_NLM) $(NLM_INCLUDE_NLM_SYS) $(NLM_INCLUDE_OBSLETE) \ - $(NLM_INCLUDE_MP) $(NLM_INCLUDE_UCS) $(TOOL_HEADERS) + $(NLM_INCLUDE_MP) $(TOOL_HEADERS) + +!ifdef SECURITYBASE +NLM_INCLUDE_PATH = $(NLM_INCLUDE_PATH) $(SECURITY_INCLUDE) +!endif #!ifdef SECURITYBASE + +!ifdef UCSINC +NLM_INCLUDE_PATH = $(NLM_INCLUDE_PATH) $(NLM_INCLUDE_UCS) +!endif #!ifndef UCSINC + INCLUDE = $(INC_THIS) $(INC_PREV) -I- $(NLM_INCLUDE_PATH) PATH = $(PATH);$(TOOL_PATH) @@ -177,6 +212,7 @@ NW_SRC = \ .\CLIBstuf.c \ + .\sv_nw.c \ .\nw5.c \ .\nw5sck.c \ .\nw5thread.c \ @@ -297,6 +333,14 @@ UNICODENORMALIZE_NLM = $(EXTDIR)\Unicode\Normalize\Normalize.NLM EXTENSION_NLM = \ + $(FCNTL_NLM) \ + $(BYTELOADER_NLM) \ + $(IO_NLM) \ + $(SOCKET_NLM) \ + $(OPCODE_NLM) \ + $(B_NLM) \ + $(ATTRS_NLM) \ + $(SDBM_FILE_NLM) \ $(POSIX_NLM) \ $(THREAD_NLM) \ $(DUMPER_NLM) \ @@ -310,17 +354,10 @@ $(LISTUTIL_NLM) \ $(MIMEBASE64_NLM) \ $(XSTYPEMAP_NLM) \ - $(FCNTL_NLM) \ - $(SOCKET_NLM) \ - $(OPCODE_NLM) \ - $(B_NLM) \ - $(ATTRS_NLM) \ - $(BYTELOADER_NLM) \ - $(IO_NLM) \ - $(UNICODENORMALIZE_NLM) \ - $(SDBM_FILE_NLM) -# Begin - Following is required to build NetWare specific extensions CGI2Perl, Perl2UCS and UCSExt + $(UNICODENORMALIZE_NLM) \ + $(FILTER_NLM) +# Begin - Following is required to build NetWare specific extensions CGI2Perl, Perl2UCS and UCSExt CGI2PERL = CGI2Perl\CGI2Perl PERL2UCS = $(EXTDIR)\Perl2UCS\Perl2UCS UCSExt = $(EXTDIR)\Perl2UCS\UCSExt @@ -331,12 +368,11 @@ NETWARE_EXTNS = \ $(CGI2PERL_NLM) \ - $(UCSExt_NLM) \ $(PERL2UCS_NLM) \ - - + $(UCSExt_NLM) # End + ECHO_SRC = TestNLM\echo\echo.c TYPE_SRC = TestNLM\type\type.c ECHO_SRC_OBJ = $(ECHO_SRC:.c=.obj) @@ -371,9 +407,13 @@ !ifndef BASE_IMPORT_FILES BASE_IMPORT_FILES = Import @$(NLMIMPORTS)\clib.imp, @$(NLMIMPORTS)\nlmlib.imp, @$(NLMIMPORTS)\threads.imp, @$(NLMIMPORTS)\nit.imp, @$(NLMIMPORTS)\socklib.imp, \ -@$(NLMIMPORTS)\fpsm.imp, @$(NLMIMPORTS)\lib0.imp, @$(SECURITY_IMPORTS)\nwsec.imp +@$(NLMIMPORTS)\fpsm.imp, @$(NLMIMPORTS)\lib0.imp !endif +!ifdef SECURITYBASE +BASE_IMPORT_FILES = $(BASE_IMPORT_FILES), @$(SECURITY_IMPORTS)\nwsec.imp +!endif # !ifdef SECURITYBASE + !ifdef USE_MPK BASE_IMPORT_FILES = $(BASE_IMPORT_FILES), @$(MPKBASE)\import\mpkorg.imp !endif @@ -381,18 +421,26 @@ !ifndef BASE_IMPORT_FNS BASE_IMPORT_FNS = Import ImportSymbol, GetSystemConsoleScreen, LoadModule !endif - - + +!ifdef CODEWAR +NWLIBPATH = +LIBPATH386 = +LIBPATH = +!else # !ifdef CODEWAR +!error Please define the tools base directory before proceeding +!endif # !ifdef CODEWAR + !ifndef BASE_LIBRARIES -#!ifdef WATCOM -#BASE_LIBRARIES = Library plib3s.lib,math3s.lib,clib3s.lib -#!else +!ifdef WATCOM +BASE_LIBRARIES = Library plib3s.lib, math3s.lib, clib3s.lib +!endif # !ifdef WATCOM !ifdef CODEWAR BASE_LIBRARIES = -!endif #!ifdef CODEWARRIOR -!endif - -COPYRIGHT = (C) Copyright 2002 Novell Inc. All Rights Reserved. +!endif # !ifdef CODEWAR +!endif # !ifndef BASE_LIBRARIES + + +COPYRIGHT = Copyright (C) 2000-01, 2002 Novell, Inc. All Rights Reserved. EXPORTS = Export @perl.imp @@ -667,8 +715,7 @@ # # filenames given to xsubpp must have forward slashes (since it puts # full pathnames in #line strings) -XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \ - -C++ -prototypes +XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes MICROCORE_SRC = \ ..\av.c \ @@ -838,7 +885,7 @@ # Top targets # -all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NPM) $(NETWARE_EXTNS) $(TEST_NLMS) $(EXTENSION_NLM) +all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NLM) $(EXTENSION_NPM) $(TEST_NLMS) $(NETWARE_EXTNS) #------------------------------------------------------------ @@ -868,6 +915,7 @@ if exist include\* $(RCOPY) include $(COREDIR)\*.* $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \ || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM) + @echo CONFIGPM Done $(MINIPERL) : $(error)Please build $(MINIPERL) before continuing @@ -924,7 +972,7 @@ @copy << stdio.h >\nul /* - * (C) Copyright 2002 Novell Inc. All Rights Reserved. + * Copyright (C) 2000-01 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -961,7 +1009,7 @@ @copy << string.h >\nul /* - * (C) Copyright 2002 Novell Inc. All Rights Reserved. + * Copyright (C) 2000-01 Novell, Inc. All Rights Reserved. * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1003,7 +1051,9 @@ @echo $(BASE_IMPORT_FILES) > $*.def @echo MODULE clib >> $*.def @echo MODULE netdb >> $*.def -# @echo MODULE nwsec >> $*.def +!ifdef SECURITYBASE + @echo MODULE nwsec >> $*.def +!endif #!ifdef SECURITYBASE @echo $(EXPORTS) >> $*.def !ifdef USE_XDC @echo======= Creating XDC file @@ -1021,13 +1071,15 @@ copy splittree.pl .. $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR) @echo ========Linked $@ ========== -##!if "$(MAKE_TYPE)"=="Debug" -##!ifdef NLM_NAME8 -## .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym -##!else -## .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym -##!endif -##!endif + +!if "$(MAKE_TYPE)"=="Debug" +!ifdef NLM_NAME8 + .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym +!else + .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym +!endif +!endif + @echo======= Finished building $(BUILT). # Create the debug or release directory if not existing @@ -1040,6 +1092,11 @@ @echo======= $(MAKE_ACTION)ing $(NLM_NAME) at $(MAKEDIR)\$(BLDDIR) ======= $(PERLIMPLIB): perllib.imp +# @echo Building $(PERLIMPLIB)... +# $(LD) -type library $(NLM_OBJ) $(BLDDIR)\nw5.obj $(BLDDIR)\nwmain.obj $(BLDDIR)\nw5thread.obj $(BLDDIR)\nwtinfo.obj \ +# $(BLDDIR)\nwutil.obj $(BLDDIR)\interface.obj $(BLDDIR)\perllib.obj $(PERL_IO_OBJ_DEP) $(DLL_OBJ) -o $@ +# $(XCOPY) $(PERLIMPLIB) $(COREDIR) +# @echo $(PERLIMPLIB) Done perllib.imp : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl # $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=def $(ADD_BUILDOPT) \ @@ -1110,7 +1167,7 @@ -del /f /q ..\lib\core .\nwconfig.h : $(NW_CFGH_TMPL) - -del /f /q config.h + @if exist .\config.h del /f /q .\config.h copy $(NW_CFGH_TMPL) config.h # REQUIRED WHEN WE INCLUDE CONFIGPM OR REGEN_CONFIG - sgp @@ -1336,10 +1393,10 @@ -rmdir /s /q $(DEB_DIR) @if exist .\stdio.h del /f /q .\stdio.h @if exist .\string.h del /f /q .\string.h - @if exist .\Main.obj del /f /q .\Main.obj - @if exist .\Main.lib del /f /q .\Main.lib + @if exist .\config.h del /f /q .\config.h @if exist .\config.nw5 del /f /q .\config.nw5 @if exist .\perl.imp del /f /q .\perl.imp + -del /f /q *.obj *.lib *.def *.sym *.map *.xdc *.err cd testnlm\echo -del /f /q *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err cd ..\type @@ -1365,10 +1422,12 @@ distclean: clean nwclean -del /f /q $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) - -del /f /q *.def *.map -del /f /q $(EXTENSION_NPM) -del /f /q $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm -del /f /q $(EXTDIR)\DynaLoader\dl_netware.xs + -del /f /q $(EXTDIR)\DynaLoader\dl_win32.xs + -del /f /q $(EXTDIR)\DynaLoader\DynaLoader.pm + -del /f /q $(EXTDIR)\DynaLoader\XSLoader.pm -del /f /q $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm -del /f /q $(LIBDIR)\XSLoader.pm -del /f /q $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm @@ -1391,14 +1450,14 @@ cd ..\netware cd ..\x2p -del /f /q find2perl s2p - -del /f /q *.bat + -del /f /q *.bat *.exe -del /f /q *.obj *.map *.link *.xdc *.err cd ..\netware -del /f /q ..\config.sh ..\splittree.pl dlutils.c config.h.new -del /f /q $(CONFIGPM) -del /f /q bin\*.bat cd $(EXTDIR) - -del /s /f /q *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib *.xdc *.err + -del /s /f /q *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib *.xdc *.err cd ..\netware !if "$(NW_EXTNS)"=="yes" cd cgi2perl @@ -1418,7 +1477,10 @@ installwin: $(MINIPERL) -I..\lib ..\installperl -install : utils installwin +install : utils installwin perlimp + +perlimp : + copy perl.imp $(INST_COREDIR) installnw: $(MINIPERL) -I..\lib ..\installperl -netware ==== //depot/macperl/NetWare/Nwmain.c#2 (text) ==== Index: macperl/NetWare/Nwmain.c --- macperl/NetWare/Nwmain.c#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/NetWare/Nwmain.c Fri May 31 09:27:30 2002 @@ -529,7 +529,6 @@ errno = 0; - if (psdata->m_fromConsole) { // get the default working directory name @@ -548,12 +547,10 @@ if (psdata->m_fromConsole) chdir(defaultDir); - // run the script // fnRunScript(psdata); - // May have to check this, I am blindly calling UCSTerminate, irrespective of // whether it is initialized or not // Copied from the previous Perl - sgp - 31st Oct 2000 @@ -565,7 +562,6 @@ (*ucsterminate)(); } - if (psdata->m_fromConsole) { // change thread groups for the call to free the memory @@ -607,7 +603,6 @@ // ExitThread(EXIT_THREAD, 0); #endif - return; } @@ -654,13 +649,11 @@ int stderr_fd=-1, stderr_fd_dup=-1; - // Main callback instance // if (fnRegisterWithThreadTable() == FALSE) return; - // parse the command line into argc/argv style: // number of params and char array of params // @@ -671,7 +664,6 @@ return; } - // Initialise the variables pclp->m_isValid = TRUE; pclp->m_redirInName = NULL; @@ -694,7 +686,6 @@ pclp->m_argc = 0; pclp->m_argv_len = 1; - // Allocate memory pclp->m_argv = (char **) malloc(pclp->m_argv_len * sizeof(char *)); if (pclp->m_argv == NULL) @@ -719,7 +710,6 @@ return; } - // Parse the command line fnCommandLineParser(pclp, (char *)psdata->m_commandLine, FALSE); if (!pclp->m_isValid) @@ -771,7 +761,6 @@ pclp->m_redirBothName = NULL; } - // Signal a semaphore, if indicated by "-{" option, to indicate that // the script has terminated and files are closed // @@ -791,7 +780,6 @@ return; } - // Simulating a shell on NetWare can be difficult. If you don't // create a new screen for the script to run in, you can output to // the console but you can't get any input from the console. Therefore, @@ -840,7 +828,6 @@ else if (use_system_console) CreateScreen((char *)"System Console", 0); - if (pclp->m_redirInName) { if ((stdin_fd = fileno(stdin)) != -1) @@ -942,14 +929,12 @@ } } - env = NULL; fnSetUpEnvBlock(&env); // Set up the ENV block // Run the Perl script exitstatus = RunPerl(pclp->m_argc, pclp->m_argv, env); - // clean up any redirection // if (pclp->m_redirInName && redirIn) @@ -1004,9 +989,14 @@ DestroyScreen(newscreenhandle); } +/** + // Commented since a few abends were happening in fnFpSetMode // Set the mode for stdin and stdout fnFpSetMode(stdin, O_TEXT, dummy); fnFpSetMode(stdout, O_TEXT, dummy); +**/ + setmode(stdin, O_TEXT); + setmode(stdout, O_TEXT); // Cleanup if(pclp->m_argv) @@ -1056,7 +1046,6 @@ pclp->m_redirBothName = NULL; } - // Signal a semaphore, if indicated by -{ option, to indicate that // the script has terminated and files are closed // @@ -1076,12 +1065,15 @@ } if(env) + { fnDestroyEnvBlock(env); + env = NULL; + } + fnUnregisterWithThreadTable(); // Remove the thread context set during Perl_set_context Remove_Thread_Ctx(); - return; } @@ -1118,7 +1110,6 @@ // add one for null termination totalcnt++; - env = (char **) malloc (totalcnt * sizeof(char *)); if (env) { @@ -1227,7 +1218,6 @@ PFFSETMODE pf_fsetmode; - if (mode == O_BINARY || mode == O_TEXT) { if (fp) @@ -1248,7 +1238,6 @@ } if (errno) err = &errno; - } else { @@ -1262,7 +1251,6 @@ err = &errno; } - return ret; } @@ -1285,7 +1273,6 @@ int currentThreadGroup = -1; ScriptData* psdata=NULL; - // Create a safe copy of the command line and pass it to the // new thread for parsing. The new thread will be responsible ==== //depot/macperl/NetWare/bat/SetCodeWar.bat#1 (text) ==== Index: macperl/NetWare/bat/SetCodeWar.bat --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/NetWare/bat/SetCodeWar.bat Fri May 31 09:27:30 2002 @@ -0,0 +1,86 @@ +@echo off +@rem AUTHOR: sgp & apc +@rem CREATED: 24th July 2000 +@rem LAST REVISED: 6th April 2001 +@rem LAST REVISED: 22nd May 2002 +@rem AUTHOR: apc +@rem Batch file to set the path to CodeWarrior directories +@rem This file is called from SetNWBld.bat. + +if "%1" == "/now" goto now +if "%1" == "" goto Usage +if "%1" == "/?" goto usage +if "%1" == "/h" goto usage + +set CODEWAR=%1 +ECHO CODEWAR=%1 + +call buildtype r +@echo Buildtype set to Release type + +set MWCIncludes=%1\include +@echo MWCIncludes=%1\include +set MWLibraries=%1\lib +@echo MWLibraries=%1\lib +set MWLibraryFiles=%1\lib\nwpre.obj;%1\lib\mwcrtld.lib +@echo MWLibraryFiles=%1\lib\nwpre.obj;%1\lib\mwcrtld.lib + +set PATH=%PATH%;%1\bin; +@echo PATH=%PATH%;%1\bin; + +goto exit + +:now +@echo CODEWAR=%CODEWAR% +goto exit + +:Usage + @echo on + @echo "Usage: setCodeWar <Path to CodeWarrior binaries>" + @echo "Usage: setCodeWar /now" - To display current setting + @echo Ex. setCodeWar d:\CodeWar + +:exit +@echo off +@rem AUTHOR: sgp & apc +@rem CREATED: 24th July 2000 +@rem LAST REVISED: 6th April 2001 +@rem LAST REVISED: 22nd May 2002 +@rem AUTHOR: apc +@rem Batch file to set the path to CodeWarrior directories +@rem This file is called from SetNWBld.bat. + +if "%1" == "/now" goto now +if "%1" == "" goto Usage +if "%1" == "/?" goto usage +if "%1" == "/h" goto usage + +set CODEWAR=%1 +ECHO CODEWAR=%1 + +call buildtype r +@echo Buildtype set to Release type + +set MWCIncludes=%1\include +@echo MWCIncludes=%1\include +set MWLibraries=%1\lib +@echo MWLibraries=%1\lib +set MWLibraryFiles=%1\lib\nwpre.obj;%1\lib\mwcrtld.lib +@echo MWLibraryFiles=%1\lib\nwpre.obj;%1\lib\mwcrtld.lib + +set PATH=%PATH%;%1\bin; +@echo PATH=%PATH%;%1\bin; + +goto exit + +:now +@echo CODEWAR=%CODEWAR% +goto exit + +:Usage + @echo on + @echo "Usage: setCodeWar <Path to CodeWarrior binaries>" + @echo "Usage: setCodeWar /now" - To display current setting + @echo Ex. setCodeWar d:\CodeWar + +:exit ==== //depot/macperl/NetWare/nw5.c#2 (text) ==== Index: macperl/NetWare/nw5.c --- macperl/NetWare/nw5.c#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/NetWare/nw5.c Fri May 31 09:27:30 2002 @@ -104,8 +104,22 @@ int nw_setmode(FILE *fp, int mode) { +/** + // Commented since a few abends were happening in fnFpSetMode int *dummy = 0; return(fnFpSetMode(fp, mode, dummy)); +**/ + + int handle = -1; + errno = 0; + + handle = fileno(fp); + if (errno) + { + errno = 0; + return -1; + } + return setmode(handle, mode); } int ==== //depot/macperl/Porting/Glossary#4 (text) ==== Index: macperl/Porting/Glossary --- macperl/Porting/Glossary#3~16730~ Tue May 21 20:36:42 2002 +++ macperl/Porting/Glossary Fri May 31 09:27:30 2002 @@ -3603,7 +3603,13 @@ perlpath (perlpath.U): This variable contains the eventual value of the PERLPATH symbol, which contains the name of the perl interpreter to be used in - shell scripts and in the "eval 'exec'" idiom. + shell scripts and in the "eval 'exec'" idiom. This variable is + not necessarily the pathname of the file containing the perl + interpreter; you must append the executable extension (_exe) if + it is not already present. Note that Perl code that runs during + the Perl build process cannot reference this variable, as Perl + may not have been installed, or even if installed, may be a + different version of Perl. pg (Loc.U): This variable is used internally by Configure to determine the ==== //depot/macperl/Porting/config.sh#5 (text) ==== Index: macperl/Porting/config.sh --- macperl/Porting/config.sh#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/Porting/config.sh Fri May 31 09:27:30 2002 @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Tue May 28 23:24:18 EET DST 2002 +# Configuration time: Fri May 31 05:21:28 EET DST 2002 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -63,7 +63,7 @@ ccversion='V5.6-082' cf_by='jhi' cf_email='[email protected]' -cf_time='Tue May 28 23:24:18 EET DST 2002' +cf_time='Fri May 31 05:21:28 EET DST 2002' charsize='1' chgrp='' chmod='chmod' @@ -769,7 +769,7 @@ path_sep=':' perl5='perl' perl='' -perl_patchlevel='16824' +perl_patchlevel='16892' perladmin='[email protected]' perllibs='-lm -lutil' perlpath='/opt/perl/bin/perl' @@ -953,7 +953,7 @@ vendorprefix='' vendorprefixexp='' version='5.8.0' -version_patchlevel_string='version 8 subversion 0 patch 16824' +version_patchlevel_string='version 8 subversion 0 patch 16892' versiononly='undef' vi='' voidflags='15' @@ -982,7 +982,7 @@ PERL_API_REVISION=5 PERL_API_VERSION=8 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=16824 +PERL_PATCHLEVEL=16892 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' ==== //depot/macperl/Porting/config_H#5 (text) ==== Index: macperl/Porting/config_H --- macperl/Porting/config_H#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/Porting/config_H Fri May 31 09:27:30 2002 @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Tue May 28 23:24:18 EET DST 2002 + * Configuration time: Fri May 31 05:21:28 EET DST 2002 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ ==== //depot/macperl/README.beos#3 (text) ==== Index: macperl/README.beos --- macperl/README.beos#2~16825~ Mon May 27 15:55:07 2002 +++ macperl/README.beos Fri May 31 09:27:30 2002 @@ -57,17 +57,14 @@ Tom Spindler [email protected] -=head2 Update 2002-05-25 +=head2 Update 2002-05-30 The following tests fail on 5.8.0 Perl in BeOS Personal 5.03: - t/op/lfs............................FAILED at test 17 - t/op/magic..........................FAILED at test 24 - ext/Fcntl/t/syslfs..................FAILED at test 17 - ext/File/Glob/t/basic...............FAILED at test 3 - ext/POSIX/t/sigaction...............FAILED at test 13 - ext/POSIX/t/waitpid.................FAILED at test 1 - lib/Tie/File/t/16_handle............FAILED at test 39 + t/op/magic..........................FAILED at test 24 + ext/File/Glob/t/basic...............FAILED at test 3 + ext/POSIX/t/sigaction...............FAILED at test 13 + ext/POSIX/t/waitpid.................FAILED at test 1 The reasons for the failures are as follows: @@ -75,12 +72,6 @@ =item * -The op/lfs and Fcntl/t/syslfs seem to hit a real bug: though we can -seek around past the 2GB limit, reading from there doesn't work. -Therefore, please don't try doing large files in BeOS with Perl. - -=item * - The op/magic failures look like something funny going on with $0 and $^X that I can't now figure out: none of the generated pathnames are wrong as such, they just seem to accumulate "./" prefixes and infixes @@ -101,11 +92,6 @@ The waitpid failure means that after there are no more child processes, waitpid is supposed to start returning -1 (and set errno to ECHILD). In BeOS, it doesn't seem to. - -=item * - -The Tie/File/t/16_handle seems to indicate some brokenness -(non-UNIXness) in how BeOS handles pipes. =back ==== //depot/macperl/README.hpux#2 (text) ==== Index: macperl/README.hpux --- macperl/README.hpux#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/README.hpux Fri May 31 09:27:30 2002 @@ -382,6 +382,20 @@ compiler. If you want to compile Perl using gcc, you will have to get a version of the compiler that support 64-bit operations.) +=head2 Oracle on HP-UX + +Using perl to connect to Oracle databases through DBI and DBD::Oracle +has caused a lot of people many headaches. Read README.hpux in the +DBD::Oracle for much more information. The reason to mention it here +is that Oracle requires a perl built with libcl and libpthread, the +latter even when perl is build without threads. Building perl using +all defaults, but still enabling to build DBD::Oracle later on can be +achieved using + + Configure -A prepend:libswanted='cl pthread ' ... + +Do not forget the space before the trailing quote. + =head2 GDBM and Threads on HP-UX If you attempt to compile Perl with threads on an 11.X system and also @@ -467,6 +481,6 @@ =head1 DATE -Version 0.6.5: 2002-02-27 +Version 0.6.6: 2002-05-30 =cut ==== //depot/macperl/README.netware#3 (text) ==== Index: macperl/README.netware --- macperl/README.netware#2~16870~ Wed May 29 23:06:34 2002 +++ macperl/README.netware Fri May 31 09:27:30 2002 @@ -33,46 +33,30 @@ Once the Tools & SDK are installed, the build environment has to be setup. The following batch files setup the environment. -=over 4 - =item * -If you want to build with Default settings you can follow the One step -process given below to create the default Build Environment. - -=item SetNWDef.bat - -The Execution of this file takes 2 parameters as input.The first being -the NetWare SDK path, Second being the path for CodeWarrior Compiler & -other tools. Execution of this file sets the Build type to -Release(default) , the NetWare SDK path, path for Compiler & other -tools. +=item SetNWBld.bat -=item Custom Build Environment +The Execution of this file takes 2 parameters as input. The first +being the NetWare SDK path, second being the path for CodeWarrior +Compiler & tools. Execution of this file sets these paths and also +sets the build type to Release by default. -If you want to change the default settings you could do so by -following the steps listed below. +=back =item Buildtype.bat -This sets the build type to release or debug. +This is used to set the build type to debug or release. Change the +build type only after executing SetNWBld.bat =item * -Example: Typing "buildtype d on" at the command prompt causes the -buildtype to be set to Debug type. Typing "buildtype r" at the -command prompt sets it to Release Build type. - -=item SetNWBld.bat - -This sets the NetWare SDK path, path to Compiler & other tools. - -These batch files are under NetWare\bat folder. These batch files -call a couple of other batch files to setup the environment. Invoking -the batch file with I</now> will show the current settings and I</h> -or I</?> gives the usage help. - -=back +Example: + 1. Typing "buildtype d on" at the command prompt causes the buildtype + to be set to Debug type with D2 flag set. + 2. Typing "buildtype d off" or "buildtype d" at the command prompt causes + the buildtype to be set to Debug type with D1 flag set. + 2. Typing "buildtype r" at the command prompt sets it to Release Build type. =head2 Make @@ -120,11 +104,13 @@ folder. The Perl interpreter, I<perl.nlm>, is copied under I<sys:\perl\system> folder. Copy this to I<sys:\system> folder. -Example: At the command prompt Type "nmake nwinstall". This will -install NetWare Perl on the NetWare Server. Similarly if you type -"nmake install", This will cause the binaries to be installed on the -local machine. (Typically under the c:\perl folder) +Example: At the command prompt Type "nmake nwinstall". + This will install NetWare Perl on the NetWare Server. + Similiarly if you type "nmake install", + This will cause the binaries to be installed on the local machine. + (Typically under the c:\perl folder) + =head1 Build new extensions To build extensions other than standard extensions, NetWare Perl has @@ -176,11 +162,14 @@ perl -Ic:/perl/5.7.2/lib/NetWare-x86-multi-thread -Ic:\perl\5.7.2\lib MakeFile.pl INSTALLSITELIB=i:\perl\lib -=item * +=back + += item * -Note: Some modules downloaded from CPAN may require NetWare related API -in order to build on NetWare.Other modules may however build smoothly with or -without minor changes depending on the type of module. +Note: Some modules downloaded from CPAN may require NetWare related +API in order to build on NetWare.Other modules may however build +smoothly with or without minor changes depending on the type of +module. =back @@ -213,6 +202,6 @@ =item * -Modified - 8 May 2002 +Modified - 28 May 2002 =back ==== //depot/macperl/README.vms#2 (text) ==== Index: macperl/README.vms --- macperl/README.vms#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/README.vms Fri May 31 09:27:30 2002 @@ -560,6 +560,58 @@ http://www.progis.de/ http://www.lp.se/products/gnu.html +=head2 Multinet issues with Perl on VMS + +Prior to the release of Perl 5.8.0 it was noted that the regression +test for lib/Net/hostent (in file [.lib.Net]hostent.t) will fail owing +to problems with the hostent structure returned by C calls to either +gethostbyname() or gethostbyaddr() using DEC or Compaq C with a +Multinet TCP/IP stack. The problem was noted in Multinet 4.3A +using either Compaq C 6.5 or DEC C 6.0, and with Multinet 4.2A +using DEC C 5.2, but could easily affect other versions of Multinet. +A representative of Process Software Inc. has acknowledged a +bug in the Multinet version of UCX$IPC_SHR for which there is +an ECO forthcoming. If you see one or more tests in lib/Net/hostent +fail we recommend that you apply the Multinet ECO when it becomes +available from: + + http://www.multinet.process.com/eco.html + +You may determine the version of Multinet that you are running using +the command: + + multinet show /version + +from the DCL command prompt. + +If you cannot wait for the ECO from Process you might try using +Perl programming constructs such as: + + $address = substr($gethostbyname_addr,0,4); + +to temporarily work around the problem, or if you are brave +and do not mind the possibility of breaking IPv6 addresses, +you might modify the pp_sys.c file to add an ad-hoc correction +like so: + + + --- pp_sys.c;1 Thu May 30 14:42:17 2002 + +++ pp_sys.c Thu May 30 12:54:02 2002 + @@ -4684,6 +4684,10 @@ + } + #endif + + + if (hent) { + + hent->h_length = 4; + + } + + + if (GIMME != G_ARRAY) { + PUSHs(sv = sv_newmortal()); + if (hent) { + +then re-compile and re-test your perl. After the installation +of the Multinet ECO you ought to back out any such changes though. + =head1 Mailing Lists There are several mailing lists available to the Perl porter. For VMS ==== //depot/macperl/configure.com#7 (text) ==== Index: macperl/configure.com --- macperl/configure.com#6~16870~ Wed May 29 23:06:34 2002 +++ macperl/configure.com Fri May 31 09:27:30 2002 @@ -5082,7 +5082,7 @@ $ WC "PERL_API_VERSION='" + api_version + "'" $ WC "PERL_API_SUBVERSION='" + api_subversion + "'" $ WC "_a='" + lib_ext + "'" -$ WC "_ext='" + exe_ext + "'" +$ WC "_exe='" + exe_ext + "'" $ WC "_o='" + obj_ext + "'" $ WC "alignbytes='" + alignbytes + "'" $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'" ==== //depot/macperl/ext/Devel/PPPort/PPPort.pm#4 (text) ==== Index: macperl/ext/Devel/PPPort/PPPort.pm --- macperl/ext/Devel/PPPort/PPPort.pm#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Devel/PPPort/PPPort.pm Fri May 31 09:27:30 2002 @@ -434,14 +434,44 @@ # define aTHX_ #endif -#ifndef PTR2IV -# define PTR2IV(d) (IV)(d) +#ifndef UVSIZE +# define UVSIZE IVSIZE +#endif + +#ifndef NVTYPE +# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) +# define NVTYPE long double +# else +# define NVTYPE double +# endif +typedef NVTYPE NV; #endif - + #ifndef INT2PTR -# define INT2PTR(any,d) (any)(d) + +#if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +#else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +#endif +#define NUM2PTR(any,d) (any)(PTRV)(d) +#define PTR2IV(p) INT2PTR(IV,p) +#define PTR2UV(p) INT2PTR(UV,p) +#define PTR2NV(p) NUM2PTR(NV,p) +#if PTRSIZE == LONGSIZE +# define PTR2ul(p) (unsigned long)(p) +#else +# define PTR2ul(p) INT2PTR(unsigned long,p) #endif +#endif /* !INT2PTR */ + #ifndef boolSV # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) #endif @@ -667,44 +697,6 @@ # define NVgf "g" # endif #endif - -#ifndef UVSIZE -# define UVSIZE IVSIZE -#endif - -#ifndef NVTYPE -# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) -# define NVTYPE long double -# else -# define NVTYPE double -# endif -typedef NVTYPE NV; -#endif - -#ifndef INT2PTR - -#if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -# define PTRV UV -# define INT2PTR(any,d) (any)(d) -#else -# if PTRSIZE == LONGSIZE -# define PTRV unsigned long -# else -# define PTRV unsigned -# endif -# define INT2PTR(any,d) (any)(PTRV)(d) -#endif -#define NUM2PTR(any,d) (any)(PTRV)(d) -#define PTR2IV(p) INT2PTR(IV,p) -#define PTR2UV(p) INT2PTR(UV,p) -#define PTR2NV(p) NUM2PTR(NV,p) -#if PTRSIZE == LONGSIZE -# define PTR2ul(p) (unsigned long)(p) -#else -# define PTR2ul(p) INT2PTR(unsigned long,p) -#endif - -#endif /* !INT2PTR */ #ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */ # define AvFILLp AvFILL ==== //depot/macperl/ext/DynaLoader/DynaLoader_pm.PL#4 (text) ==== Index: macperl/ext/DynaLoader/DynaLoader_pm.PL --- macperl/ext/DynaLoader/DynaLoader_pm.PL#3~16926~ Fri May 31 09:07:35 2002 +++ macperl/ext/DynaLoader/DynaLoader_pm.PL Fri May 31 09:27:30 2002 @@ -237,6 +237,10 @@ # It may also edit @modparts if required. $modfname = &mod2fname(\@modparts) if defined &mod2fname; + if (($^O eq 'NetWare') && (length($modfname) > 8)) { + $modfname = substr($modfname, 0, 8); + } + my $modpname = join(($Is_MacOS ? ':' : '/'),@modparts); print STDERR "DynaLoader::bootstrap for $module ", @@ -258,11 +262,21 @@ } else { $dir = "$_/auto/$modpname"; } - next unless -d $dir; # skip over uninteresting directories + if ($^O ne 'NetWare') { + next unless -d $dir; # skip over uninteresting directories + } + else { + next if -f $dir; # skip over uninteresting directories + } # check for common cases to avoid autoload of dl_findfile my $try = $Is_MacOS ? "$dir:$modfname.$dl_dlext" : "$dir/$modfname.$dl_dlext"; - last if $file = ($do_expand) ? dl_expandspec($try) : (-f $try && $try); + if ($^O ne 'NetWare') { + last if $file = ($do_expand) ? dl_expandspec($try) : ((-f $try) && $try); + } + elsif (!(-d $try)) { + last if $file = ($do_expand) ? dl_expandspec($try) : ($try); + } # no luck here, save dir for possible later dl_findfile search push @dirs, $dir; @@ -289,6 +303,14 @@ warn "$bs: $@\n" if $@; } + my $boot_symbol_ref; + + if ($^O eq 'darwin') { + if ($boot_symbol_ref = dl_find_symbol(0, $bootname)) { + goto boot; #extension library has already been loaded, e.g. darwin + } + } + # Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation @@ -307,12 +329,13 @@ Carp::carp("Undefined symbols present after loading $file: @unresolved\n"); } - my $boot_symbol_ref = dl_find_symbol($libref, $bootname) or + $boot_symbol_ref = dl_find_symbol($libref, $bootname) or croak("Can't find '$bootname' symbol in $file\n"); - my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file); - push(@dl_modules, $module); # record loaded module + + boot: + my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file); # See comment block above &$xs(@args); ==== //depot/macperl/ext/DynaLoader/XSLoader_pm.PL#2 (text) ==== Index: macperl/ext/DynaLoader/XSLoader_pm.PL --- macperl/ext/DynaLoader/XSLoader_pm.PL#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/ext/DynaLoader/XSLoader_pm.PL Fri May 31 09:27:30 2002 @@ -92,6 +92,14 @@ $bootname =~ s/\W/_/g; @dl_require_symbols = ($bootname); + my $boot_symbol_ref; + + if ($^O eq 'darwin') { + if ($boot_symbol_ref = dl_find_symbol(0, $bootname)) { + goto boot; #extension library has already been loaded, e.g. darwin + } + } + # Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation @@ -111,14 +119,15 @@ Carp::carp("Undefined symbols present after loading $file: @unresolved\n"); } - my $boot_symbol_ref = dl_find_symbol($libref, $bootname) or do { + $boot_symbol_ref = dl_find_symbol($libref, $bootname) or do { require Carp; Carp::croak("Can't find '$bootname' symbol in $file\n"); }; - my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file); - push(@dl_modules, $module); # record loaded module + + boot: + my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file); # See comment block above return &$xs(@_); ==== //depot/macperl/ext/Storable/ChangeLog#5 (text) ==== Index: macperl/ext/Storable/ChangeLog --- macperl/ext/Storable/ChangeLog#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Storable/ChangeLog Fri May 31 09:27:30 2002 @@ -1,3 +1,36 @@ +Thu May 30 20:31:08 BST 2002 Nicholas Clark <[email protected]> + +. Description: + + Version 2.03 Header changes on 5.6.x on Unix where IV is long long + + 5.6.x introduced the ability to have IVs as long long. However, + Configure still defined BYTEORDER based on the size of a long. + Storable uses the BYTEORDER value as part of the header, but doesn't + explicity store sizeof(IV) anywhere in the header. Hence on 5.6.x + built with IV as long long on a platform that uses Configure (ie most + things except VMS and Windows) headers are identical for the different + IV sizes, despite the files containing some fields based on sizeof(IV) + + 5.8.0 is consistent; all platforms have BYTEORDER in config.h based on + sizeof(IV) rather than sizeof(long). This means that the value of + BYTEORDER will change from (say) 4321 to 87654321 between 5.6.1 and + 5.8.0 built with the same options to Configure on the same machine. + This means that the Storable header will differ, and the two versions + will wrongly thing that they are incompatible. + + For the benefit of long term consistency, Storable now implements the + 5.8.0 BYTEORDER policy on 5.6.x. This means that 2.03 onwards default + to be incompatible with 2.02 and earlier (ie the large 1.0.x installed + base) on the same 5.6.x perl. + + To allow interworking, a new variable $Storable::interwork_56_64bit + is introduced. It defaults to false. Set it to true to read and + write old format files. Don't use it unless you have existing + stored data written with 5.6.x that you couldn't otherwise read, + or you need to interwork with a machine running older Storable on + a 5.6.x with long long IVs. ie you probably don't need to use it. + Sat May 25 22:38:39 BST 2002 Nicholas Clark <[email protected]> Version 2.02 ==== //depot/macperl/ext/Storable/MANIFEST#5 (text) ==== Index: macperl/ext/Storable/MANIFEST --- macperl/ext/Storable/MANIFEST#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Storable/MANIFEST Fri May 31 09:27:30 2002 @@ -13,8 +13,10 @@ t/forgive.t See if Storable works t/freeze.t See if Storable works t/integer.t For "use integer" testing +t/interwork56.t Test combatibility kludge for 64bit data under 5.6.x t/lock.t See if Storable works -t/make_downgrade.pl See if Storable works +t/make_56_interwork.pl Make test data for interwork56.t +t/make_downgrade.pl Make test data for downgrade.t t/malice.t See if Storable copes with corrupt files t/overload.t See if Storable works t/recurse.t See if Storable works ==== //depot/macperl/ext/Storable/Makefile.PL#5 (text) ==== Index: macperl/ext/Storable/Makefile.PL --- macperl/ext/Storable/Makefile.PL#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Storable/Makefile.PL Fri May 31 09:27:30 2002 @@ -18,3 +18,23 @@ VERSION_FROM => 'Storable.pm', dist => { SUFFIX => 'gz', COMPRESS => 'gzip -f' }, ); + +my $ivtype = $Config{ivtype}; + +# I don't know if the VMS folks ever supported long long on 5.6.x +if ($ivtype and $ivtype eq 'long long' and $^O !~ /^MSWin/) { + print <<'EOM'; + +You appear to have a perl configured to use 64 bit integers in its scalar +variables. If you have existing data written with an earlier version of +Storable which this version of Storable refuses to load with a + + Byte order is not compatible + +error, then please read the section "64 bit data in perl 5.6.0 and 5.6.1" +in the Storable documentation for instructions on how to read your data. + +(You can find the documentation at the end of Storable.pm in POD format) + +EOM +} ==== //depot/macperl/ext/Storable/Storable.pm#8 (text) ==== Index: macperl/ext/Storable/Storable.pm --- macperl/ext/Storable/Storable.pm#7~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Storable/Storable.pm Fri May 31 09:27:30 2002 @@ -22,7 +22,7 @@ use AutoLoader; use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.02'; +$VERSION = '2.03'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # @@ -845,6 +845,69 @@ C<Storable::drop_utf8> is a blunt tool. There is no facility either to return B<all> strings as utf8 sequences, or to attempt to convert utf8 data back to 8 bit and C<croak()> if the conversion fails. + +Prior to Storable 2.01, no distinction was made between signed and +unsigned integers on storing. By default Storable prefers to store a +scalars string representation (if it has one) so this would only cause +problems when storing large unsigned integers that had never been coverted +to string or floating point. In other words values that had been generated +by integer operations such as logic ops and then not used in any string or +arithmetic context before storing. + +=head2 64 bit data in perl 5.6.0 and 5.6.1 + +This section only applies to you if you have existing data written out +by Storable 2.02 or earlier on perl 5.6.0 or 5.6.1 on Unix or Linux which +has been configured with 64 bit integer support (not the default) +If you got a precompiled perl, rather than running Configure to build +your own perl from source, then it almost certainly does not affect you, +and you can stop reading now (unless you're curious). If you're using perl +on Windows it does not affect you. + +Storable writes a file header which contains the sizes of various C +language types for the C compiler that built Storable (when not writing in +network order), and will refuse to load files written by a Storable not +on the same (or compatible) architecture. This check and a check on +machine byteorder is needed because the size of various fields in the file +are given by the sizes of the C language types, and so files written on +different architectures are incompatible. This is done for increased speed. +(When writing in network order, all fields are written out as standard +lengths, which allows full interworking, but takes longer to read and write) + +Perl 5.6.x introduced the ability to optional configure the perl interpreter +to use C's C<long long> type to allow scalars to store 64 bit integers on 32 +bit systems. However, due to the way the Perl configuration system +generated the C configuration files on non-Windows platforms, and the way +Storable generates its header, nothing in the Storable file header reflected +whether the perl writing was using 32 or 64 bit integers, despite the fact +that Storable was storing some data differently in the file. Hence Storable +running on perl with 64 bit integers will read the header from a file +written by a 32 bit perl, not realise that the data is actually in a subtly +incompatible format, and then go horribly wrong (possibly crashing) if it +encountered a stored integer. This is a design failure. + +Storable has now been changed to write out and read in a file header with +information about the size of integers. It's impossible to detect whether +an old file being read in was written with 32 or 64 bit integers (they have +the same header) so it's impossible to automatically switch to a correct +backwards compatibility mode. Hence this Storable defaults to the new, +correct behaviour. + +What this means is that if you have data written by Storable 1.x running +on perl 5.6.0 or 5.6.1 configured with 64 bit integers on Unix or Linux +then by default this Storable will refuse to read it, giving the error +I<Byte order is not compatible>. If you have such data then you you +should set C<$Storable::interwork_56_64bit> to a true value to make this +Storable read and write files with the old header. You should also +migrate your data, or any older perl you are communicating with, to this +current version of Storable. + +If you don't have data written with specific configuration of perl described +above, then you do not and should not do anything. Don't set the flag - +not only will Storable on an identically configured perl refuse to load them, +but Storable a differently configured perl will load them believing them +to be correct for it, and then may well fail or crash part way through +reading them. =head1 CREDITS ==== //depot/macperl/ext/Storable/Storable.xs#7 (text) ==== Index: macperl/ext/Storable/Storable.xs --- macperl/ext/Storable/Storable.xs#6~16870~ Wed May 29 23:06:34 2002 +++ macperl/ext/Storable/Storable.xs Fri May 31 09:27:30 2002 @@ -701,14 +701,49 @@ #define MAGICSTR_BYTES 'p','s','t','0' #define OLDMAGICSTR_BYTES 'p','e','r','l','-','s','t','o','r','e' +/* 5.6.x introduced the ability to have IVs as long long. + However, Configure still defined BYTEORDER based on the size of a long. + Storable uses the BYTEORDER value as part of the header, but doesn't + explicity store sizeof(IV) anywhere in the header. Hence on 5.6.x built + with IV as long long on a platform that uses Configure (ie most things + except VMS and Windows) headers are identical for the different IV sizes, + despite the files containing some fields based on sizeof(IV) + Erk. Broken-ness. + 5.8 is consistent - the following redifinition kludge is only needed on + 5.6.x, but the interwork is needed on 5.8 while data survives in files + with the 5.6 header. + +*/ + +#if defined (IVSIZE) && (IVSIZE == 8) && (LONGSIZE == 4) +#ifndef NO_56_INTERWORK_KLUDGE +#define USE_56_INTERWORK_KLUDGE +#endif +#if BYTEORDER == 0x1234 +#undef BYTEORDER +#define BYTEORDER 0x12345678 +#else +#if BYTEORDER == 0x4321 +#undef BYTEORDER +#define BYTEORDER 0x87654321 +#endif +#endif +#endif + #if BYTEORDER == 0x1234 #define BYTEORDER_BYTES '1','2','3','4' #else #if BYTEORDER == 0x12345678 #define BYTEORDER_BYTES '1','2','3','4','5','6','7','8' +#ifdef USE_56_INTERWORK_KLUDGE +#define BYTEORDER_BYTES_56 '1','2','3','4' +#endif #else #if BYTEORDER == 0x87654321 #define BYTEORDER_BYTES '8','7','6','5','4','3','2','1' +#ifdef USE_56_INTERWORK_KLUDGE +#define BYTEORDER_BYTES_56 '4','3','2','1' +#endif #else #if BYTEORDER == 0x4321 #define BYTEORDER_BYTES '4','3','2','1' @@ -720,6 +755,9 @@ #endif static const char byteorderstr[] = {BYTEORDER_BYTES, 0}; +#ifdef USE_56_INTERWORK_KLUDGE +static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0}; +#endif #define STORABLE_BIN_MAJOR 2 /* Binary major "version" */ #define STORABLE_BIN_MINOR 5 /* Binary minor "version" */ @@ -3170,6 +3208,20 @@ (unsigned char) sizeof(char *), (unsigned char) sizeof(NV) }; +#ifdef USE_56_INTERWORK_KLUDGE + static const unsigned char file_header_56[] = { + MAGICSTR_BYTES, + (STORABLE_BIN_MAJOR << 1) | 0, + STORABLE_BIN_WRITE_MINOR, + /* sizeof the array includes the 0 byte at the end: */ + (char) sizeof (byteorderstr_56) - 1, + BYTEORDER_BYTES_56, + (unsigned char) sizeof(int), + (unsigned char) sizeof(long), + (unsigned char) sizeof(char *), + (unsigned char) sizeof(NV) + }; +#endif const unsigned char *header; SSize_t length; @@ -3179,8 +3231,16 @@ header = network_file_header; length = sizeof (network_file_header); } else { - header = file_header; - length = sizeof (file_header); +#ifdef USE_56_INTERWORK_KLUDGE + if (SvTRUE(perl_get_sv("Storable::interwork_56_64bit", TRUE))) { + header = file_header_56; + length = sizeof (file_header_56); + } else +#endif + { + header = file_header; + length = sizeof (file_header); + } } if (!cxt->fio) { @@ -5039,8 +5099,19 @@ TRACEME(("byte order '%.*s' %d", c, buf, c)); - if ((c != (sizeof (byteorderstr) - 1)) || memNE(buf, byteorderstr, c)) - CROAK(("Byte order is not compatible")); +#ifdef USE_56_INTERWORK_KLUDGE + /* No point in caching this in the context as we only need it once per + retrieve, and we need to recheck it each read. */ + if (SvTRUE(perl_get_sv("Storable::interwork_56_64bit", TRUE))) { + if ((c != (sizeof (byteorderstr_56) - 1)) + || memNE(buf, byteorderstr_56, c)) + CROAK(("Byte order is not compatible")); + } else +#endif + { + if ((c != (sizeof (byteorderstr) - 1)) || memNE(buf, byteorderstr, c)) + CROAK(("Byte order is not compatible")); + } current = buf + c; @@ -5544,6 +5615,9 @@ #ifdef DEBUGME /* Only disable the used only once warning if we are in debugging mode. */ gv_fetchpv("Storable::DEBUGME", GV_ADDMULTI, SVt_PV); +#endif +#ifdef USE_56_INTERWORK_KLUDGE + gv_fetchpv("Storable::interwork_56_64bit", GV_ADDMULTI, SVt_PV); #endif int ==== //depot/macperl/ext/Storable/t/interwork56.t#1 (text) ==== Index: macperl/ext/Storable/t/interwork56.t --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/ext/Storable/t/interwork56.t Fri May 31 09:27:30 2002 @@ -0,0 +1,189 @@ +#!./perl -w + +# +# Copyright 2002, Larry Wall. +# +# You may redistribute only under the same terms as Perl 5, as specified +# in the README file that comes with the distribution. +# + +# I ought to keep this test easily backwards compatible to 5.004, so no +# qr//; + +# This test checks whether the kludge to interwork with 5.6 Storables compiled +# on Unix systems with IV as long long works. + +sub BEGIN { + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = ('.', '../lib'); + } else { + unshift @INC, 't'; + } + require Config; import Config; + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } + unless ($Config{ivsize} and $Config{ivsize} > $Config{longsize}) { + print "1..0 # Skip: Your IVs are no larger than your longs\n"; + exit 0; + } +} + +use Storable qw(freeze thaw); +use strict; +use Test::More tests=>30; + +use vars qw(%tests); + +{ + local $/ = "\n\nend\n"; + while (<DATA>) { + next unless /\S/s; + unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) { + s/\n.*//s; + warn "Dodgy data in section starting '$_'"; + next; + } + next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa + my $data = unpack 'u', $3; + $tests{$2} = $data; + } +} + +# perl makes easy things easy, and hard things possible: +my $test = freeze \'Hell'; + +my $header = Storable::read_magic ($test); + +is ($header->{byteorder}, $Config{byteorder}, + "header's byteorder and Config.pm's should agree"); + +my $result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "Check thawing test data"); +is ($@, '', "causes no errors"); +is ($$result, 'Hell', 'and gives the expected data'); + +my $kingdom = $Config{byteorder} =~ /23/ ? "Lillput" : "Belfuscu"; + +my $name = join ',', $kingdom, @$header{qw(intsize longsize ptrsize nvsize)}; + +SKIP: { + my $real_thing = $tests{$name}; + if (!defined $real_thing) { + print << "EOM"; +# No test data for Storable 1.x for: +# +# byteorder '$Config{byteorder}' +# sizeof(int) $$header{intsize} +# sizeof(long) $$header{longsize} +# sizeof(char *) $$header{ptrsize} +# sizeof(NV) $$header{nvsize} + +# If you have Storable 1.x built with perl 5.6.x on this platform, please +# make_56_interwork.pl to generate test data, and append the test data to +# this test. +# You may find that make_56_interwork.pl reports that your platform has no +# interworking problems, in which case you need do nothing. +EOM + skip "# No 1.x test file", 9; + } + my $result = eval {thaw $real_thing}; + is ($result, undef, "By default should not be able to thaw"); + like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); + local $Storable::interwork_56_64bit = 1; + $result = eval {thaw $real_thing}; + isa_ok ($result, 'ARRAY', "With flag should now thaw"); + is ($@, '', "with no errors"); + + # However, as the file is written with Storable pre 2.01, it's a known + # bug that large (positive) UVs become IVs + my $value = (~0 ^ (~0 >> 1) ^ 2); + + is (@$result, 4, "4 elements in array"); + like ($$result[0], + qr/^This file was written with [0-9.]+ on perl [0-9.]+\z/, + "1st element"); + is ($$result[1], "$kingdom was correct", "2nd element"); + cmp_ok ($$result[2] ^ $value, '==', 0, "3rd element") or + printf "# expected %#X, got %#X\n", $value, $$result[2]; + is ($$result[3], "The End", "4th element"); +} + +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +my $test_kludge; +{ + local $Storable::interwork_56_64bit = 1; + $test_kludge = freeze \'Heck'; +} + +my $header_kludge = Storable::read_magic ($test_kludge); + +cmp_ok (length ($header_kludge->{byteorder}), '==', $Config{longsize}, + "With 5.6 interwork kludge byteorder string should be same size as long" + ); +$result = eval {thaw $test_kludge}; +is ($result, undef, "By default should not be able to thaw"); +like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); + +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +{ + local $Storable::interwork_56_64bit = 1; + + $result = eval {thaw $test_kludge}; + isa_ok ($result, 'SCALAR', "should be able to thaw kludge data"); + is ($@, '', "with no errors"); + is ($$result, 'Heck', "and gives expected data"); + + $result = eval {thaw $test}; + is ($result, undef, "But now can't thaw real data"); + like ($@, qr/Byte order is not compatible/, + "because the header byte order strings differ"); +} + +# All together now: +$result = eval {thaw $test}; +isa_ok ($result, 'SCALAR', "CHORUS: check thawing test data"); +is ($@, '', " causes no errors"); +is ($$result, 'Hell', " and gives the expected data"); + +__END__ +# A whole run of 1.1.14 freeze data, uuencoded. The "mode bits" are the octal +# value of 'A', the "file name" is the test name. Use make_56_interwork.pl +# with a copy of Storable 1.X generate these. + +# byteorder '1234' +# sizeof(int) 4 +# sizeof(long) 4 +# sizeof(char *) 4 +# sizeof(NV) 8 +begin 101 Lillput,4,4,4,8 +M!`0$,3(S-`0$!`@"!`````HQ5&AI<R!F:6QE('=A<R!W<FET=&5N('=I=&@@ +M,2XP,30@;VX@<&5R;"`U+C`P-C`P,0H33&EL;'!U="!W87,@8V]R<F5C=`8" +0````````@`H'5&AE($5N9``` + +end + +# byteorder '4321' +# sizeof(int) 4 +# sizeof(long) 4 +# sizeof(char *) 4 +# sizeof(NV) 8 +begin 101 Belfuscu,4,4,4,8 +M!`0$-#,R,00$!`@"````!`HQ5&AI<R!F:6QE('=A<R!W<FET=&5N('=I=&@@ +M,2XP,30@;VX@<&5R;"`U+C`P-C`P,0H40F5L9G5S8W4@=V%S(&-O<G)E8W0& +1@`````````(*!U1H92!%;F0` + +end + ==== //depot/macperl/ext/Storable/t/make_56_interwork.pl#1 (text) ==== Index: macperl/ext/Storable/t/make_56_interwork.pl --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/ext/Storable/t/make_56_interwork.pl Fri May 31 09:27:30 2002 @@ -0,0 +1,51 @@ +#!/usr/bin/perl -w +use strict; + +use Config; +use Storable qw(freeze thaw); + +# Lilliput decreed that eggs should be eaten small end first. +# Belfuscu welcomed the rebels who wanted to eat big end first. +my $kingdom = $Config{byteorder} =~ /23/ ? "Lillput" : "Belfuscu"; + +my $frozen = freeze + ["This file was written with $Storable::VERSION on perl $]", + "$kingdom was correct", (~0 ^ (~0 >> 1) ^ 2), + "The End"]; + +my $ivsize = $Config{ivsize} || $Config{longsize}; + +my $storesize = unpack 'xxC', $frozen; +my $storebyteorder = unpack "xxxA$storesize", $frozen; + +if ($Config{byteorder} eq $storebyteorder) { + my $ivtype = $Config{ivtype} || 'long'; + print <<"EOM"; +You only need to run this generator program where Config.pm's byteorder string +is not the same length as the size of IVs. + +This length difference should only happen on perl 5.6.x configured with IVs as +long long on Unix, OS/2 or any platform that runs the Configure stript (ie not +MS Windows) + +This is perl $], sizeof(long) is $Config{longsize}, IVs are '$ivtype', sizeof(IV) is $ivsize, +byteorder is '$Config{byteorder}', Storable $Storable::VERSION writes a byteorder of '$storebyteorder' +EOM + exit; # Grr ' +} + +my ($i, $l, $p, $n) = unpack "xxxx${storesize}CCCC", $frozen; + +print <<"EOM"; +# byteorder '$storebyteorder' +# sizeof(int) $i +# sizeof(long) $l +# sizeof(char *) $p +# sizeof(NV) $n +EOM + +my $uu = pack 'u', $frozen; + +printf "begin %3o $kingdom,$i,$l,$p,$n\n", ord 'A'; +print $uu; +print "\nend\n\n"; ==== //depot/macperl/ext/Storable/t/malice.t#5 (text) ==== Index: macperl/ext/Storable/t/malice.t --- macperl/ext/Storable/t/malice.t#4~16730~ Tue May 21 20:36:42 2002 +++ macperl/ext/Storable/t/malice.t Fri May 31 09:27:30 2002 @@ -32,21 +32,6 @@ $byteorder = $Config{byteorder}; -if ($] < 5.007003 && $] >= 5.006 && $^O ne 'MSWin32' - && $Config{longsize} != $Config{ivsize}) { - # 5.6.x, not on Windows, built with IVs as long long - # config.h and Config.sh differ in their idea of the value of byteorder - # Storable's header is written out using C (hence config.h), but we're - # testing with perl - if ($byteorder eq '12345678') { - $byteorder = '1234'; - } elsif ($byteorder eq '87654321') { - $byteorder = '4321'; - } else { - die "I don't recognise Your byteorder: '$byteorder'"; - } -} - $file_magic_str = 'pst0'; $other_magic = 7 + length $byteorder; $network_magic = 2; ==== //depot/macperl/hints/linux.sh#2 (text) ==== Index: macperl/hints/linux.sh --- macperl/hints/linux.sh#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/hints/linux.sh Fri May 31 09:27:30 2002 @@ -56,6 +56,33 @@ libc=/lib/$libc fi +# glibc 2.2.90 and above apparently change stdio streams so Perl's +# direct buffer manipulation no longer works. The Configure tests +# should be changed to correctly detect this, but until then, +# the following check should at least let perl compile and run. +# (This quick fix should be updated before 5.8.1.) +# Since we just computed libc above, we'll use it here. A typical +# value looks like libc='/lib/libc-2.0.6.so' +# To be defensive, reject all unknown versions > 2.2.9. +# A. Dougherty, May. 30, 2002 +case "$libc" in +*-2.[01]*) ;; +*-2.2.so) ;; +*-2.2.[0-9].*) ;; +*) # Honor a command-line override + if test -z "$d_stdstdio"; then + d_stdstdio="$undef" + cat <<'EOM' >&4 + +Disabling perl's stdio buffer snooping. This will generate a harmless + *** WHOA THERE!!! *** +message in Configure. Accept the recommended value. +Read hints/linux.sh for further information. +EOM + fi + ;; +esac + # Configure may fail to find lstat() since it's a static/inline # function in <sys/stat.h>. d_lstat=define ==== //depot/macperl/lib/English.t#3 (xtext) ==== Index: macperl/lib/English.t --- macperl/lib/English.t#2~16926~ Fri May 31 09:07:35 2002 +++ macperl/lib/English.t Fri May 31 09:27:30 2002 @@ -33,7 +33,11 @@ { local(*IN, *OUT); - pipe(IN, OUT); + if ($^O ne 'dos') { + pipe(IN, OUT); + } else { + open(OUT, ">en.tmp"); + } select(OUT); $| = 1; print 'ok', '7'; @@ -44,6 +48,7 @@ my $close = close OUT; ok( !($close) == $CHILD_ERROR, '$CHILD_ERROR should be false' ); + open(IN, "<en.tmp") if ($^O eq 'dos'); my $foo = <IN>; like( $foo, qr/ok 7/, '$OFS' ); @@ -75,7 +80,7 @@ is( $UID, $<, '$UID' ); is( $GID, $(, '$GID' ); -is( $EUID, $>, '$EUID' ); +is( $EUID, $>, '$EUID' ); is( $EGID, $), '$EGID' ); is( $PROGRAM_NAME, $0, '$PROGRAM_NAME' ); @@ -117,8 +122,8 @@ $hash{'a', 'b', 'c'} = 1; my @keys = sort keys %hash; -is( $keys[0], 'a,b,c', '$SUBSCRIPT_SEPARATOR' ); -is( $keys[1], 'd|e|f', '$SUBSCRIPT_SEPARATOR' ); +is( $keys[0], 'a,b,c', '$SUBSCRIPT_SEPARATOR' ); +is( $keys[1], 'd|e|f', '$SUBSCRIPT_SEPARATOR' ); eval { is( $EXCEPTIONS_BEING_CAUGHT, 1, '$EXCEPTIONS_BEING_CAUGHT' ) }; ok( !$EXCEPTIONS_BEING_CAUGHT, '$EXCEPTIONS_BEING_CAUGHT should be false' ); ==== //depot/macperl/lib/ExtUtils/Changes#6 (text) ==== Index: macperl/lib/ExtUtils/Changes --- macperl/lib/ExtUtils/Changes#5~16825~ Mon May 27 15:55:07 2002 +++ macperl/lib/ExtUtils/Changes Fri May 31 09:27:30 2002 @@ -1,3 +1,20 @@ +6.01 Thu May 30 14:48:57 EDT 2002 + - MacOS Classic fixes from Pudge: recursive make repair, + post_initialize() now used, DEFINE & INC work with relative paths, + removed dead hybrid method/function call code. + * WriteMakefile now a bit more tolerant of wrong arguments, it will + warn and try to soldier on rather than just vomiting. + - Netware whitespace nits (bleadperl@16811) + - Netware Perl version number tag when building dynamic libraries + needs to match the current perl version instead of being hard coded + (a mutation of bleadperl@16851) + - OS/2 bug in TEST_F target found by John Poltorak (bleadperl@16839) + - README in 6.00 still declared this as alpha. + +6.00 Sat May 25 17:14:09 EDT 2002 + - VMS 8-level limit test tweak (bleadperl@16764) + * Here goes nothing. + 5.96_01 Wed May 22 19:11:09 EDT 2002 - Fixed ExtUtils::testlib so it doesn't taint @INC. - Fixed ExtUtils::Command so it groks % shell wildcard on VMS. ==== //depot/macperl/lib/ExtUtils/Command.pm#4 (text) ==== Index: macperl/lib/ExtUtils/Command.pm --- macperl/lib/ExtUtils/Command.pm#3~16825~ Mon May 27 15:55:07 2002 +++ macperl/lib/ExtUtils/Command.pm Fri May 31 09:27:30 2002 @@ -11,7 +11,7 @@ use vars qw(@ISA @EXPORT $VERSION); @ISA = qw(Exporter); @EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f); -$VERSION = '1.03_01'; +$VERSION = '1.04'; my $Is_VMS = $^O eq 'VMS'; @@ -126,7 +126,7 @@ expand_wildcards(); while (@ARGV) { - my $file = shift(@ARGV); + my $file = shift(@ARGV); open(FILE,">>$file") || die "Cannot write $file:$!"; close(FILE); utime($t,$t,$file); ==== //depot/macperl/lib/ExtUtils/Liblist/Kid.pm#3 (text) ==== Index: macperl/lib/ExtUtils/Liblist/Kid.pm --- macperl/lib/ExtUtils/Liblist/Kid.pm#2~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/Liblist/Kid.pm Fri May 31 09:27:30 2002 @@ -9,7 +9,7 @@ # Broken out of MakeMaker from version 4.11 use vars qw($VERSION); -$VERSION = 1.28_01; +$VERSION = 1.29; use Config; use Cwd 'cwd'; ==== //depot/macperl/lib/ExtUtils/MM_BeOS.pm#4 (text) ==== Index: macperl/lib/ExtUtils/MM_BeOS.pm --- macperl/lib/ExtUtils/MM_BeOS.pm#3~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/MM_BeOS.pm Fri May 31 09:27:30 2002 @@ -25,7 +25,7 @@ use vars qw(@ISA $VERSION); @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = 1.02_01; +$VERSION = 1.03; =item perl_archive ==== //depot/macperl/lib/ExtUtils/MM_Cygwin.pm#3 (text) ==== Index: macperl/lib/ExtUtils/MM_Cygwin.pm --- macperl/lib/ExtUtils/MM_Cygwin.pm#2~16230~ Sat Apr 27 14:50:45 2002 +++ macperl/lib/ExtUtils/MM_Cygwin.pm Fri May 31 09:27:30 2002 @@ -10,7 +10,7 @@ require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = 1.02_01; +$VERSION = 1.03; sub cflags { my($self,$libperl)=@_; ==== //depot/macperl/lib/ExtUtils/MM_MacOS.pm#4 (text) ==== Index: macperl/lib/ExtUtils/MM_MacOS.pm --- macperl/lib/ExtUtils/MM_MacOS.pm#3~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/MM_MacOS.pm Fri May 31 09:27:30 2002 @@ -4,6 +4,7 @@ # built-in ExtUtils::MM_Unix methods if MakeMaker.pm is run under MacOS. # # Author: Matthias Neeracher <[email protected]> +# Maintainer: Chris Nandor <[email protected]> package ExtUtils::MM_MacOS; require ExtUtils::MM_Any; @@ -11,7 +12,7 @@ @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); use vars qw($VERSION); -$VERSION = '1.00'; +$VERSION = '1.01'; use Config; use Cwd 'cwd'; @@ -60,27 +61,54 @@ } } - $class = ++$ExtUtils::MakeMaker::PACKNAME; + my $newclass = ++$ExtUtils::MakeMaker::PACKNAME; + local @ExtUtils::MakeMaker::Parent = @ExtUtils::MakeMaker::Parent; # Protect against non-local exits { - print "Blessing Object into class [$class]\n" if $Verbose>=2; - ExtUtils::MakeMaker::mv_all_methods("MY",$class); - bless $self, $class; - push @Parent, $self; - @{"$class\:\:ISA"} = 'MM'; - } - - if (defined $Parent[-2]){ - $self->{PARENT} = $Parent[-2]; - my $key; - for $key (keys %Prepend_dot_dot) { - next unless defined $self->{PARENT}{$key}; - $self->{$key} = $self->{PARENT}{$key}; - $self->{$key} = File::Spec->catdir("::",$self->{$key}) - unless File::Spec->file_name_is_absolute($self->{$key}); - } - $self->{PARENT}->{CHILDREN}->{$class} = $self if $self->{PARENT}; + no strict 'refs'; + print "Blessing Object into class [$newclass]\n" if $Verbose>=2; + ExtUtils::MakeMaker::mv_all_methods("MY",$newclass); + bless $self, $newclass; + push @Parent, $self; + require ExtUtils::MY; + @{"$newclass\:\:ISA"} = 'MM'; + } + + if (defined $ExtUtils::MakeMaker::Parent[-2]){ + $self->{PARENT} = $ExtUtils::MakeMaker::Parent[-2]; + my $key; + for $key (@ExtUtils::MakeMaker::Prepend_parent) { + next unless defined $self->{PARENT}{$key}; + $self->{$key} = $self->{PARENT}{$key}; + unless ($^O eq 'VMS' && $key =~ /PERL$/) { + $self->{$key} = $self->catdir("..",$self->{$key}) + unless $self->file_name_is_absolute($self->{$key}); + } else { + # PERL or FULLPERL will be a command verb or even a + # command with an argument instead of a full file + # specification under VMS. So, don't turn the command + # into a filespec, but do add a level to the path of + # the argument if not already absolute. + my @cmd = split /\s+/, $self->{$key}; + $cmd[1] = $self->catfile('[-]',$cmd[1]) + unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]); + $self->{$key} = join(' ', @cmd); + } + } + if ($self->{PARENT}) { + $self->{PARENT}->{CHILDREN}->{$newclass} = $self; + foreach my $opt (qw(POLLUTE PERL_CORE)) { + if (exists $self->{PARENT}->{$opt} + and not exists $self->{$opt}) + { + # inherit, but only if already unspecified + $self->{$opt} = $self->{PARENT}->{$opt}; + } + } + } + my @fm = grep /^FIRST_MAKEFILE=/, @ARGV; + $self->parse_args(@fm) if @fm; } else { - $self->parse_args(@ARGV); + $self->parse_args(split(' ', $ENV{PERL_MM_OPT} || ''),@ARGV); } $self->{NAME} ||= $self->guess_name; @@ -118,7 +146,7 @@ delete $self->{SKIP}; # free memory # We skip many sections for MacOS, but we don't say anything about it in the Makefile - for (qw/post_initialize const_config tool_autosplit + for (qw/ const_config tool_autosplit tool_xsubpp tools_other dist macro depend post_constants pasthru c_o xs_c xs_o top_targets linkext dynamic_bs dynamic_lib static_lib manifypods @@ -268,10 +296,6 @@ sub init_main { my($self) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } # --- Initialize Module Name and Paths @@ -404,10 +428,6 @@ sub init_others { # --- Initialize Other Attributes my($self) = shift; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } if ( !$self->{OBJECT} ) { # init_dirscan should have found out, if we have C files @@ -444,10 +464,6 @@ sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc) my($self) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } my($name, %dir, %xs, %c, %h, %ignore, %pl_files, %manifypods); local(%pm); #the sub in find() has to see this hash @@ -582,10 +598,6 @@ sub constants { my($self) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } my(@m,$tmp); for $tmp (qw/ @@ -630,10 +642,10 @@ if ($self->{DEFINE}) { $self->{DEFINE} =~ s/-D/-d /g; # Preprocessor definitions may be useful - $self->{DEFINE} =~ s/-I\S+//g; # UN*X includes probably are not useful + $self->{DEFINE} =~ s/-I\S+/_include($1)/eg; # UN*X includes probably are not useful } if ($self->{INC}) { - $self->{INC} =~ s/-I\S+//g; # UN*X includes probably are not useful + $self->{INC} =~ s/-I(\S+)/_include($1)/eg; # UN*X includes probably are not useful } for $tmp (qw/ FULLEXT BASEEXT ROOTEXT DEFINE INC @@ -667,10 +679,6 @@ # --- Static Loading Sections --- my($self) = shift; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } my($extlib) = $self->{MYEXTLIB} ? "\nstatic :: myextlib\n" : ""; ' all :: static @@ -690,10 +698,6 @@ sub dlsyms { my($self,%attribs) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } return '' unless !$self->{SKIPHASH}{'dynamic'}; @@ -728,10 +732,6 @@ # --- dynamic Loading Sections --- my($self) = shift; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } ' all :: dynamic @@ -752,10 +752,6 @@ # --- Cleanup and Distribution Sections --- my($self, %attribs) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } my(@m,$dir); push(@m, ' # Delete temporary files but do not touch installed files. We don\'t delete @@ -795,10 +791,6 @@ sub realclean { my($self, %attribs) = @_; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } my(@m); push(@m,' # Delete temporary files (via clean) and also delete installed files @@ -832,10 +824,6 @@ sub rulez { my($self) = shift; - unless (ref $self){ - ExtUtils::MakeMaker::TieAtt::warndirectuse((caller(0))[3]); - $self = $ExtUtils::MakeMaker::Parent[-1]; - } qq' install install_static install_dynamic :: \t\$(MACPERL_SRC)PerlInstall -l \$(PERL_LIB) @@ -875,6 +863,18 @@ } } join "", @m; +} + +sub _include { # for Unix-style includes, with -I instead of -i + my($inc) = @_; + require File::Spec::Unix; + + # allow only relative paths + if (File::Spec::Unix->file_name_is_absolute($inc)) { + return ''; + } else { + return '-i ' . macify($inc); + } } 1; ==== //depot/macperl/lib/ExtUtils/MM_NW5.pm#6 (text) ==== Index: macperl/lib/ExtUtils/MM_NW5.pm --- macperl/lib/ExtUtils/MM_NW5.pm#5~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/ExtUtils/MM_NW5.pm Fri May 31 09:27:30 2002 @@ -23,7 +23,7 @@ use File::Basename; use vars qw(@ISA $VERSION); -$VERSION = '2.04_01'; +$VERSION = '2.05'; require ExtUtils::MM_Win32; @ISA = qw(ExtUtils::MM_Win32); @@ -107,8 +107,7 @@ push @m, "BOOT_SYMBOL = $self->{'BOOT_SYMBOL'}\n"; # If the final binary name is greater than 8 chars, - # truncate it here and rename it after creation - # otherwise, Watcom Linker fails + # truncate it here. if(length($self->{'BASEEXT'}) > 8) { $self->{'NLM_SHORT_NAME'} = substr($self->{'BASEEXT'},0,8); push @m, "NLM_SHORT_NAME = $self->{'NLM_SHORT_NAME'}\n"; @@ -327,13 +326,15 @@ MAKE_FRAG } - $m .= ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl 5.8.0 Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)'; + # Reconstruct the X.Y.Z version. + my $version = join '.', map { sprintf "%d", $_ } + $] =~ /(\d)\.(\d{3})(\d{2})/; + $m .= sprintf ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl %s Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)', $version; # Taking care of long names like FileHandle, ByteLoader, SDBM_File etc if($self->{NLM_SHORT_NAME}) { # In case of nlms with names exceeding 8 chars, build nlm in the - # current dir, rename and move to auto\lib. If we create in auto\lib - # in the first place, we can't rename afterwards. + # current dir, rename and move to auto\lib. $m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)} } else { $m .= q{ -o $(INST_AUTODIR)\\$(BASEEXT).$(DLEXT)} @@ -344,12 +345,10 @@ $m .= q{ $(PERL_INC)\Main.lib -commandfile $(BASEEXT).def}."\n"; - # If it is having a short name, rename it if($self->{NLM_SHORT_NAME}) { $m .= <<'MAKE_FRAG'; - if exist $(INST_AUTODIR)\$(BASEEXT).$(DLEXT) del $(INST_AUTODIR)\$(BASEEXT).$(DLEXT) - rename $(NLM_SHORT_NAME).$(DLEXT) $(BASEEXT).$(DLEXT) - move $(BASEEXT).$(DLEXT) $(INST_AUTODIR) + if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) + move $(NLM_SHORT_NAME).$(DLEXT) $(INST_AUTODIR) MAKE_FRAG } ==== //depot/macperl/lib/ExtUtils/MM_OS2.pm#3 (text) ==== Index: macperl/lib/ExtUtils/MM_OS2.pm --- macperl/lib/ExtUtils/MM_OS2.pm#2~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/ExtUtils/MM_OS2.pm Fri May 31 09:27:30 2002 @@ -6,7 +6,7 @@ use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -$VERSION = '1.02_01'; +$VERSION = '1.03'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; ==== //depot/macperl/lib/ExtUtils/MM_Unix.pm#7 (text) ==== Index: macperl/lib/ExtUtils/MM_Unix.pm --- macperl/lib/ExtUtils/MM_Unix.pm#6~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/MM_Unix.pm Fri May 31 09:27:30 2002 @@ -19,7 +19,7 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue); -$VERSION = '1.31_01'; +$VERSION = '1.32'; require ExtUtils::MM_Any; @ISA = qw(ExtUtils::MM_Any); ==== //depot/macperl/lib/ExtUtils/MM_VMS.pm#5 (text) ==== Index: macperl/lib/ExtUtils/MM_VMS.pm --- macperl/lib/ExtUtils/MM_VMS.pm#4~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/MM_VMS.pm Fri May 31 09:27:30 2002 @@ -14,7 +14,7 @@ use File::Basename; use File::Spec; use vars qw($Revision @ISA $VERSION); -($VERSION) = $Revision = '5.64_01'; +($VERSION) = $Revision = '5.65'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; ==== //depot/macperl/lib/ExtUtils/MM_Win32.pm#3 (text) ==== Index: macperl/lib/ExtUtils/MM_Win32.pm --- macperl/lib/ExtUtils/MM_Win32.pm#2~16230~ Sat Apr 27 14:50:45 2002 +++ macperl/lib/ExtUtils/MM_Win32.pm Fri May 31 09:27:30 2002 @@ -29,7 +29,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -$VERSION = '1.04_01'; +$VERSION = '1.05'; $ENV{EMXSHELL} = 'sh'; # to run `commands` ==== //depot/macperl/lib/ExtUtils/MakeMaker.pm#6 (text) ==== Index: macperl/lib/ExtUtils/MakeMaker.pm --- macperl/lib/ExtUtils/MakeMaker.pm#5~16825~ Mon May 27 15:55:07 2002 +++ macperl/lib/ExtUtils/MakeMaker.pm Fri May 31 09:27:30 2002 @@ -2,10 +2,10 @@ BEGIN {require 5.005_03;} -$VERSION = "5.96_01"; +$VERSION = "6.01"; $Version_OK = "5.49"; # Makefiles older than $Version_OK will die # (Will be checked from MakeMaker version 4.13 onwards) -($Revision = substr(q$Revision: 1.55 $, 10)) =~ s/\s+$//; +($Revision = substr(q$Revision: 1.59 $, 10)) =~ s/\s+$//; require Exporter; use Config; @@ -44,12 +44,81 @@ require ExtUtils::MY; my %att = @_; + + _verify_att(\%att); + my $mm = MM->new(\%att); $mm->flush; return $mm; } + +# Basic signatures of the attributes WriteMakefile takes. Each is +# the reference type. Any not noted simply take strings. +my %Att_Sigs = +( + C => 'array', + CONFIG => 'array', + CONFIGURE => 'code', + DIR => 'array', + DL_FUNCS => 'hash', + DL_VARS => 'array', + EXCLUDE_EXT=> 'array', + EXE_FILES => 'array', + FUNCLIST => 'array', + H => 'array', + IMPORTS => 'hash', + INCLUDE_EXT=> 'array', + LIBS => ['array','string'], + MAN1PODS => 'hash', + MAN3PODS => 'hash', + PL_FILES => 'hash', + PM => 'hash', + PMLIBDIRS => 'array', + PREREQ_PM => 'hash', + SKIP => 'array', + TYPEMAPS => 'array', + XS => 'hash', + + clean => 'hash', + depend => 'hash', + dist => 'hash', + dynamic_lib=> 'hash', + linkext => 'hash', + macro => 'hash', + realclean => 'hash', + test => 'hash', + tool_autosplit => 'hash', +); + +my %Default_Att = ( + string => '', + hash => {}, + array => [], + code => sub {} + ); + +sub _verify_att { + my($att) = @_; + + while( my($key, $val) = each %$att ) { + my $sig = $Att_Sigs{$key}; + my @sigs = ref $sig ? @$sig : ($sig || 'string'); + my $given = lc ref $val || 'string'; + unless( grep $given eq $_, @sigs ) { + my $takes = join " or ", map { $_ ne 'string' ? "$_ reference" + : "string/number" + } @sigs; + my $has = $given ne 'string' ? "$given reference" + : "string/number"; + warn "WARNING: $key takes a $takes not a $has.\n". + " Please inform the author.\n"; + $att->{$key} = $Default_Att{$sigs[0]}; + } + } +} + sub prompt ($;$) { my($mess,$def)=@_; $ISA_TTY = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ; # Pipe? @@ -1289,7 +1358,9 @@ =item IMPORTS This attribute is used to specify names to be imported into the -extension. It is only used on OS/2 and Win32. +extension. Takes a hash ref. + +It is only used on OS/2 and Win32. =item INC @@ -1426,7 +1497,7 @@ =item LDFROM -defaults to "$(OBJECT)" and is used in the ld command to specify +Defaults to "$(OBJECT)" and is used in the ld command to specify what files to link/load from (also see dynamic_lib below for how to specify ld flags) @@ -1817,7 +1888,7 @@ $VERSION = '1.00'; *VERSION = \'1.01'; - ( $VERSION ) = '$Revision: 1.55 $ ' =~ /\$Revision:\s+([^\s]+)/; + ( $VERSION ) = '$Revision: 1.59 $ ' =~ /\$Revision:\s+([^\s]+)/; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 ==== //depot/macperl/lib/ExtUtils/Manifest.pm#4 (text) ==== Index: macperl/lib/ExtUtils/Manifest.pm --- macperl/lib/ExtUtils/Manifest.pm#3~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/Manifest.pm Fri May 31 09:27:30 2002 @@ -12,7 +12,7 @@ $Is_MacOS $Is_VMS $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP); -$VERSION = 1.37_01; +$VERSION = 1.38; @ISA=('Exporter'); @EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck', 'skipcheck', 'maniread', 'manicopy'); ==== //depot/macperl/lib/ExtUtils/Mkbootstrap.pm#2 (text) ==== Index: macperl/lib/ExtUtils/Mkbootstrap.pm --- macperl/lib/ExtUtils/Mkbootstrap.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/ExtUtils/Mkbootstrap.pm Fri May 31 09:27:30 2002 @@ -1,6 +1,6 @@ package ExtUtils::Mkbootstrap; -$VERSION = 1.14_01; +$VERSION = 1.15; use Config; use Exporter; ==== //depot/macperl/lib/ExtUtils/Mksymlists.pm#3 (text) ==== Index: macperl/lib/ExtUtils/Mksymlists.pm --- macperl/lib/ExtUtils/Mksymlists.pm#2~16730~ Tue May 21 20:36:42 2002 +++ macperl/lib/ExtUtils/Mksymlists.pm Fri May 31 09:27:30 2002 @@ -11,7 +11,7 @@ use vars qw(@ISA @EXPORT $VERSION); @ISA = 'Exporter'; @EXPORT = '&Mksymlists'; -$VERSION = 1.18_00; +$VERSION = 1.19; sub Mksymlists { my(%spec) = @_; ==== //depot/macperl/lib/ExtUtils/t/MM_NW5.t#1 (text) ==== Index: macperl/lib/ExtUtils/t/MM_NW5.t --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/lib/ExtUtils/t/MM_NW5.t Fri May 31 09:27:30 2002 @@ -0,0 +1,324 @@ +#!/usr/bin/perl + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + } + else { + unshift @INC, 't/lib'; + } +} +chdir 't'; + + +use Test::More; + +BEGIN { + if ($^O =~ /NetWare/i) { + plan tests => 40; + } else { + plan skip_all => 'This is not NW5'; + } +} + +use Config; +use File::Spec; +use File::Basename; +use ExtUtils::MM; + +require_ok( 'ExtUtils::MM_NW5' ); + +# Dummy MM object until we have a real MM init method. +my $MM = bless { + DIR => [], + NOECHO => '@', + XS => {}, + MAKEFILE => 'Makefile', + RM_RF => 'rm -rf', + MV => 'mv', + }, 'MM'; + + +# replace_manpage_separator() => tr|/|.|s ? +{ + my $man = 'a/path/to//something'; + ( my $replaced = $man ) =~ tr|/|.|s; + is( $MM->replace_manpage_separator( $man ), + $replaced, 'replace_manpage_separator()' ); +} + +# maybe_command() +SKIP: { + skip( '$ENV{COMSPEC} not set', 2 ) + unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i; + my $comspec = $1; + is( $MM->maybe_command( $comspec ), + $comspec, 'COMSPEC is a maybe_command()' ); + ( my $comspec2 = $comspec ) =~ s|\..{3}$||; + like( $MM->maybe_command( $comspec2 ), + qr/\Q$comspec/i, + 'maybe_command() without extension' ); +} + +my $had_pathext = exists $ENV{PATHEXT}; +{ + local $ENV{PATHEXT} = '.exe'; + ok( ! $MM->maybe_command( 'not_a_command.com' ), + 'not a maybe_command()' ); +} +# Bug in Perl. local $ENV{FOO} won't delete the key afterward. +delete $ENV{PATHEXT} unless $had_pathext; + +# file_name_is_absolute() [Does not support UNC-paths] +{ + ok( $MM->file_name_is_absolute( 'SYS:/' ), + 'file_name_is_absolute()' ); + ok( ! $MM->file_name_is_absolute( 'some/path/' ), + 'not file_name_is_absolute()' ); + +} + +# find_perl() +# Should be able to find running perl... $^X is OK on NW5 +{ + my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t? + my( $perl, $path ) = fileparse( $my_perl ); + like( $MM->find_perl( $], [ $perl ], [ $path ] ), + qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' ); +} + +# catdir() (calls MM_NW5->canonpath) +{ + my @path_eg = qw( SYS trick dir/now_OK ); + + is( $MM->catdir( @path_eg ), + 'SYS\\trick\\dir\\now_OK', 'catdir()' ); + is( $MM->catdir( @path_eg ), + File::Spec->catdir( @path_eg ), + 'catdir() eq File::Spec->catdir()' ); + +# catfile() (calls MM_NW5->catdir) + push @path_eg, 'file.ext'; + + is( $MM->catfile( @path_eg ), + 'SYS\\trick\\dir\\now_OK\\file.ext', 'catfile()' ); + + is( $MM->catfile( @path_eg ), + File::Spec->catfile( @path_eg ), + 'catfile() eq File::Spec->catfile()' ); +} + +# init_others(): check if all keys are created and set? +# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NUL ) +{ + my $mm_w32 = bless( {}, 'MM' ); + $mm_w32->init_others(); + my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP + TEST_F LD AR LDLOADLIBS DEV_NULL ); + for my $key ( @keys ) { + ok( $mm_w32->{ $key }, "init_others: $key" ); + } +} + +# constants() +{ + my $mm_w32 = bless { + NAME => 'TestMM_NW5', + VERSION => '1.00', + VERSION_FROM => 'TestMM_NW5', + PM => { 'MM_NW5.pm' => 1 }, + }, 'MM'; + + # XXX Hack until we have a proper init method. + # Flesh out some necessary keys in the MM object. + foreach my $key (qw(XS C O_FILES H HTMLLIBPODS HTMLSCRIPTPODS + MAN1PODS MAN3PODS PARENT_NAME)) { + $mm_w32->{$key} = ''; + } + my $s_PM = join( " \\\n\t", sort keys %{$mm_w32->{PM}} ); + my $k_PM = join( " \\\n\t", %{$mm_w32->{PM}} ); + + like( $mm_w32->constants(), + qr|^NAME\ =\ TestMM_NW5\s+VERSION\ =\ 1\.00.+ + MAKEMAKER\ =\ \Q$INC{'ExtUtils/MakeMaker.pm'}\E\s+ + MM_VERSION\ =\ \Q$ExtUtils::MakeMaker::VERSION\E.+ + VERSION_FROM\ =\ TestMM_NW5.+ + TO_INST_PM\ =\ \Q$s_PM\E\s+ + PM_TO_BLIB\ =\ \Q$k_PM\E + |xs, 'constants()' ); + +} + +# path() +my $had_path = exists $ENV{PATH}; +{ + my @path_eg = ( qw( . .. ), 'SYS:\\Program Files' ); + local $ENV{PATH} = join ';', @path_eg; + ok( eq_array( [ $MM->path() ], [ @path_eg ] ), + 'path() [preset]' ); +} +# Bug in Perl. local $ENV{FOO} will not delete key afterwards. +delete $ENV{PATH} unless $had_path; + +# static_lib() should look into that +# dynamic_bs() should look into that +# dynamic_lib() should look into that + +# clean() +{ + my $clean = $Config{cc} =~ /^gcc/i ? 'dll.base dll.exp' : '*.pdb'; + like( $MM->clean(), qr/^clean ::\s+\Q-$(RM_F) $clean\E\s+$/m, + 'clean() Makefile target' ); +} + +# perl_archive() +{ + my $libperl = $Config{libperl} || 'libperl.a'; + is( $MM->perl_archive(), File::Spec->catfile('$(PERL_INC)', $libperl ), + 'perl_archive() should respect libperl setting' ); +} + +# export_list +{ + my $mm_w32 = bless { BASEEXT => 'someext' }, 'MM'; + is( $mm_w32->export_list(), 'someext.def', 'export_list()' ); +} + +# canonpath() +{ + my $path = 'SYS:/TEMP'; + is( $MM->canonpath( $path ), File::Spec->canonpath( $path ), + 'canonpath() eq File::Spec->canonpath' ); +} + +# perl_script() +my $script_ext = ''; +my $script_name = 'mm_w32tmp'; +SKIP: { + local *SCRIPT; + skip( "Can't create temp file: $!", 4 ) + unless open SCRIPT, "> $script_name"; + print SCRIPT <<'EOSCRIPT'; +#! perl +__END__ +EOSCRIPT + skip( "Can't write to temp file: $!", 4 ) + unless close SCRIPT; + # now start tests: + is( $MM->perl_script( $script_name ), + "${script_name}$script_ext", "perl_script ($script_ext)" ); + + skip( "Can't rename temp file: $!", 3 ) + unless rename $script_name, "${script_name}.pl"; + $script_ext = '.pl'; + is( $MM->perl_script( $script_name ), + "${script_name}$script_ext", "perl_script ($script_ext)" ); + + skip( "Can't rename temp file: $!", 2 ) + unless rename "${script_name}$script_ext", "${script_name}.bat"; + $script_ext = '.bat'; + is( $MM->perl_script( $script_name ), + "${script_name}$script_ext", "perl_script ($script_ext)" ); + + skip( "Can't rename temp file: $!", 1 ) + unless rename "${script_name}$script_ext", "${script_name}.noscript"; + $script_ext = '.noscript'; + + isnt( $MM->perl_script( $script_name ), + "${script_name}$script_ext", + "not a perl_script anymore ($script_ext)" ); + is( $MM->perl_script( $script_name ), undef, + "perl_script ($script_ext) returns empty" ); +} +unlink "${script_name}$script_ext" if -f "${script_name}$script_ext"; + + +# pm_to_blib() +{ + like( $MM->pm_to_blib(), + qr/^pm_to_blib: \Q$(TO_INST_PM)\E.+\Q$(TOUCH) \E\$@\s+$/ms, + 'pm_to_blib' ); +} + +# tool_autosplit() +{ + my %attribs = ( MAXLEN => 255 ); + like( $MM->tool_autosplit( %attribs ), + qr/^\#\ Usage:\ \$\(AUTOSPLITFILE\) + \ FileToSplit\ AutoDirToSplitInto.+ + AUTOSPLITFILE\ =\ \$\(PERLRUN\)\ .+ + \$AutoSplit::Maxlen=$attribs{MAXLEN}; + /xms, + 'tool_autosplit()' ); +} + +# tools_other() +{ + ( my $mm_w32 = bless { }, 'MM' )->init_others(); + + my $bin_sh = ( $Config{make} =~ /^dmake/i + ? "" : ($Config{sh} || 'cmd /c') . "\n" ); + $bin_sh = "SHELL = $bin_sh" if $bin_sh; + + my $tools = join "\n", map "$_ = $mm_w32->{ $_ }" + => qw(CHMOD CP LD MV NOOP RM_F RM_RF TEST_F TOUCH UMASK_NULL DEV_NULL); + + like( $mm_w32->tools_other(), + qr/^\Q$bin_sh$tools/m, + 'tools_other()' ); +}; + +# xs_o() should look into that +# top_targets() should look into that + +# manifypods() +{ + my $mm_w32 = bless { NOECHO => '' }, 'MM'; + like( $mm_w32->manifypods(), + qr/^\nmanifypods :\n\t\$\Q(NOOP)\E\n$/, + 'manifypods() Makefile target' ); +} + +# dist_ci() should look into that +# dist_core() should look into that + +# pasthru() +{ + my $pastru = "PASTHRU = " . ($Config{make} =~ /^nmake/i ? "-nologo" : ""); + is( $MM->pasthru(), $pastru, 'pasthru()' ); +} + +package FakeOut; + +sub TIEHANDLE { + bless(\(my $scalar), $_[0]); +} + +sub PRINT { + my $self = shift; + $$self .= shift; +} + +__END__ + +=head1 NAME + +MM_NW5.t - Tests for ExtUtils::MM_NW5 + +=head1 TODO + + - Methods to still be checked: + # static_lib() should look into that + # dynamic_bs() should look into that + # dynamic_lib() should look into that + # xs_o() should look into that + # top_targets() should look into that + # dist_ci() should look into that + # dist_core() should look into that + +=head1 AUTHOR + +20011228 Abe Timmerman <[email protected]> + +=cut ==== //depot/macperl/lib/ExtUtils/t/writemakefile_args.t#1 (text) ==== Index: macperl/lib/ExtUtils/t/writemakefile_args.t --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/lib/ExtUtils/t/writemakefile_args.t Fri May 31 09:27:30 2002 @@ -0,0 +1,100 @@ +#!/usr/bin/perl -w + +# This is a test of the verification of the arguments to +# WriteMakefile. + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use strict; +use Test::More tests => 12; + +use TieOut; +use MakeMaker::Test::Utils; + +use ExtUtils::MakeMaker; + +chdir 't'; + +perl_lib(); + +ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || + diag("chdir failed: $!"); + +{ + ok( my $stdout = tie *STDOUT, 'TieOut' ); + my $warnings = ''; + local $SIG{__WARN__} = sub { + $warnings .= join '', @_; + }; + + my $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + MAN3PODS => ' ', # common mistake + ); + + is( $warnings, <<VERIFY ); +WARNING: MAN3PODS takes a hash reference not a string/number. + Please inform the author. +VERIFY + is_deeply( $mm->{MAN3PODS}, {}, 'Wrong argument type corrected' ); + + $warnings = ''; + $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + AUTHOR => sub {}, + ); + + is( $warnings, <<VERIFY ); +WARNING: AUTHOR takes a string/number not a code reference. + Please inform the author. +VERIFY + + is_deeply( $mm->{AUTHOR}, '' ); + + + # LIBS accepts *both* a string or an array ref. The first cut of + # our verification did not take this into account. + $warnings = ''; + $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + LIBS => '-lwibble -lwobble', + ); + + # We'll get warnings about the bogus libs, that's ok. + unlike( $warnings, qr/WARNING: .* takes/ ); + is_deeply( $mm->{LIBS}, ['-lwibble -lwobble'] ); + + $warnings = ''; + $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + LIBS => ['-lwibble', '-lwobble'], + ); + + # We'll get warnings about the bogus libs, that's ok. + unlike( $warnings, qr/WARNING: .* takes/ ); + is_deeply( $mm->{LIBS}, ['-lwibble', '-lwobble'] ); + + $warnings = ''; + $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + LIBS => { wibble => "wobble" }, + ); + + # We'll get warnings about the bogus libs, that's ok. + like( $warnings, qr{^WARNING: LIBS takes a array reference or string/number not a hash reference}m ); + is_deeply( $mm->{LIBS}, [] ); + +} ==== //depot/macperl/lib/ExtUtils/testlib.pm#4 (text) ==== Index: macperl/lib/ExtUtils/testlib.pm --- macperl/lib/ExtUtils/testlib.pm#3~16825~ Mon May 27 15:55:07 2002 +++ macperl/lib/ExtUtils/testlib.pm Fri May 31 09:27:30 2002 @@ -1,5 +1,5 @@ package ExtUtils::testlib; -$VERSION = 1.14_01; +$VERSION = 1.15; use Cwd; use File::Spec; ==== //depot/macperl/lib/File/Spec/NW5.pm#1 (text) ==== Index: macperl/lib/File/Spec/NW5.pm --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/lib/File/Spec/NW5.pm Fri May 31 09:27:30 2002 @@ -0,0 +1,363 @@ +package File::Spec::NW5; + + +use Cwd; +use vars qw(@ISA $VERSION); +require File::Spec::Unix; + +$VERSION = '1.3'; + +@ISA = qw(File::Spec::Unix); + +=head1 NAME + +File::Spec::NW5 - methods for NW5 file specs + +=head1 SYNOPSIS + + require File::Spec::NW5; # Done internally by File::Spec if needed + +=head1 DESCRIPTION + +See File::Spec::Unix for a documentation of the methods provided +there. This package overrides the implementation of these methods, not +the semantics. + +=over 4 + +=item devnull + +Returns a string representation of the null device. + +=cut + +sub devnull { + return "nul"; +} + +=item tmpdir + +Returns a string representation of the first existing directory +from the following list: + + $ENV{TMPDIR} + $ENV{TEMP} + $ENV{TMP} + SYS:/temp + /tmp + / + +Since perl 5.8.0, if running under taint mode, and if the environment +variables are tainted, they are not used. + +=cut + +my $tmpdir; +sub tmpdir { + return $tmpdir if defined $tmpdir; + my $self = shift; + my @dirlist = (@ENV{qw(TMPDIR TEMP TMP)}, qw(SYS:/temp /tmp /)); + { + no strict 'refs'; + if (${"\cTAINT"}) { # Check for taint mode on perl >= 5.8.0 + require Scalar::Util; + @dirlist = grep { ! Scalar::Util::tainted $_ } @dirlist; + } + } + foreach (@dirlist) { + next unless defined && -d; + $tmpdir = $_; + last; + } + $tmpdir = '' unless defined $tmpdir; + $tmpdir = $self->canonpath($tmpdir); + return $tmpdir; +} + +sub case_tolerant { + return 1; +} + +sub file_name_is_absolute { + my ($self,$file) = @_; + return scalar($file =~ m{^([a-z]:)?[\\/]}is); +} + +=item catfile + +Concatenate one or more directory names and a filename to form a +complete path ending with a filename + +=cut + +sub catfile { + my $self = shift; + my $file = pop @_; + return $file unless @_; + my $dir = $self->catdir(@_); + $dir .= "\\" unless substr($dir,-1) eq "\\"; + return $dir.$file; +} + +sub path { + my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'}; + my @path = split(';',$path); + foreach (@path) { $_ = '.' if $_ eq '' } + return @path; +} + +=item canonpath + +No physical check on the filesystem, but a logical cleanup of a +path. On UNIX eliminated successive slashes and successive "/.". + +=cut + +sub canonpath { + my ($self,$path) = @_; + $path =~ s/^([a-z]:)/\u$1/s; + $path =~ s|/|\\|g; + $path =~ s|([^\\])\\+|$1\\|g; # xx\\\\xx -> xx\xx + $path =~ s|(\\\.)+\\|\\|g; # xx\.\.\xx -> xx\xx + $path =~ s|^(\.\\)+||s unless $path eq ".\\"; # .\xx -> xx + $path =~ s|\\\Z(?!\n)|| + unless $path =~ m#^([A-Z]:)?\\\Z(?!\n)#s; # xx\ -> xx + return $path; +} + +=item splitpath + + ($volume,$directories,$file) = File::Spec->splitpath( $path ); + ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file ); + +Splits a path in to volume, directory, and filename portions. Assumes that +the last file is a path unless the path ends in '\\', '\\.', '\\..' +or $no_file is true. On NW5 this means that $no_file true makes this return +( $volume, $path, undef ). + +Separators accepted are \ and /. + +Volumes can be drive letters or UNC sharenames (\\server\share). + +The results can be passed to L</catpath> to get back a path equivalent to +(usually identical to) the original path. + +=cut + +sub splitpath { + my ($self,$path, $nofile) = @_; + my ($volume,$directory,$file) = ('','',''); + if ( $nofile ) { + $path =~ + m{^( (?:[a-zA-Z]:|(?:\\\\|//)[^\\/]+[\\/][^\\/]+)? ) + (.*) + }xs; + $volume = $1; + $directory = $2; + } + else { + $path =~ + m{^ ( (?: [a-zA-Z]: | + (?:\\\\|//)[^\\/]+[\\/][^\\/]+ + )? + ) + ( (?:.*[\\\\/](?:\.\.?\Z(?!\n))?)? ) + (.*) + }xs; + $volume = $1; + $directory = $2; + $file = $3; + } + + return ($volume,$directory,$file); +} + + +=item splitdir + +The opposite of L<catdir()|File::Spec/catdir()>. + + @dirs = File::Spec->splitdir( $directories ); + +$directories must be only the directory portion of the path on systems +that have the concept of a volume or that have path syntax that differentiates +files from directories. + +Unlike just splitting the directories on the separator, leading empty and +trailing directory entries can be returned, because these are significant +on some OSs. So, + + File::Spec->splitdir( "/a/b/c" ); + +Yields: + + ( '', 'a', 'b', '', 'c', '' ) + +=cut + +sub splitdir { + my ($self,$directories) = @_ ; + # + # split() likes to forget about trailing null fields, so here we + # check to be sure that there will not be any before handling the + # simple case. + # + if ( $directories !~ m|[\\/]\Z(?!\n)| ) { + return split( m|[\\/]|, $directories ); + } + else { + # + # since there was a trailing separator, add a file name to the end, + # then do the split, then replace it with ''. + # + my( @directories )= split( m|[\\/]|, "${directories}dummy" ) ; + $directories[ $#directories ]= '' ; + return @directories ; + } +} + + +=item catpath + +Takes volume, directory and file portions and returns an entire path. Under +Unix, $volume is ignored, and this is just like catfile(). On other OSs, +the $volume become significant. + +=cut + +sub catpath { + my ($self,$volume,$directory,$file) = @_; + + # If it's UNC, make sure the glue separator is there, reusing + # whatever separator is first in the $volume + $volume .= $1 + if ( $volume =~ m@^([\\/])[\\/][^\\/]+[\\/][^\\/]+\Z(?!\n)@s && + $directory =~ m@^[^\\/]@s + ) ; + + $volume .= $directory ; + + # If the volume is not just A:, make sure the glue separator is + # there, reusing whatever separator is first in the $volume if possible. + if ( $volume !~ m@^[a-zA-Z]:\Z(?!\n)@s && + $volume =~ m@[^\\/]\Z(?!\n)@ && + $file =~ m@[^\\/]@ + ) { + $volume =~ m@([\\/])@ ; + my $sep = $1 ? $1 : '\\' ; + $volume .= $sep ; + } + + $volume .= $file ; + + return $volume ; +} + + +sub abs2rel { + my($self,$path,$base) = @_; + + # Clean up $path + if ( ! $self->file_name_is_absolute( $path ) ) { + $path = $self->rel2abs( $path ) ; + } + else { + $path = $self->canonpath( $path ) ; + } + + # Figure out the effective $base and clean it up. + if ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + else { + $base = $self->canonpath( $base ) ; + } + + # Split up paths + my ( undef, $path_directories, $path_file ) = + $self->splitpath( $path, 1 ) ; + + my $base_directories = ($self->splitpath( $base, 1 ))[1] ; + + # Now, remove all leading components that are the same + my @pathchunks = $self->splitdir( $path_directories ); + my @basechunks = $self->splitdir( $base_directories ); + + while ( @pathchunks && + @basechunks && + lc( $pathchunks[0] ) eq lc( $basechunks[0] ) + ) { + shift @pathchunks ; + shift @basechunks ; + } + + # No need to catdir, we know these are well formed. + $path_directories = CORE::join( '\\', @pathchunks ); + $base_directories = CORE::join( '\\', @basechunks ); + + # $base_directories now contains the directories the resulting relative + # path must ascend out of before it can descend to $path_directory. So, + # replace all names with $parentDir + + #FA Need to replace between backslashes... + $base_directories =~ s|[^\\]+|..|g ; + + # Glue the two together, using a separator if necessary, and preventing an + # empty result. + + #FA Must check that new directories are not empty. + if ( $path_directories ne '' && $base_directories ne '' ) { + $path_directories = "$base_directories\\$path_directories" ; + } else { + $path_directories = "$base_directories$path_directories" ; + } + + return $self->canonpath( + $self->catpath( "", $path_directories, $path_file ) + ) ; +} + + +sub rel2abs { + my ($self,$path,$base ) = @_; + + if ( ! $self->file_name_is_absolute( $path ) ) { + + if ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + else { + $base = $self->canonpath( $base ) ; + } + + my ( $path_directories, $path_file ) = + ($self->splitpath( $path, 1 ))[1,2] ; + + my ( $base_volume, $base_directories ) = + $self->splitpath( $base, 1 ) ; + + $path = $self->catpath( + $base_volume, + $self->catdir( $base_directories, $path_directories ), + $path_file + ) ; + } + + return $self->canonpath( $path ) ; +} + +=back + +=head1 SEE ALSO + +L<File::Spec> + +=cut + +1; ==== //depot/macperl/lib/File/Spec/Unix.pm#3 (text) ==== Index: macperl/lib/File/Spec/Unix.pm --- macperl/lib/File/Spec/Unix.pm#2~16475~ Tue May 7 21:31:10 2002 +++ macperl/lib/File/Spec/Unix.pm Fri May 31 09:27:30 2002 @@ -317,7 +317,8 @@ Takes volume, directory and file portions and returns an entire path. Under Unix, $volume is ignored, and directory and file are catenated. A '/' is -inserted if need be. On other OSs, $volume is significant. +inserted if needed (though if the directory portion doesn't start with +'/' it is not added). On other OSs, $volume is significant. =cut ==== //depot/macperl/lib/File/stat.t#4 (text) ==== Index: macperl/lib/File/stat.t --- macperl/lib/File/stat.t#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/File/stat.t Fri May 31 09:27:30 2002 @@ -1,4 +1,4 @@ -0#!./perl +#!./perl BEGIN { chdir 't' if -d 't'; ==== //depot/macperl/lib/Math/BigFloat.pm#2 (text) ==== Index: macperl/lib/Math/BigFloat.pm --- macperl/lib/Math/BigFloat.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigFloat.pm Fri May 31 09:27:30 2002 @@ -1,7 +1,7 @@ package Math::BigFloat; # -# Mike grinned. 'Two down, infinity to go' - Mike Nostrus in Before and After +# Mike grinned. 'Two down, infinity to go' - Mike Nostrus in 'Before and After' # # The following hash values are internally used: @@ -12,7 +12,7 @@ # _p: precision # _f: flags, used to signal MBI not to touch our private parts -$VERSION = '1.31'; +$VERSION = '1.32'; require 5.005; use Exporter; use File::Spec; @@ -440,7 +440,6 @@ # return result as BFLOAT my ($self,$x,$y,$a,$p,$r) = objectify(2,@_); - #print "mbf badd $x $y\n"; # inf and NaN handling if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/)) { @@ -678,7 +677,7 @@ $next = $over->copy()->bdiv($below->copy()->bmul($factor),$scale); last if $next->bcmp($limit) <= 0; $x->badd($next); - # print "step $steps $x\n"; + # print "step $x\n"; # calculate things for the next term $over *= $u; $below *= $v; $factor->badd($f); #$steps++; @@ -1199,7 +1198,6 @@ { $x->bsqrt(); $x->bmul($xc); $d->bdec(); # 1 } - print "at $x\n"; } # assume fraction ends in 1 $x->bsqrt(); # 1 @@ -1337,7 +1335,7 @@ return $x->bone() if $y->is_zero(); return $x if $x->is_one() || $y->is_one(); - return $x->_pow2($y,$a,$p,$r) if !$y->is_int(); # non-integer power + return $x->_pow($y,$a,$p,$r) if !$y->is_int(); # non-integer power my $y1 = $y->as_number(); # make bigint # if ($x == -1) ==== //depot/macperl/lib/Math/BigInt.pm#2 (text) ==== Index: macperl/lib/Math/BigInt.pm --- macperl/lib/Math/BigInt.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt.pm Fri May 31 09:27:30 2002 @@ -18,7 +18,7 @@ my $class = "Math::BigInt"; require 5.005; -$VERSION = '1.56'; +$VERSION = '1.57'; use Exporter; @ISA = qw( Exporter ); @EXPORT_OK = qw( objectify _swap bgcd blcm); @@ -1292,6 +1292,7 @@ return $self->_div_inf($x,$y) if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/) || $y->is_zero()); + #print "mbi bdiv $x $y\n"; return $upgrade->bdiv($upgrade->new($x),$y,@r) if defined $upgrade && !$y->isa($self); @@ -1355,6 +1356,9 @@ $x->round(@r); } +############################################################################### +# modulus functions + sub bmod { # modulus (or remainder) @@ -1394,6 +1398,97 @@ $x; } +sub bmodinv_not_yet_implemented + { + # modular inverse. given a number which is (hopefully) relatively + # prime to the modulus, calculate its inverse using Euclid's + # alogrithm. if the number is not relatively prime to the modulus + # (i.e. their gcd is not one) then NaN is returned. + + my ($self,$num,$mod,@r) = objectify(2,@_); + + return $num if $num->modify('bmodinv'); + + return $num->bnan() + if ($mod->{sign} ne '+' # -, NaN, +inf, -inf + || $num->is_zero() # or num == 0 + || $num->{sign} !~ /^[+-]$/ # or num NaN, inf, -inf + ); +# return $num # i.e., NaN or some kind of infinity, +# if ($num->{sign} =~ /\w/); + + # the remaining case, nonpositive case, $num < 0, is addressed below. + + my ($u, $u1) = ($self->bzero(), $self->bone()); + my ($a, $b) = ($mod->copy(), $num->copy()); + + # put least residue into $b if $num was negative + $b %= $mod if $b->{sign} eq '-'; + + # Euclid's Algorithm + while( ! $b->is_zero()) { + ($a, my $q, $b) = ($b, $self->bdiv( $a->copy(), $b)); + ($u, $u1) = ($u1, $u - $u1 * $q); + } + + # if the gcd is not 1, then return NaN! It would be pointless to + # have called bgcd first, because we would then be performing the + # same Euclidean Algorithm *twice* + return $self->bnan() unless $a->is_one(); + + $u %= $mod; + return $u; + } + +sub bmodpow_not_yet_implemented + { + # takes a very large number to a very large exponent in a given very + # large modulus, quickly, thanks to binary exponentation. supports + # negative exponents. + my ($self,$num,$exp,$mod,@r) = objectify(3,@_); + + return $num if $num->modify('bmodpow'); + + # check modulus for valid values + return $num->bnan() if ($mod->{sign} ne '+' # NaN, - , -inf, +inf + || $mod->is_zero()); + + # check exponent for valid values + if ($exp->{sign} =~ /\w/) + { + # i.e., if it's NaN, +inf, or -inf... + return $num->bnan(); + } + elsif ($exp->{sign} eq '-') + { + $exp->babs(); + $num->bmodinv ($mod); + return $num if $num->{sign} !~ /^[+-]/; # i.e. if there was no inverse + } + + # check num for valid values + return $num->bnan() if $num->{sign} !~ /^[+-]$/; + + # in the trivial case, + return $num->bzero() if $mod->is_one(); + return $num->bone() if $num->is_zero() or $num->is_one(); + + my $acc = $num->copy(); $num->bone(); # keep ref to $num + + print "$num $acc $exp\n"; + while( !$exp->is_zero() ) { + if( $exp->is_odd() ) { + $num->bmul($acc)->bmod($mod); + } + $acc->bmul($acc)->bmod($mod); + $exp->brsft( 1, 2); # remove last (binary) digit + print "$num $acc $exp\n"; + } + return $num; + } + +############################################################################### + sub bfac { # (BINT or num_str, BINT or num_str) return BINT @@ -2097,6 +2192,7 @@ ${"$a[0]::downgrade"} = undef; } + my $up = ${"$a[0]::upgrade"}; # print "Now in objectify, my class is today $a[0]\n"; if ($count == 0) { @@ -2107,7 +2203,7 @@ { $k = $a[0]->new($k); } - elsif (ref($k) ne $a[0]) + elsif (!defined $up && ref($k) ne $a[0]) { # foreign object, try to convert to integer $k->can('as_number') ? $k = $k->as_number() : $k = $a[0]->new($k); @@ -2125,7 +2221,7 @@ { $k = $a[0]->new($k); } - elsif (ref($k) ne $a[0]) + elsif (!defined $up && ref($k) ne $a[0]) { # foreign object, try to convert to integer $k->can('as_number') ? $k = $k->as_number() : $k = $a[0]->new($k); @@ -2147,7 +2243,6 @@ my @a; my $l = scalar @_; for ( my $i = 0; $i < $l ; $i++ ) { -# print "at $_[$i]\n"; if ($_[$i] eq ':constant') { # this causes overlord er load to step in @@ -2171,7 +2266,6 @@ push @a, $_[$i]; } } -# print "a @a\n"; # any non :constant stuff is handled by our parent, Exporter # even if @_ is empty, to give it a chance $self->SUPER::import(@a); # need it for subclasses @@ -2515,6 +2609,7 @@ # return (quo,rem) or quo if scalar $x->bmod($y); # modulus (x % y) + $x->bpow($y); # power of arguments (x ** y) $x->blsft($y); # left shift $x->brsft($y); # right shift @@ -2834,6 +2929,39 @@ =head2 bmod $x->bmod($y); # modulus (x % y) + +=head2 bmodinv + +Not yet implemented. + + bmodinv($num,$mod); # modular inverse (no OO style) + +Returns the inverse of C<$num> in the given modulus C<$mod>. 'C<NaN>' is +returned unless C<$num> is relatively prime to C<$mod>, i.e. unless +C<bgcd($num, $mod)==1>. + +=head2 bmodpow + +Not yet implemented. + + bmodpow($num,$exp,$mod); # modular exponentation ($num**$exp % $mod) + +Returns the value of C<$num> taken to the power C<$exp> in the modulus +C<$mod> using binary exponentation. C<bmodpow> is far superior to +writing + + $num ** $exp % $mod + +because C<bmodpow> is much faster--it reduces internal variables into +the modulus whenever possible, so it operates on smaller numbers. + +C<bmodpow> also supports negative exponents. + + bmodpow($num, -1, $mod) + +is exactly equivalent to + + bmodinv($num, $mod) =head2 bpow ==== //depot/macperl/lib/Math/BigInt/Calc.pm#2 (text) ==== Index: macperl/lib/Math/BigInt/Calc.pm --- macperl/lib/Math/BigInt/Calc.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/Calc.pm Fri May 31 09:27:30 2002 @@ -8,7 +8,7 @@ use vars qw/@ISA $VERSION/; @ISA = qw(Exporter); -$VERSION = '0.27'; +$VERSION = '0.28'; # Package to store unsigned big integers in decimal and do math with them @@ -485,9 +485,11 @@ } # since multiplying $x with $x fails, make copy in this case - $yv = [@$xv] if "$xv" eq "$yv"; # same references? + $yv = [@$xv] if $xv == $yv; # same references? +# $yv = [@$xv] if "$xv" eq "$yv"; # same references? + # since multiplying $x with $x would fail here, use the faster squaring -# return _square($c,$xv) if "$xv" eq "$yv"; # same reference? +# return _square($c,$xv) if $xv == $yv; # same reference? if ($LEN_CONVERT != 0) { @@ -565,9 +567,10 @@ # since multiplying $x with $x fails, make copy in this case - $yv = [@$xv] if "$xv" eq "$yv"; # same references? + $yv = [@$xv] if $xv == $yv; # same references? +# $yv = [@$xv] if "$xv" eq "$yv"; # same references? # since multiplying $x with $x would fail here, use the faster squaring -# return _square($c,$xv) if "$xv" eq "$yv"; # same reference? +# return _square($c,$xv) if $xv == $yv; # same reference? if ($LEN_CONVERT != 0) { @@ -642,7 +645,7 @@ return $x; } - my $y = [ @$yorg ]; + my $y = [ @$yorg ]; # always make copy to preserve if ($LEN_CONVERT != 0) { $c->_to_small($x); $c->_to_small($y); @@ -782,7 +785,7 @@ return $x; } - my $y = [ @$yorg ]; + my $y = [ @$yorg ]; # always make copy to preserve if ($LEN_CONVERT != 0) { $c->_to_small($x); $c->_to_small($y); @@ -1571,6 +1574,16 @@ $x; } +sub _modinv + { + # inverse modulus + } + +sub _modpow + { + # modulus of power ($x ** $y) % $z + } + ############################################################################## ############################################################################## @@ -1674,6 +1687,8 @@ _gcd(obj,obj) return Greatest Common Divisor of two objects _zeros(obj) return number of trailing decimal zeros + _modinv return inverse modulus + _modpow return modulus of power ($x ** $y) % $z Input strings come in as unsigned but with prefix (i.e. as '123', '0xabc' or '0b1101'). ==== //depot/macperl/lib/Math/BigInt/t/bare_mbf.t#2 (text) ==== Index: macperl/lib/Math/BigInt/t/bare_mbf.t --- macperl/lib/Math/BigInt/t/bare_mbf.t#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/bare_mbf.t Fri May 31 09:27:30 2002 @@ -8,6 +8,7 @@ $| = 1; # to locate the testing files my $location = $0; $location =~ s/bare_mbf.t//i; + print "$0\n"; if ($ENV{PERL_CORE}) { # testing with the core distribution ==== //depot/macperl/lib/Math/BigInt/t/bigfltpm.inc#2 (text) ==== Index: macperl/lib/Math/BigInt/t/bigfltpm.inc --- macperl/lib/Math/BigInt/t/bigfltpm.inc#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/bigfltpm.inc Fri May 31 09:27:30 2002 @@ -4,7 +4,7 @@ while (<DATA>) { - chop; + chomp; $_ =~ s/#.*$//; # remove comments $_ =~ s/\s+$//; # trailing spaces next if /^$/; # skip empty lines & comments ==== //depot/macperl/lib/Math/BigInt/t/bigintpm.inc#2 (text) ==== Index: macperl/lib/Math/BigInt/t/bigintpm.inc --- macperl/lib/Math/BigInt/t/bigintpm.inc#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/bigintpm.inc Fri May 31 09:27:30 2002 @@ -40,7 +40,7 @@ while (<DATA>) { - chop; + chomp; next if /^#/; # skip comments if (s/^&//) { @@ -163,9 +163,18 @@ $try .= "\$x ^ \$y;"; }elsif ($f eq "bpow"){ $try .= "\$x ** \$y;"; + } elsif( $f eq "bmodinv") { + $try .= "\$x->bmodinv(\$y);"; }elsif ($f eq "digit"){ $try .= "\$x->digit(\$y);"; - } else { warn "Unknown op '$f'"; } + } else { + $try .= "\$z = $class->new(\"$args[2]\");"; + + # Functions with three arguments + if( $f eq "bmodpow") { + $try .= "\$x->bmodpow(\$y,\$z);"; + } else { warn "Unknown op '$f'"; } + } } # end else all other ops $ans1 = eval $try; @@ -1311,6 +1320,42 @@ 14:3:4 # bug in Calc with '99999' vs $BASE-1 10000000000000000000000000000000000000000000000000000000000000000000000000000000000:10000000375084540248994272022843165711074:999999962491547381984643365663244474111576 +#&bmodinv +## format: number:modulus:result +## bmodinv Data errors +#abc:abc:NaN +#abc:5:NaN +#5:abc:NaN +## bmodinv Expected Results from normal use +#1:5:1 +#3:5:2 +#-2:5:2 +#324958749843759385732954874325984357439658735983745:2348249874968739:1741662881064902 +## bmodinv Error cases / useless use of function +#3:-5:NaN +#inf:5:NaN +#&bmodpow +## format: number:exponent:modulus:result +## bmodpow Data errors +#abc:abc:abc:NaN +#5:abc:abc:NaN +#abc:5:abc:NaN +#abc:abc:5:NaN +#5:5:abc:NaN +#5:abc:5:NaN +#abc:5:5:NaN +## bmodpow Expected results +#0:0:2:1 +#1:0:2:1 +#0:0:1:0 +#8:7:5032:3840 +#8:-1:5033:4404 +#98436739867439843769485798542749827593285729587325:43698764986460981048259837659386739857456983759328457:6943857329857295827698367:3104744730915914415259518 +## bmodpow Error cases +#8:8:-5:NaN +#8:-1:16:NaN +#inf:5:13:NaN +#5:inf:13:NaN &bmod # inf handling, see table in doc 0:inf:0 ==== //depot/macperl/lib/Math/BigInt/t/calling.t#2 (text) ==== Index: macperl/lib/Math/BigInt/t/calling.t --- macperl/lib/Math/BigInt/t/calling.t#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/calling.t Fri May 31 09:27:30 2002 @@ -63,7 +63,7 @@ my ($func,@args,$ans,$rc,$class,$try); while (<DATA>) { - chop; + chomp; next if /^#/; # skip comments if (s/^&//) { ==== //depot/macperl/lib/Math/BigInt/t/mbi_rand.t#2 (text) ==== Index: macperl/lib/Math/BigInt/t/mbi_rand.t --- macperl/lib/Math/BigInt/t/mbi_rand.t#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/mbi_rand.t Fri May 31 09:27:30 2002 @@ -13,33 +13,35 @@ my $location = $0; $location =~ s/mbi_rand.t//; unshift @INC, $location; # to locate the testing files chdir 't' if -d 't'; - $count = 500; + $count = 128; plan tests => $count*2; } use Math::BigInt; my $c = 'Math::BigInt'; -my $length = 200; +my $length = 128; # If you get a failure here, please re-run the test with the printed seed # value as input: perl t/mbi_rand.t seed my $seed = int(rand(65537)); print "# seed: $seed\n"; srand($seed); -my ($A,$B,$ADB,$AMB,$la,$lb); +my ($A,$B,$As,$Bs,$ADB,$AMB,$la,$lb); +my $two = Math::BigInt->new(2); for (my $i = 0; $i < $count; $i++) { # length of A and B $la = int(rand($length)+1); $lb = int(rand($length)+1); - $A = ''; $B = ''; + $As = ''; $Bs = ''; # we create the numbers from "patterns", e.g. get a random number and a # random count and string them together. This means things like # "100000999999999999911122222222" are much more likely. If we just strung # together digits, we would end up with "1272398823211223" etc. - while (length($A) < $la) { $A .= int(rand(100)) x int(rand(16)); } - while (length($B) < $lb) { $B .= int(rand(100)) x int(rand(16)); } - $A = $c->new($A); $B = $c->new($B); + while (length($As) < $la) { $As .= int(rand(100)) x int(rand(16)); } + while (length($Bs) < $lb) { $Bs .= int(rand(100)) x int(rand(16)); } + $As =~ s/^0+//; $Bs =~ s/^0+//; + $A = $c->new($As); $B = $c->new($Bs); # print "# A $A\n# B $B\n"; if ($A->is_zero() || $B->is_zero()) { @@ -49,11 +51,11 @@ # $X = ($A/$B)*$B + 2 * ($A % $B) - ($A % $B); ($ADB,$AMB) = $A->copy()->bdiv($B); print "# ". join(' ',Math::BigInt::Calc->_base_len()),"\n" - unless ok ($ADB*$B+2*$AMB-$AMB,$A); + unless ok ($ADB*$B+$two*$AMB-$AMB,$As); # swap 'em and try this, too # $X = ($B/$A)*$A + $B % $A; ($ADB,$AMB) = $B->copy()->bdiv($A); print "# ". join(' ',Math::BigInt::Calc->_base_len()),"\n" - unless ok ($ADB*$A+2*$AMB-$AMB,$B); + unless ok ($ADB*$A+$two*$AMB-$AMB,$Bs); } ==== //depot/macperl/lib/Math/BigInt/t/mbimbf.inc#2 (text) ==== Index: macperl/lib/Math/BigInt/t/mbimbf.inc --- macperl/lib/Math/BigInt/t/mbimbf.inc#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/mbimbf.inc Fri May 31 09:27:30 2002 @@ -596,7 +596,7 @@ my $CALC = Math::BigInt->config()->{lib}; while (<DATA>) { - chop; + chomp; next if /^\s*(#|$)/; # skip comments and empty lines if (s/^&//) { ==== //depot/macperl/lib/Math/BigInt/t/upgrade.inc#2 (text) ==== Index: macperl/lib/Math/BigInt/t/upgrade.inc --- macperl/lib/Math/BigInt/t/upgrade.inc#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigInt/t/upgrade.inc Fri May 31 09:27:30 2002 @@ -52,7 +52,7 @@ while (<DATA>) { - chop; + chomp; next if /^#/; # skip comments if (s/^&//) { ==== //depot/macperl/lib/Math/BigRat.pm#2 (text) ==== Index: macperl/lib/Math/BigRat.pm --- macperl/lib/Math/BigRat.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigRat.pm Fri May 31 09:27:30 2002 @@ -21,7 +21,7 @@ @ISA = qw(Exporter Math::BigFloat); @EXPORT_OK = qw(); -$VERSION = '0.05'; +$VERSION = '0.06'; use overload; # inherit from Math::BigFloat @@ -38,6 +38,7 @@ my $nan = 'NaN'; my $class = 'Math::BigRat'; +my $MBI = 'Math::BigInt'; sub isa { @@ -56,7 +57,7 @@ #print "f $f caller", join(' ',caller()),"\n"; $self->{_n} = $f->{_m}->copy(); # mantissa - $self->{_d} = Math::BigInt->bone(); + $self->{_d} = $MBI->bone(); $self->{sign} = $f->{sign}; $self->{_n}->{sign} = '+'; if ($f->{_e}->{sign} eq '-') { @@ -82,17 +83,21 @@ my $self = { }; bless $self,$class; -# print "ref ",ref($d),"\n"; -# if (ref($d)) +# print "ref ",ref($n),"\n"; +# if (ref($n)) # { -# print "isa float ",$d->isa('Math::BigFloat'),"\n"; -# print "isa int ",$d->isa('Math::BigInt'),"\n"; -# print "isa rat ",$d->isa('Math::BigRat'),"\n"; +# print "isa float " if $n->isa('Math::BigFloat'); +# print "isa int " if $n->isa('Math::BigInt'); +# print "isa rat " if $n->isa('Math::BigRat'); +# print "isa lite " if $n->isa('Math::BigInt::Lite'); +# } +# else +# { +# print "scalar $n\n"; # } - # input like (BigInt,BigInt) or (BigFloat,BigFloat) not handled yet - if ((ref $n) && (!$n->isa('Math::BigRat'))) + if ((!defined $d) && (ref $n) && (!$n->isa('Math::BigRat'))) { # print "is ref, but not rat\n"; if ($n->isa('Math::BigFloat')) @@ -102,17 +107,16 @@ } if ($n->isa('Math::BigInt')) { -# print "is ref, and int\n"; $self->{_n} = $n->copy(); # "mantissa" = $n - $self->{_d} = Math::BigInt->bone(); + $self->{_d} = $MBI->bone(); $self->{sign} = $self->{_n}->{sign}; $self->{_n}->{sign} = '+'; return $self->bnorm(); } if ($n->isa('Math::BigInt::Lite')) { # print "is ref, and lite\n"; - $self->{_n} = Math::BigInt->new($$n); # "mantissa" = $n - $self->{_d} = Math::BigInt->bone(); + $self->{_n} = $MBI->new($$n); # "mantissa" = $n + $self->{_d} = $MBI->bone(); $self->{sign} = $self->{_n}->{sign}; $self->{_n}->{sign} = '+'; return $self->bnorm(); } @@ -123,8 +127,8 @@ if (!defined $n) { - $self->{_n} = Math::BigInt->bzero(); # undef => 0 - $self->{_d} = Math::BigInt->bone(); + $self->{_n} = $MBI->bzero(); # undef => 0 + $self->{_d} = $MBI->bone(); $self->{sign} = '+'; return $self->bnorm(); } @@ -153,8 +157,8 @@ } else { - $self->{_n} = Math::BigInt->new($n); - $self->{_d} = Math::BigInt->new($d); + $self->{_n} = $MBI->new($n); + $self->{_d} = $MBI->new($d); return $self->bnan() if $self->{_n}->is_nan() || $self->{_d}->is_nan(); # inf handling is missing here @@ -175,8 +179,8 @@ } else { - $self->{_n} = Math::BigInt->new($n); - $self->{_d} = Math::BigInt->bone(); + $self->{_n} = $MBI->new($n); + $self->{_d} = $MBI->bone(); $self->{sign} = $self->{_n}->{sign}; $self->{_n}->{sign} = '+'; } $self->bnorm(); @@ -221,6 +225,12 @@ # don't reduce again) my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_); + # both parts must be BigInt's + die ("n is not $MBI but (".ref($x->{_n}).')') + if ref($x->{_n}) ne $MBI; + die ("d is not $MBI but (".ref($x->{_d}).')') + if ref($x->{_d}) ne $MBI; + # this is to prevent automatically rounding when MBI's globals are set $x->{_d}->{_f} = MB_NEVER_ROUND; $x->{_n}->{_f} = MB_NEVER_ROUND; @@ -228,16 +238,22 @@ $x->{_d}->{_a} = undef; $x->{_n}->{_a} = undef; $x->{_d}->{_p} = undef; $x->{_n}->{_p} = undef; +# print "$x->{sign} $x->{_n} / $x->{_d} => "; + + # no normalize for NaN, inf etc. + return $x if $x->{sign} !~ /^[+-]$/; + # normalize zeros to 0/1 if (($x->{sign} =~ /^[+-]$/) && ($x->{_n}->is_zero())) { $x->{sign} = '+'; # never -0 - $x->{_d} = Math::BigInt->bone() unless $x->{_d}->is_one(); + $x->{_d} = $MBI->bone() unless $x->{_d}->is_one(); return $x; } -# print "$x->{_n} / $x->{_d} => "; + return $x if $x->{_d}->is_one(); + # reduce other numbers # print "bgcd $x->{_n} (",ref($x->{_n}),") $x->{_d} (",ref($x->{_d}),")\n"; # disable upgrade in BigInt, otherwise deep recursion @@ -246,8 +262,10 @@ if (!$gcd->is_one()) { +# print "normalize $x->{_d} / $x->{_n} => "; $x->{_n}->bdiv($gcd); $x->{_d}->bdiv($gcd); +# print "$x->{_d} / $x->{_n}\n"; } # print "$x->{_n} / $x->{_d}\n"; $x; @@ -296,8 +314,13 @@ # add two rationals my ($self,$x,$y,$a,$p,$r) = objectify(2,@_); - $x = $class->new($x) unless $x->isa($class); - $y = $class->new($y) unless $y->isa($class); +# print "rat badd\n"; +# print "ref($x) = ",ref($x),"\n"; +# print "ref($y) = ",ref($y),"\n"; + $x = $self->new($x) unless $x->isa($self); + $y = $self->new($y) unless $y->isa($self); +# print "ref($x) = ",ref($x),"\n"; +# print "ref($y) = ",ref($y),"\n"; return $x->bnan() if ($x->{sign} eq 'NaN' || $y->{sign} eq 'NaN'); @@ -411,6 +434,7 @@ $x = $class->new($x) unless $x->isa($class); $y = $class->new($y) unless $y->isa($class); +# print "rat bdiv $x $y ",ref($x)," ",ref($y),"\n"; return $self->_div_inf($x,$y) if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/) || $y->is_zero()); @@ -425,10 +449,13 @@ $x->{_n}->bmul($y->{_d}); $x->{_d}->bmul($y->{_n}); +# print "result $x->{_d} $x->{_n}\n"; # compute new sign $x->{sign} = $x->{sign} eq $y->{sign} ? '+' : '-'; $x->bnorm()->round($a,$p,$r); +# print "result $x->{_d} $x->{_n}\n"; + $x; } ############################################################################## @@ -709,13 +736,85 @@ $t; } -#sub import -# { -# my $self = shift; -# Math::BigInt->import(@_); -# $self->SUPER::import(@_); # need it for subclasses -# #$self->export_to_level(1,$self,@_); # need this ? -# } +sub import + { + my $self = shift; + my $l = scalar @_; + my $lib = ''; my @a; + for ( my $i = 0; $i < $l ; $i++) + { +# print "at $_[$i] (",$_[$i+1]||'undef',")\n"; + if ( $_[$i] eq ':constant' ) + { + # this rest causes overlord er load to step in + # print "overload @_\n"; + overload::constant float => sub { $self->new(shift); }; + } +# elsif ($_[$i] eq 'upgrade') +# { +# # this causes upgrading +# $upgrade = $_[$i+1]; # or undef to disable +# $i++; +# } + elsif ($_[$i] eq 'downgrade') + { + # this causes downgrading + $downgrade = $_[$i+1]; # or undef to disable + $i++; + } + elsif ($_[$i] eq 'lib') + { + $lib = $_[$i+1] || ''; # default Calc + $i++; + } + elsif ($_[$i] eq 'with') + { + $MBI = $_[$i+1] || 'Math::BigInt'; # default Math::BigInt + $i++; + } + else + { + push @a, $_[$i]; + } + } + # let use Math::BigInt lib => 'GMP'; use Math::BigFloat; still work + my $mbilib = eval { Math::BigInt->config()->{lib} }; + if ((defined $mbilib) && ($MBI eq 'Math::BigInt')) + { + # MBI already loaded + $MBI->import('lib',"$lib,$mbilib", 'objectify'); + } + else + { + # MBI not loaded, or with ne "Math::BigInt" + $lib .= ",$mbilib" if defined $mbilib; + +# my @parts = split /::/, $MBI; # Math::BigInt => Math BigInt +# my $file = pop @parts; $file .= '.pm'; # BigInt => BigInt.pm +# $file = File::Spec->catfile (@parts, $file); + + if ($] < 5.006) + { + # Perl < 5.6.0 dies with "out of memory!" when eval() and ':constant' is + # used in the same script, or eval inside import(). + my @parts = split /::/, $MBI; # Math::BigInt => Math BigInt + my $file = pop @parts; $file .= '.pm'; # BigInt => BigInt.pm + $file = File::Spec->catfile (@parts, $file); + eval { require $file; $MBI->import( lib => '$lib', 'objectify' ); } + } + else + { + my $rc = "use $MBI lib => '$lib', 'objectify';"; + eval $rc; + } + } + die ("Couldn't load $MBI: $! $@") if $@; + + # any non :constant stuff is handled by our parent, Exporter + # even if @_ is empty, to give it a chance + $self->SUPER::import(@a); # for subclasses + $self->export_to_level(1,$self,@a); # need this, too + } 1; @@ -763,7 +862,11 @@ =head1 METHODS -=head2 new +Any method not listed here is dervied from Math::BigFloat (or +Math::BigInt), so make sure you check these two modules for further +information. + +=head2 new() $x = Math::BigRat->new('1/3'); @@ -774,29 +877,58 @@ $x = Math::BigRat->new('1 / 0.1'); # w/ floats $x = Math::BigRat->new(Math::BigInt->new(3)); # BigInt $x = Math::BigRat->new(Math::BigFloat->new('3.1')); # BigFloat + $x = Math::BigRat->new(Math::BigInt::Lite->new('2')); # BigLite -=head2 numerator +=head2 numerator() $n = $x->numerator(); Returns a copy of the numerator (the part above the line) as signed BigInt. -=head2 denominator +=head2 denominator() $d = $x->denominator(); Returns a copy of the denominator (the part under the line) as positive BigInt. -=head2 parts +=head2 parts() ($n,$d) = $x->parts(); Return a list consisting of (signed) numerator and (unsigned) denominator as BigInts. +=head2 as_number() + +Returns a copy of the object as BigInt by truncating it to integer. + +=head2 bfac()/blog() + +Are not yet implemented. + +=head2 bround()/round()/bfround() + +Are not yet implemented. + + =head1 BUGS -None know yet. Please see also L<Math::BigInt>. +=over 2 + +=item perl -Mbigrat -le 'print 1 + 2/3' + +This produces wrongly NaN. It is unclear why. The following variants all work: + + perl -Mbigrat -le 'print 1/3 + 2/3' + perl -Mbigrat -le 'print 1/3 + 2' + +This also does not work: + + perl -Mbigrat -le 'print 1+3+1/2' + +=back + +Please see also L<Math::BigInt>. =head1 LICENSE ==== //depot/macperl/lib/Math/BigRat/t/bigrat.t#2 (xtext) ==== Index: macperl/lib/Math/BigRat/t/bigrat.t --- macperl/lib/Math/BigRat/t/bigrat.t#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Math/BigRat/t/bigrat.t Fri May 31 09:27:30 2002 @@ -8,12 +8,19 @@ $| = 1; chdir 't' if -d 't'; unshift @INC, '../lib'; # for running manually - plan tests => 61; + plan tests => 83; } # testing of Math::BigRat use Math::BigRat; +use Math::BigInt; +use Math::BigFloat; + +# shortcuts +my $cr = 'Math::BigRat'; +my $mbi = 'Math::BigInt'; +my $mbf = 'Math::BigFloat'; my ($x,$y,$z); @@ -23,27 +30,38 @@ ok (!$x->isa('Math::BigInt')); ############################################################################## -# new - -$x = Math::BigRat->new(1234); ok ($x,1234); -$x = Math::BigRat->new('1234/1'); ok ($x,1234); -$x = Math::BigRat->new('1234/2'); ok ($x,617); +# new and bnorm() -$x = Math::BigRat->new('100/1.0'); ok ($x,100); -$x = Math::BigRat->new('10.0/1.0'); ok ($x,10); -$x = Math::BigRat->new('0.1/10'); ok ($x,'1/100'); -$x = Math::BigRat->new('0.1/0.1'); ok ($x,'1'); -$x = Math::BigRat->new('1e2/10'); ok ($x,10); -$x = Math::BigRat->new('1e2/1e1'); ok ($x,10); -$x = Math::BigRat->new('1 / 3'); ok ($x,'1/3'); -$x = Math::BigRat->new('-1 / 3'); ok ($x,'-1/3'); -$x = Math::BigRat->new('NaN'); ok ($x,'NaN'); -$x = Math::BigRat->new('inf'); ok ($x,'inf'); -$x = Math::BigRat->new('-inf'); ok ($x,'-inf'); -$x = Math::BigRat->new('1/'); ok ($x,'NaN'); - -# input ala '1+1/3' isn't parsed ok yet -$x = Math::BigRat->new('1+1/3'); ok ($x,'NaN'); +foreach my $func (qw/new bnorm/) + { + $x = $cr->$func(1234); ok ($x,1234); + + $x = $cr->$func('1234/1'); ok ($x,1234); + $x = $cr->$func('1234/2'); ok ($x,617); + + $x = $cr->$func('100/1.0'); ok ($x,100); + $x = $cr->$func('10.0/1.0'); ok ($x,10); + $x = $cr->$func('0.1/10'); ok ($x,'1/100'); + $x = $cr->$func('0.1/0.1'); ok ($x,'1'); + $x = $cr->$func('1e2/10'); ok ($x,10); + $x = $cr->$func('1e2/1e1'); ok ($x,10); + $x = $cr->$func('1 / 3'); ok ($x,'1/3'); + $x = $cr->$func('-1 / 3'); ok ($x,'-1/3'); + $x = $cr->$func('NaN'); ok ($x,'NaN'); + $x = $cr->$func('inf'); ok ($x,'inf'); + $x = $cr->$func('-inf'); ok ($x,'-inf'); + $x = $cr->$func('1/'); ok ($x,'NaN'); + + # input ala '1+1/3' isn't parsed ok yet + $x = $cr->$func('1+1/3'); ok ($x,'NaN'); + + ############################################################################ + # other classes as input + + $x = $cr->$func($mbi->new(1231)); ok ($x,'1231'); + $x = $cr->$func($mbf->new(1232)); ok ($x,'1232'); + $x = $cr->$func($mbf->new(1232.3)); ok ($x,'12323/10'); + } ############################################################################## # mixed arguments ==== //depot/macperl/lib/Net/ChangeLog.libnet#2 (text) ==== Index: macperl/lib/Net/ChangeLog.libnet --- macperl/lib/Net/ChangeLog.libnet#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Net/ChangeLog.libnet Fri May 31 09:27:30 2002 @@ -1,3 +1,22 @@ +Change 727 on 2002/05/28 by <[email protected]> (Graham Barr) + + Net::SMTP + - Use Authen::SASL to do auth + +Change 724 on 2002/05/24 by <[email protected]> (Graham Barr) + + Net::SMTP + - Minor change to address sanitize code, mainly to allow <> + +Change 723 on 2002/05/24 by <[email protected]> (Graham Barr) + + Net::FTP + - Minor change to pattern to extract unique filename from server response + +Change 717 on 2002/04/02 by <[email protected]> (Graham Barr) + + Release 1.11 + Change 716 on 2002/04/02 by <[email protected]> (Graham Barr) Net::FTP::dataconn ==== //depot/macperl/lib/Net/FTP.pm#2 (text) ==== Index: macperl/lib/Net/FTP.pm --- macperl/lib/Net/FTP.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Net/FTP.pm Fri May 31 09:27:30 2002 @@ -22,7 +22,7 @@ use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC); # use AutoLoader qw(AUTOLOAD); -$VERSION = "2.64"; # $Id: //depot/libnet/Net/FTP.pm#67 $ +$VERSION = "2.65"; # $Id: //depot/libnet/Net/FTP.pm#68 $ @ISA = qw(Exporter Net::Cmd IO::Socket::INET); # Someday I will "use constant", when I am not bothered to much about @@ -756,7 +756,7 @@ $sock->close() or return undef; - if ('STOU' eq uc $cmd and $ftp->message =~ m/unique\ file\ name:(.*)\)|"(.*)"/) + if ('STOU' eq uc $cmd and $ftp->message =~ m/unique\s+file\s*name\s*:\s*(.*)\)|"(.*)"/) { require File::Basename; $remote = File::Basename::basename($+) @@ -1710,6 +1710,6 @@ =for html <hr> -I<$Id: //depot/libnet/Net/FTP.pm#67 $> +I<$Id: //depot/libnet/Net/FTP.pm#68 $> =cut ==== //depot/macperl/lib/Net/SMTP.pm#2 (text) ==== Index: macperl/lib/Net/SMTP.pm --- macperl/lib/Net/SMTP.pm#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/lib/Net/SMTP.pm Fri May 31 09:27:30 2002 @@ -16,7 +16,7 @@ use Net::Cmd; use Net::Config; -$VERSION = "2.22"; # $Id: //depot/libnet/Net/SMTP.pm#23 $ +$VERSION = "2.24"; # $Id: //depot/libnet/Net/SMTP.pm#25 $ @ISA = qw(Net::Cmd IO::Socket::INET); @@ -94,29 +94,52 @@ $self->_ETRN(@_); } -sub auth { # auth(username, password) by mengwong 20011106. the only supported mechanism at this time is PLAIN. - # - # my $auth = $smtp->supports("AUTH"); - # $smtp->auth("username", "password") or die $smtp->message; - # +sub auth { + my ($self, $username, $password) = @_; require MIME::Base64; - - my $self = shift; - my ($username, $password) = @_; - die "auth(username, password)" if not length $username; + require Authen::SASL; my $mechanisms = $self->supports('AUTH',500,["Command unknown: 'AUTH'"]); return unless defined $mechanisms; - if (not grep { uc $_ eq "PLAIN" } split ' ', $mechanisms) { - $self->set_status(500, ["PLAIN mechanism not supported; server supports $mechanisms"]); - return; + my $sasl; + + if (ref($username) and UNIVERSAL::isa($username,'Authen::SASL')) { + $sasl = $username; + $sasl->mechanism($mechanisms); + } + else { + die "auth(username, password)" if not length $username; + $sasl = Authen::SASL->new(mechanism=> $mechanisms, + callback => { user => $username, + pass => $password, + authname => $username, + }); + } + + # We should probably allow the user to pass the host, but I don't + # currently know and SASL mechanisms that are used by smtp that need it + my $client = $sasl->client_new('smtp',${*$self}{'net_smtp_host'},0); + my $str = $client->client_start; + # We dont support sasl mechanisms that encrypt the socket traffic. + # todo that we would really need to change the ISA hierarchy + # so we dont inherit from IO::Socket, but instead hold it in an attribute + + my @cmd = ("AUTH", $client->mechanism, MIME::Base64::encode_base64($str,'')); + my $code; + + while (($code = $self->command(@cmd)->response()) == CMD_MORE) { + @cmd = (MIME::Base64::encode_base64( + $client->client_step( + MIME::Base64::decode_base64( + ($self->message)[0] + ) + ), '' + )); } - my $authstring = MIME::Base64::encode_base64(join "\0", ($username)x2, $password); - $authstring =~ s/\n//g; # wrap long lines - $self->_AUTH("PLAIN $authstring"); + $code == CMD_OK; } sub hello @@ -156,20 +179,13 @@ return; } -sub _addr -{ - my $addr = shift || ""; - - return $1 - if $addr =~ /(<[^>]+>)/so; - - $addr =~ s/\n/ /sog; - $addr =~ s/(\A\s+|\s+\Z)//sog; - - return "<" . $addr . ">"; +sub _addr { + my $addr = shift; + $addr = "" unless defined $addr; + $addr =~ s/^\s*<?\s*|\s*>?\s*$//sg; + "<$addr>"; } - sub mail { my $me = shift; @@ -537,9 +553,7 @@ =item auth ( USERNAME, PASSWORD ) -Attempt SASL authentication. At this time only the PLAIN mechanism is supported. - -At some point in the future support for using Authen::SASL will be added +Attempt SASL authentication. =item mail ( ADDRESS [, OPTIONS] ) @@ -631,6 +645,15 @@ =back +=head1 ADDRESSES + +All methods that accept addresses expect the address to be a valid rfc2821-quoted address, although +Net::SMTP will accept accept the address surrounded by angle brackets. + + funny user@domain WRONG + "funny user"@domain RIGHT, recommended + <"funny user"@domain> OK + =head1 SEE ALSO L<Net::Cmd> @@ -647,6 +670,6 @@ =for html <hr> -I<$Id: //depot/libnet/Net/SMTP.pm#23 $> +I<$Id: //depot/libnet/Net/SMTP.pm#25 $> =cut ==== //depot/macperl/lib/Test/Harness.pm#8 (text) ==== Index: macperl/lib/Test/Harness.pm --- macperl/lib/Test/Harness.pm#7~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/Test/Harness.pm Fri May 31 09:27:30 2002 @@ -1,5 +1,5 @@ # -*- Mode: cperl; cperl-indent-level: 4 -*- -# $Id: Harness.pm,v 1.31 2002/05/18 20:19:06 schwern Exp $ +# $Id: Harness.pm,v 1.33 2002/05/29 23:02:48 schwern Exp $ package Test::Harness; @@ -22,7 +22,7 @@ $Have_Devel_Corestack = 0; -$VERSION = '2.23'; +$VERSION = '2.24'; $ENV{HARNESS_ACTIVE} = 1; @@ -159,13 +159,6 @@ 1..0 # Skipped: no leverage found -If you don't have any comment on skipping, just print C<1..0> with -nothing after it. Test::Harness will say something like this: - -op/64bitint..............skipped - skipped: no reason given - - =item B<Todo tests> If the standard output line contains the substring C< # TODO> after @@ -462,7 +455,8 @@ $tot{files}++; $Strap->{_seen_header} = 0; - my %results = $Strap->analyze_file($tfile); + my %results = $Strap->analyze_file($tfile) or + do { warn "$Strap->{error}\n"; next }; # state of the current test. my @failed = grep { !$results{details}[$_-1]{ok} } @@ -502,11 +496,11 @@ print "$test{ml}ok\n ".join(', ', @msg)."\n"; } elsif ($test{max}) { print "$test{ml}ok\n"; - } elsif (defined $test{skip_all}) { + } elsif (length $test{skip_all}) { print "skipped\n all skipped: $test{skip_all}\n"; $tot{skipped}++; } else { - print "\n skipped test on this platform\n"; + print "skipped\n all skipped: no reason given\n"; $tot{skipped}++; } $tot{good}++; ==== //depot/macperl/lib/Test/Harness/Changes#6 (text) ==== Index: macperl/lib/Test/Harness/Changes --- macperl/lib/Test/Harness/Changes#5~16825~ Mon May 27 15:55:07 2002 +++ macperl/lib/Test/Harness/Changes Fri May 31 09:27:30 2002 @@ -1,5 +1,11 @@ Revision history for Perl extension Test::Harness +2.24 Wed May 29 19:02:18 EDT 2002 + * Nikola Knezevic found a bug when tests are completely skipped + but no reason is given it was considered a failure. + * Made Test::Harness::Straps->analyze_file & Test::Harness a bit + more graceful when the test doesn't exist. + 2.23 Wed May 22 12:59:47 EDT 2002 - reason for all skip wasn't being displayed. Broken in 2.20. - Changed the wait status tests to conform with POSIX standards. ==== //depot/macperl/lib/Test/Harness/Straps.pm#8 (text) ==== Index: macperl/lib/Test/Harness/Straps.pm --- macperl/lib/Test/Harness/Straps.pm#7~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/Test/Harness/Straps.pm Fri May 31 09:27:30 2002 @@ -1,12 +1,12 @@ # -*- Mode: cperl; cperl-indent-level: 4 -*- -# $Id: Straps.pm,v 1.6 2002/05/17 23:04:11 schwern Exp $ +# $Id: Straps.pm,v 1.8 2002/05/29 23:02:48 schwern Exp $ package Test::Harness::Straps; use strict; use vars qw($VERSION); use Config; -$VERSION = '0.11'; +$VERSION = '0.12'; use Test::Harness::Assert; use Test::Harness::Iterator; @@ -150,7 +150,7 @@ $totals{skip_all} = $self->{skip_all} if defined $self->{skip_all}; - my $passed = $totals{skip_all} || + my $passed = !$totals{max} || ($totals{max} && $totals{seen} && $totals{max} == $totals{seen} && $totals{max} == $totals{ok}); @@ -257,6 +257,16 @@ sub analyze_file { my($self, $file) = @_; + unless( -e $file ) { + $self->{error} = "$file does not exist"; + return; + } + + unless( -r $file ) { + $self->{error} = "$file is not readable"; + return; + } + local $ENV{PERL5LIB} = $self->_INC2PERL5LIB; # Is this necessary anymore? @@ -315,8 +325,11 @@ my $s = ''; $s .= " $ENV{'HARNESS_PERL_SWITCHES'}" if exists $ENV{'HARNESS_PERL_SWITCHES'}; - $s .= qq[ "-$1" ] if $first =~ /^#!.*\bperl.*\s-\w*([Tt]+)/; - $s .= join " ", map {qq["-I$_"]} $self->_filtered_INC; + + # When taint mode is on, PERL5LIB is ignored. So we need to put + # all that on the command line as -Is. + $s .= join " ", qq[ "-$1"], map {qq["-I$_"]} $self->_filtered_INC + if $first =~ /^#!.*\bperl.*\s-\w*([Tt]+)/; close(TEST) or print "can't close $file. $!\n"; @@ -443,7 +456,8 @@ if( my($max, $extra) = $line =~ /^1\.\.(\d+)(.*)/ ) { $self->{max} = $max; assert( $self->{max} >= 0, 'Max # of tests looks right' ); - if( defined $extra ) { + + if( defined $extra ) { my($todo, $skip, $reason) = $extra =~ /$Extra_Header_Re/xo; $self->{todo} = { map { $_ => 1 } split /\s+/, $todo } if $todo; ==== //depot/macperl/lib/Test/Harness/t/callback.t#3 (text) ==== Index: macperl/lib/Test/Harness/t/callback.t --- macperl/lib/Test/Harness/t/callback.t#2~16868~ Wed May 29 22:39:51 2002 +++ macperl/lib/Test/Harness/t/callback.t Fri May 31 09:27:30 2002 @@ -10,11 +10,7 @@ } } -use File::Spec::Functions; - -my $SAMPLE_TESTS = $ENV{PERL_CORE} - ? catdir(curdir(), 'lib', 'sample-tests') - : catdir(curdir(), 't', 'sample-tests'); +my $SAMPLE_TESTS = $ENV{PERL_CORE} ? 'lib/sample-tests' : 't/sample-tests'; use Test::More; @@ -32,8 +28,9 @@ simple => [qw( header test test test test test )], simple_fail => [qw( header test test test test test )], 'skip' => [qw( header test test test test test )], - skip_all => [qw( header )], - skip_no_msg => [qw( header test )], + skipall => [qw( header )], + skipall_nomsg => [qw( header )], + skip_nomsg => [qw( header test )], taint => [qw( header test )], 'todo' => [qw( header test test test test test )], todo_inline => [qw( header test test test )], @@ -53,7 +50,7 @@ while( my($test, $expect) = each %samples ) { local @out = (); - $strap->analyze_file(catfile($SAMPLE_TESTS, $test)); + $strap->analyze_file("$SAMPLE_TESTS/$test"); is_deeply(\@out, $expect, "$test callback"); } ==== //depot/macperl/lib/Test/Harness/t/strap-analyze.t#8 (text) ==== Index: macperl/lib/Test/Harness/t/strap-analyze.t --- macperl/lib/Test/Harness/t/strap-analyze.t#7~16868~ Wed May 29 22:39:51 2002 +++ macperl/lib/Test/Harness/t/strap-analyze.t Fri May 31 09:27:30 2002 @@ -10,19 +10,11 @@ } } -use File::Spec::Functions; - -my $SAMPLE_TESTS = $ENV{PERL_CORE} - ? catdir(curdir(), 'lib', 'sample-tests') - : catdir(curdir(), 't', 'sample-tests'); +my $SAMPLE_TESTS = $ENV{PERL_CORE} ? 'lib/sample-tests' : 't/sample-tests'; use strict; use Test::More; -if ($^O eq 'MacOS') { - plan skip_all => "Exit status broken on Mac OS"; -} - my $IsVMS = $^O eq 'VMS'; # VMS uses native, not POSIX, exit codes. @@ -239,7 +231,28 @@ ] }, - skip_all => { + 'skip_nomsg' => { + passing => 1, + + 'exit' => 0, + 'wait' => 0, + + max => 1, + seen => 1, + + 'ok' => 1, + 'todo' => 0, + 'skip' => 1, + bonus => 0, + + details => [ { 'ok' => 1, actual_ok => 1, + type => 'skip', + reason => '', + }, + ] + }, + + skipall => { passing => 1, 'exit' => 0, @@ -257,6 +270,23 @@ details => [], }, + skipall_nomsg => { + passing => 1, + + 'exit' => 0, + 'wait' => 0, + + max => 0, + seen => 0, + + 'ok' => 0, + 'todo' => 0, + 'skip' => 0, + bonus => 0, + + details => [], + }, + 'todo' => { passing => 1, @@ -406,7 +436,7 @@ }, ); -plan tests => (keys(%samples) * 3) + 1; +plan tests => (keys(%samples) * 3) + 3; use_ok('Test::Harness::Straps'); @@ -425,7 +455,7 @@ } my $strap = Test::Harness::Straps->new; - my %results = $strap->analyze_file(catfile($SAMPLE_TESTS, $test)); + my %results = $strap->analyze_file("$SAMPLE_TESTS/$test"); is_deeply($results{details}, $expect->{details}, "$test details" ); @@ -439,3 +469,8 @@ is_deeply(\%results, $expect, " the rest $test" ); } + + +my $strap = Test::Harness::Straps->new; +ok( !$strap->analyze_file('I_dont_exist') ); +is( $strap->{error}, "I_dont_exist does not exist" ); ==== //depot/macperl/lib/Test/Harness/t/test-harness.t#8 (text) ==== Index: macperl/lib/Test/Harness/t/test-harness.t --- macperl/lib/Test/Harness/t/test-harness.t#7~16868~ Wed May 29 22:39:51 2002 +++ macperl/lib/Test/Harness/t/test-harness.t Fri May 31 09:27:30 2002 @@ -10,11 +10,7 @@ } } -use File::Spec::Functions; - -my $SAMPLE_TESTS = $ENV{PERL_CORE} - ? catdir(curdir(), 'lib', 'sample-tests') - : catdir(curdir(), 't', 'sample-tests'); +my $SAMPLE_TESTS = $ENV{PERL_CORE} ? "lib/sample-tests" : "t/sample-tests"; use strict; @@ -40,10 +36,9 @@ use Test::More; my $IsVMS = $^O eq 'VMS'; -my $IsMacOS = $^O eq 'MacOS'; # VMS uses native, not POSIX, exit codes. -my $die_estat = $IsVMS ? 44 : $IsMacOS ? 0 : 1; +my $die_estat = $IsVMS ? 44 : 1; my %samples = ( simple => { @@ -162,6 +157,22 @@ failed => { }, all_ok => 1, }, + 'skip_nomsg' => { + total => { + bonus => 0, + max => 1, + 'ok' => 1, + files => 1, + bad => 0, + good => 1, + tests => 1, + sub_skipped=> 1, + 'todo' => 0, + skipped => 0, + }, + failed => { }, + all_ok => 1, + }, bailout => 0, combined => { total => { @@ -233,7 +244,23 @@ }, all_ok => 0, }, - skip_all => { + skipall => { + total => { + bonus => 0, + max => 0, + 'ok' => 0, + files => 1, + bad => 0, + good => 1, + tests => 1, + sub_skipped=> 0, + 'todo' => 0, + skipped => 1, + }, + failed => { }, + all_ok => 1, + }, + skipall_nomsg => { total => { bonus => 0, max => 0, @@ -399,7 +426,7 @@ select NULL; # _run_all_tests() isn't as quiet as it should be. local $SIG{__WARN__} = sub { $warning .= join '', @_; }; ($totals, $failed) = - Test::Harness::_run_all_tests(catfile($SAMPLE_TESTS, $test)); + Test::Harness::_run_all_tests("$SAMPLE_TESTS/$test"); }; select STDOUT; @@ -417,7 +444,7 @@ is_deeply( {map { $_=>$totals->{$_} } keys %{$expect->{total}}}, $expect->{total}, "$test - totals" ); - is_deeply( {map { $_=>$failed->{catfile($SAMPLE_TESTS, $test)}{$_} } + is_deeply( {map { $_=>$failed->{"$SAMPLE_TESTS/$test"}{$_} } keys %{$expect->{failed}}}, $expect->{failed}, "$test - failed" ); ==== //depot/macperl/lib/blib.t#4 (text) ==== Index: macperl/lib/blib.t --- macperl/lib/blib.t#3~16875~ Thu May 30 04:48:05 2002 +++ macperl/lib/blib.t Fri May 31 09:27:30 2002 @@ -6,6 +6,7 @@ } use strict; +use File::Spec; my($blib, $blib_arch, $blib_lib, @blib_dirs); sub _cleanup { @@ -51,13 +52,26 @@ my $warnings = ''; local $SIG{__WARN__} = sub { $warnings = join '', @_ }; use_ok('blib'); - is( $warnings, '', 'use blib is niiiice and quiet' ); + is( $warnings, '', 'use blib is nice and quiet' ); } is( @INC, 3, '@INC now has 3 elements' ); is( $INC[2], '../lib', 'blib added to the front of @INC' ); -ok( grep(m|$blib_lib$|, @INC[0,1]) == 1, ' blib/lib in @INC'); -ok( grep(m|$blib_arch$|, @INC[0,1]) == 1, ' blib/arch in @INC'); +if ($^O eq 'VMS') { + # Unix syntax is accepted going in but it's not what comes out + # So we don't use catdir above + $blib_arch = 'blib.arch]'; + $blib_lib = 'blib.lib]'; +} +elsif ($^O ne 'MacOS') +{ + $blib_arch = File::Spec->catdir("blib","arch"); + $blib_lib = File::Spec->catdir("blib","lib"); +} + + +ok( grep(m|\Q$blib_lib\E$|, @INC[0,1]) == 1, " $blib_lib in \@INC"); +ok( grep(m|\Q$blib_arch\E$|, @INC[0,1]) == 1, " $blib_arch in \@INC"); END { _cleanup( @blib_dirs ); } ==== //depot/macperl/lib/charnames.pm#4 (text) ==== Index: macperl/lib/charnames.pm --- macperl/lib/charnames.pm#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/charnames.pm Fri May 31 09:27:30 2002 @@ -16,7 +16,7 @@ # Convenience. 'LF' => 'LINE FEED (LF)', 'FF' => 'FORM FEED (FF)', - 'CR' => 'CARRIAGE RETURN (LF)', + 'CR' => 'CARRIAGE RETURN (CR)', 'NEL' => 'NEXT LINE (NEL)', # More convenience. For futher convencience, # it is suggested some way using using the NamesList @@ -235,8 +235,19 @@ $txt = do "unicore/Name.pl" unless $txt; - if ($txt =~ m/^([0-9A-F]+)\t\t($arg)$/m) { - return $vianame{$arg} = hex $1; + my $pos = index $txt, "\t\t$arg\n"; + if ($[ <= $pos) { + my $posLF = rindex $txt, "\n", $pos; + (my $code = substr $txt, $posLF + 1, 6) =~ tr/\t//d; + return $vianame{$arg} = hex $code; + + # If $pos is at the 1st line, $posLF must be $[ - 1 (not found); + # then $posLF + 1 equals to $[ (at the beginning of $txt). + # Otherwise $posLF is the position of "\n"; + # then $posLF + 1 must be the position of the next to "\n" + # (the beginning of the line). + # substr($txt, $posLF + 1, 6) may be "0000\t\t", "00A1\t\t", + # "10300\t", "100000", etc. So we can get the code via removing TAB. } else { return; } ==== //depot/macperl/lib/charnames.t#4 (text) ==== Index: macperl/lib/charnames.t --- macperl/lib/charnames.t#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/lib/charnames.t Fri May 31 09:27:30 2002 @@ -173,14 +173,28 @@ print "not " unless "\N{NULL}" eq "\c@"; print "ok 25\n"; -print "not " unless "\N{LINE FEED (LF)}" eq "\n"; -print "ok 26\n"; +if ($^O eq 'MacOS') +{ + print "not " unless "\N{CARRIAGE RETURN (CR)}" eq "\n"; + print "ok 26\n"; -print "not " unless "\N{LINE FEED}" eq "\n"; -print "ok 27\n"; + print "not " unless "\N{CARRIAGE RETURN}" eq "\n"; + print "ok 27\n"; -print "not " unless "\N{LF}" eq "\n"; -print "ok 28\n"; + print "not " unless "\N{CR}" eq "\n"; + print "ok 28\n"; +} +else +{ + print "not " unless "\N{LINE FEED (LF)}" eq "\n"; + print "ok 26\n"; + + print "not " unless "\N{LINE FEED}" eq "\n"; + print "ok 27\n"; + + print "not " unless "\N{LF}" eq "\n"; + print "ok 28\n"; +} my $nel = ord("A") == 193 ? qr/^(?:\x15|\x25)$/ : qr/^\x85$/; ==== //depot/macperl/makedef.pl#8 (text) ==== Index: macperl/makedef.pl --- macperl/makedef.pl#7~16730~ Tue May 21 20:36:42 2002 +++ macperl/makedef.pl Fri May 31 09:27:30 2002 @@ -1275,6 +1275,8 @@ Perl_sv_catsv Perl_sv_catpvn Perl_sv_2pv + nw_freeenviron + Remove_Thread_Ctx )) { try_symbol($symbol); ==== //depot/macperl/os2/os2ish.h#3 (text) ==== Index: macperl/os2/os2ish.h --- macperl/os2/os2ish.h#2~16870~ Wed May 29 23:06:34 2002 +++ macperl/os2/os2ish.h Fri May 31 09:27:30 2002 @@ -382,7 +382,7 @@ # define HAS_BOOL 1 #endif -extern int* _fd_flags(int fd); /* where's the real prototype of this? */ +#include <emx/io.h> /* for _fd_flags() prototype */ static inline bool _PERLIO_IS_BINMODE_FD(int fd) ==== //depot/macperl/patchlevel.h#8 (text) ==== Index: macperl/patchlevel.h --- macperl/patchlevel.h#7~16870~ Wed May 29 23:06:34 2002 +++ macperl/patchlevel.h Fri May 31 09:27:30 2002 @@ -79,7 +79,7 @@ #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static char *local_patches[] = { NULL - ,"DEVEL16859" + ,"DEVEL16924" ,NULL }; ==== //depot/macperl/perlio.c#7 (text) ==== Index: macperl/perlio.c --- macperl/perlio.c#6~16825~ Mon May 27 15:55:07 2002 +++ macperl/perlio.c Fri May 31 09:27:30 2002 @@ -2388,6 +2388,14 @@ * stdio as a layer */ +#if defined(VMS) && !defined(STDIO_BUFFER_WRITABLE) +/* perl5.8 - This ensures the last minute VMS ungetc fix is not + broken by the last second glibc 2.3 fix + */ +#define STDIO_BUFFER_WRITABLE +#endif + + typedef struct { struct _PerlIO base; FILE *stdio; /* The stream */ @@ -2639,6 +2647,7 @@ SSize_t unread = 0; FILE *s = PerlIOSelf(f, PerlIOStdio)->stdio; +#ifdef STDIO_BUFFER_WRITABLE if (PerlIO_fast_gets(f) && PerlIO_has_base(f)) { STDCHAR *buf = ((STDCHAR *) vbuf) + count; STDCHAR *base = PerlIO_get_base(f); @@ -2658,7 +2667,9 @@ PerlSIO_clearerr(s); } } - else if (PerlIO_has_cntptr(f)) { + else +#endif + if (PerlIO_has_cntptr(f)) { /* We can get pointer to buffer but not its base Do ungetc() but check chars are ending up in the buffer @@ -2852,6 +2863,8 @@ return EOF; #if (defined(STDIO_PTR_LVALUE) && (defined(STDIO_CNT_LVALUE) || defined(STDIO_PTR_LVAL_SETS_CNT))) + +#ifdef STDIO_BUFFER_WRITABLE if (PerlIO_fast_gets(f) && PerlIO_has_base(f)) { /* Fake ungetc() to the real buffer in case system's ungetc goes elsewhere @@ -2867,7 +2880,9 @@ return 0; } } - else if (PerlIO_has_cntptr(f)) { + else +#endif + if (PerlIO_has_cntptr(f)) { STDCHAR ch = c; if (PerlIOStdio_unread(aTHX_ f,&ch,1) == 1) { return 0; ==== //depot/macperl/pod/perldelta.pod#9 (text) ==== Index: macperl/pod/perldelta.pod --- macperl/pod/perldelta.pod#8~16870~ Wed May 29 23:06:34 2002 +++ macperl/pod/perldelta.pod Fri May 31 09:27:30 2002 @@ -2806,11 +2806,8 @@ t/op/lfs............................FAILED at test 17 t/op/magic..........................FAILED at test 24 - ext/Fcntl/t/syslfs..................FAILED at test 17 - ext/File/Glob/t/basic...............FAILED at test 3 ext/POSIX/t/sigaction...............FAILED at test 13 ext/POSIX/t/waitpid.................FAILED at test 1 - lib/Tie/File/t/16_handle............FAILED at test 39 See L<perlbeos> (README.beos) for more details. @@ -2850,6 +2847,11 @@ subtest 9, which confuses the test harness so much that it thinks the subtest 9 failed. +=head2 Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint + +This is a known bug in the glibc 2.2.5 with long long integers. +( http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=65612 ) + =head2 Linux With Sfio Fails op/misc Test 48 No known fix. @@ -3037,12 +3039,16 @@ change will break existing code that relies on the current (ill-defined) semantics, so just avoid doing this in general. -=head2 Self-tying of Arrays and Hashes Is Forbidden +=head2 Self-tying Problems Self-tying of arrays and hashes is broken in rather deep and hard-to-fix ways. As a stop-gap measure to avoid people from getting frustrated at the mysterious results (core dumps, most often) it is for now forbidden (you will get a fatal error even from an attempt). + +Self-tying of globs is broken, but not disabled. + +Self-tying of scalars and IO works. =head2 Building Extensions Can Fail Because Of Largefiles ==== //depot/macperl/pod/perlfunc.pod#6 (text) ==== Index: macperl/pod/perlfunc.pod --- macperl/pod/perlfunc.pod#5~16870~ Wed May 29 23:06:34 2002 +++ macperl/pod/perlfunc.pod Fri May 31 09:27:30 2002 @@ -5912,8 +5912,6 @@ no strict 'refs'; no warnings; -If no C<unimport> method can be found the call fails with a fatal error. - See L<perlmodlib> for a list of standard modules and pragmas. See L<perlrun> for the C<-M> and C<-m> command-line options to perl that give C<use> functionality from the command-line. ==== //depot/macperl/pod/perlipc.pod#4 (text) ==== Index: macperl/pod/perlipc.pod --- macperl/pod/perlipc.pod#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/pod/perlipc.pod Fri May 31 09:27:30 2002 @@ -168,6 +168,68 @@ the F<t/lib/posix.t> file from the Perl source distribution has some examples in it. +=head2 Handling the SIGHUP Signal in Daemons + +A process that usually starts when the system boots and shuts down +when the system is shut down is called a daemon (Disk And Execution +MONitor). If a daemon process has a configuration file which is +modified after the process has been started, there should be a way to +tell that process to re-read its configuration file, without stopping +the process. Many daemons provide this mechanism using the C<SIGHUP> +signal handler. When you want to tell the daemon to re-read the file +you simply send it the C<SIGHUP> signal. + +Not all platforms automatically reinstall their (native) signal +handlers after a signal delivery. This means that the handler works +only the first time the signal is sent. The solution to this problem +is to use C<POSIX> signal handlers if available, their behaviour +is well-defined. + +The following example implements a simple daemon, which restarts +itself every time the C<SIGHUP> signal is received. The actual code is +located in the subroutine C<code()>, which simply prints some debug +info to show that it works and should be replaced with the real code. + + #!/usr/bin/perl -w + + use POSIX (); + use FindBin (); + use File::Basename (); + use File::Spec::Functions; + + $|=1; + + # make the daemon cross-platform, so exec always calls the script + # itself with the right path, no matter how the script was invoked. + my $script = File::Basename::basename($0); + my $SELF = catfile $FindBin::Bin, $script; + + # POSIX unmasks the sigprocmask properly + my $sigset = POSIX::SigSet->new(); + my $action = POSIX::SigAction->new('sigHUP_handler', + $sigset, + &POSIX::SA_NODEFER); + POSIX::sigaction(&POSIX::SIGHUP, $action); + + sub sigHUP_handler { + print "got SIGHUP\n"; + exec($SELF, @ARGV) or die "Couldn't restart: $!\n"; + } + + code(); + + sub code { + print "PID: $$\n"; + print "ARGV: @ARGV\n"; + my $c = 0; + while (++$c) { + sleep 2; + print "$c\n"; + } + } + __END__ + + =head1 Named Pipes A named pipe (often referred to as a FIFO) is an old Unix IPC ==== //depot/macperl/pod/perlport.pod#3 (text) ==== Index: macperl/pod/perlport.pod --- macperl/pod/perlport.pod#2~16475~ Tue May 7 21:31:10 2002 +++ macperl/pod/perlport.pod Fri May 31 09:27:30 2002 @@ -448,6 +448,36 @@ Don't count on specific values of C<$!>. +=head2 Command names versus file pathnames + +Don't assume that the name used to invoke a command or program with +C<system> or C<exec> can also be used to test for the existence of the +file that holds the executable code for that command or program. +First, many operating systems have "internal" commands that are +built-in to the OS and while these commands can be invoked, there is +no corresponding file. Second, some operating systems (Cygwin, DJGPP, +OS/2, and VOS) have required suffixes for executable files; these +suffixes are generally permitted on the command name but are not +required. Thus, a command like "perl" might exist in a file named +"perl", "perl.exe", or "perl.pm", depending on the operating system. +The variable "_exe" in the Config module holds the executable suffix, +if any. Third, VMS files always end in a version number, which comes +after the executable suffix. + +To convert $^X to a file pathname, taking account of the requirements +of the various operating system possibilities, say: + use Config; + use File::Spec; + $thisperl = $^X; + $thisperl .= $Config{_exe} unless $thisperl ~= m/$Config{_exe}([;\d]*)$/i; + +To convert $Config{perlpath} to a file pathname, say: + + use Config; + use File::Spec; + $thisperl = File::Spec->canonpath($Config{perlpath}); + $thisperl .= $Config{_exe} unless $thisperl ~= m/$Config{_exe}([;\d]*)$/i; + =head2 Interprocess Communication (IPC) In general, don't directly access the system in code meant to be ==== //depot/macperl/pod/perltoc.pod#5 (text+w) ==== Index: macperl/pod/perltoc.pod --- macperl/pod/perltoc.pod#4~16870~ Wed May 29 23:06:34 2002 +++ macperl/pod/perltoc.pod Fri May 31 09:27:30 2002 @@ -1717,6 +1717,12 @@ =item Signals +=over 4 + +=item Handling the SIGHUP Signal in Daemons + +=back + =item Named Pipes =over 4 @@ -2106,6 +2112,8 @@ =item System Interaction +=item Command names versus file pathnames + =item Interprocess Communication (IPC) =item External Subroutines (XS) @@ -2334,8 +2342,6 @@ =item Questions With Answers -, , , , , , - =item Hexadecimal Notation =item Further Resources @@ -3062,10 +3068,10 @@ =item How do I convert between numeric representations? -B<How do I convert hexadecimal into decimal:>, B<How do I convert from -decimal to hexadecimal:>, B<How do I convert from octal to decimal:>, B<How -do I convert from decimal to octal:>, B<How do I convert from binary to -decimal:>, B<How do I convert from decimal to binary:> +How do I convert hexadecimal into decimal, How do I convert from decimal to +hexadecimal, How do I convert from octal to decimal, How do I convert from +decimal to octal, How do I convert from binary to decimal, How do I convert +from decimal to binary =item Why doesn't & work the way I want it to? @@ -3183,6 +3189,8 @@ =item How do I process/modify each element of an array? +=item How do I select a random element from an array? + =item How do I permute N elements of a list? =item How do I sort an array by (anything)? @@ -5334,6 +5342,8 @@ =item HP-UX lib/posix Subtest 9 Fails When LP64-Configured +=item Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint + =item Linux With Sfio Fails op/misc Test 48 =item Mac OS X @@ -5364,7 +5374,7 @@ =item Localising Tied Arrays and Hashes Is Broken -=item Self-tying of Arrays and Hashes Is Forbidden +=item Self-tying Problems =item Building Extensions Can Fail Because Of Largefiles @@ -6114,8 +6124,6 @@ =item Known test failures -, , - =item EBCDIC platforms not fully supported =item UNICOS/mk CC failures during Configure run @@ -7025,7 +7033,7 @@ =item Contact Information -=item Update 2002-05-25 +=item Update 2002-05-30 =back @@ -7322,6 +7330,8 @@ =item 64-bit Perl on HP-UX +=item Oracle on HP-UX + =item GDBM and Threads on HP-UX =item NFS filesystems and utime(2) on HP-UX @@ -15218,6 +15228,10 @@ =item bmod +=item bmodinv + +=item bmodpow + =item bpow =item blsft @@ -15387,20 +15401,28 @@ =over 4 -=item new +=item new() -=item numerator +=item numerator() -=item denominator +=item denominator() $d = $x->denominator(); -=item parts +=item parts() + +=item as_number() + +=item bfac()/blog() + +=item bround()/round()/bfround() =back =item BUGS +perl -Mbigrat -le 'print 1 + 2/3' + =item LICENSE =item SEE ALSO @@ -15923,6 +15945,8 @@ DATA ] ), expand ( ADDRESS ), verify ( ADDRESS ), help ( [ $subject ] ), quit () +=item ADDRESSES + =item SEE ALSO =item AUTHOR @@ -17892,6 +17916,12 @@ =item WARNING =item BUGS + +=over 4 + +=item 64 bit data in perl 5.6.0 and 5.6.1 + +=back =item CREDITS ==== //depot/macperl/pod/perlvar.pod#2 (text) ==== Index: macperl/pod/perlvar.pod --- macperl/pod/perlvar.pod#1~16123~ Tue Apr 23 18:25:17 2002 +++ macperl/pod/perlvar.pod Fri May 31 09:27:30 2002 @@ -1150,8 +1150,52 @@ =item $^X -The name that the Perl binary itself was executed as, from C's C<argv[0]>. -This may not be a full pathname, nor even necessarily in your path. +The name used to execute the current copy of Perl, from C's +C<argv[0]>. + +Depending on the host operating system, the value of $^X may be +a relative or absolute pathname of the perl program file, or may +be the string used to invoke perl but not the pathname of the +perl program file. Also, most operating systems permit invoking +programs that are not in the PATH environment variable, so there +is no guarantee that the value of $^X is in PATH. For VMS, the +value may or may not include a version number. + +You usually can use the value of $^X to re-invoke an independent +copy of the same perl that is currently running, e.g., + + @first_run = `$^X -le "print int rand 100 for 1..100"`; + +But recall that not all operating systems support forking or +capturing of the output of commands, so this complex statement +may not be portable. + +It is not safe to use the value of $^X as a path name of a file, +as some operating systems that have a mandatory suffix on +executable files do not require use of the suffix when invoking +a command. To convert the value of $^X to a path name, use the +following statements: + +# Build up a set of file names (not command names). + use Config; + use File::Spec; + $this_perl = File::Spec->canonpath($^X); + $this_perl .= $Config{_ext} + unless $this_perl =~ m/$Config{_ext}([;\d]*)$/i; + +Because many operating systems permit anyone with read access to +the Perl program file to make a copy of it, patch the copy, and +then execute the copy, the security-conscious Perl programmer +should take care to invoke the installed copy of perl, not the +copy referenced by $^X. The following statements accomplish +this goal, and produce a pathname that can be invoked as a +command or referenced as a file. + + use Config; + use File::Spec; + $secure_perl_path = File::Spec->canonpath($Config{perlpath}); + $secure_perl_path .= $Config{_ext} + unless $secure_perl_path =~ m/$Config{_ext}([;\d]*)$/i; =item ARGV ==== //depot/macperl/pp_sys.c#7 (text) ==== Index: macperl/pp_sys.c --- macperl/pp_sys.c#6~16870~ Wed May 29 23:06:34 2002 +++ macperl/pp_sys.c Fri May 31 09:27:30 2002 @@ -828,11 +828,11 @@ sv_unmagic(varsv, how); /* Croak if a self-tie on an aggregate is attempted. */ if (varsv == SvRV(sv) && - (SvTYPE(sv) == SVt_PVAV || - SvTYPE(sv) == SVt_PVHV)) + (SvTYPE(varsv) == SVt_PVAV || + SvTYPE(varsv) == SVt_PVHV)) Perl_croak(aTHX_ "Self-ties of arrays and hashes are not supported"); - sv_magic(varsv, sv, how, Nullch, 0); + sv_magic(varsv, (SvRV(sv) == varsv ? Nullsv : sv), how, Nullch, 0); } LEAVE; SP = PL_stack_base + markoff; ==== //depot/macperl/t/TEST#4 (xtext) ==== Index: macperl/t/TEST --- macperl/t/TEST#3~16646~ Fri May 17 03:54:03 2002 +++ macperl/t/TEST Fri May 31 09:27:30 2002 @@ -97,7 +97,7 @@ my $mani = File::Spec->catfile($updir, "MANIFEST"); if (open(MANI, $mani)) { while (<MANI>) { # similar code in t/harness - if (m!^(ext/\S+/?([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) { + if (m!^(ext/\S+/?(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) { $t = $1; if (!$core || $t =~ m!^lib/[a-z]!) { ==== //depot/macperl/t/harness#6 (text) ==== Index: macperl/t/harness --- macperl/t/harness#5~16870~ Wed May 29 23:06:34 2002 +++ macperl/t/harness Fri May 31 09:27:30 2002 @@ -71,7 +71,7 @@ my $mani = File::Spec->catfile(File::Spec->updir, "MANIFEST"); if (open(MANI, $mani)) { while (<MANI>) { # similar code in t/TEST - if (m!^(ext/\S+/?([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) { + if (m!^(ext/\S+/?(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) { push @tests, File::Spec->catfile($updir, $1); } } ==== //depot/macperl/t/lib/sample-tests/die#3 (text) ==== Index: macperl/t/lib/sample-tests/die --- macperl/t/lib/sample-tests/die#2~16825~ Mon May 27 15:55:07 2002 +++ macperl/t/lib/sample-tests/die Fri May 31 09:27:30 2002 @@ -1,3 +1,2 @@ -use lib 'lib'; use if ($^O eq 'VMS'), vmsish => 'hushed'; exit 1; # exit because die() can be noisy ==== //depot/macperl/t/lib/sample-tests/skip_nomsg#1 (text) ==== Index: macperl/t/lib/sample-tests/skip_nomsg --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/t/lib/sample-tests/skip_nomsg Fri May 31 09:27:30 2002 @@ -0,0 +1,4 @@ +print <<DUMMY; +1..1 +ok 1 # Skip +DUMMY ==== //depot/macperl/t/lib/sample-tests/skipall#1 (text) ==== Index: macperl/t/lib/sample-tests/skipall --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/t/lib/sample-tests/skipall Fri May 31 09:27:30 2002 @@ -0,0 +1,3 @@ +print <<DUMMY_TEST; +1..0 # skip: rope +DUMMY_TEST ==== //depot/macperl/t/lib/sample-tests/skipall_nomsg#1 (text) ==== Index: macperl/t/lib/sample-tests/skipall_nomsg --- /dev/null Tue May 5 13:32:27 1998 +++ macperl/t/lib/sample-tests/skipall_nomsg Fri May 31 09:27:30 2002 @@ -0,0 +1,2 @@ +print "1..0\n"; +exit 0; ==== //depot/macperl/t/op/tie.t#6 (xtext) ==== Index: macperl/t/op/tie.t --- macperl/t/op/tie.t#5~16870~ Wed May 29 23:06:34 2002 +++ macperl/t/op/tie.t Fri May 31 09:27:30 2002 @@ -1,9 +1,13 @@ #!./perl -# This test harness will (eventually) test the "tie" functionality -# without the need for a *DBM* implementation. - -# Currently it only tests the untie warning +# Add new tests to the end with format: +# ######## +# +# # test description +# Test code +# EXPECT +# Warn or die msgs (if any) at - line 1234 +# chdir 't' if -d 't'; @INC = '../lib'; @@ -11,29 +15,23 @@ $|=1; -# catch warnings into fatal errors -$SIG{__WARN__} = sub { die "WARNING: @_" } ; -$SIG{__DIE__} = sub { die @_ }; - undef $/; -@prgs = split "\n########\n", <DATA>; -print "1..", scalar @prgs, "\n"; +@prgs = split /^########\n/m, <DATA>; +require './test.pl'; +plan(tests => scalar @prgs); for (@prgs){ - my($prog,$expected) = split(/\nEXPECT\n/, $_); - eval "$prog" ; - $status = $?; - $results = $@ ; + ++$i; + my($prog,$expected) = split(/\nEXPECT\n/, $_, 2); + print("not ok $i # bad test format\n"), next + unless defined $expected; + my ($testname) = $prog =~ /^# (.*)\n/m; + $testname ||= ''; + $TODO = $testname =~ s/^TODO //; $results =~ s/\n+$//; $expected =~ s/\n+$//; - if ( $status or $results and $results !~ /^(WARNING: )?$expected/){ - print STDERR "STATUS: $status\n"; - print STDERR "PROG: $prog\n"; - print STDERR "EXPECTED:\n$expected\n"; - print STDERR "GOT:\n$results\n"; - print "not "; - } - print "ok ", ++$i, "\n"; + + fresh_perl_is($prog, $expected, {}, $testname); } __END__ @@ -106,7 +104,7 @@ $a = tie %h, Tie::StdHash; untie %h; EXPECT -untie attempted while 1 inner references still exist +untie attempted while 1 inner references still exist at - line 6. ######## # strict behaviour, with 1 extra references via tied generating an error @@ -116,7 +114,7 @@ $a = tied %h; untie %h; EXPECT -untie attempted while 1 inner references still exist +untie attempted while 1 inner references still exist at - line 7. ######## # strict behaviour, with 1 extra references which are destroyed @@ -145,7 +143,7 @@ $b = tied %h ; untie %h; EXPECT -untie attempted while 2 inner references still exist +untie attempted while 2 inner references still exist at - line 7. ######## # strict behaviour, check scope of strictness. @@ -162,56 +160,30 @@ untie %H; EXPECT ######## + # Forbidden aggregate self-ties -my ($a, $b) = (0, 0); sub Self::TIEHASH { bless $_[1], $_[0] } -sub Self::DESTROY { $b = $_[0] + 1; } { - my %c = 42; + my %c; tie %c, 'Self', \%c; } EXPECT -Self-ties of arrays and hashes are not supported +Self-ties of arrays and hashes are not supported at - line 6. ######## + # Allowed scalar self-ties -my ($a, $b) = (0, 0); +my $destroyed = 0; sub Self::TIESCALAR { bless $_[1], $_[0] } -sub Self::DESTROY { $b = $_[0] + 1; } +sub Self::DESTROY { $destroyed = 1; } { my $c = 42; - $a = $c + 0; tie $c, 'Self', \$c; } -die unless $a == 0 && $b == 43; -EXPECT -######## -# Interaction of tie and vec - -my ($a, $b); -use Tie::Scalar; -tie $a,Tie::StdScalar or die; -vec($b,1,1)=1; -$a = $b; -vec($a,1,1)=0; -vec($b,1,1)=0; -die unless $a eq $b; +die "self-tied scalar not DESTROYed" unless $destroyed == 1; EXPECT ######## -# An attempt at lvalueable barewords broke this - -tie FH, 'main'; -EXPECT -######## -# correct unlocalisation of tied hashes (patch #16431) -use Tie::Hash ; -tie %tied, Tie::StdHash; -{ local $hash{'foo'} } warn "plain hash bad unlocalize" if exists $hash{'foo'}; -{ local $tied{'foo'} } warn "tied hash bad unlocalize" if exists $tied{'foo'}; -{ local $ENV{'foo'} } warn "%ENV bad unlocalize" if exists $ENV{'foo'}; -EXPECT -######## -# Allowed glob self-ties +# TODO Allowed glob self-ties my $destroyed = 0; my $printed = 0; sub Self2::TIEHANDLE { bless $_[1], $_[0] } @@ -241,3 +213,30 @@ EXPECT ######## +# Interaction of tie and vec + +my ($a, $b); +use Tie::Scalar; +tie $a,Tie::StdScalar or die; +vec($b,1,1)=1; +$a = $b; +vec($a,1,1)=0; +vec($b,1,1)=0; +die unless $a eq $b; +EXPECT +######## + +# correct unlocalisation of tied hashes (patch #16431) +use Tie::Hash ; +tie %tied, Tie::StdHash; +{ local $hash{'foo'} } warn "plain hash bad unlocalize" if exists $hash{'foo'}; +{ local $tied{'foo'} } warn "tied hash bad unlocalize" if exists $tied{'foo'}; +{ local $ENV{'foo'} } warn "%ENV bad unlocalize" if exists $ENV{'foo'}; +EXPECT +######## + +# An attempt at lvalueable barewords broke this +tie FH, 'main'; +EXPECT +Can't modify constant item in tie at - line 3, near "'main';" +Execution of - aborted due to compilation errors. ==== //depot/macperl/t/test.pl#4 (text) ==== Index: macperl/t/test.pl --- macperl/t/test.pl#3~16870~ Wed May 29 23:06:34 2002 +++ macperl/t/test.pl Fri May 31 09:27:30 2002 @@ -433,6 +433,9 @@ unless (defined $Perl) { $Perl = $^X; + # VMS should have 'perl' aliased properly + return $Perl if $^O eq 'VMS'; + my $exe; eval "require Config; Config->import"; if ($@) { ==== //depot/macperl/toke.c#5 (text) ==== Index: macperl/toke.c --- macperl/toke.c#4~16646~ Fri May 17 03:54:03 2002 +++ macperl/toke.c Fri May 31 09:27:30 2002 @@ -7577,15 +7577,33 @@ where = "at EOF"; else if (PL_bufptr > PL_oldoldbufptr && PL_bufptr - PL_oldoldbufptr < 200 && PL_oldoldbufptr != PL_oldbufptr && PL_oldbufptr != PL_bufptr) { + /* + Only for NetWare: + The code below is removed for NetWare because it abends/crashes on NetWare + when the script has error such as not having the closing quotes like: + if ($var eq "value) + Checking of white spaces is anyway done in NetWare code. + */ +#ifndef NETWARE while (isSPACE(*PL_oldoldbufptr)) PL_oldoldbufptr++; +#endif context = PL_oldoldbufptr; contlen = PL_bufptr - PL_oldoldbufptr; } else if (PL_bufptr > PL_oldbufptr && PL_bufptr - PL_oldbufptr < 200 && PL_oldbufptr != PL_bufptr) { + /* + Only for NetWare: + The code below is removed for NetWare because it abends/crashes on NetWare + when the script has error such as not having the closing quotes like: + if ($var eq "value) + Checking of white spaces is anyway done in NetWare code. + */ +#ifndef NETWARE while (isSPACE(*PL_oldbufptr)) PL_oldbufptr++; +#endif context = PL_oldbufptr; contlen = PL_bufptr - PL_oldbufptr; } ==== //depot/macperl/utfebcdic.h#3 (text) ==== Index: macperl/utfebcdic.h --- macperl/utfebcdic.h#2~16870~ Wed May 29 23:06:34 2002 +++ macperl/utfebcdic.h Fri May 31 09:27:30 2002 @@ -18,6 +18,7 @@ The entries marked 9 in tr6 are continuation bytes and are marked as length 1 here so that we can recover. */ +#if '^' == 95 /* if defined(__MVS__) || defined(??) (VM/ESA?) 1047 */ EXTCONST unsigned char PL_utf8skip[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -36,9 +37,53 @@ 1,4,1,1,1,1,1,1,1,1,4,4,4,5,5,5, 1,1,1,1,1,1,1,1,1,1,5,6,6,7,7,1 }; +#endif + +#if '^' == 106 /* if defined(_OSD_POSIX) POSIX-BC */ +unsigned char PL_utf8skip[] = { +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,2,2,2,2,2,3,1,1,1,1,1,1, +2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +2,3,1,1,1,1,1,1,1,1,2,2,2,3,2,2, +1,2,2,2,2,2,2,3,3,3,2,1,1,1,3,3, +4,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3, +1,1,1,1,1,1,1,1,1,1,3,3,4,6,4,4, +7,4,1,1,1,1,1,1,1,1,4,4,4,5,5,5, +1,1,1,1,1,1,1,1,1,1,5,1,6,1,7,1 +}; +#endif + +#if '^' == 176 /* if defined(??) (OS/400?) 037 */ +unsigned char PL_utf8skip[] = { +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1, +2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +2,1,1,1,1,1,1,1,1,1,2,2,2,3,2,2, +1,2,2,2,2,2,2,3,3,3,1,1,3,3,3,3, +1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3, +1,1,1,1,1,1,1,1,1,1,3,3,4,4,4,4, +1,4,1,1,1,1,1,1,1,1,4,4,4,5,5,5, +1,1,1,1,1,1,1,1,1,1,5,6,6,7,7,1 +}; +#endif /* Transform tables from tr16 applied after encoding to render encoding EBCDIC like */ +#if '^' == 95 /* if defined(__MVS__) || defined(??) (VM/ESA?) 1047 */ EXTCONST unsigned char PL_utf2e[] = { /* UTF-8-mod to EBCDIC (IBM-1047) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, @@ -58,7 +103,7 @@ 0xDC, 0xDD, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, }; -EXTCONST unsigned char PL_e2utf[] = { /* EBCDIC to UTF-8-mod */ +EXTCONST unsigned char PL_e2utf[] = { /* EBCDIC (IBM-1047) to UTF-8-mod */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -76,6 +121,87 @@ 0x5C, 0xF4, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x9F, }; +#endif /* 1047 */ + +#if '^' == 106 /* if defined(_OSD_POSIX) POSIX-BC */ +unsigned char PL_utf2e[] = { /* UTF-8-mod to EBCDIC (POSIX-BC) */ + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xBB, 0xBC, 0xBD, 0x6A, 0x6D, + 0x4A, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xFB, 0x4F, 0xFD, 0xFF, 0x07, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, + 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0x5F, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xB0, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xD0, 0x70, 0x71, 0x72, 0x73, + 0x74, 0x75, 0x76, 0x77, 0x78, 0x80, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x9A, 0x9B, 0x9C, + 0x9D, 0x9E, 0x9F, 0xA0, 0xAA, 0xAB, 0xAC, 0xAE, 0xAF, 0xBA, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, + 0xB7, 0xB8, 0xB9, 0xAD, 0x79, 0xA1, 0xBE, 0xBF, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xDA, 0xDB, + 0xDC, 0xC0, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xDD, 0xFC, 0xE0, 0xFE, +}; + +unsigned char PL_e2utf[] = { /* EBCDIC (POSIX-BC) to UTF-8-mod */ + 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, + 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, + 0x20, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0x60, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, + 0x26, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x9F, + 0x2D, 0x2F, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0x5E, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, + 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xE4, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, + 0xC5, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, + 0xCC, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, + 0xD3, 0xE5, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xD4, 0xD5, 0xD6, 0xE3, 0xD7, 0xD8, + 0xA9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xD9, 0x5B, 0x5C, 0x5D, 0xE6, 0xE7, + 0xF1, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, + 0xBB, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xEE, 0xEF, 0xF0, 0xFC, 0xF2, 0xF3, + 0xFE, 0xF4, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xFB, 0x7B, 0xFD, 0x7D, 0xFF, 0x7E, +}; +#endif /* POSIX-BC */ + +#if '^' == 176 /* if defined(??) (OS/400?) 037 */ +unsigned char PL_utf2e[] = { /* UTF-8-mod to EBCDIC (IBM-037) */ + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xBA, 0xE0, 0xBB, 0xB0, 0x6D, + 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, + 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x70, 0x71, 0x72, 0x73, + 0x74, 0x75, 0x76, 0x77, 0x78, 0x80, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x9A, 0x9B, 0x9C, + 0x9D, 0x9E, 0x9F, 0xA0, 0xAA, 0xAB, 0xAC, 0xAE, 0xAF, 0x5F, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, + 0xB7, 0xB8, 0xB9, 0xAD, 0xBD, 0xBC, 0xBE, 0xBF, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xDA, 0xDB, + 0xDC, 0xDD, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, +}; + +unsigned char PL_e2utf[] = { /* EBCDIC (IBM-037) to UTF-8-mod */ + 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, + 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, + 0x20, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, + 0x26, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xD9, + 0x2D, 0x2F, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, + 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, + 0xC5, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, + 0xCC, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, + 0xD3, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xD4, 0xD5, 0xD6, 0xE3, 0xD7, 0xD8, + 0x5E, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0x5B, 0x5D, 0xE5, 0xE4, 0xE6, 0xE7, + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, + 0x5C, 0xF4, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x9F, +}; +#endif /* 037 */ /* These tables moved from perl.h and converted to hex. They map platfrom code page from/to bottom 256 codes of Unicode (i.e. iso-8859-1). @@ -160,6 +286,7 @@ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0x7B, 0xDC, 0x7D, 0xDA, 0x7E }; #endif /* POSIX-BC */ + #if '^' == 176 /* if defined(??) (OS/400?) 037 */ EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (IBM-037) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, End of Patch.