}
/*}}}*/
-
+#if __VMS_VER < 70000000 || __DECC_VER < 50200000
/* Used for UTC calculation in my_gmtime(), my_localtime(), my_time(),
* my_utime(), and flex_stat(), all of which operate on UTC unless
* VMSISH_TIMES is true.
#define localtime(t) my_localtime(t)
#define time(t) my_time(t)
+#endif /* VMS VER < 7.0 || Dec C < 5.2
/* my_utime - update modification time of a file
* calling sequence is identical to POSIX utime(), but under
*/
lowbit = (utimes->modtime & 1) ? secscale : 0;
unixtime = (long int) utimes->modtime;
-# ifdef VMSISH_TIME
+#if defined(VMSISH_TIME) && (__VMS_VER < 70000000 || __DECC_VER < 50200000)
if (!VMSISH_TIME) { /* Input was UTC; convert to local for sys svc */
if (!gmtime_emulation_type) (void) time(NULL); /* Initialize UTC */
unixtime += utc_offset_secs;
# else
if (1) {
# endif
+#if __VMS_VER < 70000000 || __DECC_VER < 50200000
if (!gmtime_emulation_type) (void)time(NULL);
statbufp->st_mtime -= utc_offset_secs;
statbufp->st_atime -= utc_offset_secs;
statbufp->st_ctime -= utc_offset_secs;
+#endif
}
return 0;
}
# else
if (1) {
# endif
+#if __VMS_VER < 70000000 || __DECC_VER < 50200000
if (!gmtime_emulation_type) (void)time(NULL);
statbufp->st_mtime -= utc_offset_secs;
statbufp->st_atime -= utc_offset_secs;
statbufp->st_ctime -= utc_offset_secs;
+#endif
}
}
return retval;
# define seekdir Perl_seekdir
# define closedir Perl_closedir
# define vmsreaddirversions Perl_vmsreaddirversions
+#if __VMS_VER < 70000000 || __DECC_VER < 50200000
# define my_gmtime Perl_my_gmtime
# define my_localtime Perl_my_localtime
# define my_time Perl_my_time
+#endif
# define cando_by_name Perl_cando_by_name
# define flex_fstat Perl_flex_fstat
# define flex_stat Perl_flex_stat
* in VMS 6.0 or later use. We also add shims for time() and localtime()
* so we can run on UTC by default.
*/
+#if __VMS_VER < 70000000 || __DECC_VER < 50200000
#define gmtime(t) my_gmtime(t)
#define localtime(t) my_localtime(t)
#define time(t) my_time(t)
+#endif
/* VMS doesn't use a real sys_nerr, but we need this when scanning for error
* messages in text strings . . .
void seekdir _((DIR *, long));
void closedir _((DIR *));
void vmsreaddirversions _((DIR *, int));
+#ifdef my_gmtime
struct tm * my_gmtime _((const time_t *));
struct tm * my_localtime _((const time_t *));
time_t my_time _((time_t *));
+#endif /* We're assuming these three come as a package */
I32 cando_by_name _((I32, I32, char *));
int flex_fstat _((int, struct mystat *));
int flex_stat _((char *, struct mystat *));