From: Steve Hay Date: Wed, 6 Dec 2006 14:19:55 +0000 (+0000) Subject: Upgrade to Time-HiRes 1.9702 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e000d5bba1b92ebe4298dfb33bed2ff08e2cd6b;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Time-HiRes 1.9702 p4raw-id: //depot/perl@29478 --- diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes index 28a60c9..8d4c783 100644 --- a/ext/Time/HiRes/Changes +++ b/ext/Time/HiRes/Changes @@ -1,10 +1,32 @@ Revision history for the Perl extension Time::HiRes. -1.96 [2006-30-11] - - 1.95 broke builds for threaded Perls +1.9702 [2006-12-06] + - restore the -DATLEASTFIVEOHOHFIVE + +1.9701 [2006-12-04] + - upgrade to ppport.h 3.10_02 + - remove the -DATLEASTFIVEOHOHFIVE + - use the ppport.h PL_ppaddr, PL_statcache, PL_laststatval + - use the ppport.h aTHXR for calling Perl stat() + - switch into four-digit version since 2.0 is coming up + awfully fast but not feeling like a major rewrite + +1.97 [2006-11-30] + - 1.95 broke building in Win32 (since pp_stat is not exported), + figured out how to call an op directly in 5.005 (use Perl_ppaddr + instead of PL_ppaddr) + - backport to Perl 5.004_05 (requires using statcache + and laststatval instead of PL_statcache and PL_laststatval) + (also checked to work in 5.005_04, 5.6.1, and 5.8.8 with threads) + +1.96 [2006-11-30] + - 1.95 broke builds for threaded Perls, rt.cpan.org tickets: + [rt.cpan.org #23694] Time::HiRes fails tests on Solaris and Perl 5.6.1 + [rt.cpan.org #23712] Time-HiRes 1.95 Fails make on AIX 5.2 with Perl 5.8.8 + [rt.cpan.org #23730] Time::HiRes 1.95 fails make on MacOS X 10.3.9/perl 5.8.8 - use main() prototype consistently in Makefile.PL -1.95 [2006-29-11] +1.95 [2006-11-29] - integrate core change #29180: Silence VC++ compiler warnings from Steve Hay - do not use PL_ppaddr in stat() because that is not available @@ -12,6 +34,7 @@ Revision history for the Perl extension Time::HiRes. - regenerate fallback/*.inc for older Perls without ExtUtils::Constant because of d_hires_stat, resolves [rt.cpan.org #23694] Time::HiRes fails tests on Solaris and Perl 5.6.1 + - Make Makefile.PL more defensive against false PERL_CORE 1.94 [2006-10-16] - file timestamps oddities seen: the atime and mtime diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index 2c014b2..e75eddd 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -23,7 +23,7 @@ require DynaLoader; stat ); -$VERSION = '1.96_01'; +$VERSION = '1.9702'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index 5d38fc5..97dbb59 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -66,20 +66,6 @@ extern "C" { # undef ITIMER_REALPROF #endif -/* 5.004 doesn't define PL_sv_undef */ -#ifndef ATLEASTFIVEOHOHFIVE -# ifndef PL_sv_undef -# define PL_sv_undef sv_undef -# endif -#endif - -/* PL_ppaddr is not available in Perl 5.005_04 */ -#if (PERL_VERSION < 5) || (PERL_VERSION == 5 && PERL_SUBVERSION <50) -# ifndef PL_ppaddr -# define PL_ppaddr ppaddr -# endif -#endif - #if defined(TIME_HIRES_CLOCK_GETTIME) && defined(_STRUCT_ITIMERSPEC) /* HP-UX has CLOCK_XXX values but as enums, not as defines. @@ -727,7 +713,7 @@ myNVtime() static void hrstatns(UV atime, UV mtime, UV ctime, UV *atime_nsec, UV *mtime_nsec, UV *ctime_nsec) { - dTHX; + dTHXR; *atime_nsec = 0; *mtime_nsec = 0; *ctime_nsec = 0; @@ -772,12 +758,12 @@ BOOT: MY_CXT_INIT; #endif #ifdef ATLEASTFIVEOHOHFIVE -#ifdef HAS_GETTIMEOFDAY +# ifdef HAS_GETTIMEOFDAY { hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2IV(myNVtime)), 0); hv_store(PL_modglobal, "Time::U2time", 12, newSViv(PTR2IV(myU2time)), 0); } -#endif +# endif #endif } @@ -1220,13 +1206,12 @@ void stat(...) PROTOTYPE: ;$ PPCODE: - dTHX; PUSHMARK(SP); XPUSHs(sv_2mortal(newSVsv(items == 1 ? ST(0) : DEFSV))); PUTBACK; ENTER; PL_laststatval = -1; - (void)*(PL_ppaddr[OP_STAT])(aTHX); + (void)*(PL_ppaddr[OP_STAT])(aTHXR); SPAGAIN; LEAVE; if (PL_laststatval == 0) { diff --git a/ext/Time/HiRes/Makefile.PL b/ext/Time/HiRes/Makefile.PL index bf2c024..2f5081c 100644 --- a/ext/Time/HiRes/Makefile.PL +++ b/ext/Time/HiRes/Makefile.PL @@ -102,6 +102,16 @@ sub try_compile_and_link { $COREincdir = File::Spec->catdir($Config{'archlibexp'}, 'CORE'); } + if ($ENV{PERL_CORE}) { + unless (-f File::Spec->catfile($COREincdir, "EXTERN.h")) { + die <<__EOD__; +Your environment variable PERL_CORE is '$ENV{PERL_CORE}' but there +is no EXTERN.h in $COREincdir. +Cannot continue, aborting. +__EOD__ + } + } + my $ccflags = $Config{'ccflags'} . ' ' . "-I$COREincdir"; if ($^O eq 'VMS') { diff --git a/ext/Time/HiRes/t/HiRes.t b/ext/Time/HiRes/t/HiRes.t index 2ef3b2b..c4c2d6b 100644 --- a/ext/Time/HiRes/t/HiRes.t +++ b/ext/Time/HiRes/t/HiRes.t @@ -16,7 +16,7 @@ BEGIN { $| = 1; print "1..38\n"; } END { print "not ok 1\n" unless $loaded } -use Time::HiRes 1.93; # Remember to bump this once in a while. +use Time::HiRes 1.9701; # Remember to bump this once in a while. use Time::HiRes qw(tv_interval); $loaded = 1; @@ -581,7 +581,7 @@ if ($have_clock) { print "# clock = @clock\n"; } if ($clock[0] >= 0 && - $clock[1] > $clock[0] && + $clock[1] > $clock[0] && $clock[2] > $clock[1] && $clock[3] > $clock[2]) { print "ok 33\n";