diff options
author | Craig A. Berry <craigberry@mac.com> | 2014-06-27 07:58:42 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2014-06-27 07:58:42 -0500 |
commit | c97ab48957e7f73939e2a77e6312b44dc2408398 (patch) | |
tree | 8f1a305ff16bd91a0c34e31e6e1f00792079f435 /time64.c | |
parent | ae7c5b9bcea1e06708978024a3f9c6409468ad51 (diff) | |
download | perl-c97ab48957e7f73939e2a77e6312b44dc2408398.tar.gz |
Time functions in time64.c need thread context on VMS.
In order to support the C<vmsish 'time'> pragma, the wrappers for
gmtime and localtime need thread context, which in the case of
localtime was removed in 23491f1decae17401c5. Add it back but
make it VMS-specific and turn the comment indicating why it's
there into a more direct statement.
Diffstat (limited to 'time64.c')
-rw-r--r-- | time64.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -300,8 +300,8 @@ static void S_copy_little_tm_to_big_TM(const struct tm *src, struct TM *dest) { #ifndef HAS_LOCALTIME_R /* Simulate localtime_r() to the best of our ability */ static struct tm * S_localtime_r(const time_t *clock, struct tm *result) { -#ifdef VMS - dTHX; /* in case the following is defined as Perl_my_localtime(aTHX_ ...) */ +#ifdef __VMS + dTHX; /* the following is defined as Perl_my_localtime(aTHX_ ...) */ #endif const struct tm *static_result = localtime(clock); @@ -321,6 +321,9 @@ static struct tm * S_localtime_r(const time_t *clock, struct tm *result) { #ifndef HAS_GMTIME_R /* Simulate gmtime_r() to the best of our ability */ static struct tm * S_gmtime_r(const time_t *clock, struct tm *result) { +#ifdef __VMS + dTHX; /* the following is defined as Perl_my_localtime(aTHX_ ...) */ +#endif const struct tm *static_result = gmtime(clock); assert(result != NULL); |