This patch describes the changes made in ActivePerl build 815 over the official Perl v5.8.7 sources from CPAN. The ActivePerl Release Notes contain an informal summary of these changes. These can be viewed at: http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/changes-58.html The included patch may be applied to Perl v5.8.7 sources using the GNU patch utility. e.g: % cd perl-5.8.7 % patch -lNp1 < this_file --------------------------------------------------------------------------- diff -ruN perl-5.8.7/activeperl.c AP815_source/activeperl.c --- perl-5.8.7/activeperl.c 1969-12-31 16:00:00.000000000 -0800 +++ AP815_source/activeperl.c 2005-11-02 19:15:00.000000000 -0800 @@ -0,0 +1,49 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +static +XS(ActivePerl_PRODUCT) +{ + dXSARGS; + if (items != 0) + Perl_croak(aTHX_ "Usage: ActivePerl::PRODUCT()"); + XSRETURN_PV(ACTIVEPERL_PRODUCT); +} + +static +XS(ActivePerl_BUILD) +{ + dXSARGS; + if (items != 0) + Perl_croak(aTHX_ "Usage: ActivePerl::BUILD()"); + XSRETURN_PV(PRODUCT_BUILD_NUMBER); +} + +#ifdef CONFIG_HEAVY +static +XS(ActivePerl_CONFIG_HEAVY) +{ + dXSARGS; + if (items != 0) + Perl_croak(aTHX_ "Usage: ActivePerl::_CONFIG_HEAVY()"); + XSRETURN_PV(STRINGIFY(CONFIG_HEAVY)); +} +#endif + +void +Perl_boot_core_ActivePerl(pTHX) +{ + char *file = __FILE__; + SV *version_sv = get_sv("ActivePerl::VERSION", TRUE); +#if ACTIVEPERL_SUBVERSION > 0 + sv_setpvf(version_sv, "%d.%02d", ACTIVEPERL_VERSION, ACTIVEPERL_SUBVERSION); +#else + sv_setiv(version_sv, ACTIVEPERL_VERSION); +#endif + newXS("ActivePerl::PRODUCT", ActivePerl_PRODUCT, file); + newXS("ActivePerl::BUILD", ActivePerl_BUILD, file); +#ifdef CONFIG_HEAVY + newXS("ActivePerl::_CONFIG_HEAVY", ActivePerl_CONFIG_HEAVY, file); +#endif +} diff -ruN perl-5.8.7/BuildInfo.h AP815_source/BuildInfo.h --- perl-5.8.7/BuildInfo.h 1969-12-31 16:00:00.000000000 -0800 +++ AP815_source/BuildInfo.h 2005-11-02 19:14:59.000000000 -0800 @@ -0,0 +1,39 @@ +/* BuildInfo.h + * + * Copyright (C) 1998-2005 ActiveState Corp. All rights reserved. + * + */ + +#ifndef ___BuildInfo__h___ +#define ___BuildInfo__h___ + +#define ACTIVEPERL_PRODUCT "ActivePerl" +#define ACTIVEPERL_VERSION 815 +#define ACTIVEPERL_SUBVERSION 0 +#define ACTIVEPERL_CHANGELIST "" + +#define PERL_VENDORLIB_NAME "ActiveState" + +#ifndef STRINGIFY +# include "config.h" +#endif + +/* Derived values and legacy */ +#if ACTIVEPERL_SUBVERSION > 0 +# define PRODUCT_BUILD_NUMBER STRINGIFY(ACTIVEPERL_VERSION) "." STRINGIFY(ACTIVEPERL_SUBVERSION) +#else +# define PRODUCT_BUILD_NUMBER STRINGIFY(ACTIVEPERL_VERSION) +#endif +#define PERLFILEVERSION "5,8,7," STRINGIFY(ACTIVEPERL_VERSION) "\0" +#define PERLRC_VERSION 5,8,7,ACTIVEPERL_VERSION +#define PERLPRODUCTVERSION "Build " PRODUCT_BUILD_NUMBER ACTIVEPERL_CHANGELIST "\0" +#define PERLPRODUCTNAME ACTIVEPERL_PRODUCT "\0" +#define ACTIVEPERL_LOCAL_PATCHES_ENTRY ACTIVEPERL_PRODUCT " Build " PRODUCT_BUILD_NUMBER ACTIVEPERL_CHANGELIST +#ifdef BUILT_BY_ACTIVESTATE +#define BINARY_BUILD_NOTICE PerlIO_printf(PerlIO_stdout(), "\n\ +Binary build " PRODUCT_BUILD_NUMBER ACTIVEPERL_CHANGELIST " provided by ActiveState http://www.ActiveState.com\n\ +ActiveState is a division of Sophos.\n\ +Built " __DATE__ " " __TIME__ "\n"); +#endif + +#endif /* ___BuildInfo__h___ */ diff -ruN perl-5.8.7/cflags.SH AP815_source/cflags.SH --- perl-5.8.7/cflags.SH 2002-09-30 03:59:07.000000000 -0700 +++ AP815_source/cflags.SH 2005-11-02 19:15:00.000000000 -0800 @@ -86,6 +86,9 @@ ODBM_File) ;; POSIX) ;; SDBM_File) ;; + activeperl) + ccflags="$ccflags -DCONFIG_HEAVY=$config_heavy" + ;; av) ;; byterun) ;; deb) ;; diff -ruN perl-5.8.7/Changes AP815_source/Changes --- perl-5.8.7/Changes 2005-05-30 14:19:27.000000000 -0700 +++ AP815_source/Changes 2005-11-02 19:14:59.000000000 -0800 @@ -24,6 +24,71 @@ to the perl5-porters mailing list. You can retrieve the messages for example from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ +-------------------- +ActivePerl build 815 Additional core patches in ActivePerl build 815 +-------------------- +____________________________________________________________________________ +[ 25774] By: rgs on 2005/10/16 21:47:57 + Log: Subject: [PATCH] Keys of %INC always use forward slashes + From: Jan Dubois + Date: Oct 16, 2005 8:24 PM + Message-ID: <006e01c5d27e$d722c6e0$2217a8c0@candy> + Branch: perl + ! lib/CPAN.pm +____________________________________________________________________________ +[ 25747] By: rgs on 2005/10/13 09:43:46 + Log: Subject: Accidental interpolation of $@ in Pod::Html [PATCH] + From: Gisle Aas + Date: 13 Oct 2005 01:42:32 -0700 + Message-ID: + Branch: perl + ! lib/Pod/Html.pm +____________________________________________________________________________ +[ 25362] By: rgs on 2005/09/07 10:31:47 + Log: Subject: [perl #37091] File::Path::mkpath resets errno + From: kvr@centrum.cz (via RT) + Date: Tue, 06 Sep 2005 08:07:14 -0700 + Message-ID: + Branch: perl + ! lib/File/Path.pm +____________________________________________________________________________ +[ 25186] By: steveh on 2005/07/19 13:25:42 + Log: Fix test following change #25181 + Branch: perl + ! lib/Pod/t/htmlview.t +____________________________________________________________________________ +[ 25181] By: steveh on 2005/07/19 10:07:46 + Log: Subject: [perl #36526] Incorrect (X)HTML generated by Pod::Html + From: Earl Hood (via RT) + Date: Tue, 12 Jul 2005 23:55:28 -0700 + Message-ID: + + (with old code deleted rather than commented out) + Branch: perl + ! lib/Pod/Html.pm +____________________________________________________________________________ +[ 24999] By: rgs on 2005/06/27 21:30:09 + Log: From: Mattia Barbon + Subject: [PATCH] Avoid redefinition warning for MinGW + Date: Jun 27, 2005 10:07 PM + Message-ID: + Branch: perl + ! win32/win32iop.h +____________________________________________________________________________ +[ 24699] By: rgs on 2005/06/03 21:07:03 + Log: Subject: Re: [PATCH] Improved ICMP_UNREACHABLE handling in Net::Ping + From: Gisle Aas + Date: 03 Jun 2005 09:17:44 -0700 + Message-ID: + Branch: perl + ! lib/Net/Ping.pm +____________________________________________________________________________ +[ 21540] By: rgs on 2003/10/26 14:59:53 + Log: Fix backward-compatibility issues in if.pm. + Branch: perl + ! lib/if.pm +____________________________________________________________________________ + -------------- Version v5.8.7 Maintenance release working toward v5.8.7 -------------- diff -ruN perl-5.8.7/config_h.SH AP815_source/config_h.SH --- perl-5.8.7/config_h.SH 2005-04-30 07:34:20.000000000 -0700 +++ AP815_source/config_h.SH 2005-11-02 19:15:00.000000000 -0800 @@ -3486,7 +3486,9 @@ * This symbol, if defined, indicates that sitecustomize should * be used. */ +#ifndef USE_SITECUSTOMIZE #$usesitecustomize USE_SITECUSTOMIZE /**/ +#endif /* Size_t_size: * This symbol holds the size of a Size_t in bytes. diff -ruN perl-5.8.7/configpm AP815_source/configpm --- perl-5.8.7/configpm 2004-11-28 07:48:15.000000000 -0800 +++ AP815_source/configpm 2005-11-02 19:15:00.000000000 -0800 @@ -7,9 +7,9 @@ # commonly used names to precache (and hence lookup fastest) my %Common; -while ($how_many_common--) { - $_ = ; - chomp; +while () { + next if /^\s*#/; + last unless $how_many_common--; /^(\S+):\s*(\d+)$/ or die "Malformed line '$_'"; $Common{$1} = $1; } @@ -80,6 +80,14 @@ use strict; # use warnings; Pulls in Carp # use vars pulls in Carp +BEGIN { + unless ($ENV{ACTIVEPERL_CONFIG_DISABLE}) { + eval { + require ActivePerl::Config; + }; + die $@ if $@ && $@ !~ /^Can't locate ActivePerl\/Config\.pm/; + } +} ENDOFBEG my $myver = sprintf "v%vd", $^V; @@ -201,6 +209,16 @@ # Search for it in the big string sub fetch_string { my($self, $key) = @_; + # Let ActivePerl::Config override if it wants + my $value; + $value = _fetch_string(@_) + unless defined(&ActivePerl::Config::override) && + ActivePerl::Config::override($key, $value); + return $self->{$key} = $value; # cache it +} + +sub _fetch_string { + my($self, $key) = @_; EOT @@ -259,7 +277,7 @@ $fetch_string .= <<'EOT'; # So we can say "if $Config{'foo'}". $value = undef if $value eq 'undef'; - $self->{$key} = $value; # cache it + return $value; } EOT @@ -527,16 +545,26 @@ } my $fast_config = join '', map { " $_,\n" } sort values %Common; -print CONFIG sprintf <<'ENDOFTIE', $fast_config; +$Config_heavy =~ s,.*[/\\],,; # basename +print CONFIG sprintf <<'ENDOFTIE', $Config_heavy, $Config_heavy, $fast_config; sub DESTROY { } sub AUTOLOAD { - require 'Config_heavy.pl'; + my $config_heavy = '%s'; + if (defined &ActivePerl::_CONFIG_HEAVY) { + $config_heavy = ActivePerl::_CONFIG_HEAVY(); + } + require $config_heavy; goto \&launcher; die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; } +sub __unused { + # XXX Keep PerlApp happy + require '%s'; +} + tie %%Config, 'Config', { %s}; @@ -805,7 +833,7 @@ sitelibexp: 4305 privlibexp: 4163 ldlibpthname: 4041 -libpth: 2134 +#libpth: 2134 archname: 1591 exe_ext: 1256 scriptdir: 1155 @@ -818,15 +846,15 @@ intsize: 759 usevendorprefix: 642 dlsrc: 624 -cc: 541 +#cc: 541 lib_ext: 520 so: 512 -ld: 501 -ccdlflags: 500 -ldflags: 495 +#ld: 501 +#ccdlflags: 500 +#ldflags: 495 obj_ext: 495 -cccdlflags: 493 -lddlflags: 493 +#cccdlflags: 493 +#lddlflags: 493 ar: 492 dlext: 492 libc: 492 @@ -861,11 +889,11 @@ siteprefixexp: 336 installbin: 335 usedl: 332 -ccflags: 285 +#ccflags: 285 startperl: 232 optimize: 231 usemymalloc: 229 -cpprun: 228 +#cpprun: 228 sharpbang: 228 perllibs: 225 usesfio: 224 @@ -874,7 +902,7 @@ extensions: 217 usesocks: 208 shellflags: 198 -make: 191 +#make: 191 d_pwage: 189 d_pwchange: 189 d_pwclass: 189 @@ -883,10 +911,10 @@ d_pwgecos: 189 d_pwpasswd: 189 d_pwquota: 189 -gccversion: 189 +#gccversion: 189 libs: 186 useshrplib: 186 -cppflags: 185 +#cppflags: 185 ptrsize: 185 shrpenv: 185 static_ext: 185 @@ -894,6 +922,6 @@ uselargefiles: 185 alignbytes: 184 byteorder: 184 -ccversion: 184 +#ccversion: 184 config_args: 184 -cppminus: 184 +#cppminus: 184 diff -ruN perl-5.8.7/Configure AP815_source/Configure --- perl-5.8.7/Configure 2005-04-20 09:34:37.000000000 -0700 +++ AP815_source/Configure 2005-11-02 19:15:00.000000000 -0800 @@ -189,6 +189,7 @@ to='' usecrosscompile='' mistrustnm='' +config_heavy='' perllibs='' dynamic_ext='' extensions='' @@ -3493,6 +3494,11 @@ esac EOSC +: default Config_heavy.pl +case "$config_heavy" in +'') config_heavy=Config_heavy.pl;; +esac + : function used to set $1 to $val setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef; case "$val$was" in @@ -7936,7 +7942,7 @@ $spackage has manual pages available in source form. EOM -case "$nroff" in +case "DISABLED $nroff" in # heuristic disabled for ActivePerl (always want manpages) nroff) echo "However, you don't have nroff, so they're probably useless to you." case "$man1dir" in @@ -8045,7 +8051,7 @@ $spackage has manual pages for many of the library modules. EOM -case "$nroff" in +case "DISABLED $nroff" in # heuristic disabled for ActivePerl (always want manpages) nroff) $cat <<'EOM' However, you don't have nroff, so they're probably useless to you. @@ -20571,6 +20577,7 @@ clocktype='$clocktype' comm='$comm' compress='$compress' +config_heavy='$config_heavy' contains='$contains' cp='$cp' cpio='$cpio' @@ -21297,7 +21304,7 @@ passcat='$passcat' patchlevel='$patchlevel' path_sep='$path_sep' -perl5='$perl5' +perl5='$installprefix/bin/perl' perl='$perl' perl_patchlevel='$perl_patchlevel' perladmin='$perladmin' diff -ruN perl-5.8.7/embed.fnc AP815_source/embed.fnc --- perl-5.8.7/embed.fnc 2005-01-30 15:13:22.000000000 -0800 +++ AP815_source/embed.fnc 2005-11-02 19:15:00.000000000 -0800 @@ -111,6 +111,7 @@ Ap |I32 |block_gimme p |int |block_start |int full p |void |boot_core_UNIVERSAL +p |void |boot_core_ActivePerl p |void |boot_core_PerlIO Ap |void |call_list |I32 oldscope|AV* av_list p |bool |cando |Mode_t mode|Uid_t effective|Stat_t* statbufp diff -ruN perl-5.8.7/embed.h AP815_source/embed.h --- perl-5.8.7/embed.h 2005-05-30 14:19:11.000000000 -0700 +++ AP815_source/embed.h 2005-11-02 19:15:00.000000000 -0800 @@ -85,6 +85,7 @@ #ifdef PERL_CORE #define block_start Perl_block_start #define boot_core_UNIVERSAL Perl_boot_core_UNIVERSAL +#define boot_core_ActivePerl Perl_boot_core_ActivePerl #define boot_core_PerlIO Perl_boot_core_PerlIO #endif #define call_list Perl_call_list @@ -2107,6 +2108,7 @@ #ifdef PERL_CORE #define block_start(a) Perl_block_start(aTHX_ a) #define boot_core_UNIVERSAL() Perl_boot_core_UNIVERSAL(aTHX) +#define boot_core_ActivePerl() Perl_boot_core_ActivePerl(aTHX) #define boot_core_PerlIO() Perl_boot_core_PerlIO(aTHX) #endif #define call_list(a,b) Perl_call_list(aTHX_ a,b) diff -ruN perl-5.8.7/ext/B/t/stash.t AP815_source/ext/B/t/stash.t --- perl-5.8.7/ext/B/t/stash.t 2005-04-22 09:29:23.000000000 -0700 +++ AP815_source/ext/B/t/stash.t 2005-11-02 19:15:00.000000000 -0800 @@ -58,6 +58,7 @@ print "# (after perlio censorings)\n"; print "# got = @got\n"; +@got = grep { ! /^ActivePerl$/ } @got if defined &ActivePerl::BUILD; @got = grep { ! /^Win32$/ } @got if $^O eq 'MSWin32'; @got = grep { ! /^NetWare$/ } @got if $^O eq 'NetWare'; @got = grep { ! /^(Cwd|File|File::Copy|OS2)$/ } @got if $^O eq 'os2'; diff -ruN perl-5.8.7/ext/Devel/DProf/DProf.xs AP815_source/ext/Devel/DProf/DProf.xs --- perl-5.8.7/ext/Devel/DProf/DProf.xs 2003-08-02 01:40:44.000000000 -0700 +++ AP815_source/ext/Devel/DProf/DProf.xs 2005-11-02 19:15:00.000000000 -0800 @@ -137,6 +137,8 @@ #endif #ifdef PERL_IMPLICIT_CONTEXT # define register +# undef PERL_UNUSED_DECL +# define PERL_UNUSED_DECL pTHX; # undef register #endif diff -ruN perl-5.8.7/ext/Time/HiRes/Changes AP815_source/ext/Time/HiRes/Changes --- perl-5.8.7/ext/Time/HiRes/Changes 2005-04-03 08:23:01.000000000 -0700 +++ AP815_source/ext/Time/HiRes/Changes 2005-11-02 19:15:02.000000000 -0800 @@ -1,6 +1,79 @@ Revision history for Perl extension Time::HiRes. -1.66 +1.76 [2005-10-22] + - testing for nanosleep had wrong logic which caused nanosleep + to become undefined for e.g. Mac OS X + - added a test for a core dump that was introduced by Perl 5.8.0 + safe signals and was fixed for the time of 5.8.1 (one report of + the core dump was [perl #20920]), the test skipped pre-5.8.1. + - *cough* s/unanosleep/nanosleep/g; *cough* + +1.75 [2005-10-18] + - installation patch from Gisle Aas: in Perls 5.8.x and later + use MakeMaker INSTALLDIRS value of 'perl' instead of 'site'. + +1.74 [2005-09-19] + - [cpan #14608] Solaris 8 perl 5.005_03 File::Spec module does not have method rel2abs + (the workaround is not to use rel2abs, should not be necessary) + - [cpan #14642] U2time wrongly exported on the C API + (patch supplied by the reporter, SALVA@cpan.org) + - add release dates to Changes + +1.73 [2005-08-16] + - Time::HiRes::nanosleep support for Solaris [PATCH] + (POSIX::uname() not available if building with core perl, + from Gisle Aas, via perl5-porters, perl change #25295) + +1.72 [2005-07-01] + - going back to the 1.68 loader setup (using DynaLoader) + since too many weird things starting breaking + - fix a typo in José Auguste-Etienne's name + +1.71 [2005-06-28] + - a thinko in the nanosleep() detection + - move more changes stuff from the README to Changes + - add -w to the Makefile.PL + +1.70 [2005-06-26] + - oops in 1.69 about @ISA (not affecting anything but silly) + - add copyright 2005 to HiRes.pm + - add copyright and license to HiRes.xs + - add copyrights 2003, 2004, 2005 to README + +1.69 [2005-06-25] + - actually run a test for nanosleep + (if there is no $Config{d_nanosleep}) since e.g. in AIX 4.2 + it seems that one can link in nanosleep() but then calling + it fails instantly and sets errno to ENOSYS (Not implemented). + This may be fixable in the AIX case by figuring out the right + (realtime POSIX?) libs and whatnot, but in the general case + running a real test case is better. (Of course, this change + will no doubt run into portability problems because of the + execution step...) Note that because of hysterical raisins + most Perls do NOT have $Config{d_nanosleep} (scanning for + it by Configure would in many platforms require linking in + things like -lrt, which would in many platforms be a bad idea + for Perl itself). + (from José Auguste-Etienne) + - support XSLoader also since it's much faster + (from Alexey Tourbin) + - add SEE ALSO (BSD::Resource and Time::TAI64) + +1.68 [2005-05-14] + - somehow 1.67 had a lot of doubled lines (a major cut-and-paste + error suspected), but miraculously it still worked since the + doubling took place below the __END__ token + - undef Pause() before defining it to avoid redefinition warnings + during compilation in case perl.h had already defined Pause() + (part of perl change #24271) + - minor doc tweaks + +1.67 [2005-05-04] + - (internal) don't ignore the return value of gettimeofday() + - (external) return undef or an empty if the C gettimeofday() fails + (affects Time::HiRes gettimeofday() and the hires time()) + +1.66 [2004-12-19] - add nanosleep() - fix the 'hierachy' typo in Makefile.PL [rt.cpan.org #8492] - should now build in Solaris [rt.cpan.org #7165] (since 1.64) @@ -8,7 +81,7 @@ - close also [rt.cpan.org #5933] "Time::HiRes::time does not pick up time adjustments like ntp" since ever reproducing it in the same environment has become rather unlikely -1.65 +1.65 [2004-09-18] - one should not mix u?alarm and sleep (the tests modified by 1.65, #12 and #13, hung in Solaris), now we just busy loop executing an empty block @@ -16,7 +89,7 @@ sleeps and alarms - small spelling fixes -1.64 +1.64 [2004-09-16] - regenerate ppport.h with Devel::PPPort 3.03, now the MY_CXT_CLONE is defined in ppport.h, we no more need to do that. @@ -26,11 +99,11 @@ changed to sleep(1)s, the tests still pass but no hang after a few hundred repeats. -1.63 +1.63 [2004-09-01] - Win32 and any ithread build: ppport.h didn't define MY_CXT_CLONE, which seems to be a Time-HiResism. -1.62 +1.62 [2004-08-31] - Skip testing if under PERL_CORE and Time::HiRes has not been Configured (from Marcus Holland-Moritz, core change #23246) @@ -42,13 +115,13 @@ - Can't use newSVpvf for <= 5.003. (most of the changes from Marcus) -1.61 +1.61 [2004-08-21] - Win32: reset reading from the performance counters every five minutes to better track wall clock time (thanks to PC timers being often quite bad), should help long-running programs. -1.60 +1.60 [2004-08-15] - Win32: Patch from Steve Hay [PATCH] Re: [perl #30755] [Win32] Different results from Time::HiRes::gettimeofdayunder the debugger to [perl #30755] reported by Nigel Sandever @@ -61,50 +134,50 @@ after that keep using -lrt, patch from Alan Burlison, bug reported in [cpan #7165] -1.59 +1.59 [2004-04-08] - Change the Win32 recalibration limit to 0.5 seconds and tweak the documentation to blather less about the gory details of the Win32 implementation and more about the complications in general of meddling with the system clock. -1.58 +1.58 [2004-04-08] - Document the 1.57 change better. -1.57 +1.57 [2004-07-04] - Win32/Cygwin/MinGW: if the performance counter drifts by more than two seconds from the system clock (due to ntp adjustments, for example), recalibrate our internal counter: from Jan Dubois, based on [cpan #5933] by Jerry D. Hedden. -1.56 +1.56 [2004-29-02] - Give a clearer message if the tests timeout (perl change #22253) - Don't use /tmp or its moral equivalents (perl bug #15036, perl change #22258) -1.55 +1.55 [2004-01-14] - Windows: mingw32 patch from Mike Pomraning (use Perl's Const64() instead of VC-specific i64 suffix) -1.54 +1.54 [2003-12-31] - Solaris: like Tru64 (dec_osf) also Solaris need -lrt for nanosleep -1.53 +1.53 [2003-12-30] - Windows: higher resolution time() by using the Windows performance counter API, from Jan Dubois and Anton Shcherbinin. The exact new higher resolution depends on the hardware, but it should be quite a bit better than using the basic Windows timers. -1.52 +1.52 [2003-10-28] - In AIX (v?) with perl 5.6.1 the HiRes.t can hang after the subtest 18. No known analysis nor fix, but added an alarm (that requires fork() and alarm()) to the test. -1.51 +1.51 [2003-09-22] - doc tweaks from mjd (perl change #20456) - NCR MP-RAS hints file added (svr4.pl) (perl change #21249) -1.50 +1.50 [2003-08-02] - add a message (for non-core builds) to Makefile.PL about the LC_ALL=C workaround - &Time::HiRes::d_nanosleep was broken (perl change #20131) @@ -114,47 +187,47 @@ - MPE/iX tweak (perl change #20042) - do not use HAS_NANOSLEEP (perl change #19898) -1.49 +1.49 [2003-06-23] - UVuf for non-IVSIZE platforms (from Keiichiro Nagano) - OS/2 can always mix subsecond sleeps with signals (part of perl change #19789) -1.48 +1.48 [2003-06-04] - workaround for buggy gcc 2.95.3 in openbsd/sparc64 (perl change #19592) -1.47 +1.47 [2003-05-03] - do not use -lrt in Linux (from March Lehmann, perl change #19449) - unnecessary (nanosleep is in libc anyway) - harmful (-lrt slows down execution) - incompatible (with many distributions' pthreads) -1.46 +1.46 [2003-04-25] - do not create files in blib directories under core (perl change #19160, from rgs) - detypo s/VTLARM/VTARLM/ (perl change #19328, from mjd) -1.45 +1.45 [2003-04-01] - guarantee that $xdefine in HiRes.t is always defined (perl change #19109, from IlyaZ) - a cleaner way to detect PERL_CORE (perl change #19111, from IlyaZ) -1.44 +1.44 [2003-03-30] - add hints/irix.pl to turn off overly POSIX flags that cause hide struct timespec to be hidden (and compilation to fail) (bleadperl change #19085) - documentation tweaks -1.43 +1.43 [2003-03-11] - add c:/temp to the list of temp directories to probe so that cygwin (and win*?) builds are happy. This was needed at least in my cygwin 1.3.20/w2k setup. -1.42 +1.42 [2003-01-07] - modernize the constants code (from Nicholas Clark) -1.41 +1.41 [2003-01-03] - At some point the ability to figure our the correct incdir for EXTERN.h (either a core perl build, or an installed perl) had broken (which lead into all test compiles failing with @@ -164,7 +237,7 @@ Now stole a trick from the Encode that sets $ENV{PERL_CORE} right, and both styles of build should work again. -1.40 +1.40 [2003-01-03] - Nicholas Clark noticed that the my_catdir() emulation function was broken (which means that we didn't really work for Perls 5.002 and 5.003) @@ -172,16 +245,16 @@ and strict clean - tightened up the Makefile.PL output, less whitespace -1.39 +1.39 [2003-10-20] - fix from Craig Berry for better building in VMS with PERL_CORE -1.38 +1.38 [2003-10-13] - no functional changes - move lib/Time/HiRes.pm as Hires.pm - libraries scanning was slightly broken (always scanned for a library even when $Config{libs} already had it) -1.37 +1.37 [2003-09-23] - Ray Zimmerman ran into a race condition in Mac OS X. A 0.01-second alarm fired before the test expected. The test first slept indefinitely (blocking for signals) @@ -192,7 +265,7 @@ environment variable VERBOSE to a true value to see the details (the probing command and the possible errors) -1.36 +1.36 [2003-09-12] - do not clear MAN3PODS in Makefile.PL (Radoslaw Zielinski) - INSTALLDIRS => 'perl' missing which means that Time::HiRes cannot be upgraded from CPAN to override the 5.8.0 version @@ -202,19 +275,19 @@ if $ENV{PERL_CORE} (Hugo van der Sanden) - add documentation about the restart of select() under alarm() -1.35 +1.35 [2003-08-24] - small documentation tweaks -1.34 +1.34 [2003-08-22] - better VMS operation (Craig Berry) -1.33 +1.33 [2003-08-20] - our time machine is accelerating: now works with Perl 5.004_01 (tried with 5.003_07 and 5.002 but I get segmentation faults from running the Makefile.PL with those in Tru64 4.0D) -1.32 +1.32 [2003-08-20] - backward compatibility (pre-5.6.0) tweaks: - no XSLoader in 5.00503, use DynaLoader instead - no SvPV_nolen, either @@ -229,7 +302,7 @@ (since older Perl do not have them in %Config, and even 5.8.0 does not probe for nanosleep) -1.31 +1.31 [2003-08-19] - backward compatibility (pre-5.6.1) tweaks: - define NV if no NVTYPE - define IVdf if needed (note: the Devel::PPPort @@ -237,22 +310,35 @@ the IVSIZE might not be defined) - define NVgf if needed - grab the typemap from 5.8.0 for the NV stuff -1.30 + + 1.31 and 1.32 add more backward compatibility (now all the way + back to Perl 5.00404), and using nanosleep() (if available) for + subsecond sleeps. + +1.30 [2003-08-16] - release 1.29_02 as 1.30 -1.29_02 + 1.30 adds all the changes made during the Perl 5.6->5.7->5.8 + development cycle. Most notably portability across platforms has been + enhanced, and the interval timers (setitimer, getitimer) have been + added. Note that the version of Time::HiRes that is included in Perl + 5.8.0 calls itself 1.20_00, but it is equivalent to this Time::HiRes + version. Note also that in 1.30 Wegscheid turns over the maintenance + to Jarkko Hietaniemi. + +1.29_02 [2003-08-16] - fix a silly unclosed comment typo in HiRes.xs - document and export REALTIME_REALPROF (Solaris) -1.29_01 +1.29_01 [2003-08-16] - only getitimer(ITIMER_REAL) available in Cygwin and Win32 (need to patch this also in Perl 5.[89]) - remove CVS revision log from HiRes.xs -1.29_00 +1.29_00 [2003-08-14] The following numbered patches refer to the Perl 5.7 changes, you can browse them at http://public.activestate.com/cgi-bin/perlbrowse @@ -346,6 +432,10 @@ - hopefully correct "-lc" fix for SCO. - add PPD stuff + 1.20 adds a platform neutral set of C accessible routines if you are + running 5.005+. All other changes are packaging changes and build + fixes(?) for statically linked Perl, SCO, and VMS. + 1.19 Tue Sep 29 22:30 1998 - put VMS gettimeofday() in. Patch is from Sebastian Bazley @@ -357,6 +447,8 @@ - fix Makefile.PL (more) so that detection of gettimeofday is more correct. + 1.19 has better VMS support. + 1.18 Mon Jul 6 22:40 1998 - add usleep() for Win32. - fix Makefile.PL to fix reported HP/UX feature where unresolved @@ -364,6 +456,9 @@ x bit set). Thanks to David Kozinn for report and explanation. Problems with the fix are mine :) + 1.18 has limited Win32 support (no ualarm). Added usleep for Win32. + Probably buggy. I'm sure I'll hear. + 1.17 Wed Jul 1 20:10 1998 - fix setitimer calls so microseconds is not more than 1000000. Hp/UX 9 doesn't like that. Provided by Roland B Robert, PhD. @@ -375,6 +470,22 @@ 1.16 Wed Nov 12 21:05 1997 - add missing EXTEND in new gettimeofday scalar code. + 1.16+ should be closer to building out of the box on Linux. Thanks + to Gisle Aas for patches, and the ualarm equivalent using setitimer. + + If your underlying operating system doesn't implement ualarm(), then + a fake using setitimer() will be made. If the OS is missing usleep(), + a fake one using select() will be made. If a fake can't be made for + either ualarm() or usleep(), then the corresponding Perl function will + not be available. If the OS is missing gettimeofday(), you will get + unresolved externals, either at link- or run-time. + + This is an improvement; the package used to not even build if + you were missing any of these bits. Roderick Schertler + + did all the conditional compilation stuff, + look at HiRes.pm and the test suites; it's good educational reading. + 1.15 Mon Nov 10 21:30 1997 - HiRes.pm: update pod. Provided by Gisle Aas. - HiRes.xs: if gettimeofday() called in scalar context, do diff -ruN perl-5.8.7/ext/Time/HiRes/hints/solaris.pl AP815_source/ext/Time/HiRes/hints/solaris.pl --- perl-5.8.7/ext/Time/HiRes/hints/solaris.pl 2004-08-22 12:33:12.000000000 -0700 +++ AP815_source/ext/Time/HiRes/hints/solaris.pl 2005-11-02 19:15:02.000000000 -0800 @@ -1,6 +1,7 @@ -use POSIX qw(uname); # 2.6 has nanosleep in -lposix4, after that it's in -lrt -if (substr((uname())[2], 2) <= 6) { +my $r = `/usr/bin/uname -r`; +chomp($r); +if (substr($r, 2) <= 6) { $self->{LIBS} = ['-lposix4']; } else { $self->{LIBS} = ['-lrt']; diff -ruN perl-5.8.7/ext/Time/HiRes/HiRes.pm AP815_source/ext/Time/HiRes/HiRes.pm --- perl-5.8.7/ext/Time/HiRes/HiRes.pm 2005-04-03 08:23:02.000000000 -0700 +++ AP815_source/ext/Time/HiRes/HiRes.pm 2005-11-02 19:15:02.000000000 -0800 @@ -15,7 +15,7 @@ d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.66'; +$VERSION = '1.76'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -24,7 +24,10 @@ ($constname = $AUTOLOAD) =~ s/.*:://; die "&Time::HiRes::constant not defined" if $constname eq 'constant'; my ($error, $val) = constant($constname); - if ($error) { die $error; } + if ($error) { + my (undef,$file,$line) = caller; + die "$error at $file line $line.\n"; + } { no strict 'refs'; *$AUTOLOAD = sub { $val }; @@ -111,9 +114,9 @@ then carefully read your C C API documentation for any peculiarities. -Unless using C for mixing sleeping with signals, give -some thought to whether Perl is the tool you should be using for -work requiring nanosecond accuracies. +If you are using C for something else than mixing sleeping +with signals, give some thought to whether Perl is the tool you should +be using for work requiring nanosecond accuracies. The following functions can be imported from this module. No functions are exported by default. @@ -151,7 +154,7 @@ Issues a C call; the C<$interval_useconds> is optional and will be zero if unspecified, resulting in C-like behaviour. -Note that the interaction between alarms and sleeps are unspecified. +Note that the interaction between alarms and sleeps is unspecified. =item tv_interval @@ -194,7 +197,7 @@ be imported, resulting in a nice drop-in replacement for the C provided with perl, see the L below. -Note that the interaction between alarms and sleeps are unspecified. +Note that the interaction between alarms and sleeps is unspecified. =item alarm ( $floating_seconds [, $interval_floating_seconds ] ) @@ -210,7 +213,7 @@ take the sum of the times specified for the the C and the C, not just the time of the C. -Note that the interaction between alarms and sleeps are unspecified. +Note that the interaction between alarms and sleeps is unspecified. =item setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] ) @@ -235,7 +238,7 @@ and Cygwin have only C, and only Solaris seems to have C (which is used to profile multithreaded programs). -C results in C-like behavior. Time is counted in +C results in C-like behaviour. Time is counted in I; that is, wallclock time. C is delivered when the timer expires. @@ -321,17 +324,17 @@ name C prototype --------------- ---------------------- Time::NVtime double (*)() - Time::U2time void (*)(UV ret[2]) + Time::U2time void (*)(pTHX_ UV ret[2]) Both functions return equivalent information (like C) but with different representations. The names C and C were selected mainly because they are operating system independent. -(C is Unix-centric, though some platforms like VMS have -emulations for it.) +(C is Unix-centric, though some platforms like Win32 and +VMS have emulations for it.) Here is an example of using C from C: - double (*myNVtime)(); + double (*myNVtime)(); /* Returns -1 on failure. */ SV **svp = hv_fetch(PL_modglobal, "Time::NVtime", 12, 0); if (!svp) croak("Time::HiRes is required"); if (!SvIOK(*svp)) croak("Time::NVtime isn't a function pointer"); @@ -363,6 +366,10 @@ drift off from the system clock (and the original time()) by up to 0.5 seconds. Time::HiRes will notice this eventually and recalibrate. +=head1 SEE ALSO + +L, L. + =head1 AUTHORS D. Wegscheid @@ -374,7 +381,7 @@ Copyright (c) 1996-2002 Douglas E. Wegscheid. All rights reserved. -Copyright (c) 2002,2003,2004 Jarkko Hietaniemi. All rights reserved. +Copyright (c) 2002, 2003, 2004, 2005 Jarkko Hietaniemi. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -ruN perl-5.8.7/ext/Time/HiRes/HiRes.xs AP815_source/ext/Time/HiRes/HiRes.xs --- perl-5.8.7/ext/Time/HiRes/HiRes.xs 2005-04-03 08:23:03.000000000 -0700 +++ AP815_source/ext/Time/HiRes/HiRes.xs 2005-11-02 19:15:02.000000000 -0800 @@ -1,3 +1,13 @@ +/* + * + * Copyright (c) 1996-2002 Douglas E. Wegscheid. All rights reserved. + * + * Copyright (c) 2002,2003,2004,2005 Jarkko Hietaniemi. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the same terms as Perl itself. + */ + #ifdef __cplusplus extern "C" { #endif @@ -31,6 +41,7 @@ #ifdef HAS_PAUSE # define Pause pause #else +# undef Pause /* In case perl.h did it already. */ # define Pause() sleep(~0) /* Zzz for a long time. */ #endif @@ -351,10 +362,10 @@ * The TIME_HIRES_NANOSLEEP is set by Makefile.PL. */ #if !defined(HAS_USLEEP) && defined(TIME_HIRES_NANOSLEEP) #define HAS_USLEEP -#define usleep hrt_unanosleep /* could conflict with ncurses for static build */ +#define usleep hrt_nanosleep /* could conflict with ncurses for static build */ void -hrt_unanosleep(unsigned long usec) /* This is used to emulate usleep. */ +hrt_nanosleep(unsigned long usec) /* This is used to emulate usleep. */ { struct timespec res; res.tv_sec = usec/1000/1000; @@ -647,10 +658,8 @@ #ifdef ATLEASTFIVEOHOHFIVE #ifdef HAS_GETTIMEOFDAY { - UV auv[2]; hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2IV(myNVtime)), 0); - if (myU2time(aTHX_ auv) == 0) - hv_store(PL_modglobal, "Time::U2time", 12, newSViv((IV) auv[0]), 0); + hv_store(PL_modglobal, "Time::U2time", 12, newSViv(PTR2IV(myU2time)), 0); } #endif #endif @@ -810,16 +819,18 @@ PPCODE: int status; status = gettimeofday (&Tp, &Tz); - Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ - if (GIMME == G_ARRAY) { - EXTEND(sp, 2); - /* Mac OS (Classic) has unsigned time_t */ - PUSHs(sv_2mortal(newSVuv(Tp.tv_sec))); - PUSHs(sv_2mortal(newSViv(Tp.tv_usec))); - } else { - EXTEND(sp, 1); - PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); + if (status == 0) { + Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ + if (GIMME == G_ARRAY) { + EXTEND(sp, 2); + /* Mac OS (Classic) has unsigned time_t */ + PUSHs(sv_2mortal(newSVuv(Tp.tv_sec))); + PUSHs(sv_2mortal(newSViv(Tp.tv_usec))); + } else { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); + } } NV @@ -830,8 +841,12 @@ CODE: int status; status = gettimeofday (&Tp, &Tz); - Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ - RETVAL = Tp.tv_sec + (Tp.tv_usec / 1000000.0); + if (status == 0) { + Tp.tv_sec += Tz.tz_minuteswest * 60; /* adjust for TZ */ + RETVAL = Tp.tv_sec + (Tp.tv_usec / 1000000.0); + } else { + RETVAL = -1.0; + } OUTPUT: RETVAL @@ -843,13 +858,15 @@ PPCODE: int status; status = gettimeofday (&Tp, NULL); - if (GIMME == G_ARRAY) { - EXTEND(sp, 2); - PUSHs(sv_2mortal(newSViv(Tp.tv_sec))); - PUSHs(sv_2mortal(newSViv(Tp.tv_usec))); - } else { - EXTEND(sp, 1); - PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); + if (status == 0) { + if (GIMME == G_ARRAY) { + EXTEND(sp, 2); + PUSHs(sv_2mortal(newSViv(Tp.tv_sec))); + PUSHs(sv_2mortal(newSViv(Tp.tv_usec))); + } else { + EXTEND(sp, 1); + PUSHs(sv_2mortal(newSVnv(Tp.tv_sec + (Tp.tv_usec / 1000000.0)))); + } } NV @@ -859,7 +876,11 @@ CODE: int status; status = gettimeofday (&Tp, NULL); - RETVAL = Tp.tv_sec + (Tp.tv_usec / 1000000.); + if (status == 0) { + RETVAL = Tp.tv_sec + (Tp.tv_usec / 1000000.); + } else { + RETVAL = -1.0; + } OUTPUT: RETVAL @@ -913,4 +934,3 @@ #endif /* #if defined(HAS_GETITIMER) && defined(HAS_SETITIMER) */ - diff -ruN perl-5.8.7/ext/Time/HiRes/Makefile.PL AP815_source/ext/Time/HiRes/Makefile.PL --- perl-5.8.7/ext/Time/HiRes/Makefile.PL 2004-11-16 11:37:15.000000000 -0800 +++ AP815_source/ext/Time/HiRes/Makefile.PL 2005-11-02 19:15:02.000000000 -0800 @@ -1,3 +1,10 @@ +#!/usr/bin/perl +# +# In general we trust %Config, but for nanosleep() this trust +# may be misplaced (it may be linkable but not really functional). +# Use $ENV{FORCE_NANOSLEEP_SCAN} to force rescanning whether there +# really is hope. + require 5.002; use Config; @@ -7,7 +14,7 @@ my $VERBOSE = $ENV{VERBOSE}; my $DEFINE; my $LIBS = []; -my $XSOPT; +my $XSOPT = ''; use vars qw($self); # Used in 'sourcing' the hints. @@ -135,16 +142,28 @@ printf "cccmd = $cccmd\n" if $VERBOSE; my $res = system($cccmd); $ok = defined($res) && $res==0 && -s $tmp_exe && -x _; + + if ( $ok && exists $args{run} && $args{run}) { + my $tmp_exe = + File::Spec->catfile(File::Spec->curdir, $tmp_exe); + printf "Running $tmp_exe..." if $VERBOSE; + if (system($tmp_exe) == 0) { + $ok = 1; + } else { + $ok = 0; + print "[ system('$tmp_exe') failed: status $? ] "; + } + } unlink("$tmp.c", $tmp_exe); } } - $ok; + return $ok; } sub has_gettimeofday { # confusing but true (if condition true ==> -DHAS_GETTIMEOFDAY already) - return 0 if $Config{d_gettimeod} eq 'define'; + return 0 if $Config{d_gettimeod}; return 1 if try_compile_and_link(< 1); +#include +#include +#include +#include +#include + +/* int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); */ + +int main() { + struct timespec ts1, ts2; + int ret; + ts1.tv_sec = 0; + ts1.tv_nsec = 750000000; + ts2.tv_sec = 0; + ts2.tv_nsec = 0; + errno = 0; + ret = nanosleep(&ts1, &ts2); /* E.g. in AIX nanosleep() fail and set errno to ENOSYS. */ + ret == 0 ? exit(0) : exit(errno ? errno : -1); +} +EOM +} + sub has_include { my ($inc) = @_; return 1 if @@ -327,7 +372,7 @@ } else { print "NOT found.\n"; print "Let's see if you have select()... "; - if ($Config{'d_select'} eq 'define') { + if ($Config{'d_select'}) { print "found.\n"; print "We can make a Time::HiRes::usleep().\n"; } else { @@ -338,15 +383,27 @@ print "Looking for nanosleep()... "; my $has_nanosleep; - if (exists $Config{d_nanosleep}) { + if ($ENV{FORCE_NANOSLEEP_SCAN}) { + print "forced scan... "; + if (has_nanosleep()) { + $has_nanosleep++; + $DEFINE .= ' -DTIME_HIRES_NANOSLEEP'; + } + } + elsif (exists $Config{d_nanosleep}) { + print "believing \$Config{d_nanosleep}... "; if ($Config{d_nanosleep}) { $has_nanosleep++; $DEFINE .= ' -DTIME_HIRES_NANOSLEEP'; } - } elsif ($^O ne 'mpeix' && # MPE/iX falsely finds nanosleep. - has_x ("nanosleep (NULL, NULL)")) { - $has_nanosleep++; - $DEFINE .= ' -DTIME_HIRES_NANOSLEEP'; + } elsif ($^O =~ /^(mpeix)$/) { + # MPE/iX falsely finds nanosleep from its libc equivalent. + print "skipping because in $^O... "; + } else { + if (has_nanosleep()) { + $has_nanosleep++; + $DEFINE .= ' -DTIME_HIRES_NANOSLEEP'; + } } if ($has_nanosleep) { @@ -402,7 +459,7 @@ 'XSOPT' => $XSOPT, # do not even think about 'INC' => '-I/usr/ucbinclude', Solaris will avenge. 'INC' => '', # e.g., '-I/usr/include/other' - 'INSTALLDIRS' => 'perl', + 'INSTALLDIRS' => ($] >= 5.008 ? 'perl' : 'site'), 'dist' => { 'CI' => 'ci -l', 'COMPRESS' => 'gzip -9f', diff -ruN perl-5.8.7/ext/Time/HiRes/t/HiRes.t AP815_source/ext/Time/HiRes/t/HiRes.t --- perl-5.8.7/ext/Time/HiRes/t/HiRes.t 2005-04-03 08:23:04.000000000 -0700 +++ AP815_source/ext/Time/HiRes/t/HiRes.t 2005-11-02 19:15:02.000000000 -0800 @@ -12,9 +12,9 @@ } } -BEGIN { $| = 1; print "1..28\n"; } +BEGIN { $| = 1; print "1..29\n"; } -END {print "not ok 1\n" unless $loaded;} +END { print "not ok 1\n" unless $loaded } use Time::HiRes qw(tv_interval); @@ -30,6 +30,12 @@ my $have_ualarm = defined &Time::HiRes::ualarm; my $have_time = defined &Time::HiRes::time; +printf "# have_gettimeofday = %d\n", $have_gettimeofday; +printf "# have_usleep = %d\n", $have_usleep; +printf "# have_nanosleep = %d\n", $have_nanosleep; +printf "# have_ualarm = %d\n", $have_ualarm; +printf "# have_time = %d\n", $have_time; + import Time::HiRes 'gettimeofday' if $have_gettimeofday; import Time::HiRes 'usleep' if $have_usleep; import Time::HiRes 'nanosleep' if $have_nanosleep; @@ -39,26 +45,29 @@ my $have_alarm = $Config{d_alarm}; my $have_fork = $Config{d_fork}; -my $waitfor = 60; # 10 seconds is normal. -my $pid; +my $waitfor = 60; # 10-20 seconds is normal (load affects this). +my $timer_pid; if ($have_fork) { - print "# I am process $$, starting the timer process\n"; - if (defined ($pid = fork())) { - if ($pid == 0) { # We are the kid, set up the timer. - print "# I am timer process $$\n"; + print "# I am the main process $$, starting the timer process...\n"; + $timer_pid = fork(); + if (defined $timer_pid) { + if ($timer_pid == 0) { # We are the kid, set up the timer. + print "# I am the timer process $$, sleeping for $waitfor seconds...\n"; sleep($waitfor); - warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded\n"; - print "# Terminating the testing process\n"; + warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded!\n"; + print "# Terminating the main process...\n"; kill('TERM', getppid()); - print "# Timer process exiting\n"; + print "# This is the timer process $$, over and out.\n"; exit(0); + } else { + print "# Timer process $timer_pid launched, continuing testing...\n"; } } else { warn "$0: fork failed: $!\n"; } } else { - print "# No timer process\n"; + print "# No timer process (need fork)\n"; } my $xdefine = ''; @@ -95,7 +104,7 @@ } } -if (!$have_gettimeofday) { +unless ($have_gettimeofday) { skip 2..6; } else { @@ -114,7 +123,7 @@ ok 6, $f - $two[0] < 2, "$f - $two[0] >= 2"; } -if (!$have_usleep) { +unless ($have_usleep) { skip 7..8; } else { @@ -125,7 +134,7 @@ my $three = time; ok 7, $one == $two || $two == $three, "slept too long, $one $two $three"; - if (!$have_gettimeofday) { + unless ($have_gettimeofday) { skip 8; } else { @@ -143,7 +152,7 @@ ok 9, abs($f - 5.4) < 0.001, $f; } -if (!$have_gettimeofday) { +unless ($have_gettimeofday) { skip 10; } else { @@ -152,7 +161,7 @@ ok 10, $f < 2, $f; } -if (!$have_usleep || !$have_gettimeofday) { +unless ($have_usleep && $have_gettimeofday) { skip 11; } else { @@ -162,7 +171,7 @@ ok 11, $f > 0.4 && $f < 0.9, "slept $f instead of 0.5 secs."; } -if (!$have_ualarm || !$have_alarm) { +unless ($have_ualarm && $have_alarm) { skip 12..13; } else { @@ -183,7 +192,7 @@ # Did we even get close? -if (!$have_time) { +unless ($have_time) { skip 14; } else { my ($s, $n, $i) = (0); @@ -350,7 +359,7 @@ } } -if (!$have_nanosleep) { +unless ($have_nanosleep) { skip 22..23; } else { @@ -361,7 +370,7 @@ my $three = CORE::time; ok 22, $one == $two || $two == $three, "slept too long, $one $two $three"; - if (!$have_gettimeofday) { + unless ($have_gettimeofday) { skip 23; } else { @@ -402,9 +411,25 @@ skip 28; } -if (defined $pid) { - print "# I am process $$, terminating the timer process $pid\n"; - kill('TERM', $pid); # We are done, the timer can go. - unlink("ktrace.out"); +if ($have_ualarm && $] >= 5.008001) { + # http://groups.google.com/group/perl.perl5.porters/browse_thread/thread/adaffaaf939b042e/20dafc298df737f0%2320dafc298df737f0?sa=X&oi=groupsr&start=0&num=3 + # Perl changes [18765] and [18770], perl bug [perl #20920] + use Time::HiRes qw(alarm); + my $cnt = 0; + $SIG{ALRM} = sub { alarm(0) if $cnt++ > 10; 1 for 1..100000 }; + alarm(0.01, 0.01); + sleep(1); + print "ok 29\n"; # Not core dumping by now is considered to be the success. +} else { + skip 29; +} + +END { + if (defined $timer_pid) { + print "# I am the main process $$, terminating the timer process $timer_pid.\n"; + kill('TERM', $timer_pid); # We are done, the timer can go. + unlink("ktrace.out"); # Used in BSD system call tracing. + print "# All done.\n"; + } } diff -ruN perl-5.8.7/ext/util/make_ext AP815_source/ext/util/make_ext --- perl-5.8.7/ext/util/make_ext 2002-05-02 16:32:21.000000000 -0700 +++ AP815_source/ext/util/make_ext 2005-11-02 19:15:02.000000000 -0800 @@ -92,7 +92,12 @@ dynamic) makeargs="LINKTYPE=dynamic"; target=all ;; -static) makeargs="LINKTYPE=static CCCDLFLAGS=" +static) case "$mname" in + # For Apache, DynaLoader needs the CCCDLFLAGS variable + # (+z/+Z/-fpic/-fPIC) to stick around + *DynaLoader*) makeargs="LINKTYPE=static" ;; + *) makeargs="LINKTYPE=static CCCDLFLAGS=" ;; + esac target=all ;; static_pic) makeargs="LINKTYPE=static" diff -ruN perl-5.8.7/hints/aix.sh AP815_source/hints/aix.sh --- perl-5.8.7/hints/aix.sh 2005-04-04 13:05:43.000000000 -0700 +++ AP815_source/hints/aix.sh 2005-11-02 19:15:02.000000000 -0800 @@ -152,6 +152,28 @@ # the required -bE:$installarchlib/CORE/perl.exp is added by # libperl.U (Configure) later. +case "$cc" in +*gcc*) ;; +cc*|xlc*) # cc should've been set by line 116 or so if empty. + if test ! -x /usr/bin/$cc -a -x /usr/vac/bin/$cc; then + case ":$PATH:" in + *:/usr/vac/bin:*) ;; + *) cat <= 10.x @@ -33,6 +35,7 @@ sed -e 's/HP-//' -e 1q`; selecttype='int *' fi +fi # For some strange reason, the u32align test from Configure hangs in # HP-UX 10.20 since the December 2001 patches. So hint it to avoid @@ -179,7 +182,11 @@ esac # When HP-UX runs a script with "#!", it sets argv[0] to the script name. +case "$toke_cflags" in +'') toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' + ;; +esac ### 64 BITNESS @@ -285,7 +292,11 @@ ;; *) ccflags="$ccflags +DD64" - ldflags="$ldflags +DD64" + case "$archname" in + PA-RISC*) + ldflags="$ldflags +DD64" + ;; + esac ;; esac @@ -293,7 +304,7 @@ # are the right type # (NOTE: on IA64, this doesn't work with .a files.) libscheck='case "`/usr/bin/file $xxx`" in - *ELF-64*|*LP64*|*PA-RISC2.0*) ;; + *ELF-64*|*LP64*|*PA-RISC2.0*|*pa20_64*) ;; *) xxx=/no/64-bit$xxx ;; esac' @@ -306,7 +317,10 @@ libc='/lib/libc.sl' ;; IA64*) loclibpth="$loclibpth /usr/lib/hpux32" - libc='/usr/lib/hpux32/libc.so' ;; + libc='/usr/lib/hpux32/libc.so' + # no odbm libs + i_dbm=$undef + ;; esac ;; esac @@ -366,14 +380,17 @@ $define|true|[Yy]) case "$optimize" in - "") optimize="-g -O" ;; + "") optimize="-O" ;; *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;; esac - #ld="$cc" - ld=/usr/bin/ld + ld="$cc" + #ld=/usr/bin/ld cccdlflags='-fPIC' - #lddlflags='-shared' - lddlflags='-b' + lddlflags='-shared -static-libgcc -fPIC' + case "$ccflags" in + *-mlp64*) lddlflags="$lddlflags -mlp64" ;; + esac + #lddlflags='-b' case "$optimize" in *-g*-O*|*-O*-g*) # gcc without gas will not accept -g @@ -424,6 +441,35 @@ ;; esac +# -lc should be at the end, if present (cc wrappers always add it). +# If $ld is the same as $cc, we remove libc from $libswanted, as cc +# will normally add it to the end of the libs list. If that isn't +# the case, we need to move libc to the end of $libswanted. +case "$ld" in +"$cc") + set `echo " $libswanted " | sed -e 's@ c @ @'` + libswanted="$*" + ;; +*) + case " $libswanted " in + *" c "*) + set `echo " $libswanted " | sed -e 's@ c @ @'` + libswanted="$* c " + ;; + esac + ;; +esac + +# Link with libcres.a, a performance library, on PA-RISC when using HP C +case "$archname" in + PA-RISC*) + case "$ccisgcc" in + '') + libswanted="cres $libswanted" + ;; + esac + esac + ## LARGEFILES if [ $xxOsRev -lt 1020 ]; then uselargefiles="$undef" @@ -626,9 +672,17 @@ else # 12 may want upping the _POSIX_C_SOURCE datestamp... ccflags=" -D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags" - set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` - shift - libswanted="$*" + case "$libswanted " in + *" pthread "*) ;; + *" c "*) + set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` + shift + libswanted="$*" + ;; + *) + libswanted="$libswanted pthread " + ;; + esac fi ;; @@ -638,7 +692,7 @@ # The mysterious io_xs memory corruption in 11.00 32bit seems to get # fixed by not using Perl's malloc. Flip side is performance loss. # So we want mymalloc for all situations possible -usemymalloc='y' +usemymalloc='n' case "$usethreads" in $define|true|[yY]*) usemymalloc='n' ;; *) case "$ccisgcc" in @@ -658,7 +712,7 @@ usemymalloc='n' case "$useperlio" in - $undef|false|[nN]*) usemymalloc='y' ;; + $undef|false|[nN]*) usemymalloc='n' ;; esac # malloc wrap works diff -ruN perl-5.8.7/hints/solaris_2.sh AP815_source/hints/solaris_2.sh --- perl-5.8.7/hints/solaris_2.sh 2005-04-04 13:03:12.000000000 -0700 +++ AP815_source/hints/solaris_2.sh 2005-11-02 19:15:02.000000000 -0800 @@ -64,6 +64,14 @@ fi ;; esac +case "$archname" in +"i86pc-${osname}") + # x86 looks so much better and is how this platform + # is usually denoted + archname="x86-${osname}" + ;; +esac + # # This extracts the library directories that will be searched by the Sun @@ -356,7 +364,9 @@ # after it has prompted the user for whether to use threads. case "$usethreads" in $define|true|[yY]*) - ccflags="-D_REENTRANT $ccflags" + # -D_POSIX_C_SOURCE=199506L doesn't compile with gcc 2.95.2 :-( + #ccflags="-D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags" + ccflags="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT $ccflags" # -lpthread overrides some lib C functions, so put it before c. set `echo X "$libswanted "| sed -e "s/ c / pthread c /"` @@ -460,7 +470,7 @@ ;; esac -if test `uname -p` = "sparc"; then +if test `uname -p` = sparc -o `uname -p` = i386; then cat > UU/use64bitint.cbu <<'EOCBU' # This script UU/use64bitint.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use 64 bit integers. @@ -510,16 +520,19 @@ exit 1 ;; esac - libc='/usr/lib/sparcv9/libc.so' - if test ! -f $libc; then - cat >&4 <&4 </dev/null" in *gcc*) echo 'int main() { return 0; }' > try.c @@ -537,9 +550,12 @@ exit 1 ;; esac - loclibpth="/usr/lib/sparcv9 $loclibpth" - ccflags="$ccflags -mcpu=v9 -m64" - if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then + if test "$processor" = sparc; then + loclibpth="/usr/lib/sparcv9 $loclibpth" + ccflags="$ccflags -mcpu=v9" + fi + ccflags="$ccflags -m64" + if test $processor = sparc -a X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then # This adds in -Wa,-xarch=v9. I suspect that's superfluous, # since the -m64 above should do that already. Someone # with gcc-3.x.x, please test with gcc -v. A.D. 20-Nov-2003 @@ -554,10 +570,13 @@ lddlflags="$lddlflags -G `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" echo "int main() { return(0); } " > try.c tryworkshopcc="${cc:-cc} try.c -o try $ccflags" - loclibpth="/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 `$getworkshoplibs` $loclibpth" + if test "$processor" = sparc; then + loclibpth="/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 $loclibpth" + fi + loclibpth="`$getworkshoplibs` $loclibpth" ;; esac - + unset processor use64bitall_done=yes archname64=64 ;; diff -ruN perl-5.8.7/installperl AP815_source/installperl --- perl-5.8.7/installperl 2005-04-03 07:58:58.000000000 -0700 +++ AP815_source/installperl 2005-11-02 19:15:02.000000000 -0800 @@ -834,7 +834,7 @@ if ($dir =~ /^auto/ || ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) || ($name =~ /^(.*)\.(?:h|lib)$/i && ($Is_W32 || $Is_NetWare)) || - $name eq 'Config_heavy.pl' + $name eq $Config{config_heavy} ) { $installlib = $installarchlib; return unless $do_installarchlib; diff -ruN perl-5.8.7/intrpvar.h AP815_source/intrpvar.h --- perl-5.8.7/intrpvar.h 2005-05-27 03:45:08.000000000 -0700 +++ AP815_source/intrpvar.h 2005-11-02 19:15:02.000000000 -0800 @@ -527,11 +527,19 @@ PERLVAR(Isort_RealCmp, SVCOMPARE_t) +#ifndef PERL_DARWIN +/* Iin_load_module moved here because it was already in build 806 */ +PERLVARI(Iin_load_module, int, 0) /* to prevent recursions in PerlIO_find_layer */ +#endif + PERLVARI(Icheckav_save, AV*, Nullav) /* save CHECK{}s when compiling */ PERLVARI(Iclocktick, long, 0) /* this many times() ticks in a second */ +#ifdef PERL_DARWIN +/* for OS X build 813 is the first release, so keep original layout */ PERLVARI(Iin_load_module, int, 0) /* to prevent recursions in PerlIO_find_layer */ +#endif PERLVAR(Iunicode, U32) /* Unicode features: $ENV{PERL_UNICODE} or -C */ diff -ruN perl-5.8.7/lib/ActivePerl.pm AP815_source/lib/ActivePerl.pm --- perl-5.8.7/lib/ActivePerl.pm 1969-12-31 16:00:00.000000000 -0800 +++ AP815_source/lib/ActivePerl.pm 2005-11-02 19:15:02.000000000 -0800 @@ -0,0 +1,121 @@ +package ActivePerl; + +sub perl_version { + return sprintf("%vd.%s", $^V, BUILD()); +} + +1; + +__END__ + +=head1 NAME + +ActivePerl - ActiveState's quality-assured binary build of Perl + +=head1 SYNOPSIS + + use ActivePerl; + print "$ActivePerl::VERSION\n"; + +=head1 DESCRIPTION + +ActivePerl is ActiveState's quality-assured binary build of Perl, +available for AIX, HP-UX, Linux, Mac OS X, Solaris and +Windows. ActivePerl includes: + +=over + +=item * + +The binary core distribution of perl. See L for details. + +=item * + +A set of useful additional CPAN modules "out of +the box". + +=item * + +The Perl Package Manager, for quick and easy install of additional +Perl extension modules. See L for details. + +=item * + +Complete documentation in HTML format. This is found in the F +sub directory where ActivePerl was installed. + +=back + +The release notes for this version of ActivePerl is available in +L. A list of changes beween builds of ActivePerl +is found in L. + +=head2 The ActivePerl:: module + +The C module provide version information about ActivePerl. +The module is built in so most of its variables and functions are +available without having to C the module. The module was +introduced in ActivePerl 814. + +The following functions are available: + +=over + +=item ActivePerl->VERSION + +=item ActivePerl->VERSION( $VERSION ) + +This method returns the current version of ActivePerl. It is a number +like C<814> or C<814.01>. With argument croak if the current version +is less than the given number. + +This method is inherited from Perl's C class, and will +usually be invoked indirectly by C, for instance: + + use ActivePerl 814; + +This statement ensures that the scripts runs under ActivePerl 814 or +better. If this perl is not ActivePerl or is older than 814 then this +statement would croak. + +The version number returned is picked up from the $ActivePerl::VERSION +variable. For conditional code it is usually better to test against +this variable directly: + + if (($ActivePerl::VERSION || 0) >= 814) { + ... + } + +The C<|| 0> ensures that this code does not produce a warning if +running on ActivePerl 813 or older, or running on standard perl. + +=item ActivePerl::PRODUCT + +This constant function returns "ActivePerl" for the free version and +"ActivePerlEE" for the Enterprise Edition product. + +=item ActivePerl::BUILD + +The value returned is the same as found in $ActivePerl::VERSION, but +the subversion number will not be padded with 0. It means that this +value is suitable for printing, but unsafe for numeric comparisons. + +This returns the same value as Win32::BuildNumber(), but this function +is only avalable on the Windows builds of ActivePerl. + +=item ActivePerl::perl_version + +Returns a full version number that also include the version of perl +this ActivePerl release is based on. It returns a string like +"5.8.7.814" or "5.8.7.814.1". + +This function is not directly built in and will only be avalable after +'require ActivePerl' has executed. + +=back + +=head1 SEE ALSO + +L, L, L + +=cut diff -ruN perl-5.8.7/lib/CGI/Carp.pm AP815_source/lib/CGI/Carp.pm --- perl-5.8.7/lib/CGI/Carp.pm 2005-05-16 01:41:00.000000000 -0700 +++ AP815_source/lib/CGI/Carp.pm 2005-11-02 19:15:02.000000000 -0800 @@ -368,12 +368,16 @@ # The mod_perl package Apache::Registry loads CGI programs by calling -# eval. These evals don't count when looking at the stack backtrace. +# eval, as does PerlEx. These evals don't count when looking at the +# stack backtrace. sub _longmess { my $message = Carp::longmess(); - $message =~ s,eval[^\n]+(ModPerl|Apache)/(?:Registry|Dispatch)\w*\.pm.*,,s - if exists $ENV{MOD_PERL}; - return $message; + my $mod_perl = exists $ENV{MOD_PERL}; + my $plex = exists($ENV{'GATEWAY_INTERFACE'}) + && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-PerlEx/; + $message =~ s,eval[^\n]+((ModPerl|Apache)/Registry\w*\.pm|\s*PerlEx::Precompiler).*,,s + if $mod_perl or $plex; + return $message; } sub ineval { @@ -441,13 +445,15 @@ For help, please send mail to $wm, giving this error message and the time and date of the error. END - ; - my $mod_perl = exists $ENV{MOD_PERL}; + ; + my $mod_perl = exists $ENV{MOD_PERL}; + my $plex = exists($ENV{'GATEWAY_INTERFACE'}) + && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-PerlEx/; if ($CUSTOM_MSG) { if (ref($CUSTOM_MSG) eq 'CODE') { print STDOUT "Content-type: text/html\n\n" - unless $mod_perl; + unless $mod_perl || $plex; &$CUSTOM_MSG($msg); # nicer to perl 5.003 users return; } else { diff -ruN perl-5.8.7/lib/CPAN.pm AP815_source/lib/CPAN.pm --- perl-5.8.7/lib/CPAN.pm 2003-09-21 22:42:59.000000000 -0700 +++ AP815_source/lib/CPAN.pm 2005-11-02 19:15:02.000000000 -0800 @@ -739,7 +739,6 @@ my $file = $mod; my $obj; $file =~ s|::|/|g; - $file =~ s|/|\\|g if $^O eq 'MSWin32'; $file .= ".pm"; if ($INC{$file}) { # checking %INC is wrong, because $INC{LWP} may be true @@ -1228,6 +1227,13 @@ use Carp; eval {require CPAN::Config;}; # We eval because of some # MakeMaker problems + + # Let ActivePerl::Config choose the make utility dynamically + if (eval {require ActivePerl::Config}) { + my $make = $Config::Config{make}; + $CPAN::Config->{make} = $make if $make; + } + unless ($dot_cpan++){ unshift @INC, File::Spec->catdir($ENV{HOME},".cpan"); eval {require CPAN::MyConfig;}; # where you can override diff -ruN perl-5.8.7/lib/Digest/file.pm AP815_source/lib/Digest/file.pm --- perl-5.8.7/lib/Digest/file.pm 2005-02-04 03:07:40.000000000 -0800 +++ AP815_source/lib/Digest/file.pm 2005-11-02 19:15:02.000000000 -0800 @@ -49,7 +49,7 @@ # Poor mans "md5sum" command use Digest::file qw(digest_file_hex); for (@ARGV) { - print digest_file_hex($_, "MD5"), " $_\n";e + print digest_file_hex($_, "MD5"), " $_\n"; } =head1 DESCRIPTION diff -ruN perl-5.8.7/lib/ExtUtils/Embed.pm AP815_source/lib/ExtUtils/Embed.pm --- perl-5.8.7/lib/ExtUtils/Embed.pm 2002-02-09 11:09:16.000000000 -0800 +++ AP815_source/lib/ExtUtils/Embed.pm 2005-11-02 19:15:02.000000000 -0800 @@ -221,18 +221,24 @@ } #print STDERR "\@potential_libs = @potential_libs\n"; + my $lpath = File::Spec->catdir($Config{archlibexp}, 'CORE'); my $libperl; if ($^O eq 'MSWin32') { $libperl = $Config{libperl}; + $lpath = qq["$lpath"]; } else { $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] || "-lperl"; + if ($libperl eq "-lperl" && $Config{libperl} eq "libperl.a" && + -f File::Spec->catfile($lpath, "libperl.so")) + { + $libperl = File::Spec->catfile($lpath, $Config{libperl}); + $lpath = undef; + } } - my $lpath = File::Spec->catdir($Config{archlibexp}, 'CORE'); - $lpath = qq["$lpath"] if $^O eq 'MSWin32'; my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) = - MM->ext(join ' ', "-L$lpath", $libperl, @potential_libs); + MM->ext(join ' ', ($lpath ? "-L$lpath" : ()), $libperl, @potential_libs); my $ld_or_bs = $bsloadlibs || $ldloadlibs; print STDERR "bs: $bsloadlibs ** ld: $ldloadlibs" if $Verbose; diff -ruN perl-5.8.7/lib/ExtUtils/Install.pm AP815_source/lib/ExtUtils/Install.pm --- perl-5.8.7/lib/ExtUtils/Install.pm 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/Install.pm 2005-11-02 19:15:02.000000000 -0800 @@ -205,7 +205,7 @@ if ($pack{'write'}) { $dir = install_rooted_dir(dirname($pack{'write'})); mkpath($dir,0,0755) unless $nonono; - print "Writing $pack{'write'}\n"; + print "Writing $pack{'write'}\n" if $verbose; $packlist->write(install_rooted_file($pack{'write'})) unless $nonono; } } @@ -279,6 +279,13 @@ my $INST_SCRIPT = File::Spec->catdir(File::Spec->curdir,'blib','script'); my $INST_MAN1DIR = File::Spec->catdir(File::Spec->curdir,'blib','man1'); my $INST_MAN3DIR = File::Spec->catdir(File::Spec->curdir,'blib','man3'); + + my @INST_HTML; + if($Config{installhtmldir}) { + my $INST_HTMLDIR = File::Spec->catdir(File::Spec->curdir,'blib','html'); + @INST_HTML = ($INST_HTMLDIR => $Config{installhtmldir}); + } + install({ read => "$Config{sitearchexp}/auto/$FULLEXT/.packlist", write => "$Config{installsitearch}/auto/$FULLEXT/.packlist", @@ -290,6 +297,7 @@ $INST_SCRIPT => $Config{installscript}, $INST_MAN1DIR => $Config{installman1dir}, $INST_MAN3DIR => $Config{installman3dir}, + @INST_HTML, },1,0,0); } @@ -370,7 +378,7 @@ } # if not verbose, we just say nothing } else { - print "Unlinking $targetfile (shadowing?)\n"; + print "Unlinking $targetfile (shadowing?)\n" if $verbose; forceunlink($targetfile); } } diff -ruN perl-5.8.7/lib/ExtUtils/instmodsh AP815_source/lib/ExtUtils/instmodsh --- perl-5.8.7/lib/ExtUtils/instmodsh 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/instmodsh 2005-11-02 19:15:02.000000000 -0800 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl -w use strict; use IO::File; @@ -7,93 +7,145 @@ use vars qw($Inst @Modules); -################################################################################ -sub do_module($) -{ -my ($module) = @_; -my $help = < - Create a tar archive of the module + h - Display module help q - Quit the module EOF -print($help); -while (1) - { - print("$module cmd? "); - my $reply = ; chomp($reply); - CASE: - { - $reply =~ /^f\s*/ and do - { - my $class = (split(' ', $reply))[1]; - $class = 'all' if (! $class); - my @files; - if (eval { @files = $Inst->files($module, $class); }) - { - print("$class files in $module are:\n ", - join("\n ", @files), "\n"); - last CASE; - } - else - { print($@); } - }; - $reply =~ /^d\s*/ and do - { - my $class = (split(' ', $reply))[1]; - $class = 'all' if (! $class); - my @dirs; - if (eval { @dirs = $Inst->directories($module, $class); }) - { - print("$class directories in $module are:\n ", - join("\n ", @dirs), "\n"); - last CASE; - } - else - { print($@); } - }; - $reply =~ /^t\s*/ and do - { - my $file = (split(' ', $reply))[1]; - my $tmp = "/tmp/inst.$$"; - if (my $fh = IO::File->new($tmp, "w")) - { - $fh->print(join("\n", $Inst->files($module))); - $fh->close(); - system("tar cvf $file -I $tmp"); - unlink($tmp); - last CASE; - } - else { print("Can't open $file: $!\n"); } - last CASE; - }; - $reply eq 'v' and do - { - if (my @missing = $Inst->validate($module)) - { - print("Files missing from $module are:\n ", - join("\n ", @missing), "\n"); - } - else - { - print("$module has no missing files\n"); - } - last CASE; - }; - $reply eq 'q' and do - { - return; - }; - # Default - print($help); - } - } + +my %Module_Commands = ( + f => \&list_installed, + d => \&list_directories, + v => \&validate_packlist, + t => \&create_archive, + h => \&module_help, + ); + +sub do_module($) { + my ($module) = @_; + + print($Module_Help); + MODULE_CMD: while (1) { + print("$module cmd? "); + + my $reply = ; chomp($reply); + my($cmd) = $reply =~ /^(\w)\b/; + + last if $cmd eq 'q'; + + if( $Module_Commands{$cmd} ) { + $Module_Commands{$cmd}->($reply, $module); + } + elsif( $cmd eq 'q' ) { + last MODULE_CMD; + } + else { + module_help(); + } + } } -################################################################################ + +sub list_installed { + my($reply, $module) = @_; + + my $class = (split(' ', $reply))[1]; + $class = 'all' unless $class; + + my @files; + if (eval { @files = $Inst->files($module, $class); }) { + print("$class files in $module are:\n ", + join("\n ", @files), "\n"); + } + else { + print($@); + } +}; + + +sub list_directories { + my($reply, $module) = @_; + + my $class = (split(' ', $reply))[1]; + $class = 'all' unless $class; + + my @dirs; + if (eval { @dirs = $Inst->directories($module, $class); }) { + print("$class directories in $module are:\n ", + join("\n ", @dirs), "\n"); + } + else { + print($@); + } +} + + +sub create_archive { + my($reply, $module) = @_; + + my $file = (split(' ', $reply))[1]; + + if( !(defined $file and length $file) ) { + print "No tar file specified\n"; + } + elsif( eval { require Archive::Tar } ) { + Archive::Tar->create_archive($file, 0, $Inst->files($module)); + } + else { + my($first, @rest) = $Inst->files($module); + system('tar', 'cvf', $file, $first); + for my $f (@rest) { + system('tar', 'rvf', $file, $f); + } + print "Can't use tar\n" if $?; + } +} + + +sub validate_packlist { + my($reply, $module) = @_; + + if (my @missing = $Inst->validate($module)) { + print("Files missing from $module are:\n ", + join("\n ", @missing), "\n"); + } + else { + print("$module has no missing files\n"); + } +} + +sub module_help { + print $Module_Help; +} + + + +############################################################################## sub toplevel() { @@ -130,10 +182,11 @@ } } -################################################################################ + +############################################################################### $Inst = ExtUtils::Installed->new(); @Modules = $Inst->modules(); toplevel(); -################################################################################ +############################################################################### diff -ruN perl-5.8.7/lib/ExtUtils/Liblist/Kid.pm AP815_source/lib/ExtUtils/Liblist/Kid.pm --- perl-5.8.7/lib/ExtUtils/Liblist/Kid.pm 2004-04-04 06:31:31.000000000 -0700 +++ AP815_source/lib/ExtUtils/Liblist/Kid.pm 2005-11-02 19:15:02.000000000 -0800 @@ -82,6 +82,12 @@ next; } + if ($Config_libext && $thislib =~ /\Q$Config_libext\E$/) { + push @libs, $thislib unless $libs_seen{$thislib}++; + push(@ldloadlibs, $thislib); + next; + } + # Handle possible library arguments. unless ($thislib =~ s/^-l//){ warn "Unrecognized argument in LIBS ignored: '$thislib'\n"; diff -ruN perl-5.8.7/lib/ExtUtils/MakeMaker.pm AP815_source/lib/ExtUtils/MakeMaker.pm --- perl-5.8.7/lib/ExtUtils/MakeMaker.pm 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/MakeMaker.pm 2005-11-02 19:15:02.000000000 -0800 @@ -205,16 +205,16 @@ FULLPERL FULLPERLRUN FULLPERLRUNINST FUNCLIST H IMPORTS - INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR + INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR INST_HTMLDIR INSTALLDIRS DESTDIR PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN - INSTALLMAN1DIR INSTALLMAN3DIR - INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR - INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR + INSTALLMAN1DIR INSTALLMAN3DIR INSTALLHTMLDIR + INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR INSTALLSITEHTMLDIR + INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR INSTALLVENDORHTMLDIR INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP @@ -261,7 +261,7 @@ special_targets c_o xs_c xs_o top_targets linkext dlsyms dynamic dynamic_bs - dynamic_lib static static_lib manifypods processPL + dynamic_lib static static_lib manifypods htmlifypods processPL installbin subdirs clean_subdirs clean realclean_subdirs realclean metafile metafile_addtomanifest @@ -317,7 +317,7 @@ # @Prepend_parent = qw( INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT - MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC + MAP_TARGET INST_MAN1DIR INST_MAN3DIR INST_HTMLDIR PERL_SRC PERL FULLPERL ); } @@ -1057,8 +1057,8 @@ =head2 make install make alone puts all relevant files into directories that are named by -the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and -INST_MAN3DIR. All these default to something below ./blib if you are +the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR, INST_MAN3DIR +INST_HTMLDIR. All these default to something below ./blib if you are I building below the perl source directory. If you I building below the perl source, INST_LIB and INST_ARCHLIB default to ../../lib, and INST_SCRIPT is not defined. @@ -1078,6 +1078,7 @@ INST_SCRIPT INSTALLSCRIPT INSTALLSCRIPT INSTALLSCRIPT INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR + INST_HTMLDIR INSTALLHTMLDIR INSTALLSITEHTMLDIR INSTALLVENDORHTMLDIR The INSTALL... macros in turn default to their %Config ($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts. @@ -1600,6 +1601,10 @@ Directory to hold the man pages at 'make' time +=item INST_HTMLDIR + +Directory to hold the html documentation at 'make' time + =item INST_SCRIPT Directory, where executable files should be installed during diff -ruN perl-5.8.7/lib/ExtUtils/MM_Any.pm AP815_source/lib/ExtUtils/MM_Any.pm --- perl-5.8.7/lib/ExtUtils/MM_Any.pm 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/MM_Any.pm 2005-11-02 19:15:02.000000000 -0800 @@ -60,6 +60,7 @@ SCRIPT MAN1DIR SITEMAN1DIR VENDORMAN1DIR MAN3DIR SITEMAN3DIR VENDORMAN3DIR + HTMLDIR SITEHTMLDIR VENDORHTMLDIR ); } @@ -383,6 +384,58 @@ return $manify; } +=item htmlifypods + +Defines targets and routines to translate the pods into html and +put them into the INST_* directories. + +=cut + +sub htmlifypods { + my $self = shift; + + my $POD2HTML_macro = $self->POD2HTML_macro(); + my $htmlifypods_target = $self->htmlifypods_target(); + + return <htmlifypods_target; + +Generates the htmlifypods target. This target generates html pages from +all POD files in MAN1PODS and MAN3PODS. + +=cut + +sub htmlifypods_target { + my($self) = shift; + + my $dependencies = ''; + + # populate dependencies: + foreach my $name (keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}}) { + $dependencies .= " \\\n\t$name"; + } + + my $htmlify = <POD2HTML_macro + +Returns a definition for the POD2HTML macro. This is a program +which emulates the pod2html utility. You can add more switches to the +command by simply appending them on the macro. + +Typical usage: + + $(POD2HTML) podfile1 html_page1 ... + +=cut + +sub POD2HTML_macro { + my $self = shift; + + my $pod2html_exe; + if (eval "require ActivePerl::DocTools; 1;") { + $pod2html_exe = '$(PERLRUN) "-MActivePerl::DocTools" -e "Pod2HTML(installdirs => "$(INSTALLDIRS)")"'; + } + else { + $pod2html_exe = '$(NOOP)'; + } + return <<"END_OF_DEF"; +POD2HTML_EXE = $pod2html_exe +POD2HTML = \$(POD2HTML_EXE) +END_OF_DEF +} + =item test_via_harness @@ -549,7 +632,7 @@ my $self = shift; return <<'MAKE_EXT'; -all :: pure_all +all :: pure_all htmlifypods $(NOECHO) $(NOOP) MAKE_EXT diff -ruN perl-5.8.7/lib/ExtUtils/MM_Unix.pm AP815_source/lib/ExtUtils/MM_Unix.pm --- perl-5.8.7/lib/ExtUtils/MM_Unix.pm 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/MM_Unix.pm 2005-11-02 19:15:02.000000000 -0800 @@ -440,7 +440,7 @@ VERSION VERSION_MACRO VERSION_SYM DEFINE_VERSION XS_VERSION XS_VERSION_MACRO XS_DEFINE_VERSION INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB - INST_MAN1DIR INST_MAN3DIR + INST_MAN1DIR INST_MAN3DIR INST_HTMLDIR MAN1EXT MAN3EXT INSTALLDIRS DESTDIR PREFIX @@ -2028,6 +2028,7 @@ $self->{INST_MAN1DIR} ||= $self->catdir($Curdir,'blib','man1'); $self->{INST_MAN3DIR} ||= $self->catdir($Curdir,'blib','man3'); + $self->{INST_HTMLDIR} ||= $self->catdir($Curdir,'blib','html'); return 1; } @@ -2081,6 +2082,14 @@ $Config_Override{installsitebin} = $self->catdir($sprefix, 'bin'); } + + unless ( $Config{installsitehtmldir} ) { + $Config_Override{installsitehtmldir} = $Config{installhtmldir}; + } + + unless ( $Config{installvendorhtmldir} ) { + $Config_Override{installvendorhtmldir} = $Config{installhtmldir}; + } $self->{PREFIX} ||= ''; @@ -2157,6 +2166,18 @@ d => 'man/man3', style => $manstyle, }, ); + my %html_layouts = + ( + htmldir => { s => $iprefix, + t =>'perl', + d => 'html', }, + sitehtmldir => { s => $sprefix, + t => 'site', + d => 'html', }, + vendorhtmldir => { s => $vprefix, + t => 'vendor', + d => 'html', }, + ); my %lib_layouts = ( @@ -2208,7 +2229,7 @@ vendor => 'VENDORPREFIX' ); - my %layouts = (%bin_layouts, %man_layouts, %lib_layouts); + my %layouts = (%bin_layouts, %man_layouts, %html_layouts, %lib_layouts); while( my($var, $layout) = each(%layouts) ) { my($s, $t, $d, $style) = @{$layout}{qw(s t d style)}; my $r = '$('.$type2prefix{$t}.')'; @@ -2478,9 +2499,15 @@ sub install { my($self, %attribs) = @_; my(@m); + + my $doc_update = '$(NOOP)'; + if (eval { require ActivePerl::DocTools; 1; }) { + $doc_update = '$(NOECHO) $(PERLRUN) "-MActivePerl::DocTools" -e '. + 'ActivePerl::DocTools::WriteTOC'; + } push @m, q{ -install :: all pure_install doc_install +install :: all pure_install doc_install doc_update install_perl :: all pure_perl_install doc_perl_install @@ -2492,6 +2519,9 @@ doc_install :: doc_$(INSTALLDIRS)_install +doc_update :: + }.$doc_update.q{ + pure__install : pure_site_install $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site @@ -2507,7 +2537,8 @@ $(INST_BIN) $(DESTINSTALLBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) + $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) \ + $(INST_HTMLDIR) $(DESTINSTALLHTMLDIR) $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ }.$self->catdir('$(SITEARCHEXP)','auto','$(FULLEXT)').q{ @@ -2521,7 +2552,8 @@ $(INST_BIN) $(DESTINSTALLSITEBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) + $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) \ + $(INST_HTMLDIR) $(DESTINSTALLSITEHTMLDIR) $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{ @@ -2534,7 +2566,8 @@ $(INST_BIN) $(DESTINSTALLVENDORBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) + $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) \ + $(INST_HTMLDIR) $(DESTINSTALLVENDORHTMLDIR) doc_perl_install :: $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod @@ -2572,7 +2605,7 @@ }; push @m, q{ -uninstall :: uninstall_from_$(INSTALLDIRS)dirs +uninstall :: uninstall_from_$(INSTALLDIRS)dirs doc_update uninstall_from_perldirs :: $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ @@ -3357,7 +3390,14 @@ } - $ppd_xml .= sprintf <<'PPD_OUT', $Config{archname}; + + my $archname = $Config{archname}; + if ($^V ge v5.8) { +# archname did not change from 5.6 to 5.8, but those versions may not be not binary compatible +# so now we append the part of the version that changes when binary compatibility may change + $archname .= "-". substr($Config{version},0,3); + } + $ppd_xml .= sprintf <<'PPD_OUT', $archname; PPD_OUT @@ -3994,7 +4034,7 @@ my $self = shift; return <<'MAKE_EXT'; -all :: pure_all manifypods +all :: pure_all htmlifypods manifypods $(NOECHO) $(NOOP) MAKE_EXT } diff -ruN perl-5.8.7/lib/ExtUtils/t/basic.t AP815_source/lib/ExtUtils/t/basic.t --- perl-5.8.7/lib/ExtUtils/t/basic.t 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/t/basic.t 2005-11-02 19:15:02.000000000 -0800 @@ -96,7 +96,13 @@ ' ' ); like( $ppd_html, qr{^\s*}m, ' ' ); -like( $ppd_html, qr{^\s*}m, +my $archname = $Config{archname}; +if ($^V ge v5.8) { +# archname did not change from 5.6 to 5.8, but those versions may not be not binary compatible +# so now we append the part of the version that changes when binary compatibility may change + $archname .= "-". substr($Config{version},0,3); +} +like( $ppd_html, qr{^\s*}m, ' '); like( $ppd_html, qr{^\s*}m, ' '); like( $ppd_html, qr{^\s*}m, ' '); @@ -118,7 +124,7 @@ diag $test_out; -my $install_out = run("$make install"); +my $install_out = run("$make install VERBINST=1"); is( $?, 0, 'install' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -138,7 +144,7 @@ SKIP: { skip "VMS install targets do not preserve $(PREFIX)", 8 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere"); + $install_out = run("$make install VERBINST=1 PREFIX=elsewhere"); is( $?, 0, 'install with PREFIX override' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -157,7 +163,7 @@ SKIP: { skip "VMS install targets do not preserve $(DESTDIR)", 10 if $Is_VMS; - $install_out = run("$make install PREFIX= DESTDIR=other"); + $install_out = run("$make install VERBINST=1 PREFIX= DESTDIR=other"); is( $?, 0, 'install with DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); @@ -197,7 +203,7 @@ SKIP: { skip "VMS install targets do not preserve $(PREFIX)", 9 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/"); + $install_out = run("$make install VERBINST=1 PREFIX=elsewhere DESTDIR=other/"); is( $?, 0, 'install with PREFIX override and DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); diff -ruN perl-5.8.7/lib/ExtUtils/t/MM_Unix.t AP815_source/lib/ExtUtils/t/MM_Unix.t --- perl-5.8.7/lib/ExtUtils/t/MM_Unix.t 2004-01-05 14:34:59.000000000 -0800 +++ AP815_source/lib/ExtUtils/t/MM_Unix.t 2005-11-02 19:15:02.000000000 -0800 @@ -18,7 +18,7 @@ plan skip_all => 'Non-Unix platform'; } else { - plan tests => 115; + plan tests => 116; } } @@ -102,6 +102,7 @@ makeaperl makefile manifypods + htmlifypods needs_linking pasthru perldepend diff -ruN perl-5.8.7/lib/File/Path.pm AP815_source/lib/File/Path.pm --- perl-5.8.7/lib/File/Path.pm 2005-05-05 09:00:32.000000000 -0700 +++ AP815_source/lib/File/Path.pm 2005-11-02 19:15:02.000000000 -0800 @@ -72,33 +72,17 @@ =item * -a boolean value, which if TRUE will cause C to -skip any files to which you do not have delete access -(if running under VMS) or write access (if running -under another OS). This will change in the future when -a criterion for 'delete permission' under OSs other -than VMS is settled. (defaults to FALSE) +a boolean value, which if FALSE (the default for non-root users) will +cause C to adjust the mode of directories (if required) prior +to attempting to remove the contents. Note that on interruption or +failure of C, directories may be left with more permissive +modes for the owner. =back It returns the number of files successfully deleted. Symlinks are simply deleted and not followed. -B There are race conditions internal to the implementation of -C making it unsafe to use on directory trees which may be -altered or moved while C is running, and in particular on any -directory trees with any path components or subdirectories potentially -writable by untrusted users. - -Additionally, if the third parameter is not TRUE and C is -interrupted, it may leave files and directories with permissions altered -to allow deletion (and older versions of this module would even set -files and directories to world-read/writable!) - -Note also that the occurrence of errors in C can be determined I -by trapping diagnostic messages using C<$SIG{__WARN__}>; it is not apparent -from the return value. - =head1 DIAGNOSTICS =over 4 @@ -124,8 +108,9 @@ use Exporter (); use strict; use warnings; +use Cwd 'getcwd'; -our $VERSION = "1.07"; +our $VERSION = "1.07"; # but modified for ActivePerl our @ISA = qw( Exporter ); our @EXPORT = qw( mkpath rmtree ); @@ -165,118 +150,157 @@ unless (mkdir($path,$mode)) { my $e = $!; # allow for another process to have created it meanwhile - croak "mkdir $path: $e" unless -d $path; + $! = $e, croak "mkdir $path: $e" unless -d $path; } push(@created, $path); } @created; } -sub rmtree { - my($roots, $verbose, $safe) = @_; - my(@files); - my($count) = 0; - $verbose ||= 0; - $safe ||= 0; - - if ( defined($roots) && length($roots) ) { - $roots = [$roots] unless ref $roots; - } - else { - carp "No root path(s) specified\n"; - return 0; - } - - my($root); - foreach $root (@{$roots}) { - if ($Is_MacOS) { - $root = ":$root" if $root !~ /:/; - $root =~ s#([^:])\z#$1:#; - } else { - $root =~ s#/\z##; - } - (undef, undef, my $rp) = lstat $root or next; - $rp &= 07777; # don't forget setuid, setgid, sticky bits - if ( -d _ ) { - # notabene: 0700 is for making readable in the first place, - # it's also intended to change it to writable in case we have - # to recurse in which case we are better than rm -rf for - # subtrees with strange permissions - chmod($rp | 0700, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) - or carp "Can't make directory $root read+writeable: $!" - unless $safe; - - if (opendir my $d, $root) { - no strict 'refs'; - if (!defined ${"\cTAINT"} or ${"\cTAINT"}) { - # Blindly untaint dir names - @files = map { /^(.*)$/s ; $1 } readdir $d; - } else { - @files = readdir $d; - } - closedir $d; - } - else { - carp "Can't read $root: $!"; - @files = (); - } - - # Deleting large numbers of files from VMS Files-11 filesystems - # is faster if done in reverse ASCIIbetical order - @files = reverse @files if $Is_VMS; - ($root = VMS::Filespec::unixify($root)) =~ s#\.dir\z## if $Is_VMS; - if ($Is_MacOS) { - @files = map("$root$_", @files); - } else { - @files = map("$root/$_", grep $_!~/^\.{1,2}\z/s,@files); - } - $count += rmtree(\@files,$verbose,$safe); - if ($safe && - ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) { - print "skipped $root\n" if $verbose; - next; - } - chmod $rp | 0700, $root - or carp "Can't make directory $root writeable: $!" - if $force_writeable; - print "rmdir $root\n" if $verbose; - if (rmdir $root) { - ++$count; - } - else { - carp "Can't remove directory $root: $!"; - chmod($rp, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) - or carp("and can't restore permissions to " - . sprintf("0%o",$rp) . "\n"); +sub _rmtree +{ + my ($path, $prefix, $up, $up_dev, $up_ino, $verbose, $safe) = @_; + + my ($dev, $ino, $perm) = lstat $path or do { + return 0; + }; + $perm &= 07777; + + unless (-d _) + { + my $nperm; + if ($force_writeable) { + # make the file writable + $nperm = $perm | 0600; + unless ($safe or $nperm == $perm or chmod $nperm, $path) { + carp "Can't make file $prefix$path writeable: $!"; } } - else { - if ($safe && - ($Is_VMS ? !&VMS::Filespec::candelete($root) - : !(-l $root || -w $root))) - { - print "skipped $root\n" if $verbose; - next; - } - chmod $rp | 0600, $root - or carp "Can't make file $root writeable: $!" - if $force_writeable; - print "unlink $root\n" if $verbose; - # delete all versions under VMS - for (;;) { - unless (unlink $root) { - carp "Can't unlink file $root: $!"; - if ($force_writeable) { - chmod $rp, $root - or carp("and can't restore permissions to " - . sprintf("0%o",$rp) . "\n"); - } - last; + print "unlink $prefix$path\n" if $verbose; + unless (unlink $path) + { + carp "Can't remove file $prefix$path ($!)"; + if ($force_writeable) { + unless ($safe or $nperm == $perm or chmod $perm, $path) { + carp("and can't restore permissions to " + . sprintf("0%o",$perm) . "\n"); } - ++$count; - last unless $Is_VMS && lstat $root; } + return 0; } + return 1; + } + + CHDIR: { + last CHDIR if chdir $path; + my $err = $!; + unless ($safe || ($perm & 0100)) { + # might be able to succeed by tweaking the permission + # before we chdir + last CHDIR if chmod(0700, $path) && chdir($path); + } + carp "Can't chdir to $prefix$path ($err)"; + return 0; + } + + # avoid a race condition where a directory may be replaced by a + # symlink between the initial lstat and the chdir + my ($new_dev, $new_ino) = stat '.'; + unless ("$new_dev:$new_ino" eq "$dev:$ino") + { + croak "Directory $prefix$path changed before chdir, aborting"; + } + + my $nperm = $perm | 0700; + unless ($safe or $nperm == $perm or chmod $nperm, '.') + { + carp "Can't make directory $prefix$path read+writeable ($!)"; + $nperm = $perm; + } + + my $count = 0; + if (opendir my $dir, '.') + { + my $entry; + while (defined ($entry = readdir $dir)) + { + next if $entry =~ /^\.\.?$/; + $entry =~ /^(.*)$/s; $entry = $1; # untaint + $count += _rmtree($entry, "$prefix$path/", '..', $dev, $ino, + $verbose, $safe); + } + + closedir $dir; + } + + # restore directory permissions is required (in case the rmdir + # below fails) now, while we're still in the directory and may do + # so without a race via '.' + unless ($force_writeable or $safe or $nperm == $perm or chmod $perm, '.') + { + carp "Can't restore permissions on directory $prefix$path ($!)"; + } + + # don't leave the caller in an unexpected directory + unless (chdir $up) + { + croak "Can't return to $up from $prefix$path ($!)"; + } + + # ensure that a chdir .. didn't take us somewhere other than + # where we expected (see CVE-2002-0435) + unless (($new_dev, $new_ino) = stat '.' + and "$new_dev:$new_ino" eq "$up_dev:$up_ino") + { + croak "Previous directory $up changed since entering $prefix$path"; + } + + print "rmdir $prefix$path\n" if $verbose; + if (rmdir $path) + { + $count++; + } + else + { + carp "Can't remove directory $prefix$path ($!)"; + } + + return $count; +} + +sub rmtree +{ + my ($p, $verbose, $safe) = @_; + $p = [] unless defined $p and length $p; + $p = [ $p ] unless ref $p; + my @paths = grep defined && length, @$p; + + # default to "unsafe" for non-root (will chmod dirs) + $safe = ($> || $force_writeable) ? 0 : 1 unless defined $safe; + + unless (@paths) + { + carp "No root path(s) specified"; + return 0; + } + + my $oldpwd = getcwd or do { + carp "Can't fetch initial working directory"; + return 0; + }; + + my ($dev, $ino) = stat '.' or do { + carp "Can't stat initial working directory"; + return 0; + }; + + # untaint + for ($oldpwd) { /^(.*)$/s; $_ = $1 } + + my $count = 0; + for my $path (@paths) + { + $count += _rmtree($path, '', $oldpwd, $dev, $ino, $verbose, $safe); } $count; diff -ruN perl-5.8.7/lib/File/Path.t AP815_source/lib/File/Path.t --- perl-5.8.7/lib/File/Path.t 2003-08-22 06:31:50.000000000 -0700 +++ AP815_source/lib/File/Path.t 2005-11-02 19:15:02.000000000 -0800 @@ -12,16 +12,16 @@ my $count = 0; use warnings; -print "1..4\n"; +print "1..6\n"; # first check for stupid permissions second for full, so we clean up # behind ourselves -for my $perm (0111,0777) { +for my $perm (0111,0777,0) { my $path = catdir(curdir(), "mhx", "bar"); mkpath($path); chmod $perm, "mhx", $path; - print "not " unless -d "mhx" && -d $path; + print "not " unless -d "mhx" && (!$perm || -d $path); print "ok ", ++$count, "\n"; rmtree("mhx"); diff -ruN perl-5.8.7/lib/if.pm AP815_source/lib/if.pm --- perl-5.8.7/lib/if.pm 2003-02-09 18:48:55.000000000 -0800 +++ AP815_source/lib/if.pm 2005-11-02 19:15:03.000000000 -0800 @@ -1,6 +1,6 @@ package if; -our $VERSION = '0.03'; +$VERSION = '0.04'; sub work { my $method = shift() ? 'import' : 'unimport'; @@ -8,7 +8,7 @@ my $p = $_[0]; # PACKAGE (my $file = "$p.pm") =~ s!::!/!g; - require $file or die; + require $file; my $m = $p->can($method); goto &$m if $m; diff -ruN perl-5.8.7/lib/Net/Ping/t/110_icmp_inst.t AP815_source/lib/Net/Ping/t/110_icmp_inst.t --- perl-5.8.7/lib/Net/Ping/t/110_icmp_inst.t 2002-10-20 06:22:45.000000000 -0700 +++ AP815_source/lib/Net/Ping/t/110_icmp_inst.t 2005-11-02 19:15:02.000000000 -0800 @@ -15,9 +15,11 @@ # Everything loaded fine ok 1; +require Win32 if $^O eq "MSWin32"; + if (($> and $^O ne 'VMS' and $^O ne 'cygwin') or ($^O eq 'MSWin32' - and Win32::IsWinNT()) + and !Win32::IsAdminUser()) or ($^O eq 'VMS' and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/))) { skip "icmp ping requires root privileges.", 1; diff -ruN perl-5.8.7/lib/Net/Ping/t/500_ping_icmp.t AP815_source/lib/Net/Ping/t/500_ping_icmp.t --- perl-5.8.7/lib/Net/Ping/t/500_ping_icmp.t 2003-02-08 01:19:27.000000000 -0800 +++ AP815_source/lib/Net/Ping/t/500_ping_icmp.t 2005-11-02 19:15:02.000000000 -0800 @@ -15,9 +15,11 @@ # Everything loaded fine ok 1; +require Win32 if $^O eq "MSWin32"; + if (($> and $^O ne 'VMS' and $^O ne 'cygwin') or ($^O eq 'MSWin32' - and Win32::IsWinNT()) + and !Win32::IsAdminUser()) or ($^O eq 'VMS' and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/))) { skip "icmp ping requires root privileges.", 1; diff -ruN perl-5.8.7/lib/Net/Ping.pm AP815_source/lib/Net/Ping.pm --- perl-5.8.7/lib/Net/Ping.pm 2003-08-03 12:38:04.000000000 -0700 +++ AP815_source/lib/Net/Ping.pm 2005-11-02 19:15:02.000000000 -0800 @@ -396,6 +396,7 @@ } use constant ICMP_ECHOREPLY => 0; # ICMP packet types +use constant ICMP_UNREACHABLE => 3; use constant ICMP_ECHO => 8; use constant ICMP_STRUCT => "C2 n3 A"; # Structure of a minimal ICMP packet use constant SUBCODE => 0; # No ICMP subcode for ECHO and ECHOREPLY @@ -480,8 +481,11 @@ ($from_seq == $self->{"seq"})) { if ($from_type == ICMP_ECHOREPLY){ $ret = 1; + $done = 1; + } + elsif ($from_type == ICMP_UNREACHABLE) { + $done = 1; } - $done = 1; } } else { # Oops, timed out $done = 1; diff -ruN perl-5.8.7/lib/Pod/Find.pm AP815_source/lib/Pod/Find.pm --- perl-5.8.7/lib/Pod/Find.pm 2005-04-03 08:23:58.000000000 -0700 +++ AP815_source/lib/Pod/Find.pm 2005-11-02 19:15:02.000000000 -0800 @@ -196,7 +196,7 @@ my $name; if(-f $try) { if($name = _check_and_extract_name($try, $opts{-verbose})) { - _check_for_duplicates($try, $name, \%names, \%pods); + _check_for_duplicates($try, $name, \%names, \%pods, $opts{-verbose}); } next; } @@ -225,7 +225,7 @@ return; } if($name = _check_and_extract_name($item, $opts{-verbose}, $root_rx)) { - _check_for_duplicates($item, $name, \%names, \%pods); + _check_for_duplicates($item, $name, \%names, \%pods, $opts{-verbose}); } }, $try); # end of File::Find::find } @@ -234,11 +234,12 @@ } sub _check_for_duplicates { - my ($file, $name, $names_ref, $pods_ref) = @_; - if($$names_ref{$name}) { - warn "Duplicate POD found (shadowing?): $name ($file)\n"; - warn " Already seen in ", - join(' ', grep($$pods_ref{$_} eq $name, keys %$pods_ref)),"\n"; + my ($file, $name, $names_ref, $pods_ref, $verbose) = @_; + if ($$names_ref{$name}) { + warn "Duplicate POD found (shadowing?): $name ($file)\n", + " Already seen in ", + join(' ', grep($$pods_ref{$_} eq $name, keys %$pods_ref)),"\n" + if $verbose; } else { $$names_ref{$name} = 1; @@ -251,7 +252,7 @@ # check extension or executable flag # this involves testing the .bat extension on Win32! - unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x _ )) { + unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x $file)) { return undef; } diff -ruN perl-5.8.7/lib/Pod/Html.pm AP815_source/lib/Pod/Html.pm --- perl-5.8.7/lib/Pod/Html.pm 2005-05-05 09:00:34.000000000 -0700 +++ AP815_source/lib/Pod/Html.pm 2005-11-02 19:15:02.000000000 -0800 @@ -524,7 +524,7 @@ } elsif (/^=over\s*(.*)/) { # =over N process_over(); } elsif (/^=back/) { # =back - process_back(); + process_back($need_dd); } elsif (/^=for\s+(\S+)\s*(.*)/si) {# =for process_for($1,$2); } else { @@ -571,11 +571,9 @@ ## end of experimental if( $after_item ){ - print HTML "$text\n"; $After_Lpar = 1; - } else { - print HTML "

$text

\n"; } + print HTML "

$text

\n"; } print HTML "\n" if $need_dd; $after_item = 0; @@ -682,7 +680,7 @@ usage("-") if defined $opt_help; # see if the user asked for help $opt_help = ""; # just to make -w shut-up. - @Podpath = split(":", $opt_podpath) if defined $opt_podpath; + @Podpath = map { s/\|/:/g; $_ } split(":", $opt_podpath) if defined $opt_podpath; @Libpods = split(":", $opt_libpods) if defined $opt_libpods; $Backlink = $opt_backlink if defined $opt_backlink; @@ -959,6 +957,19 @@ $Pages{$_} = "" unless defined $Pages{$_}; $Pages{$_} .= "$dir/$_.pm:"; push(@pods, "$dir/$_.pm"); + } elsif (-T "$dir/$_") { # script(?) + local *F; + if (open(F, "$dir/$_")) { + my $line; + while (defined($line = )) { + if ($line =~ /^=(?:pod|head1)/) { + $Pages{$_} = "" unless defined $Pages{$_}; + $Pages{$_} .= "$dir/$_.pod:"; + last; + } + } + close(F); + } } } closedir(DIR); @@ -1107,7 +1118,7 @@ $name = anchorify($name); print HTML qq{}, process_text( \$otext ), ''; } - print HTML "
\n"; + print HTML "\n"; undef( $EmittedItem ); } @@ -1139,7 +1150,7 @@ # formatting: insert a paragraph if preceding item has >1 paragraph if( $After_Lpar ){ - print HTML "

\n"; + print HTML $need_dd ? "\n" : "\n" if $After_Lpar; $After_Lpar = 0; } @@ -1172,7 +1183,6 @@ } $need_dd = 1; } - print HTML "" if $emitted; print HTML "\n"; return $need_dd; } @@ -1191,6 +1201,7 @@ # process_back - process a pod back tag and convert it to HTML format. # sub process_back { + my $need_dd = shift; if( $Listlevel == 0 ){ warn "$0: $Podfile: unexpected =back directive in paragraph $Paragraph. ignoring.\n" unless $Quiet; return; @@ -1201,7 +1212,7 @@ # $Listend[$Listlevel] may have never been initialized. $Listlevel--; if( defined $Listend[$Listlevel] ){ - print HTML '

' if $After_Lpar; + print HTML $need_dd ? "\n" : "\n" if $After_Lpar; print HTML $Listend[$Listlevel]; print HTML "\n"; pop( @Listend ); @@ -1288,6 +1299,34 @@ $line; #eg; + my @line = split /\n/, $rest; + my $comments = !grep !/^\s*(#.*)?$/, @line; + + # Try to colorize the block as Perl sample code + if (($comments || $rest =~ /[;{]/) && + eval {require ActiveState::Scineplex}) + { + my $prefix; + my $input = $rest; # Don't modify $rest in case the colorizer fails + if ($input =~ /^( +)/) { + $prefix = $1; + s/^$prefix// for @line; + $input = join("\n", @line, ""); + } + my $styled = eval { ActiveState::Scineplex::Annotate($input, 'perl', outputFormat => 'html') }; + if ($styled) { + # If this really looks like code, then we don't want + # to add hyperlinks to URLs embedded in strings etc. + if ($prefix) { + $$text = $prefix . join("\n$prefix", split("\n", $styled)) . "\n"; + } + else { + $$text = $styled; + } + return; + } + } + # convert some special chars to HTML escapes $rest = html_escape($rest); @@ -1395,7 +1434,7 @@ sub process_puretext { my($text, $quote, $notinIS) = @_; - ## Guessing at func() or [$@%&]*var references in plain text is destined + ## Guessing at func() or [\$\@%&]*var references in plain text is destined ## to produce some strange looking ref's. uncomment to disable: ## $notinIS = 0; @@ -2059,7 +2098,7 @@ return $1 if $text =~ /->\s*(\w+)\s*\(?/; # a variable name? - return $1 if $text =~ /^([$@%*]\S+)/; + return $1 if $text =~ /^([\$\@%*]\S+)/; # some pattern matching operator? return $1 if $text =~ m|^(\w+/).*/\w*$|; diff -ruN perl-5.8.7/lib/Pod/t/htmlview.t AP815_source/lib/Pod/t/htmlview.t --- perl-5.8.7/lib/Pod/t/htmlview.t 2003-05-20 13:42:40.000000000 -0700 +++ AP815_source/lib/Pod/t/htmlview.t 2005-11-02 19:15:02.000000000 -0800 @@ -80,66 +80,69 @@

new()

Constructor method. Accepts the following config options:

-
foo
-
+
foo +
-The foo item. +

The foo item.

-

-
bar
-
+ +
bar +
-The bar item. +

The bar item.

This is a list within a list

    -
  • -The wiz item. -

    -
  • -The waz item. -

-
baz
-
+
  • +

    The wiz item.

    +
  • +
  • +

    The waz item.

    +
  • + +
    baz +
    -The baz item. +

    The baz item.

    -

    + +

    Title on the same line as the =item + * bullets

    Title on the same line as the =item + numerical bullets

      -
    1. Cat
      -
    2. -
    3. Sat
      -
    4. -
    5. Mat
      -
    6. +
    7. Cat + +
    8. Sat + +
    9. Mat +

    No bullets, no title

    -
    +
    -Cat +

    Cat

    -

    -
    + +
    -Sat +

    Sat

    -

    -
    + +
    -Mat +

    Mat

    -

    + +

    old()

    diff -ruN perl-5.8.7/lib/User/grent.pm AP815_source/lib/User/grent.pm --- perl-5.8.7/lib/User/grent.pm 2001-09-21 09:50:57.000000000 -0700 +++ AP815_source/lib/User/grent.pm 2005-11-02 19:15:03.000000000 -0800 @@ -51,7 +51,7 @@ print "gid zero name wheel, with other members"; } - use User::grent qw(:FIELDS; + use User::grent qw(:FIELDS); getgrgid(0) or die "No group zero"; if ( $gr_name eq 'wheel' && @gr_members > 1 ) { print "gid zero name wheel, with other members"; diff -ruN perl-5.8.7/makedef.pl AP815_source/makedef.pl --- perl-5.8.7/makedef.pl 2005-05-09 06:27:41.000000000 -0700 +++ AP815_source/makedef.pl 2005-11-02 19:15:03.000000000 -0800 @@ -373,6 +373,9 @@ PL_statusvalue_vms PL_sys_intern )]); + emit_symbols([qw( + boot_DynaLoader + )]); } elsif ($PLATFORM eq 'os2') { emit_symbols([qw( diff -ruN perl-5.8.7/Makefile.SH AP815_source/Makefile.SH --- perl-5.8.7/Makefile.SH 2005-02-05 07:17:44.000000000 -0800 +++ AP815_source/Makefile.SH 2005-11-02 19:15:00.000000000 -0800 @@ -286,6 +286,8 @@ INSTALLPREFIXEXP = $prefix +CONFIG_HEAVY = $config_heavy + !GROK!THIS! # not used by Makefile but by installperl; # mentioned here so that metaconfig picks these up @@ -315,7 +317,7 @@ CCCMDSRC = `sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $<` -CONFIGPM = lib/Config.pm lib/Config_heavy.pl +CONFIGPM = lib/Config.pm lib/$(CONFIG_HEAVY) private = preplibrary $(CONFIGPM) lib/ExtUtils/Miniperl.pm # Files to be built with variable substitution before miniperl @@ -355,14 +357,14 @@ c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c reentr.c c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c -c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c +c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c activeperl.c pad.c c4 = globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c pp_sort.c c = $(c1) $(c2) $(c3) $(c4) miniperlmain.c perlmain.c opmini.c obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) -obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) +obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) activeperl$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) @@ -758,7 +760,7 @@ # (If trying to create a new port and having problems with the configpm script, # try 'make minitest' and/or commenting out the tests at the end of configpm.) $(CONFIGPM): config.sh miniperl$(EXE_EXT) configpm Porting/Glossary - $(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl configpm.tmp + $(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/$(CONFIG_HEAVY) configpm.tmp sh mv-if-diff configpm.tmp lib/Config.pm lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM) diff -ruN perl-5.8.7/MANIFEST AP815_source/MANIFEST --- perl-5.8.7/MANIFEST 2005-05-27 15:49:03.000000000 -0700 +++ AP815_source/MANIFEST 2005-11-02 19:15:00.000000000 -0800 @@ -7,6 +7,7 @@ beos/beos.c BeOS port beos/beosish.h BeOS port beos/nm.c BeOS port +BuildInfo.h ActivePerl build number bytecode.pl Produces ext/ByteLoader/byterun.h, ext/ByteLoader/byterun.c and ext/B/Asmdata.pm cc_runtime.h Macros need by runtime of compiler-generated code cflags.SH A script that emits C compilation flags per file @@ -2728,6 +2729,7 @@ t/op/re_tests Regular expressions for regexp.t t/op/reverse.t See if reverse operator works t/op/runlevel.t See if die() works from perl_call_*() +t/op/sig.t See if signals work t/op/sleep.t See if sleep works t/op/sort.t See if sort works t/op/splice.t See if splice works @@ -2955,10 +2957,12 @@ win32/makefile.mk Win32 makefile for DMAKE (BC++, VC++ builds) win32/makeico.pl script to create perlexe.ico image file win32/mdelete.bat multifile delete +win32/perldll.rc ActivePerl info resource win32/perlexe.rc associated perl binary with icon win32/perlglob.c Win32 port win32/perlhost.h Perl "host" implementation win32/perllib.c Win32 port +win32/perl.ico ActivePerl Gecko win32/pod.mak Win32 port win32/runperl.c Win32 port win32/splittree.pl Win32 port diff -ruN perl-5.8.7/patchlevel.h AP815_source/patchlevel.h --- perl-5.8.7/patchlevel.h 2005-05-30 14:32:42.000000000 -0700 +++ AP815_source/patchlevel.h 2005-11-02 19:15:03.000000000 -0800 @@ -10,6 +10,8 @@ #ifndef __PATCHLEVEL_H_INCLUDED__ +#include "BuildInfo.h" + /* do not adjust the whitespace! Configure expects the numbers to be * exactly on the third column */ @@ -119,7 +121,28 @@ #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static char *local_patches[] = { - NULL + NULL + ,ACTIVEPERL_LOCAL_PATCHES_ENTRY +# if !defined(PERL_DARWIN) + ,"Iin_load_module moved for compatibility with build 806" +# endif +# if defined(__hpux) + ,"Avoid signal flag SA_RESTART for older versions of HP-UX" +# endif + ,"PerlEx support in CGI::Carp" + ,"Less verbose ExtUtils::Install and Pod::Find" + ,"instmodsh upgraded from ExtUtils-MakeMaker-6.25" + ,"Patch for CAN-2005-0448 from Debian with modifications" + ,"Upgrade to Time-HiRes-1.76" + ,"25774 Keys of %INC always use forward slashes" + ,"25747 Accidental interpolation of $@ in Pod::Html" + ,"25362 File::Path::mkpath resets errno" + ,"25181 Incorrect (X)HTML generated by Pod::Html" +# if defined(WIN32) + ,"24999 Avoid redefinition warning for MinGW" +# endif + ,"24699 ICMP_UNREACHABLE handling in Net::Ping" + ,"21540 Fix backward-compatibility issues in if.pm" ,NULL }; diff -ruN perl-5.8.7/perl.c AP815_source/perl.c --- perl-5.8.7/perl.c 2005-04-22 07:14:27.000000000 -0700 +++ AP815_source/perl.c 2005-11-02 19:15:03.000000000 -0800 @@ -1750,6 +1750,7 @@ boot_core_PerlIO(); boot_core_UNIVERSAL(); boot_core_xsutils(); + boot_core_ActivePerl(); if (xsinit) (*xsinit)(aTHX); /* in case linked C routines want magical variables */ diff -ruN perl-5.8.7/perlio.h AP815_source/perlio.h --- perl-5.8.7/perlio.h 2004-11-16 11:37:16.000000000 -0800 +++ AP815_source/perlio.h 2005-11-02 19:15:03.000000000 -0800 @@ -102,10 +102,10 @@ #define PerlIO PerlIO #define PERLIO_LAYERS 1 -extern void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab); +extern void PerlIO_define_layer(pTHX_ PerlIO_funcs *); extern PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int load); -extern PerlIO *PerlIO_push(pTHX_ PerlIO *f, PerlIO_funcs *tab, +extern PerlIO *PerlIO_push(pTHX_ PerlIO *f, PerlIO_funcs *, const char *mode, SV *arg); extern void PerlIO_pop(pTHX_ PerlIO *f); extern AV* PerlIO_get_layers(pTHX_ PerlIO *f); diff -ruN perl-5.8.7/pod/perl.pod AP815_source/pod/perl.pod --- perl-5.8.7/pod/perl.pod 2005-05-29 08:02:44.000000000 -0700 +++ AP815_source/pod/perl.pod 2005-11-02 19:15:03.000000000 -0800 @@ -24,6 +24,8 @@ perlintro Perl introduction for beginners perltoc Perl documentation table of contents + ActivePerl ActivePerl overview + =head2 Tutorials perlreftut Perl references short introduction @@ -148,6 +150,9 @@ perl5005delta Perl changes in version 5.005 perl5004delta Perl changes in version 5.004 + activeperl-release Release notes for ActivePerl + activeperl-changes ActivePerl revision history + perlartistic Perl Artistic License perlgpl GNU General Public License diff -ruN perl-5.8.7/Porting/curliff.pl AP815_source/Porting/curliff.pl --- perl-5.8.7/Porting/curliff.pl 2003-07-28 11:01:56.000000000 -0700 +++ AP815_source/Porting/curliff.pl 2005-11-03 17:29:40.000000000 -0800 @@ -17,6 +17,7 @@ README.win32 win32/Makefile win32/makefile.mk + wince/Makefile.ce wince/compile-all.bat wince/README.perlce wince/registry.bat diff -ruN perl-5.8.7/proto.h AP815_source/proto.h --- perl-5.8.7/proto.h 2005-05-30 14:19:11.000000000 -0700 +++ AP815_source/proto.h 2005-11-02 19:15:04.000000000 -0800 @@ -85,6 +85,7 @@ PERL_CALLCONV I32 Perl_block_gimme(pTHX); PERL_CALLCONV int Perl_block_start(pTHX_ int full); PERL_CALLCONV void Perl_boot_core_UNIVERSAL(pTHX); +PERL_CALLCONV void Perl_boot_core_ActivePerl(pTHX); PERL_CALLCONV void Perl_boot_core_PerlIO(pTHX); PERL_CALLCONV void Perl_call_list(pTHX_ I32 oldscope, AV* av_list); PERL_CALLCONV bool Perl_cando(pTHX_ Mode_t mode, Uid_t effective, Stat_t* statbufp); diff -ruN perl-5.8.7/t/op/sig.t AP815_source/t/op/sig.t --- perl-5.8.7/t/op/sig.t 1969-12-31 16:00:00.000000000 -0800 +++ AP815_source/t/op/sig.t 2005-11-02 19:15:05.000000000 -0800 @@ -0,0 +1,56 @@ +#!perl -w + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + eval { + require POSIX; + POSIX::->import(qw(WNOHANG SIGINT SIGTERM)); + }; + if ($@ or !$Config{d_fork}) { + print "# $@\n"; + print "1..0 # skipped, not posix compatible\n"; + exit 0; + } +} + +use strict; + +my $done = 0; +sub reaper { + print "# got sig\n"; + $done = 1; +} + +sub start_child { + my $pid = fork(); + + defined $pid or die "fork() failed: $!"; + unless ($pid) { + # child + $SIG{INT} = $SIG{TERM} = \&reaper; + while () { + last if $done; + sleep(30); + } + exit; + } + sleep 1; + return $pid; +} + +my $test = 1; +my @signals = (SIGINT, SIGTERM); +print "1.." . (@signals * 3) . "\n"; + +# SIGINT/SIGTERM should not restart sleep() +for my $sig (@signals) { + my $pid = start_child(); + print "not " unless kill(SIGINT, $pid) == 1; + print "ok $test\n"; ++$test; + sleep 1; + print "not " unless waitpid($pid, WNOHANG) == $pid; + print "ok $test\n"; ++$test; + print "# [$?]\nnot " unless 0 == ($? >> 8); + print "ok $test\n"; ++$test; +} diff -ruN perl-5.8.7/util.c AP815_source/util.c --- perl-5.8.7/util.c 2005-05-30 05:44:15.000000000 -0700 +++ AP815_source/util.c 2005-11-02 19:15:06.000000000 -0800 @@ -2375,8 +2375,14 @@ sigemptyset(&act.sa_mask); act.sa_flags = 0; #ifdef SA_RESTART - if (PL_signals & PERL_SIGNALS_UNSAFE_FLAG) - act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */ + if ((PL_signals & PERL_SIGNALS_UNSAFE_FLAG) +# if defined(__hpux) && !(defined(__ux_version) && __ux_version <= 1020) + && signo != SIGTERM && signo != SIGINT +# endif + ) + { + act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */ + } #endif #if defined(SA_NOCLDWAIT) && !defined(BSDish) /* See [perl #18849] */ if (signo == SIGCHLD && handler == (Sighandler_t)SIG_IGN) diff -ruN perl-5.8.7/utils/perlbug.PL AP815_source/utils/perlbug.PL --- perl-5.8.7/utils/perlbug.PL 2004-02-28 08:19:09.000000000 -0800 +++ AP815_source/utils/perlbug.PL 2005-11-02 19:15:06.000000000 -0800 @@ -36,6 +36,7 @@ my @patches; while () { last if /^\s*}/; + next if /^\s*#/; # preprocessor stuff chomp; s/^\s+,?\s*"?//; s/"?\s*,?$//; diff -ruN perl-5.8.7/win32/ext/Win32/Win32.pm AP815_source/win32/ext/Win32/Win32.pm --- perl-5.8.7/win32/ext/Win32/Win32.pm 2005-05-16 08:44:20.000000000 -0700 +++ AP815_source/win32/ext/Win32/Win32.pm 2005-11-02 19:15:06.000000000 -0800 @@ -8,7 +8,7 @@ require DynaLoader; @ISA = qw|Exporter DynaLoader|; - $VERSION = '0.24'; + $VERSION = '0.26'; @EXPORT = qw( NULL @@ -195,7 +195,7 @@ 90 => "Me" }, 2 => { - 0 => "2000", + 0 => "NT4", 1 => "XP/.Net", 2 => "2003", 51 => "NT3.51" @@ -212,9 +212,9 @@ my $tag = ""; - # But distinguising W2k from NT4 requires looking at the major version - if ($os eq "2000" && $major != 5) { - $os = "NT4"; + # But distinguising W2k and Vista from NT4 requires looking at the major version + if ($os eq "NT4") { + $os = {5 => "2000", 6 => "Vista"}->{$major} || "NT4"; } # For the rest we take a look at the build numbers and try to deduce @@ -483,6 +483,7 @@ Windows 2000 2 5 0 Windows XP 2 5 1 Windows Server 2003 2 5 2 + Windows Vista 2 6 0 On Windows NT 4 SP6 and later this function returns the following additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE. diff -ruN perl-5.8.7/win32/Makefile AP815_source/win32/Makefile --- perl-5.8.7/win32/Makefile 2005-05-30 14:50:09.000000000 -0700 +++ AP815_source/win32/Makefile 2005-11-03 17:29:53.000000000 -0800 @@ -51,7 +51,7 @@ # before anything else. This script can then be set up, for example, # to add additional entries to @INC. # -#USE_SITECUST = define +USE_SITECUST = define # # uncomment to enable multiple interpreters. This is need for fork() @@ -177,6 +177,7 @@ # # Additional compiler flags can be specified here. # +BUILDOPT = $(BUILDOPTEXTRA) # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's # internal hash function unless the PERL_HASH_SEED environment variable is set. @@ -185,7 +186,7 @@ # The latter is required to maintain binary compatibility with Perl 5.8.0. # #BUILDOPT = $(BUILDOPT) -DPERL_HASH_SEED_EXPLICIT -#BUILDOPT = $(BUILDOPT) -DNO_HASH_SEED +BUILDOPT = $(BUILDOPT) -DNO_HASH_SEED # # @@ -220,7 +221,7 @@ # set this to your email address (perl will guess a value from # from your loginname and your hostname, which may not be right) # -#EMAIL = +EMAIL = support@ActiveState.com ## ## Build configuration ends. @@ -514,7 +515,7 @@ PERLEXE_ICO = .\perlexe.ico PERLEXE_RES = .\perlexe.res -PERLDLL_RES = +PERLDLL_RES = .\perldll.res # Nominate a target which causes extensions to be re-built # This used to be $(PERLEXE), but at worst it is the .dll that they depend @@ -586,6 +587,7 @@ -C++ -prototypes MICROCORE_SRC = \ + ..\activeperl.c \ ..\av.c \ ..\deb.c \ ..\doio.c \ @@ -974,10 +976,10 @@ << $(XCOPY) $(PERLIMPLIB) $(COREDIR) -$(PERLEXE_ICO): $(MINIPERL) makeico.pl - $(MINIPERL) makeico.pl > $@ - -$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO) +#$(PERLEXE_ICO): $(MINIPERL) makeico.pl +# $(MINIPERL) makeico.pl > $@ +# +#$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO) $(MINIMOD) : $(MINIPERL) ..\minimod.pl cd .. @@ -1186,7 +1188,8 @@ -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new -del /f $(CONFIGPM) -del /f bin\*.bat - -del /f $(PERLEXE_ICO) perl.base +# -del /f $(PERLEXE_ICO) + -del /f perl.base -cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib -cd $(EXTDIR) && del /s *.def Makefile Makefile.old -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) diff -ruN perl-5.8.7/win32/makefile.mk AP815_source/win32/makefile.mk --- perl-5.8.7/win32/makefile.mk 2005-05-30 14:50:09.000000000 -0700 +++ AP815_source/win32/makefile.mk 2005-11-03 17:29:53.000000000 -0800 @@ -53,7 +53,7 @@ # before anything else. This script can then be set up, for example, # to add additional entries to @INC. # -#USE_SITECUST *= define +USE_SITECUST *= define # # uncomment to enable multiple interpreters. This is need for fork() @@ -202,6 +202,7 @@ # # Additional compiler flags can be specified here. # +BUILDOPT *= $(BUILDOPTEXTRA) # # Adding -DPERL_HASH_SEED_EXPLICIT will disable randomization of Perl's @@ -211,7 +212,7 @@ # The latter is required to maintain binary compatibility with Perl 5.8.0. # #BUILDOPT += -DPERL_HASH_SEED_EXPLICIT -#BUILDOPT += -DNO_HASH_SEED +BUILDOPT += -DNO_HASH_SEED # # This should normally be disabled. Adding -DPERL_POLLUTE enables support @@ -251,7 +252,7 @@ # set this to your email address (perl will guess a value from # from your loginname and your hostname, which may not be right) # -#EMAIL *= +EMAIL *= support@ActiveState.com ## ## Build configuration ends. @@ -626,7 +627,7 @@ .rc.res: .IF "$(CCTYPE)" == "GCC" - $(RSC) --use-temp-file -i $< -o $@ + $(RSC) --use-temp-file -I . -I .. -i $< -o $@ .ELSE $(RSC) -i.. $< .ENDIF @@ -654,7 +655,7 @@ PERLEXE_ICO = .\perlexe.ico PERLEXE_RES = .\perlexe.res -PERLDLL_RES = +PERLDLL_RES = .\perldll.res # Nominate a target which causes extensions to be re-built # This used to be $(PERLEXE), but at worst it is the .dll that they depend @@ -741,6 +742,7 @@ -C++ -prototypes MICROCORE_SRC = \ + ..\activeperl.c \ ..\av.c \ ..\deb.c \ ..\doio.c \ @@ -1121,11 +1123,10 @@ .ENDIF $(XCOPY) $(PERLIMPLIB) $(COREDIR) - -$(PERLEXE_ICO): $(MINIPERL) makeico.pl - $(MINIPERL) makeico.pl > $@ - -$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO) +#$(PERLEXE_ICO): $(MINIPERL) makeico.pl +# $(MINIPERL) makeico.pl > $@ +# +#$(PERLEXE_RES): perlexe.rc $(PERLEXE_ICO) $(MINIMOD) : $(MINIPERL) ..\minimod.pl cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm @@ -1345,8 +1346,8 @@ -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new -del /f $(CONFIGPM) -del /f bin\*.bat - -del /f perllibst.h - -del /f $(PERLEXE_ICO) perl.base +# -del /f $(PERLEXE_ICO) + -del /f perl.base -cd .. && del /s *$(a) *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib -cd $(EXTDIR) && del /s *.def Makefile Makefile.old -if exist $(AUTODIR) rmdir /s /q $(AUTODIR) diff -ruN perl-5.8.7/win32/perldll.rc AP815_source/win32/perldll.rc --- perl-5.8.7/win32/perldll.rc 1969-12-31 16:00:00.000000000 -0800 +++ AP815_source/win32/perldll.rc 2005-11-02 19:15:06.000000000 -0800 @@ -0,0 +1,52 @@ +// PerlDll.rc + +// (c) 1995-1998 Microsoft Corporation. All rights reserved. +// Developed by ActiveState Tool Corp., http://www.ActiveState.com + +// You may distribute under the terms of either the GNU General Public +// License or the Artistic License, as specified in the README file. + +#include +#include "BuildInfo.h" + +PERLDLL ICON perl.ico + +#ifndef _DEBUG +#define VER_DEBUG 0 +#else +#define VER_DEBUG VS_FF_DEBUG +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PERLRC_VERSION + PRODUCTVERSION PERLRC_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS VER_DEBUG + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN + +BEGIN +BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ActiveState, a division of Sophos\0" + VALUE "FileDescription", "Perl Interpreter\0" + VALUE "FileVersion", PERLFILEVERSION + VALUE "InternalName", "perl58.dll\0" + VALUE "LegalCopyright", "Copyright 1987-2004, Larry Wall, Binary build by ActiveState, a division of Sophos, http://www.ActiveState.com\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "perl58.dll\0" + VALUE "ProductName", PERLPRODUCTNAME + VALUE "ProductVersion", PERLPRODUCTVERSION + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 0x04E4 + // English language (0x409) and the Windows ANSI codepage (0x04E4) + END +END + diff -ruN perl-5.8.7/win32/perlexe.rc AP815_source/win32/perlexe.rc --- perl-5.8.7/win32/perlexe.rc 2004-01-22 12:56:05.000000000 -0800 +++ AP815_source/win32/perlexe.rc 2005-11-02 19:15:06.000000000 -0800 @@ -1 +1,52 @@ -PERLEXE ICON perlexe.ico +// PerlExe.rc + +// (c) 1995-1999 Microsoft Corporation. All rights reserved. +// Developed by ActiveState Tool Corp., http://www.ActiveState.com + +// You may distribute under the terms of either the GNU General Public +// License or the Artistic License, as specified in the README file. + +#include +#include "BuildInfo.h" + +PERLEXE ICON perl.ico + +#ifndef _DEBUG +#define VER_DEBUG 0 +#else +#define VER_DEBUG VS_FF_DEBUG +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PERLRC_VERSION + PRODUCTVERSION PERLRC_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS VER_DEBUG + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE VFT2_UNKNOWN + +BEGIN +BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "ActiveState, a division of Sophos\0" + VALUE "FileDescription", "Perl Command Line Interpreter\0" + VALUE "FileVersion", PERLFILEVERSION + VALUE "InternalName", "perl.exe\0" + VALUE "LegalCopyright", "Copyright 1987-2004, Larry Wall, Binary build by ActiveState, a division of Sophos, http://www.ActiveState.com\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "perl.exe\0" + VALUE "ProductName", PERLPRODUCTNAME + VALUE "ProductVersion", PERLPRODUCTVERSION + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 0x04E4 + // English language (0x409) and the Windows ANSI codepage (0x04E4) + END +END + Binary files perl-5.8.7/win32/perl.ico and AP815_source/win32/perl.ico differ diff -ruN perl-5.8.7/win32/win32.c AP815_source/win32/win32.c --- perl-5.8.7/win32/win32.c 2005-04-06 13:34:51.000000000 -0700 +++ AP815_source/win32/win32.c 2005-11-02 19:15:06.000000000 -0800 @@ -138,6 +138,10 @@ : w32_perldll_handle), w32_module_name, sizeof(w32_module_name)); + /* remove \\?\ prefix */ + if (memcmp(w32_module_name, "\\\\?\\", 4) == 0) + memmove(w32_module_name, w32_module_name+4, strlen(w32_module_name+4)+1); + /* try to get full path to binary (which may be mangled when perl is * run from a 16-bit app) */ /*PerlIO_printf(Perl_debug_log, "Before %s\n", w32_module_name);*/ @@ -4378,6 +4382,13 @@ */ static +XS(w32_BuildNumber) +{ + dXSARGS; + XSRETURN_PV(PRODUC