From: Steve Peters Date: Thu, 30 Nov 2006 14:11:57 +0000 (+0000) Subject: Upgrade to Time-HiRes-1.96. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71ac54769aee87355e067f835ee5a5d6ba12b116;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Time-HiRes-1.96. p4raw-id: //depot/perl@29426 --- diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes index e9061a7..28a60c9 100644 --- a/ext/Time/HiRes/Changes +++ b/ext/Time/HiRes/Changes @@ -1,5 +1,9 @@ Revision history for the Perl extension Time::HiRes. +1.96 [2006-30-11] + - 1.95 broke builds for threaded Perls + - use main() prototype consistently in Makefile.PL + 1.95 [2006-29-11] - integrate core change #29180: Silence VC++ compiler warnings from Steve Hay @@ -8,7 +12,6 @@ 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 39c743d..132d023 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -23,7 +23,7 @@ require DynaLoader; stat ); -$VERSION = '1.95'; +$VERSION = '1.96'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index a33e190..3071925 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -1213,16 +1213,18 @@ 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); + pp_stat(); SPAGAIN; LEAVE; if (PL_laststatval == 0) { - /* We assume that pp_stat() left us with 13 valid stack items. */ + /* We assume that pp_stat() left us with 13 valid stack items, + * and that the timestamps are at offsets 8, 9, and 10. */ UV atime = SvUV(ST( 8)); UV mtime = SvUV(ST( 9)); UV ctime = SvUV(ST(10)); diff --git a/ext/Time/HiRes/Makefile.PL b/ext/Time/HiRes/Makefile.PL index bd2b64b..bf2c024 100644 --- a/ext/Time/HiRes/Makefile.PL +++ b/ext/Time/HiRes/Makefile.PL @@ -102,15 +102,6 @@ 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 \$ENV{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') { @@ -252,7 +243,7 @@ sub has_nanosleep { /* int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); */ -int main() { +int main _((int argc, char** argv, char** env)) { struct timespec ts1, ts2; int ret; ts1.tv_sec = 0; @@ -605,7 +596,7 @@ EOD if (try_compile_and_link(< -int main() { +int main _((int argc, char** argv, char** env)) { struct stat st; st.st_atimespec.tv_nsec = 0; } @@ -625,7 +616,7 @@ EOM if (try_compile_and_link(< -int main() { +int main _((int argc, char** argv, char** env)) { struct stat st; st.st_atimensec = 0; } @@ -645,7 +636,7 @@ EOM if (try_compile_and_link(< -int main() { +int main _((int argc, char** argv, char** env)) { struct stat st; st.st_atime_n = 0; } @@ -665,7 +656,7 @@ EOM if (try_compile_and_link(< -int main() { +int main _((int argc, char** argv, char** env)) { struct stat st; st.st_atim.tv_nsec = 0; } @@ -685,7 +676,7 @@ EOM if (try_compile_and_link(< -int main() { +int main _((int argc, char** argv, char** env)) { struct stat st; st.st_uatime = 0; } @@ -844,7 +835,6 @@ NOTE: if you get an error like this (the Makefile line number may vary): Makefile:91: *** missing separator then set the environment variable LC_ALL to "C" and retry from scratch (re-run perl "Makefile.PL"). -(And consider upgrading your Perl.) EOM } }