From: Rafael Garcia-Suarez Date: Fri, 1 Dec 2006 10:26:48 +0000 (+0100) Subject: Fix Time-HiRes linker error on Win32 introduced by upgrades X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9ab5773ab03c0291526c156de00ac54d29be095;p=p5sagit%2Fp5-mst-13.2.git Fix Time-HiRes linker error on Win32 introduced by upgrades from version 1.94 (#29423 and #29426) Subject: Re: Time::HiRes not happy? From: "Rafael Garcia-Suarez" Message-ID: p4raw-id: //depot/perl@29428 --- diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index 132d023..2c014b2 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -23,7 +23,7 @@ require DynaLoader; stat ); -$VERSION = '1.96'; +$VERSION = '1.96_01'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index 3071925..5d38fc5 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -73,6 +73,13 @@ extern "C" { # 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. @@ -1219,7 +1226,7 @@ PROTOTYPE: ;$ PUTBACK; ENTER; PL_laststatval = -1; - pp_stat(); + (void)*(PL_ppaddr[OP_STAT])(aTHX); SPAGAIN; LEAVE; if (PL_laststatval == 0) {