From: Craig A. Berry Date: Fri, 9 Jan 2009 18:55:45 +0000 (-0600) Subject: fake_localtime_r and fake_gmtime_r may need thread context. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=478780ab3df0743bf944175d5aa87dba462c40e8;p=p5sagit%2Fp5-mst-13.2.git fake_localtime_r and fake_gmtime_r may need thread context. They definitely need it on VMS. --- diff --git a/time64.c b/time64.c index 3ac6707..c357ce1 100644 --- a/time64.c +++ b/time64.c @@ -332,6 +332,7 @@ void copy_big_TM_to_little_tm(const struct TM *src, struct tm *dest) { /* Simulate localtime_r() to the best of our ability */ struct tm * fake_localtime_r(const time_t *clock, struct tm *result) { + dTHX; /* in case the following is defined as Perl_my_localtime(aTHX_ ...) */ const struct tm *static_result = localtime(clock); assert(result != NULL); @@ -349,6 +350,7 @@ struct tm * fake_localtime_r(const time_t *clock, struct tm *result) { /* Simulate gmtime_r() to the best of our ability */ struct tm * fake_gmtime_r(const time_t *clock, struct tm *result) { + dTHX; /* in case the following is defined as Perl_my_gmtime(aTHX_ ...) */ const struct tm *static_result = gmtime(clock); assert(result != NULL);