This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for b5b6210a9/#46947
[perl5.git] / time64.c
index 555286b..74914bd 100644 (file)
--- a/time64.c
+++ b/time64.c
@@ -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);