Skip Menu |

This queue is for tickets about the Time-HiRes CPAN distribution.

Report information
The Basics
Id: 102799
Status: resolved
Priority: 0/
Queue: Time-HiRes

People
Owner: Nobody in particular
Requestors: BULKDD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.9726
Fixed in: (no value)



Subject: [PATCH] remove pre-5.6 threads leftovers
Time-HiRes has had a min ver of 5.6.0 since release 1.9724 in 2011. dTHXR and aTHXR are for 5.005 threads compat but they are pointless since there is usage of "unsafe" dTHX in other places in Time-HiRes currently. Perl's headers don't define those 2 "R" macros, so they were defined to >= 5.6.0 threads in ppport.h. By switching to the modern >=5.6.0 macros, ppport.h is only used to allow Time::HiRes to run on old perls, not the other direction of using ppport.h to allow ancient XS (Time::HiRes in this case) code to run on newer perls. This patch is split off a p5p patch that may or may not be accepted to use an empty ppport.h on blead, so this patch allows HiRes to compile on blead perl with an empty ppport.h.
forgot attachment
Subject: 0001-remove-pre-5.6-threads-leftovers.patch
From 8ff7234d828082af33e4fbc7f6432c38a929c128 Mon Sep 17 00:00:00 2001 From: Daniel Dragan <bulk88@hotmail.com> Date: Mon, 16 Mar 2015 05:08:40 -0400 Subject: [PATCH] remove pre-5.6 threads leftovers Time-HiRes has had a min ver of 5.6.0 since release 1.9724 in 2011. dTHXR and aTHXR are for 5.005 threads compat but they are pointless since there is usage of "unsafe" dTHX in other places in Time-HiRes currently. Perl's headers don't define those 2 "R" macros, so they were defined to >= 5.6.0 threads in ppport.h. By switching to the modern >=5.6.0 macros, ppport.h is only used to allow Time::HiRes to run on old perls, not the other direction of using ppport.h to allow ancient XS (Time::HiRes in this case) code to run on newer perls. This patch is split off a p5p patch that may or may not be accepted to use an empty ppport.h on blead, so this patch allows HiRes to compile on blead perl with an empty ppport.h. --- cpan/Time-HiRes/HiRes.xs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpan/Time-HiRes/HiRes.xs b/cpan/Time-HiRes/HiRes.xs index 96640e9..9a852c4 100644 --- a/cpan/Time-HiRes/HiRes.xs +++ b/cpan/Time-HiRes/HiRes.xs @@ -731,7 +731,7 @@ myNVtime() static void hrstatns(UV *atime_nsec, UV *mtime_nsec, UV *ctime_nsec) { - dTHXR; + dTHX; #if TIME_HIRES_STAT == 1 *atime_nsec = PL_statcache.st_atimespec.tv_nsec; *mtime_nsec = PL_statcache.st_mtimespec.tv_nsec; @@ -1284,7 +1284,7 @@ PROTOTYPE: ;$ fakeop.op_flags = GIMME_V == G_ARRAY ? OPf_WANT_LIST : GIMME_V == G_SCALAR ? OPf_WANT_SCALAR : OPf_WANT_VOID; PL_op = &fakeop; - (void)fakeop.op_ppaddr(aTHXR); + (void)fakeop.op_ppaddr(aTHX); SPAGAIN; LEAVE; nret = SP+1 - &ST(0); -- 1.8.0.msysgit.0
Bump.
I have applied this to https://github.com/rjbs/Time-HiRes which I will be using as a temporary staging repo to make dev releases. These will go into blead and CPAN. (The repo itself will probably go away afterward.) -- rjbs